WIP Functionality to request wines for next lottery #24
@@ -1,30 +1,40 @@
|
|||||||
|
|
|||||||
<template>
|
<template>
|
||||||
<main>
|
<main>
|
||||||
<h1>
|
<h1>
|
||||||
Alle viner
|
Alle viner foreslåtte viner
|
||||||
|
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
|
|||||||
</h1>
|
</h1>
|
||||||
<section>
|
<section class="requested-wines-container">
|
||||||
|
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
|
|||||||
{{this.wines}}
|
<RequestedWineCard v-for="requestedEl in wines" :key="requestedEl.id" :requestedElement="requestedEl" />
|
||||||
|
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
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { allRequestedWines } from "@/api";
|
import { allRequestedWines } from "@/api";
|
||||||
|
import RequestedWineCard from "@/ui/RequestedWineCard";
|
||||||
|
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
|
|||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
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
|
||||||
|
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
|
|||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
wines: undefined
|
wines: undefined,
|
||||||
|
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
|
|||||||
|
canRequest: true
|
||||||
|
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
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const wines = await allRequestedWines();
|
const wines = await allRequestedWines();
|
||||||
this.wines = wines
|
this.wines = wines
|
||||||
|
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
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
|
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{
|
||||||
|
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
|
|||||||
|
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`.
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
|
|||||||
|
justify-content: space-around;
|
||||||
|
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
|
|||||||
|
flex-flow: row wrap;
|
||||||
|
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
|
|||||||
|
align-items: stretch
|
||||||
|
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
|
|||||||
</style>
|
</style>
|
||||||
@@ -97,4 +97,5 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding: 20px 10px;
|
padding: 20px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
72
src/ui/RequestedWineCard.vue
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
Vinnere ? Vinnere ?
fixed fixed
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<template>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<div class="requested-wine">
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<img
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
v-if="wine.image"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
:src="wine.image"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
class="wine-image"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
:class="{ 'fullscreen': fullscreen }"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
/>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<img v-else class="wine-placeholder" alt="Wine image" />
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<section class="wine-info">
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<h3 v-if="wine.name">{{ wine.name }}</h3>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<h3 v-else>(no name)</h3>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<p>Antall ganger denne har blitt foreslått: {{requestedElement.count}}</p>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<section class="buttons">
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<button class="vin-button" @click="request(wine)" v-if="!locallyRequested">Foreslå denne</button>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<a
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
v-if="wine.vivinoLink"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
:href="wine.vivinoLink"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
class="wine-link"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
>Les mer på polet</a>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
</section>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
</section>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
</div>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
</template>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<script>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
export default {
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
data(){
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
return {
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
wine: this.requestedElement.wine,
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
locallyRequested: false
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
}
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
},
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
props: {
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
requestedElement: {
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
required: true,
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
type: Object
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
}
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
},
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
methods: {
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
request(wine){
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
this.locallyRequested = true
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
// wine.requested = true
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
this.requestedElement.count = this.requestedElement.count +1
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
const options = {
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
body: JSON.stringify({
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
wine: wine
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
}),
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
headers: {
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
'Accept': 'application/json',
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
'Content-Type': 'application/json'
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
},
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
method: "post"
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
}
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
fetch("http://localhost:30030/api/request", options)
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
.then(res => res.json())
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
},
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
},
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
}
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
</script>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
<style lang="scss" scoped>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
.requested-wine{
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
padding: 20px;
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
border-radius: 1px;
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
margin: 1rem 0;
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
-webkit-box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.65);
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
-moz-box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.65);
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.65);
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
}
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
fixed fixed
🤷♂️ fixed 🤷♂️ fixed
|
|||||||
|
</style>
|
||||||
|
Rename too Rename too `wineDeleted` and emit the wine element.
Vinnere ? Vinnere ?
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