release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
4 changed files with 27 additions and 20 deletions
Showing only changes of commit 17460a8543 - Show all commits

View File

@ -166,11 +166,11 @@ export default defineComponent({
setup(_, { emit }) {
const store = usePricelistStore();
const emptyIngredient: FG.Ingredient = {
/*const emptyIngredient: FG.Ingredient = {
id: -1,
drink_ingredient: undefined,
extra_ingredient: undefined,
};
};*/
const newIngredient = ref<FG.Drink | FG.ExtraIngredient>();
const newIngredientVolume = ref<number>(0);
function addIngredient(volume: DrinkPriceVolume) {

View File

@ -68,14 +68,14 @@ import {usePricelistStore} from 'src/plugins/pricelist/store';
export default defineComponent({
name: 'DrinkTypes',
setup() {
const store = usePricelistStore()
const store = usePricelistStore();
const emptyExtraIngredient: FG.ExtraIngredient = {
name: '',
price: 0,
id: -1,
};
const newExtraIngredient = ref<FG.ExtraIngredient>(emptyExtraIngredient);
const newDrinkTypeName = ref<string>('');
/*const newDrinkTypeName = ref<string>('');*/
const edittype = ref(false);
const actualExtraIngredient = ref(emptyExtraIngredient);

View File

@ -52,23 +52,27 @@ import DrinkTypes from 'src/plugins/pricelist/components/DrinkTypes.vue';
import CalculationTable from 'src/plugins/pricelist/components/CalculationTable.vue';
import ExtraIngredients from 'src/plugins/pricelist/components/ExtraIngredients.vue';
import { usePricelistStore } from 'src/plugins/pricelist/store';
export default defineComponent({
name: 'Settings',
//components: { DrinkTypes, ExtraIngredients, CalculationTable },
components: { ExtraIngredients, DrinkTypes, CalculationTable },
setup(_) {
setup() {
interface Tab {
name: string;
label: string;
}
const store = usePricelistStore()
const store = usePricelistStore();
onBeforeMount(() => {
store.getExtraIngredients().then(() => {
console.log(store.extraIngredients)
}).catch(err => console.log(err))
void store.getDrinkTypes()
store.getDrinks()
store
.getExtraIngredients()
.then(() => {
console.log(store.extraIngredients);
})
.catch((err) => console.log(err));
void store.getDrinkTypes();
store.getDrinks();
});
const drawer = ref<boolean>(false);
@ -78,19 +82,19 @@ export default defineComponent({
},
set: (val: boolean) => {
drawer.value = val;
}
},
});
const tabs: Tab[] = [
{ name: 'pricelist', label: 'Getränke' },
{ name: 'extra_ingredients', label: 'Zutaten' },
{ name: 'drink_types', label: 'Getränketypen' }
{ name: 'drink_types', label: 'Getränketypen' },
];
const tab = ref<string>('pricelist');
return { tabs, tab, showDrawer };
}
},
});
</script>

View File

@ -18,7 +18,10 @@ interface Drink extends Omit<Omit<FG.Drink, 'cost_price_pro_volume'>, 'volumes'>
}
class DrinkPriceVolume implements DrinkPriceVolume {
constructor({ id, volume, min_prices, prices, ingredients }: FG.DrinkPriceVolume, drink: Drink) {
constructor(
{ id, volume, /*min_prices,*/ prices, ingredients }: FG.DrinkPriceVolume,
drink: Drink
) {
this.id = id;
this._volume = volume;
this.prices = prices;
@ -68,8 +71,8 @@ class Drink {
cost_price_package_netto,
tags,
type,
volumes,
}: FG.Drink) {
}: /*volumes,*/
FG.Drink) {
this.id = id;
this.article_id = article_id;
this.package_size = package_size;