WIP Functionality to request wines for next lottery #24

Merged
Adrianht merged 23 commits from feat/request-wine into master 2020-09-07 14:28:31 +00:00
7 changed files with 12 additions and 12 deletions
Showing only changes of commit ed6ac2ac01 - Show all commits

View File

@@ -27,6 +27,12 @@ router.route("/request").get(async (req, res) => {
return res.send(rWines)
})
router.route("/request/all").get(async (req, res) => {
const allWines = await RequestedWine.find({}).populate("wine");
res.json(allWines);
});
router.route("/request").post(async (req, res) => {
const {wine} = req.body

View File

@@ -104,12 +104,6 @@ router.route("/highscore/statistics").get(async (req, res) => {
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
res.json(highscore);
});
router.route("/wines/all-requested-wines").get(async (req, res) => {
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
const allWines = await RequestedWine.find({}).populate("wine");
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
res.json(allWines);
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
});
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
router.route("/wines/statistics").get(async (req, res) => {
const wines = await Wine.find();
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:10 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
KevinMidboe commented 2020-09-07 14:00:13 +00:00 (Migrated from github.com)
Review

Remove

Remove
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:49 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:52 +00:00 (Migrated from github.com)
Review

fixed

fixed

View File

@@ -18,7 +18,7 @@ const convertToOurWineObject = wine => {
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
rating: wine.basic.alcoholContent,
occurences: 0,
id: wine.basic.productId,
image: `https://bilder.vinmonopolet.no/cache/300x300-0/${wine.basic.productId}-1.jpg`,
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
image: `https://bilder.vinmonopolet.no/cache/500x500-0/${wine.basic.productId}-1.jpg`,
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
price: wine.prices[0].salesPrice.toString(),
country: wine.origins.origin.country
}
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
KevinMidboe commented 2020-09-07 14:00:35 +00:00 (Migrated from github.com)
Review

Is this used?

Is this used?
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 14:23:56 +00:00 (Migrated from github.com)
Review

fixed

fixed

View File

@@ -25,7 +25,7 @@ const overallWineStatistics = () => {
};
const allRequestedWines = () => {
const url = new URL("/api/wines/all-requested-wines", BASE_URL);
const url = new URL("/api/request/all", BASE_URL);
return fetch(url.href).then(resp => resp.json());
};

View File

@@ -7,7 +7,7 @@
v-if="showModal"
modalText="Ønsket ditt har blitt lagt til"
:buttons="modalButtons"
@modalBtnClicked="emitFromModalButton"
@click="emitFromModalButton"
></Modal>
<section>
<section class="search-section">

View File

@@ -38,7 +38,7 @@ export default {
},
methods:{
modalButtonClicked(action){
this.$emit('modalBtnClicked', action)
this.$emit('click', action)
}
}
}

View File

@@ -19,9 +19,9 @@
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed
class="wine-link"
>Les mer polet</a>
</section>
<button @click="deleteWine(wine)">
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed
<!-- <button @click="deleteWine(wine)">
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed
Slett vinen
</button>
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed
</button> -->
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed
</section>
</div>
</template>
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:34:04 +00:00 (Migrated from github.com)
Review

Rename too wineDeleted and emit the wine element.

Rename too `wineDeleted` and emit the wine element.
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
KevinMidboe commented 2020-09-07 08:35:18 +00:00 (Migrated from github.com)
Review

Vinnere ?

Vinnere ?
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:55:58 +00:00 (Migrated from github.com)
Review

fixed

fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed
Adrianht commented 2020-09-07 13:56:06 +00:00 (Migrated from github.com)
Review

🤷‍♂️ fixed

🤷‍♂️ fixed