From 5153f074b54a7dc89d6e62c6d0c4c989a1566a04 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 14 Mar 2021 13:52:58 +0100 Subject: [PATCH] [Vue3] Fixed pricelist --- src/flaschengeist.d.ts | 65 +++---- src/plugins/pricelist/components/Drink.vue | 162 ++++++++++++++++++ .../pricelist/components/DrinkTypes.vue | 17 +- .../pricelist/components/Pricelist.vue | 15 +- src/plugins/pricelist/pages/MainPage.vue | 44 ----- src/plugins/pricelist/pages/Settings.vue | 8 +- src/plugins/pricelist/routes/index.ts | 30 ++-- 7 files changed, 224 insertions(+), 117 deletions(-) create mode 100644 src/plugins/pricelist/components/Drink.vue delete mode 100644 src/plugins/pricelist/pages/MainPage.vue diff --git a/src/flaschengeist.d.ts b/src/flaschengeist.d.ts index 92c5fc4..694df70 100644 --- a/src/flaschengeist.d.ts +++ b/src/flaschengeist.d.ts @@ -13,10 +13,10 @@ declare namespace FG { firstname: string; lastname: string; mail: string; - birthday?: Date; + birthday?: any; roles: Array; - permissions?: Array; - avatar_url?: string; + permissions?: any; + avatar_url?: any; } type Permission = string; interface Role { @@ -29,58 +29,41 @@ declare namespace FG { time: Date; amount: number; reversal_id: number; - sender_id?: string; - receiver_id?: string; - author_id?: string; - original_id?: number; + sender_id?: any; + receiver_id?: any; + author_id?: any; + original_id?: any; } 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; - type?: DrinkType; - volumes: Array; - } - interface DrinkIngredient { - id: number; volume: number; - drink_ingredient_id: number; + cost_price: number; + discount: number; + extra_charge?: any; + prices: Array; + ingredients: Array; + tags: Array; } interface DrinkPrice { - id: number; - price: number; - public: boolean; - description?: string; - } - interface DrinkPriceVolume { id: number; volume: number; - min_prices: Array; - prices: Array; - ingredients: Array; + price: number; + no_auto: boolean; + public: boolean; + description?: any; + round_step: number; } 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; + volume: number; + drink_parent_id: number; + drink_ingredient_id: number; + drink_ingredient?: any; } interface Tag { id: number; @@ -90,7 +73,7 @@ declare namespace FG { id: number; start: Date; end: Date; - description?: string; + description?: any; type: EventType; jobs: Array; } @@ -101,7 +84,7 @@ declare namespace FG { interface Job { id: number; start: Date; - end?: Date; + end?: any; comment: string; type: JobType; services: Array; diff --git a/src/plugins/pricelist/components/Drink.vue b/src/plugins/pricelist/components/Drink.vue new file mode 100644 index 0000000..9530ed4 --- /dev/null +++ b/src/plugins/pricelist/components/Drink.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/src/plugins/pricelist/components/DrinkTypes.vue b/src/plugins/pricelist/components/DrinkTypes.vue index ace97ad..e8c9af8 100644 --- a/src/plugins/pricelist/components/DrinkTypes.vue +++ b/src/plugins/pricelist/components/DrinkTypes.vue @@ -6,7 +6,7 @@
Editere Getränkeart {{ actualDrinkType.name }}
- + @@ -17,11 +17,11 @@ -