From 352e65c5296307927970e0e0e642839cff6f8d81 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 26 Jul 2023 15:17:00 +0200 Subject: [PATCH 01/26] refs #5673 feat(claim): add development section --- src/composables/useArrayData.js | 14 +- src/i18n/es/index.js | 9 +- src/pages/Claim/Card/ClaimCard.vue | 1 - src/pages/Claim/Card/ClaimDevelopment.vue | 199 ++++++++++++++++++++++ src/router/modules/claim.js | 18 +- 5 files changed, 228 insertions(+), 13 deletions(-) create mode 100644 src/pages/Claim/Card/ClaimDevelopment.vue diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index c7808f9a8..4535cde0f 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -38,11 +38,11 @@ export function useArrayData(key, userOptions) { 'limit', 'skip', 'userParams', - 'userFilter' + 'userFilter', ]; if (typeof userOptions === 'object') { for (const option in userOptions) { - const isEmpty = userOptions[option] == null || userOptions[option] == '' + const isEmpty = userOptions[option] == null || userOptions[option] == ''; if (isEmpty || !allowedOptions.includes(option)) continue; if (Object.prototype.hasOwnProperty.call(store, option)) { @@ -73,7 +73,7 @@ export function useArrayData(key, userOptions) { Object.assign(params, store.userParams); - store.isLoading = true + store.isLoading = true; const response = await axios.get(store.url, { signal: canceller.signal, params, @@ -94,7 +94,7 @@ export function useArrayData(key, userOptions) { updateStateParams(); } - store.isLoading = false + store.isLoading = false; canceller = null; } @@ -153,8 +153,8 @@ export function useArrayData(key, userOptions) { }); } - const totalRows = computed(() => store.data && store.data.length || 0); - const isLoading = computed(() => store.isLoading || false) + const totalRows = computed(() => (store.data && store.data.length) || 0); + const isLoading = computed(() => store.isLoading || false); return { fetch, @@ -167,6 +167,6 @@ export function useArrayData(key, userOptions) { hasMoreData, totalRows, updateStateParams, - isLoading + isLoading, }; } diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 6328c8f5d..91a05685c 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -63,7 +63,7 @@ export default { webPayments: 'Pagos Web', createCustomer: 'Crear cliente', basicData: 'Datos básicos', - summary: 'Resumen' + summary: 'Resumen', }, list: { phone: 'Teléfono', @@ -243,6 +243,7 @@ export default { lines: 'Líneas', rma: 'RMA', photos: 'Fotos', + development: 'Trazabilidad', log: 'Registros de auditoría', }, list: { @@ -294,7 +295,7 @@ export default { result: 'Consecuencias', responsible: 'Responsable', worker: 'Trabajador', - redelivery: 'Devolución' + redelivery: 'Devolución', }, basicData: { customer: 'Cliente', @@ -411,7 +412,7 @@ export default { wagonEdit: 'Editar tipo', typesList: 'Listado tipos', typeCreate: 'Crear tipo', - typeEdit: 'Editar tipo' + typeEdit: 'Editar tipo', }, type: { name: 'Nombre', @@ -444,7 +445,7 @@ export default { minHeightBetweenTrays: 'La distancia mínima entre bandejas es ', maxWagonHeight: 'La altura máxima del vagón es ', uncompleteTrays: 'Hay bandejas sin completar', - } + }, }, components: { topbar: {}, diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue index 2691bbc51..3d22747c0 100644 --- a/src/pages/Claim/Card/ClaimCard.vue +++ b/src/pages/Claim/Card/ClaimCard.vue @@ -23,7 +23,6 @@ const entityId = computed(() => { }); const claimSections = [ { name: 'Notes', url: '/note/index', icon: 'draft' }, - { name: 'Development', url: '/development', icon: 'vn:traceability' }, { name: 'Action', url: '/action', icon: 'vn:actions' }, ]; diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue new file mode 100644 index 000000000..b9626b444 --- /dev/null +++ b/src/pages/Claim/Card/ClaimDevelopment.vue @@ -0,0 +1,199 @@ + + + + + + +en: + You are about to remove {count} rows: ' + You are about to remove {count} row | + You are about to remove {count} rows' +es: + Claimed lines: Líneas reclamadas + Delivered: Entregado + Quantity: Cantidad + Claimed: Reclamada + Description: Descripción + Price: Precio + Discount: Descuento + Actions: Acciones + Amount: Total + Amount Claimed: Cantidad reclamada + Delete claimed sales: Eliminar ventas reclamadas + Discount updated: Descuento actualizado + Claimed quantity: Cantidad reclamada + You are about to remove {count} rows: ' + Vas a eliminar {count} línea | + Vas a eliminar {count} líneas' + diff --git a/src/router/modules/claim.js b/src/router/modules/claim.js index c43ed5012..a39e60d8a 100644 --- a/src/router/modules/claim.js +++ b/src/router/modules/claim.js @@ -11,7 +11,14 @@ export default { redirect: { name: 'ClaimMain' }, menus: { main: ['ClaimList', 'ClaimRmaList'], - card: ['ClaimBasicData', 'ClaimLines', 'ClaimRma', 'ClaimPhotos', 'ClaimLog'], + card: [ + 'ClaimBasicData', + 'ClaimLines', + 'ClaimPhotos', + 'ClaimDevelopment', + 'ClaimRma', + 'ClaimLog', + ], }, children: [ { @@ -94,6 +101,15 @@ export default { }, component: () => import('src/pages/Claim/Card/ClaimPhoto.vue'), }, + { + name: 'ClaimDevelopment', + path: 'development', + meta: { + title: 'development', + icon: 'vn:traceability', + }, + component: () => import('src/pages/Claim/Card/ClaimDevelopment.vue'), + }, { name: 'ClaimLog', path: 'log', From b7bbb4ba417cb0cc0d8462fcb79c99ecb0123296 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 27 Jul 2023 16:05:23 +0200 Subject: [PATCH 02/26] refs #5673 feat(claim_development): add translation --- src/i18n/en/index.js | 9 +++++---- src/i18n/es/index.js | 2 +- src/pages/Claim/Card/ClaimCard.vue | 1 - src/pages/Claim/Card/ClaimDevelopment.vue | 6 ++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index a43c5fe7c..67c552b5a 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -244,6 +244,7 @@ export default { lines: 'Lines', rma: 'RMA', photos: 'Photos', + development: 'Development', log: 'Audit logs', }, list: { @@ -295,7 +296,7 @@ export default { result: 'Result', responsible: 'Responsible', worker: 'Worker', - redelivery: 'Redelivery' + redelivery: 'Redelivery', }, basicData: { customer: 'Customer', @@ -411,7 +412,7 @@ export default { wagonEdit: 'Edit wagon', typesList: 'Types List', typeCreate: 'Create type', - typeEdit: 'Edit type' + typeEdit: 'Edit type', }, type: { name: 'Name', @@ -431,7 +432,7 @@ export default { plate: 'Plate', volume: 'Volume', type: 'Type', - label: 'Label' + label: 'Label', }, warnings: { noData: 'No data available', @@ -444,7 +445,7 @@ export default { minHeightBetweenTrays: 'The minimum height between trays is ', maxWagonHeight: 'The maximum height of the wagon is ', uncompleteTrays: 'There are incomplete trays', - } + }, }, components: { topbar: {}, diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 91a05685c..b9a344ccf 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -242,8 +242,8 @@ export default { basicData: 'Datos básicos', lines: 'Líneas', rma: 'RMA', - photos: 'Fotos', development: 'Trazabilidad', + photos: 'Fotos', log: 'Registros de auditoría', }, list: { diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue index 3d22747c0..2b6e275f9 100644 --- a/src/pages/Claim/Card/ClaimCard.vue +++ b/src/pages/Claim/Card/ClaimCard.vue @@ -76,6 +76,5 @@ es: You can search by claim id or customer name: Puedes buscar por id de la reclamación o nombre del cliente Details: Detalles Notes: Notas - Development: Trazabilidad Action: Acción diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue index b9626b444..0e247b581 100644 --- a/src/pages/Claim/Card/ClaimDevelopment.vue +++ b/src/pages/Claim/Card/ClaimDevelopment.vue @@ -106,11 +106,10 @@ const columns = computed(() => [ selection="multiple" hide-pagination > -