From 6cdc143aa97237bf49378029a26731025e16e2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Tue, 30 Mar 2021 22:32:18 +0200 Subject: [PATCH] [pricelist] some styling on pricelist --- .../BuildManual/BuildManualVolumePart.vue | 3 +- .../CalculationTable/BuildManual.vue | 2 +- .../pricelist/components/Pricelist.vue | 16 ++- .../pricelist/pages/InnerPricelist.vue | 14 +++ src/plugins/pricelist/pages/Pricelist.vue | 100 ------------------ src/plugins/pricelist/routes/index.ts | 2 +- 6 files changed, 32 insertions(+), 105 deletions(-) create mode 100644 src/plugins/pricelist/pages/InnerPricelist.vue delete mode 100644 src/plugins/pricelist/pages/Pricelist.vue diff --git a/src/plugins/pricelist/components/BuildManual/BuildManualVolumePart.vue b/src/plugins/pricelist/components/BuildManual/BuildManualVolumePart.vue index d0dcce4..27e21ea 100644 --- a/src/plugins/pricelist/components/BuildManual/BuildManualVolumePart.vue +++ b/src/plugins/pricelist/components/BuildManual/BuildManualVolumePart.vue @@ -37,8 +37,7 @@
{{ price.price.toFixed(2) }}€
öffentlich
- {{ price.description - }} + {{ price.description }}
diff --git a/src/plugins/pricelist/components/CalculationTable/BuildManual.vue b/src/plugins/pricelist/components/CalculationTable/BuildManual.vue index c8f920d..4d462bb 100644 --- a/src/plugins/pricelist/components/CalculationTable/BuildManual.vue +++ b/src/plugins/pricelist/components/CalculationTable/BuildManual.vue @@ -5,7 +5,7 @@ class="full-width row q-gutter-sm justify-between q-py-sm" >
-
{{ index + 1}}.
+
{{ index + 1 }}.
{{ step }}
diff --git a/src/plugins/pricelist/components/Pricelist.vue b/src/plugins/pricelist/components/Pricelist.vue index 95a4935..b30da7b 100644 --- a/src/plugins/pricelist/components/Pricelist.vue +++ b/src/plugins/pricelist/components/Pricelist.vue @@ -79,7 +79,11 @@ import { defineComponent, onBeforeMount, computed, ref } from 'vue'; import { usePricelistStore } from '../store'; import { useMainStore } from 'src/stores'; - +function sort(a: string | number, b: string | number) { + if (a > b) return 1; + if (b > a) return -1; + return 0; +} export default defineComponent({ name: 'Pricelist', filters: { @@ -120,12 +124,22 @@ export default defineComponent({ { name: 'picture', label: 'Bild', + align: 'center', }, { name: 'name', label: 'Getränk', field: 'name', align: 'center', + sortable: true, + }, + { + name: 'drink_type', + label: 'Kategorie', + field: 'type', + format: (val: FG.DrinkType) => `${val.name}`, + sortable: true, + sort: (a: FG.DrinkType, b: FG.DrinkType) => sort(a.name, b.name), }, { name: 'volumes', diff --git a/src/plugins/pricelist/pages/InnerPricelist.vue b/src/plugins/pricelist/pages/InnerPricelist.vue new file mode 100644 index 0000000..bd49a21 --- /dev/null +++ b/src/plugins/pricelist/pages/InnerPricelist.vue @@ -0,0 +1,14 @@ + + diff --git a/src/plugins/pricelist/pages/Pricelist.vue b/src/plugins/pricelist/pages/Pricelist.vue deleted file mode 100644 index 1a6c827..0000000 --- a/src/plugins/pricelist/pages/Pricelist.vue +++ /dev/null @@ -1,100 +0,0 @@ - - diff --git a/src/plugins/pricelist/routes/index.ts b/src/plugins/pricelist/routes/index.ts index ab429fa..8242505 100644 --- a/src/plugins/pricelist/routes/index.ts +++ b/src/plugins/pricelist/routes/index.ts @@ -19,7 +19,7 @@ export const innerRoutes: FG_Plugin.MenuRoute[] = [ route: { path: 'pricelist', name: 'drinks-pricelist', - component: () => import('../pages/Pricelist.vue'), + component: () => import('../pages/InnerPricelist.vue'), }, }, {