From 68ebda625b9594229837e2bbb331d0f2787b53ec Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 25 Sep 2024 14:02:11 +0200 Subject: [PATCH 01/53] fix: refs #7874 refs #6943 ui --- .../components/CustomerAddressEdit.vue | 58 +++++++++---------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/src/pages/Customer/components/CustomerAddressEdit.vue b/src/pages/Customer/components/CustomerAddressEdit.vue index 606867388..1e5387815 100644 --- a/src/pages/Customer/components/CustomerAddressEdit.vue +++ b/src/pages/Customer/components/CustomerAddressEdit.vue @@ -240,39 +240,33 @@ function handleLocation(data, location) { class="row q-gutter-md q-mb-md" v-for="(note, index) in notes" > -
- -
-
- -
-
- - - {{ t('Remove note') }} - - -
+ + + + + {{ t('Remove note') }} + + - Date: Wed, 25 Sep 2024 14:18:34 +0200 Subject: [PATCH 02/53] 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 05/53] 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 01dc25da8ccc320dd336a36297d41c426b599339 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 3 Oct 2024 10:23:27 +0200 Subject: [PATCH 09/53] refactor: refs #7874 create element if condition --- src/components/ui/VnNotes.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue index 6ae8538e2..340f46775 100644 --- a/src/components/ui/VnNotes.vue +++ b/src/components/ui/VnNotes.vue @@ -57,10 +57,11 @@ onBeforeRouteLeave((to, from, next) => { From 4b9588c189544aee28e36f1fa66a23a7ed5ea27b Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 4 Oct 2024 08:55:48 +0200 Subject: [PATCH 12/53] 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) { > diff --git a/src/components/common/VnTime.vue b/src/components/common/VnTime.vue new file mode 100644 index 000000000..135709d2b --- /dev/null +++ b/src/components/common/VnTime.vue @@ -0,0 +1,6 @@ + + From 5c5a35998615b270d4f2423b4247f828fd9524fb Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 7 Oct 2024 09:38:39 +0200 Subject: [PATCH 15/53] refactor: refs #8019 create VnTime --- src/components/common/VnInputTime.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index a5e7d3002..6d69bc4a5 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -3,6 +3,8 @@ import { computed, ref, useAttrs } from 'vue'; import { useI18n } from 'vue-i18n'; import { date } from 'quasar'; import { useValidator } from 'src/composables/useValidator'; +import VnTime from './VnTime.vue'; + const { validations } = useValidator(); const $attrs = useAttrs(); const model = defineModel({ type: String }); @@ -107,6 +109,7 @@ function dateToTime(newDate) { /> - + + + + From d1b3e01d871e95a7472900225fa2b2d545aef19c Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 7 Oct 2024 13:36:27 +0200 Subject: [PATCH 16/53] chore: refs #8019 refactor css scoped --- src/components/common/VnDate.vue | 36 ++++++++++++++++++++++++++++++++ src/components/ui/VnImg.vue | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnDate.vue b/src/components/common/VnDate.vue index 4b65ec4da..cdfa0d258 100644 --- a/src/components/common/VnDate.vue +++ b/src/components/common/VnDate.vue @@ -9,3 +9,39 @@ const model = defineModel({ type: [String, Number], required: true }); :options="$attrs.options" /> + diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue index ceb4e8468..1b57c20d0 100644 --- a/src/components/ui/VnImg.vue +++ b/src/components/ui/VnImg.vue @@ -58,7 +58,7 @@ defineExpose({ :class="{ zoomIn: zoom }" :src="getUrl()" v-bind="$attrs" - @click.stop="show = $props.zoom ? true : false" + @click.stop="show = $props.zoom" spinner-color="primary" /> From c81506695314e291aa22d7433d65521711921d37 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 7 Oct 2024 15:55:18 +0200 Subject: [PATCH 17/53] feat: refs #8019 fine-tunning vnDate --- src/components/common/VnDate.vue | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/src/components/common/VnDate.vue b/src/components/common/VnDate.vue index cdfa0d258..761ac995e 100644 --- a/src/components/common/VnDate.vue +++ b/src/components/common/VnDate.vue @@ -2,46 +2,28 @@ const model = defineModel({ type: [String, Number], required: true }); From 4344458bb067f4c6595f02df580dffd3e5e08a84 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 7 Oct 2024 16:02:29 +0200 Subject: [PATCH 18/53] feat: refs #8019 fine-tunning vnTime --- src/components/common/VnTime.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnTime.vue b/src/components/common/VnTime.vue index 135709d2b..369f80432 100644 --- a/src/components/common/VnTime.vue +++ b/src/components/common/VnTime.vue @@ -2,5 +2,15 @@ const model = defineModel({ type: [String, Number], required: true }); + From 73e5039ec39d351672548f22400fc0c6c52220a5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 8 Oct 2024 08:35:24 +0200 Subject: [PATCH 19/53] refs #7986 create front --- src/pages/Worker/Card/WorkerMoto.vue | 187 +++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerMoto.vue diff --git a/src/pages/Worker/Card/WorkerMoto.vue b/src/pages/Worker/Card/WorkerMoto.vue new file mode 100644 index 000000000..a53aac270 --- /dev/null +++ b/src/pages/Worker/Card/WorkerMoto.vue @@ -0,0 +1,187 @@ + + + + + +es: + Model: Modelo + Serial number: Número de serie + Current SIM: SIM actual + Add new device: Añadir nuevo dispositivo + PDA deallocated: PDA desasignada + Remove PDA: Eliminar PDA + Do you want to remove this PDA?: ¿Desea eliminar este PDA? + You can only have one PDA: Solo puedes tener un PDA si no eres autonomo + This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario + From e0f60ed1181c2548ba77b4e2a55461c7b6492e5e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 8 Oct 2024 11:07:05 +0000 Subject: [PATCH 20/53] test: fix VnLocation --- .../integration/vnComponent/vnLocation.spec.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js index 78dc38899..c1b0cf929 100644 --- a/test/cypress/integration/vnComponent/vnLocation.spec.js +++ b/test/cypress/integration/vnComponent/vnLocation.spec.js @@ -64,7 +64,7 @@ describe('VnLocation', () => { `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) > .q-icon` ).click(); cy.get( - `#q-portal--dialog--4 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input` + `#q-portal--dialog--5 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input` ).should('have.value', province); }); }); @@ -133,6 +133,8 @@ describe('VnLocation', () => { ); cy.get('.q-mt-lg > .q-btn--standard').click(); cy.get(`${createForm.prefix}`).should('not.exist'); + cy.waitForElement('.q-form'); + checkVnLocation(postCode, province); }); it('Create city', () => { @@ -144,10 +146,12 @@ describe('VnLocation', () => { cy.get( `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon` ).click(); - cy.selectOption('#q-portal--dialog--2 .q-select', 'one'); - cy.get('#q-portal--dialog--2 .q-input').type(province); - cy.get('#q-portal--dialog--2 .q-btn--standard').click(); + cy.selectOption('#q-portal--dialog--3 .q-select', 'one'); + cy.get('#q-portal--dialog--3 .q-input').type(province); + cy.get('#q-portal--dialog--3 .q-btn--standard').click(); cy.get('#q-portal--dialog--1 .q-btn--standard').click(); + cy.waitForElement('.q-form'); + checkVnLocation(postCode, province); }); From 6a797460806cf628f9310a7c54d35fb878c29b03 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 8 Oct 2024 13:18:51 +0200 Subject: [PATCH 21/53] test: fix TicketDescriptor --- test/cypress/integration/ticket/ticketDescriptor.spec.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js index 8192b7c7c..0ba2723a2 100644 --- a/test/cypress/integration/ticket/ticketDescriptor.spec.js +++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js @@ -1,7 +1,8 @@ /// describe('Ticket descriptor', () => { - const toCloneOpt = '[role="menu"] .q-list > :nth-child(5)'; - const setWeightOpt = '[role="menu"] .q-list > :nth-child(6)'; + const listItem = '[role="menu"] .q-list .q-item'; + const toCloneOpt = 'To clone ticket'; + const setWeightOpt = 'Set weight'; const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span'; const summaryHeader = '.summaryHeader > div'; const weight = 25; @@ -14,7 +15,7 @@ describe('Ticket descriptor', () => { it('should clone the ticket without warehouse', () => { cy.visit('/#/ticket/1/summary'); cy.openActionsDescriptor(); - cy.get(toCloneOpt).click(); + cy.contains(listItem, toCloneOpt).click(); cy.clickConfirm(); cy.get(warehouseValue).contains('Warehouse One'); cy.get(summaryHeader) @@ -28,7 +29,7 @@ describe('Ticket descriptor', () => { it('should set the weight of the ticket', () => { cy.visit('/#/ticket/10/summary'); cy.openActionsDescriptor(); - cy.get(setWeightOpt).click(); + cy.contains(listItem, setWeightOpt).click(); cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight'); cy.get('.q-dialog input').type(weight); cy.clickConfirm(); From 855032e4a63765927536c8a266ccce7ec472b28e Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 8 Oct 2024 15:36:57 +0200 Subject: [PATCH 22/53] refs #7986 fix front --- src/pages/Worker/Card/WorkerMoto.vue | 187 ------------- src/pages/Worker/Card/WorkerOperator.vue | 322 +++++++++++++++++++++++ src/router/modules/worker.js | 12 + 3 files changed, 334 insertions(+), 187 deletions(-) delete mode 100644 src/pages/Worker/Card/WorkerMoto.vue create mode 100644 src/pages/Worker/Card/WorkerOperator.vue diff --git a/src/pages/Worker/Card/WorkerMoto.vue b/src/pages/Worker/Card/WorkerMoto.vue deleted file mode 100644 index a53aac270..000000000 --- a/src/pages/Worker/Card/WorkerMoto.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - - - -es: - Model: Modelo - Serial number: Número de serie - Current SIM: SIM actual - Add new device: Añadir nuevo dispositivo - PDA deallocated: PDA desasignada - Remove PDA: Eliminar PDA - Do you want to remove this PDA?: ¿Desea eliminar este PDA? - You can only have one PDA: Solo puedes tener un PDA si no eres autonomo - This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario - diff --git a/src/pages/Worker/Card/WorkerOperator.vue b/src/pages/Worker/Card/WorkerOperator.vue new file mode 100644 index 000000000..13b531a33 --- /dev/null +++ b/src/pages/Worker/Card/WorkerOperator.vue @@ -0,0 +1,322 @@ + + + + + +es: + Model: Modelo + Serial number: Número de serie + Current SIM: SIM actual + Add new device: Añadir nuevo dispositivo + PDA deallocated: PDA desasignada + Remove PDA: Eliminar PDA + Do you want to remove this PDA?: ¿Desea eliminar este PDA? + You can only have one PDA: Solo puedes tener un PDA si no eres autonomo + This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 7258881be..d7199a4e6 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -1,3 +1,5 @@ +import { path } from 'chromium'; +import { name } from 'quasar/dist/icon-set/material-icons.umd.prod'; import { RouterView } from 'vue-router'; export default { @@ -27,6 +29,7 @@ export default { 'WorkerBalance', 'WorkerFormation', 'WorkerMedical', + 'WorkerOperator', ], }, children: [ @@ -208,6 +211,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerMedical.vue'), }, + { + name: 'WorkerOperator', + path: 'operator', + meta: { + title: 'operator', + icon: 'person', + }, + component: () => import('src/pages/Worker/Card/WorkerOperator.vue'), + }, ], }, ], From cfe95df9e84c5841077bdcb480459a19940dfd7c Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 10 Oct 2024 09:46:07 +0200 Subject: [PATCH 23/53] fix: refs #7524 use dynamic load --- src/pages/Ticket/TicketCreateDialog.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/pages/Ticket/TicketCreateDialog.vue b/src/pages/Ticket/TicketCreateDialog.vue index 1493adc53..4138884bf 100644 --- a/src/pages/Ticket/TicketCreateDialog.vue +++ b/src/pages/Ticket/TicketCreateDialog.vue @@ -27,7 +27,6 @@ const initialFormState = reactive({ warehouseId: user.value.warehouseFk, landed: null, }); -const clientOptions = ref([]); const agenciesOptions = ref([]); const addressesOptions = ref([]); const warehousesOptions = ref([]); @@ -111,12 +110,6 @@ const redirectToTicketList = (_, { id }) => {