release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
2 changed files with 59 additions and 40 deletions
Showing only changes of commit 42b43aa56c - Show all commits

View File

@ -15,7 +15,7 @@ declare namespace FG {
mail: string;
birthday?: Date;
roles: Array<string>;
permissions?: Array<Permission>;
permissions?: Array<string>;
avatar_url?: string;
}
type Permission = string;
@ -34,10 +34,62 @@ declare namespace FG {
author_id?: string;
original_id?: number;
}
interface Drink {
id: number;
article_id?: string;
package_size?: number;
name: string;
volume?: number;
cost_price_pro_volume?: number;
cost_price_package_netto?: number;
tags?: Array<Tag>;
type?: DrinkType;
volumes: Array<DrinkPriceVolume>;
}
interface DrinkIngredient {
id: number;
volume: number;
drink_ingredient_id: number;
}
interface DrinkPrice {
id: number;
price: number;
public: boolean;
description?: string;
}
interface DrinkPriceVolume {
id: number;
volume: number;
min_prices: Array<MinPrices>;
prices: Array<DrinkPrice>;
ingredients: Array<Ingredient>;
}
interface DrinkType {
id: number;
name: string;
}
interface ExtraIngredient {
id: number;
name: string;
price: number;
}
interface Ingredient {
id: number;
drink_ingredient?: DrinkIngredient;
extra_ingredient?: ExtraIngredient;
}
interface MinPrices {
percentage: number;
price: number;
}
interface Tag {
id: number;
name: string;
}
interface Event {
id: number;
start: Date;
end: Date;
end?: Date;
description?: string;
type: EventType;
jobs: Array<Job>;
@ -63,35 +115,4 @@ declare namespace FG {
userid: string;
value: number;
}
interface Drink {
id: number;
name: string;
volume: number;
cost_price: number;
discount: number;
extra_charge?: any;
prices: Array<DrinkPrice>;
ingredients: Array<Ingredient>;
}
interface DrinkPrice {
id: number;
volume: number;
price: number;
description?: any;
round_step: number;
}
interface DrinkType {
id: number;
name: string;
}
interface Ingredient {
id: number;
volume: number;
parent_id: number;
ingredient_id: number;
}
interface Tag {
id: number;
name: string;
}
}

View File

@ -130,10 +130,8 @@ export default defineComponent({
id: -1,
name: '',
volume: -1,
cost_price: -1,
discount: -1,
prices: [],
ingredients: [],
tags: [],
volumes: [],
});
const emptyPrice = {
volume: '',
@ -149,9 +147,9 @@ export default defineComponent({
}
async function save() {
console.log(drink);
drink.value.prices.forEach((price: FG.DrinkPrice) => {
//price.no_auto = !price.no_auto;
});
/*drink.value.prices.forEach((price: FG.DrinkPrice) => {
price.no_auto = !price.no_auto;
});*/
await store.createDrink(drink.value);
}
return { drink, addPrice, save };