From 0e5607d685b19600ce99fea92ad83616eca8aa40 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 6 Sep 2024 13:59:50 +0200 Subject: [PATCH] feat: refs #7553 ticket component to vntable and fixed minor errors --- .../Ticket/Card/BasicData/TicketBasicData.vue | 151 ++++---- src/pages/Ticket/Card/TicketComponents.vue | 353 +++++++++--------- .../Ticket/Card/TicketPurchaseRequest.vue | 15 +- src/pages/Ticket/Card/TicketSale.vue | 181 ++++----- src/pages/Ticket/Card/TicketVolume.vue | 4 +- 5 files changed, 338 insertions(+), 366 deletions(-) diff --git a/src/pages/Ticket/Card/BasicData/TicketBasicData.vue b/src/pages/Ticket/Card/BasicData/TicketBasicData.vue index 22e89d394..741231ca3 100644 --- a/src/pages/Ticket/Card/BasicData/TicketBasicData.vue +++ b/src/pages/Ticket/Card/BasicData/TicketBasicData.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import FetchedTags from 'components/ui/FetchedTags.vue'; -import RightMenu from 'src/components/common/RightMenu.vue'; import FetchData from 'components/FetchData.vue'; import { useStateStore } from 'stores/useStateStore'; @@ -145,83 +144,81 @@ onUnmounted(() => (stateStore.rightDrawer = false)); @on-fetch="(data) => (ticketUpdateActions = data)" auto-load /> - - - + + + + + + + + + {{ t('basicData.withoutNegativesInfo') }} + + + + + [ name: 'item', align: 'left', }, + { + align: 'left', + label: t('lines.image'), + name: 'image', + columnField: { + component: VnImg, + attrs: (id) => { + return { + id, + width: '50px', + }; + }, + }, + columnFilter: false, + }, { label: t('ticketComponents.description'), name: 'description', align: 'left', + columnClass: 'expand', }, { label: t('ticketComponents.quantity'), name: 'quantity', field: 'quantity', align: 'left', - format: (val) => dashIfEmpty(val), + format: (row) => dashIfEmpty(row.quantity), }, { label: t('ticketComponents.serie'), name: 'serie', align: 'left', - }, - { - label: t('ticketComponents.components'), - name: 'components', - align: 'left', - }, - { - label: t('ticketComponents.import'), - name: 'import', - align: 'left', + format: (row) => dashIfEmpty(row.serie), }, { label: t('ticketComponents.total'), @@ -174,181 +182,166 @@ onUnmounted(() => (stateStore.rightDrawer = false)); @on-fetch="(data) => (components = data)" auto-load /> - - - - + {{ component.name }}: + + {{ + toCurrency(component.value, 'EUR', 3) + }} + + + + + + {{ t('ticketComponents.zoneBreakdown') }} + + + + + {{ t('ticketComponents.price') }}: + + {{ toCurrency(ticketData?.zonePrice, 'EUR', 2) }} + + + + {{ t('ticketComponents.bonus') }}: + + {{ toCurrency(ticketData?.zoneBonus, 'EUR', 2) }} + + + + {{ t('ticketComponents.zone') }}: + + + {{ dashIfEmpty(ticketData?.zone?.name) }} + + + + + + {{ t('ticketComponents.volume') }}: + + {{ ticketVolume }} + + + + {{ t('ticketComponents.packages') }}: + + {{ dashIfEmpty(ticketData?.packages) }} + + + + + + {{ t('ticketComponents.theoricalCost') }} + + + + + {{ t('ticketComponents.totalPrice') }}: + + {{ toCurrency(theoricalCost, 'EUR', 2) }} + + + + -