release v2.0.0 #4
|
@ -112,9 +112,9 @@
|
||||||
<q-input
|
<q-input
|
||||||
v-model="cost_per_volume"
|
v-model="cost_per_volume"
|
||||||
class="col-xs-12 col-sm-6 q-pa-sm q-pb-lg"
|
class="col-xs-12 col-sm-6 q-pa-sm q-pb-lg"
|
||||||
:outlined="auto_cost_per_volume"
|
:outlined="auto_cost_per_volume || hasIngredients"
|
||||||
:filled="!auto_cost_per_volume"
|
:filled="!auto_cost_per_volume && !hasIngredients"
|
||||||
:readonly="auto_cost_per_volume"
|
:readonly="auto_cost_per_volume || hasIngredients"
|
||||||
label="Preis pro L"
|
label="Preis pro L"
|
||||||
hint="Inkl. 19% Mehrwertsteuer"
|
hint="Inkl. 19% Mehrwertsteuer"
|
||||||
suffix="€"
|
suffix="€"
|
||||||
|
@ -315,6 +315,8 @@ export default defineComponent({
|
||||||
set: (val: number) => ((<Drink>edit_drink.value).cost_per_volume = val),
|
set: (val: number) => ((<Drink>edit_drink.value).cost_per_volume = val),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const hasIngredients = computed(() => edit_volumes.value?.some(a => a.ingredients.length > 0))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
edit_drink,
|
edit_drink,
|
||||||
save,
|
save,
|
||||||
|
@ -338,6 +340,7 @@ export default defineComponent({
|
||||||
cost_per_volume,
|
cost_per_volume,
|
||||||
edit_volumes,
|
edit_volumes,
|
||||||
key,
|
key,
|
||||||
|
hasIngredients,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue