WIP Refactor - Requested wines ui #53

Merged
KevinMidboe merged 20 commits from refactor/requested-wines-ui into master 2020-11-02 14:20:21 +00:00
Showing only changes of commit 40d5062d2f - Show all commits

View File

@@ -54,12 +54,16 @@ export default {
} }
}, },
methods: { methods: {
request(wine){ request(){
if (this.locallyRequested)
return
console.log("requesting", this.wine)
this.locallyRequested = true this.locallyRequested = true
this.requestedElement.count = this.requestedElement.count +1 this.requestedElement.count = this.requestedElement.count +1
requestNewWine(wine) requestNewWine(this.wine)
}, },
async deleteWine(wine) { async deleteWine() {
const wine = this.wine
if (window.confirm("Er du sikker på at du vil slette vinen?")) { if (window.confirm("Er du sikker på at du vil slette vinen?")) {
let response = await deleteRequestedWine(wine); let response = await deleteRequestedWine(wine);
if (response['success'] == true) { if (response['success'] == true) {