Bugfix Edit Pricelist

Gastro kann nur noch unter /gastro/pricelist und nicht unter /pricelist die preise ändern.
This commit is contained in:
Tim Gröger 2020-07-27 09:31:07 +02:00
parent 05a486a6d3
commit cc39796243
1 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,7 @@
<v-icon>{{ searchIcon }}</v-icon> <v-icon>{{ searchIcon }}</v-icon>
</template> </template>
</v-text-field> </v-text-field>
<v-dialog v-model="dialog" v-if="isGastro"> <v-dialog v-model="dialog" v-if="isGastro && isGastroPage">
<template v-slot:activator="{ on }"> <template v-slot:activator="{ on }">
<v-btn <v-btn
fab fab
@ -190,7 +190,7 @@
</v-icon> </v-icon>
</template> </template>
</v-data-table> </v-data-table>
<v-card tile v-if="isGastro" :loading="typesLoading"> <v-card tile v-if="isGastro && isGastroPage" :loading="typesLoading">
<v-card-title> <v-card-title>
Kategorien Kategorien
<v-spacer /> <v-spacer />
@ -442,6 +442,9 @@ export default {
typesLoading: 'priceList/typesLoading', typesLoading: 'priceList/typesLoading',
isGastro: 'isGastro' isGastro: 'isGastro'
}), }),
isGastroPage() {
return this.$route.name === 'gastroPricelist'
},
formTitle() { formTitle() {
return this.editedIndex === -1 ? 'Neues Getränk' : 'Bearbeite Getränk' return this.editedIndex === -1 ? 'Neues Getränk' : 'Bearbeite Getränk'
}, },
@ -473,7 +476,7 @@ export default {
created() { created() {
this.getPriceList() this.getPriceList()
this.getTypes() this.getTypes()
if (this.isGastro) { if (this.isGastro && this.isGastroPage) {
this.headers.push({ this.headers.push({
text: 'Aktion', text: 'Aktion',
value: 'action', value: 'action',
@ -481,6 +484,7 @@ export default {
filterable: false filterable: false
}) })
} }
console.log(this.$route)
}, },
watch: { watch: {
dialog(val) { dialog(val) {