From 56af4d37364ffa1f665d172052da810c0f175c0b Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 25 Sep 2024 14:18:34 +0200 Subject: [PATCH 01/39] feat: refs #7010 added packing type field in customer summary and ticket list --- .../components/CustomerSummaryTable.vue | 18 ++++- src/pages/Ticket/TicketList.vue | 70 +++++++++++++++---- 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/src/pages/Customer/components/CustomerSummaryTable.vue b/src/pages/Customer/components/CustomerSummaryTable.vue index 946296e67..8ebf4aabc 100644 --- a/src/pages/Customer/components/CustomerSummaryTable.vue +++ b/src/pages/Customer/components/CustomerSummaryTable.vue @@ -32,6 +32,16 @@ const filter = { }, { relation: 'invoiceOut', scope: { fields: ['id'] } }, { relation: 'agencyMode', scope: { fields: ['name'] } }, + { + relation: 'ticketSales', + scope: { + fields: ['id', 'concept', 'itemFk'], + include: { relation: 'item' }, + scope: { + fields: ['id', 'name', 'itemPackingTypeFk'], + }, + }, + }, ], where: { clientFk: route.params.id }, order: ['shipped DESC', 'id'], @@ -87,7 +97,13 @@ const columns = computed(() => [ label: t('Total'), name: 'total', }, - + { + align: 'left', + name: 'itemPackingTypeFk', + label: t('ticketSale.packaging'), + format: (row, dashIfEmpty) => + dashIfEmpty(row?.ticketSales[0]?.item.itemPackingTypeFk), + }, { align: 'right', label: '', diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index ad97e75c1..2a1dfd014 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -1,6 +1,6 @@ @@ -577,16 +615,16 @@ function setReference(data) { {{ row.state }} + + + {{ row.refFk }} + + + {{ row.state }} - + + From 1c99c01d1dcfe61e595cd322cde9910ac943cb87 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 26 Sep 2024 14:12:59 +0200 Subject: [PATCH 03/39] refactor: refs #7010 modified front --- src/pages/Ticket/TicketList.vue | 48 +++------------------------------ 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index 2a1dfd014..fe9667bea 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -1,6 +1,6 @@ - - From 4b9588c189544aee28e36f1fa66a23a7ed5ea27b Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 4 Oct 2024 08:55:48 +0200 Subject: [PATCH 09/39] refactor: refs #7825 modified worker list form to fill the field when a bank entity is created --- src/pages/Worker/WorkerList.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index f4ae20591..4b7d028e7 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -93,6 +93,11 @@ onBeforeMount(async () => { ).data?.payMethodFk; }); +const handleNewBankEntity = (response, formData) => { + bankEntitiesOptions.value = [...bankEntitiesOptions.value, response]; + formData.bankEntityFk = response.id; +}; + function handleLocation(data, location) { const { town, code, provinceFk, countryFk } = location ?? {}; data.postcode = code; @@ -319,7 +324,10 @@ async function autofillBic(worker) { > From afc52f6ceaa41fe54459926d10398a25c4f5b56a Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 7 Oct 2024 13:29:43 +0200 Subject: [PATCH 12/39] fix: changes in sale and summary --- .../Ticket/Card/TicketDescriptorMenu.vue | 9 ++- src/pages/Ticket/Card/TicketEditMana.vue | 26 +++++++ src/pages/Ticket/Card/TicketSale.vue | 19 +++++ src/pages/Ticket/Card/TicketSummary.vue | 71 ++++++++++++++----- src/pages/Ticket/TicketFilter.vue | 12 ++-- 5 files changed, 110 insertions(+), 27 deletions(-) diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index 73104fe27..caf82ed24 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -3,7 +3,7 @@ import axios from 'axios'; import { ref, toRefs } from 'vue'; import { useQuasar } from 'quasar'; import { useI18n } from 'vue-i18n'; -import { useRouter } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; import { usePrintService } from 'composables/usePrintService'; import SendEmailDialog from 'components/common/SendEmailDialog.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; @@ -23,6 +23,7 @@ const props = defineProps({ required: true, }, }); +const route = useRoute(); const { push, currentRoute } = useRouter(); const { dialog, notify } = useQuasar(); @@ -334,7 +335,11 @@ async function handleInvoiceOutData() { {{ toPercentage(row.discount / 100) }} diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 2ca0b5727..ef5024e36 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -19,6 +19,7 @@ import VnTitle from 'src/components/common/VnTitle.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; +import TicketDescriptorMenu from './TicketDescriptorMenu.vue'; const route = useRoute(); const { notify } = useNotify(); @@ -68,7 +69,7 @@ function isEditable() { async function changeState(value) { try { - stateBtnDropdownRef.value.hide(); + stateBtnDropdownRef.value?.hide(); const formData = { ticketFk: entityId.value, code: value, @@ -108,6 +109,10 @@ function getNoteValue(description) { function toTicketUrl(section) { return '#/ticket/' + entityId.value + '/' + section; } +function isOnTicketCard() { + const currentPath = route.path; + return currentPath.startsWith('/ticket'); +}