WIP Functionality to request wines for next lottery #24
@@ -101,7 +101,7 @@ const winners = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const deleteRequestedWine = wineToBeDeleted => {
|
const deleteRequestedWine = wineToBeDeleted => {
|
||||||
console.log("when do i get here", wineToBeDeleted)
|
|
||||||
const url = new URL("api/request", BASE_URL);
|
const url = new URL("api/request", BASE_URL);
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
|||||||
Alle foreslåtte viner
|
Alle foreslåtte viner
|
||||||
</h1>
|
</h1>
|
||||||
<section class="requested-wines-container">
|
<section class="requested-wines-container">
|
||||||
|
<p v-if="this.wines.length <= 0">Ingen har foreslått noe enda!</p>
|
||||||
|
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
fixed fixed
fixed fixed
fixed fixed
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
fixed fixed
|
|||||||
<RequestedWineCard v-for="requestedEl in wines" :key="requestedEl.id" :requestedElement="requestedEl" @deletedOne="refreshData" />
|
<RequestedWineCard v-for="requestedEl in wines" :key="requestedEl.id" :requestedElement="requestedEl" @deletedOne="refreshData" />
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
@@ -35,6 +36,9 @@ export default {
|
|||||||
|
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
fixed fixed
fixed fixed
fixed fixed
fixed fixed
fixed fixed
fixed fixed
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
fixed fixed
fixed fixed
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
h1{
|
||||||
|
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
fixed fixed
fixed fixed
fixed fixed
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
fixed fixed
|
|||||||
|
text-align: center;
|
||||||
|
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
fixed fixed
fixed fixed
fixed fixed
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
fixed fixed
|
|||||||
|
}
|
||||||
|
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
fixed fixed
fixed fixed
fixed fixed
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
fixed fixed
|
|||||||
|
|
||||||
.requested-wines-container{
|
.requested-wines-container{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
|
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
This is in the template which is scoped to This is in the template which is scoped to `this` so we can write: `wines == undefined`. Also the length of a list will not be less that zero so change check to be `wines.length == 0`.
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Shorthand would be Shorthand would be `this.wines = await allRequestedWines() || [];`
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
Could the item deleted be sent up here and we filter it away instead of making a new request? Could the item deleted be sent up here and we filter it away instead of making a new request?
fixed fixed
fixed fixed
fixed fixed
fixed fixed
fixed fixed
fixed fixed
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
```suggestion
[this.wines, this.isAdmin] = await allRequestedWines() || [[], false]
```
fixed fixed
fixed fixed
|
|||||||
This is in the template which is scoped to
thisso we can write:wines == undefined. Also the length of a list will not be less that zero so change check to bewines.length == 0.This is in the template which is scoped to
thisso we can write:wines == undefined. Also the length of a list will not be less that zero so change check to bewines.length == 0.Shorthand would be
this.wines = await allRequestedWines() || [];Shorthand would be
this.wines = await allRequestedWines() || [];Could the item deleted be sent up here and we filter it away instead of making a new request?
Could the item deleted be sent up here and we filter it away instead of making a new request?
fixed
fixed
fixed
fixed
fixed
fixed
fixed
fixed