[pricelist] fix some merge issues
This commit is contained in:
parent
3eea079871
commit
0d044b505a
|
@ -120,27 +120,6 @@
|
|||
/>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="drink_type" :props="drinks_props">
|
||||
{{ drinks_props.row.type.name }}
|
||||
<q-popup-edit
|
||||
v-slot="scope"
|
||||
v-model="drinks_props.row.type"
|
||||
buttons
|
||||
label-cancel="Abbrechen"
|
||||
label-set="Speichern"
|
||||
@update:modelValue="updateDrink(drinks_props.row)"
|
||||
>
|
||||
<q-select
|
||||
v-model="scope.value"
|
||||
:options="drinkTypes"
|
||||
option-label="name"
|
||||
filled
|
||||
dense
|
||||
autofocus
|
||||
@keyup.enter="scope.set"
|
||||
/>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="article_id" :props="drinks_props">
|
||||
{{ drinks_props.row.article_id || 'o.A.' }}
|
||||
<q-popup-edit
|
||||
|
@ -161,6 +140,28 @@
|
|||
/>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="drink_type" :props="drinks_props">
|
||||
{{ drinks_props.row.type.name }}
|
||||
<q-popup-edit
|
||||
v-slot="scope"
|
||||
v-model="drinks_props.row.type"
|
||||
buttons
|
||||
label-cancel="Abbrechen"
|
||||
label-set="Speichern"
|
||||
@update:modelValue="updateDrink(drinks_props.row)"
|
||||
>
|
||||
<q-select
|
||||
v-model="scope.value"
|
||||
:options="drinkTypes"
|
||||
option-label="name"
|
||||
option-value='id'
|
||||
filled
|
||||
dense
|
||||
autofocus
|
||||
@keyup.enter="scope.set"
|
||||
/>
|
||||
</q-popup-edit>
|
||||
</q-td>
|
||||
<q-td key="volume_package" :props="drinks_props">
|
||||
{{ drinks_props.row.volume ? `${drinks_props.row.volume} L` : 'o.A.' }}
|
||||
<q-popup-edit
|
||||
|
@ -305,8 +306,8 @@
|
|||
@update:modelValue="updateDrink(drinks_props.row)"
|
||||
>
|
||||
<q-input
|
||||
type="textarea"
|
||||
v-model="scope.value"
|
||||
type="textarea"
|
||||
autofocus
|
||||
counter
|
||||
@keyup.enter.stop
|
||||
|
@ -341,6 +342,9 @@ export default defineComponent({
|
|||
const store = usePricelistStore();
|
||||
|
||||
onBeforeMount(() => {
|
||||
void store.getDrinkTypes()
|
||||
void store.getExtraIngredients()
|
||||
void store.get_min_prices()
|
||||
store.getPriceCalcColumn(user);
|
||||
});
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<q-btn
|
||||
v-if="pricePerVolume"
|
||||
color="positive"
|
||||
icon-right="add"
|
||||
label="Abgabe hinzufügen"
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
<div v-if="ingredient.drink_ingredient" class="col">
|
||||
<div class="full-width row justify-evenly q-py-xs">
|
||||
<div class="col">
|
||||
{{ get_drink_ingredient_name(ingredient.drink_ingredient.drink_ingredient_id) }}
|
||||
{{ get_drink_ingredient_name(ingredient.drink_ingredient.ingredient_id) }}
|
||||
<q-popup-edit
|
||||
v-model="ingredient.drink_ingredient.drink_ingredient_id"
|
||||
v-model="ingredient.drink_ingredient.ingredient_id"
|
||||
buttons
|
||||
label-cancel="Abbrechen"
|
||||
label-set="Speichern"
|
||||
@save="updateDrink"
|
||||
>
|
||||
<q-select
|
||||
v-model="ingredient.drink_ingredient.drink_ingredient_id"
|
||||
v-model="ingredient.drink_ingredient.ingredient_id"
|
||||
class="col q-px-sm"
|
||||
label="Getränk"
|
||||
filled
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
filled
|
||||
label="Inhalt in L/Gebinde"
|
||||
type="number"
|
||||
step='0.01'
|
||||
min='0'
|
||||
/>
|
||||
<q-input
|
||||
v-model.number="newDrink.package_size"
|
||||
|
@ -46,6 +48,8 @@
|
|||
filled
|
||||
label="Preis Netto/Gebinde"
|
||||
type="number"
|
||||
step='0.01'
|
||||
min='0'
|
||||
/>
|
||||
<q-input
|
||||
v-model.number="cost_per_volume"
|
||||
|
@ -53,6 +57,9 @@
|
|||
filled
|
||||
label="Preis mit 19%/Liter"
|
||||
:disable="calc_price_pro_volume"
|
||||
type='number'
|
||||
step='0.01'
|
||||
min='0'
|
||||
/>
|
||||
<div class="row justify-between">
|
||||
<q-btn v-close-popup label="Abbrechen" type="reset" />
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
<div class="text-h6">Zutaten</div>
|
||||
<div v-for="ingredient in drink.volumes[0].ingredients" :key="ingredient.id">
|
||||
{{
|
||||
name(ingredient.drink_ingredient?.drink_ingredient_id) ||
|
||||
name(ingredient.drink_ingredient?.ingredient_id) ||
|
||||
ingredient.extra_ingredient?.name
|
||||
}}
|
||||
{{ ingredient.drink_ingredient?.volume }}
|
||||
{{ ingredient.drink_ingredient?.volume ? `${ingredient.drink_ingredient?.volume * 100} cl` : '' }}
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
|
@ -55,6 +55,7 @@ export default defineComponent({
|
|||
return drink.volumes.some((volume) => volume.ingredients.length > 0);
|
||||
})
|
||||
);
|
||||
|
||||
return { drinks, name };
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue