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
2 changed files with 4 additions and 27 deletions
Showing only changes of commit e060ff3aaa - Show all commits

View File

@@ -48,7 +48,7 @@
</template>
<script>
import { searchForWine } from "@/api";
import { searchForWine, requestNewWine } from "@/api";
import Wine from "@/ui/Wine";
import Modal from "@/ui/Modal";
@@ -84,19 +84,7 @@ export default {
}
},
request(wine){
const options = {
body: JSON.stringify({
wine: wine
}),
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: "post"
}
fetch("http://localhost:30030/api/request/new-wine", options)
.then(res => res.json())
requestNewWine(wine)
.then(() => this.showModal = true)
},
emitFromModalButton(action){

View File

@@ -27,7 +27,7 @@
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
</template>
<script>
import { deleteRequestedWine } from "@/api";
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
import { deleteRequestedWine, requestNewWine } from "@/api";
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
export default {
data(){
@@ -46,18 +46,7 @@ export default {
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
request(wine){
this.locallyRequested = true
this.requestedElement.count = this.requestedElement.count +1
const options = {
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
body: JSON.stringify({
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
wine: 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
}),
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
headers: {
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
'Accept': 'application/json',
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
'Content-Type': 'application/json'
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
},
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
method: "post"
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
}
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
fetch("http://localhost:30030/api/request/new-wine", options)
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
.then(res => res.json())
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
requestNewWine(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
},
async deleteWine(wine) {
if (window.confirm("Er du sikker på at du vil slette vinen?")) {
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