From 30e101c36496a894ae8d311d12c5a3bbc7761e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Mon, 29 Mar 2021 12:50:50 +0200 Subject: [PATCH] [pricelist] add Receipts --- src/flaschengeist.d.ts | 1 + .../pricelist/components/CalculationTable.vue | 24 +++++++ src/plugins/pricelist/pages/Receipts.vue | 63 ++++++++++++++++++ src/plugins/pricelist/pages/Reciepts.vue | 66 ------------------- src/plugins/pricelist/routes/index.ts | 18 ++--- src/plugins/pricelist/store.ts | 4 +- 6 files changed, 99 insertions(+), 77 deletions(-) create mode 100644 src/plugins/pricelist/pages/Receipts.vue delete mode 100644 src/plugins/pricelist/pages/Reciepts.vue diff --git a/src/flaschengeist.d.ts b/src/flaschengeist.d.ts index 8956465..67248d4 100644 --- a/src/flaschengeist.d.ts +++ b/src/flaschengeist.d.ts @@ -83,6 +83,7 @@ declare namespace FG { type?: DrinkType; volumes: Array; uuid: string; + receipt?: string; } interface DrinkIngredient { id: number; diff --git a/src/plugins/pricelist/components/CalculationTable.vue b/src/plugins/pricelist/components/CalculationTable.vue index d6f6ac4..6565ac5 100644 --- a/src/plugins/pricelist/components/CalculationTable.vue +++ b/src/plugins/pricelist/components/CalculationTable.vue @@ -294,6 +294,25 @@ @updateDrink="updateDrink(drinks_props.row)" /> + + {{drinks_props.row.receipt}} + + + + @@ -389,6 +408,11 @@ export default defineComponent({ label: 'Preiskalkulation', field: 'volumes', }, + { + name: 'receipt', + label: 'Bauanleitung', + field: 'receipt', + }, ]; const column_calc = [ { diff --git a/src/plugins/pricelist/pages/Receipts.vue b/src/plugins/pricelist/pages/Receipts.vue new file mode 100644 index 0000000..3d2bd3f --- /dev/null +++ b/src/plugins/pricelist/pages/Receipts.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/plugins/pricelist/pages/Reciepts.vue b/src/plugins/pricelist/pages/Reciepts.vue deleted file mode 100644 index 7ca0bbc..0000000 --- a/src/plugins/pricelist/pages/Reciepts.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - - - diff --git a/src/plugins/pricelist/routes/index.ts b/src/plugins/pricelist/routes/index.ts index 05bfbb8..fcfc86e 100644 --- a/src/plugins/pricelist/routes/index.ts +++ b/src/plugins/pricelist/routes/index.ts @@ -25,13 +25,13 @@ export const innerRoutes: FG_Plugin.MenuRoute[] = [ { title: 'Rezepte', shortcut: false, - icon: '', + icon: 'mdi-receipt', permissions: ['user'], route: { path: 'reciepts', name: 'reciepts', - component: () => import('../pages/Reciepts.vue') - } + component: () => import('../pages/Receipts.vue'), + }, }, { title: 'Cocktailbuilder', @@ -41,8 +41,8 @@ export const innerRoutes: FG_Plugin.MenuRoute[] = [ route: { path: 'cocktail-builder', name: 'cocktail-builder', - component: () => import('../pages/CocktailBuilder.vue') - } + component: () => import('../pages/CocktailBuilder.vue'), + }, }, { title: 'Einstellungen', @@ -67,7 +67,7 @@ export const outerRoutes: FG_Plugin.MenuRoute[] = [ route: { path: 'pricelist', name: 'outter-pricelist', - component: () => import('../pages/OuterPricelist.vue') - } - } -] + component: () => import('../pages/OuterPricelist.vue'), + }, + }, +]; diff --git a/src/plugins/pricelist/store.ts b/src/plugins/pricelist/store.ts index ca86b50..4200cc6 100644 --- a/src/plugins/pricelist/store.ts +++ b/src/plugins/pricelist/store.ts @@ -58,6 +58,7 @@ class Drink { tags, type, uuid, + receipt, }: FG.Drink) { this.id = id; this.article_id = article_id; @@ -84,6 +85,7 @@ class Drink { this.type = type; this.volumes = []; this.uuid = uuid; + this.receipt = receipt; } } @@ -322,6 +324,4 @@ export const usePricelistStore = defineStore({ }, }); - - export { DrinkPriceVolume, MinPrice, Drink };