From 56af4d37364ffa1f665d172052da810c0f175c0b Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 25 Sep 2024 14:18:34 +0200 Subject: [PATCH 01/14] 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/14] 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 73e5039ec39d351672548f22400fc0c6c52220a5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 8 Oct 2024 08:35:24 +0200 Subject: [PATCH 06/14] 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 855032e4a63765927536c8a266ccce7ec472b28e Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 8 Oct 2024 15:36:57 +0200 Subject: [PATCH 07/14] 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 dfceb9403cc5b69a7da50ea94174f14f4599fc80 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 15 Oct 2024 07:54:52 +0200 Subject: [PATCH 08/14] fix: refs #7986 fix front --- src/i18n/locale/en.yml | 12 ++++ src/i18n/locale/es.yml | 13 +++++ src/pages/Worker/Card/WorkerOperator.vue | 73 ++++++------------------ src/router/modules/worker.js | 2 - 4 files changed, 44 insertions(+), 56 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index b73395df2..422c21d82 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -840,6 +840,18 @@ worker: debit: Debt credit: Have concept: Concept + operator: + numberOfWagons: Number of wagons + train: Train + itemPackingType: Item packing type + warehouse: Warehouse + sector: Sector + labeler: Printer + linesLimit: Lines limit + volumeLimit: Volume limit + sizeLimit: Size limit + isOnReservationMode: Reservation mode + Machine: Machine wagon: pageTitles: wagons: Wagons diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 2552c9549..ce2384d89 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -838,6 +838,19 @@ worker: debit: Debe credit: Haber concept: Concepto + operator: + numberOfWagons: Número de vagones + train: tren + itemPackingType: Tipo de embalaje + warehouse: Almacén + sector: Sector + labeler: Impresora + linesLimit: Líneas límite + volumeLimit: Volumen límite + sizeLimit: Tamaño límite + isOnReservationMode: Modo de reserva + Machine: Máquina + wagon: pageTitles: wagons: Vagones diff --git a/src/pages/Worker/Card/WorkerOperator.vue b/src/pages/Worker/Card/WorkerOperator.vue index 13b531a33..ce1c142e9 100644 --- a/src/pages/Worker/Card/WorkerOperator.vue +++ b/src/pages/Worker/Card/WorkerOperator.vue @@ -2,26 +2,17 @@ import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import { ref, computed } from 'vue'; - -import axios from 'axios'; -import useNotify from 'src/composables/useNotify.js'; import FetchData from 'components/FetchData.vue'; import FormModelPopup from 'src/components/FormModelPopup.vue'; -import { useVnConfirm } from 'composables/useVnConfirm'; - import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import VnInput from 'src/components/common/VnInput.vue'; -import { size } from 'cypress/types/lodash'; const { t } = useI18n(); -const { notify } = useNotify(); - const paginate = ref(); const dialog = ref(); const route = useRoute(); -const { openConfirmationModal } = useVnConfirm(); const routeId = computed(() => route.params.id); const initialData = computed(() => { @@ -40,52 +31,34 @@ const initialData = computed(() => { machineFk: null, }; }); - -// const deallocatePDA = async (deviceProductionFk) => { -// try { -// await axios.post(`Workers/${route.params.id}/deallocatePDA`, { -// pda: deviceProductionFk, -// }); -// notify(t('PDA deallocated'), 'positive'); -// } catch (err) { -// console.error('Error deallocating PDA'); -// } -// paginate.value.fetch(); -// }; - -function reloadData() { - // initialData.value.deviceProductionFk = null; - // initialData.value.simSerialNumber = null; - paginate.value.fetch(); -}