[pricelist] dont show 'add ingredients' if cost_per_volume exists

This commit is contained in:
Tim Gröger 2021-04-14 19:13:47 +02:00
parent 851c5a0588
commit 43397fe3a7
3 changed files with 6 additions and 3 deletions

View File

@ -31,8 +31,7 @@ export default defineComponent({
name: 'BuildManual', name: 'BuildManual',
props: { props: {
steps: { steps: {
type: (Array as PropType<Array<string>>) || undefined, type: Array as PropType<Array<string>>,
required: true,
}, },
editable: { editable: {
type: Boolean, type: Boolean,

View File

@ -95,7 +95,7 @@
</div> </div>
<div class="q-pa-sm"> <div class="q-pa-sm">
<ingredients <ingredients
v-if="!public" v-if="!public && !cost_per_volume"
v-model="volume.ingredients" v-model="volume.ingredients"
:editable="editable" :editable="editable"
@update="updateVolume(volume)" @update="updateVolume(volume)"
@ -130,6 +130,9 @@ export default defineComponent({
type: Array as PropType<Array<DrinkPriceVolume>>, type: Array as PropType<Array<DrinkPriceVolume>>,
required: true, required: true,
}, },
cost_per_volume: {
type: undefined
},
editable: { editable: {
type: Boolean, type: Boolean,
default: false, default: false,

View File

@ -125,6 +125,7 @@
<q-card-section :key="key"> <q-card-section :key="key">
<drink-price-volumes <drink-price-volumes
v-model="edit_volumes" v-model="edit_volumes"
:cost_per_volume='cost_per_volume'
editable editable
@update="updateVolume" @update="updateVolume"
@delete-volume="deleteVolume" @delete-volume="deleteVolume"