From 9b273c25012d1dcc625a5fd6df6e3330fa3c1a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Thu, 18 Mar 2021 14:46:54 +0100 Subject: [PATCH] [QuasarV2][fix] table-data --- src/plugins/balance/pages/Admin.vue | 14 ++++++------ src/plugins/balance/pages/Overview.vue | 22 +++++++++---------- .../pricelist/components/DrinkTypes.vue | 15 ++++++------- .../pricelist/components/Pricelist.vue | 12 +++++----- 4 files changed, 31 insertions(+), 32 deletions(-) diff --git a/src/plugins/balance/pages/Admin.vue b/src/plugins/balance/pages/Admin.vue index e9eeb9b..eeab423 100644 --- a/src/plugins/balance/pages/Admin.vue +++ b/src/plugins/balance/pages/Admin.vue @@ -3,7 +3,7 @@ - + @@ -32,28 +32,28 @@ export default defineComponent({ field: 'userid', required: true, align: 'left', - sortable: true, + sortable: true }, { name: 'credit', label: 'Haben', field: 'credit', - format: (val: number) => val.toFixed(2), + format: (val: number) => val.toFixed(2) }, { name: 'debit', label: 'Soll', field: 'debit', - format: (val: number) => val.toFixed(2), + format: (val: number) => val.toFixed(2) }, { name: 'balance', label: 'Kontostand', format: (_: undefined, row: { debit: number; credit: number }) => - (row.credit - row.debit).toFixed(2), - }, + (row.credit - row.debit).toFixed(2) + } ]; return { rows, columns }; - }, + } }); diff --git a/src/plugins/balance/pages/Overview.vue b/src/plugins/balance/pages/Overview.vue index acb9715..cf058b2 100644 --- a/src/plugins/balance/pages/Overview.vue +++ b/src/plugins/balance/pages/Overview.vue @@ -10,7 +10,7 @@ onRequest({ pagination: pagination.value, - filter: undefined, + filter: undefined }) ); }); @@ -63,7 +63,7 @@ export default defineComponent({ descending: false, page: 1, rowsPerPage: 3, - rowsNumber: 10, + rowsNumber: 10 }); interface PaginationInterface { @@ -87,7 +87,7 @@ export default defineComponent({ offset: startRow, limit: fetchCount, showCancelled: showCancelled.value, - showReversals: false, + showReversals: false }); // clear out existing data and add new data.value.splice(0, data.value.length, ...result.transactions); @@ -112,7 +112,7 @@ export default defineComponent({ field: 'time', required: true, sortable: true, - format: (val: Date) => formatDateTime(new Date(val), true, true, true), + format: (val: Date) => formatDateTime(new Date(val), true, true, true) }, { name: 'type', @@ -126,7 +126,7 @@ export default defineComponent({ else return 'Gesendet an X'; } } - }, + } }, { name: 'text', @@ -140,13 +140,13 @@ export default defineComponent({ else return 'Gesendet an X'; } } - }, + } }, { name: 'amount', label: 'Betrag', field: 'amount', - format: (val: number) => `${val.toFixed(2)}€`, + format: (val: number) => `${val.toFixed(2)}€` }, { name: 'author_id', @@ -156,11 +156,11 @@ export default defineComponent({ const user = userStore.users.filter((x) => x.userid == val); if (user.length > 0) return user[0].display_name; else return val; - }, - }, + } + } ]; return { data, pagination, onRequest, loading, balance, columns, showCancelled }; - }, + } }); diff --git a/src/plugins/pricelist/components/DrinkTypes.vue b/src/plugins/pricelist/components/DrinkTypes.vue index b90ccb4..348cc74 100644 --- a/src/plugins/pricelist/components/DrinkTypes.vue +++ b/src/plugins/pricelist/components/DrinkTypes.vue @@ -16,7 +16,7 @@ - +