From f9cfd668bb2d5285b90d123980aeeb776a05f2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Mon, 15 Nov 2021 10:12:20 +0100 Subject: [PATCH] [fix] fix public view by grid, revert wrong commit --- .../CalculationTable/DrinkPriceVolumes.vue | 16 ++-- test.ts | 93 ------------------- 2 files changed, 7 insertions(+), 102 deletions(-) delete mode 100644 test.ts diff --git a/src/components/CalculationTable/DrinkPriceVolumes.vue b/src/components/CalculationTable/DrinkPriceVolumes.vue index af8bf88..75a235b 100644 --- a/src/components/CalculationTable/DrinkPriceVolumes.vue +++ b/src/components/CalculationTable/DrinkPriceVolumes.vue @@ -42,8 +42,8 @@
-
-
+
+
- +
) { if (props.public) { - console.log(price); - return price.public; + return prices.filter((price) => price.public); } - return true; + return prices; } const isUnderMinPrice = computed(() => { @@ -337,7 +335,7 @@ export default defineComponent({ isUnderMinPrice, hasPermission, PERMISSIONS, - isPublic, + filterPublic, }; }, }); diff --git a/test.ts b/test.ts deleted file mode 100644 index 643b509..0000000 --- a/test.ts +++ /dev/null @@ -1,93 +0,0 @@ -declare namespace FG { - interface Notification { - id: number; - plugin: string; - text: string; - data?: any; - time: Date; - } - interface User { - userid: string; - display_name: string; - firstname: string; - lastname: string; - mail: string; - birthday?: Date; - roles: Array; - permissions?: Array; - avatar_url?: string; - } - interface Session { - expires: Date; - token: string; - lifetime: number; - browser: string; - platform: string; - userid: string; - } - type Permission = string; - interface Role { - id: number; - name: string; - permissions: Array; - } - interface Drink { - id: number; - article_id?: string; - package_size?: number; - name: string; - volume?: number; - cost_per_volume?: number; - cost_per_package?: number; - uuid: string; - receipt?: Array; - tags?: Array; - type?: DrinkType; - volumes: Array; - } - interface DrinkIngredient { - id: number; - volume: number; - ingredient_id: number; - cost_per_volume: number; - name: string; - } - interface DrinkPrice { - id: number; - price: number; - volume: DrinkPriceVolume; - public: boolean; - description?: string; - } - interface DrinkPriceVolume { - id: number; - drink: Drink; - volume: number; - min_prices: Array; - prices: Array; - ingredients: Array; - } - 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; - color: string; - } -}