From b09ecefad4ec93451ef9f6d70bfe927ddc7eb771 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 4 Apr 2024 14:12:16 +0200 Subject: [PATCH] feat: refs #6636 Added pickup in claim --- src/components/common/VnLog.vue | 4 +-- src/i18n/en/index.js | 9 +++++- src/i18n/es/index.js | 9 +++++- src/pages/Claim/Card/ClaimBasicData.vue | 28 ++++++++++++++----- src/pages/Claim/Card/ClaimSummary.vue | 7 ++--- .../__tests__/components/common/VnLog.spec.js | 4 +-- 6 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 794e4cc8f..c1cc78f54 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -1030,7 +1030,7 @@ en: ticketCreated: Created created: Created isChargedToMana: Charged to mana - hasToPickUp: Has to pick Up + pickup: Type of pickup dmsFk: Document ID text: Description claimStateFk: Claim State @@ -1069,7 +1069,7 @@ es: ticketCreated: Creado created: Creado isChargedToMana: Cargado a maná - hasToPickUp: Se debe recoger + pickup: Se debe recoger dmsFk: ID documento text: Descripción claimStateFk: Estado de la reclamación diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 5e0bba5c0..650ae78ce 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -545,6 +545,7 @@ export default { assignedTo: 'Assigned', attendedBy: 'Attended by', created: 'Created', + pickup: 'Pickup', state: 'State', details: 'Details', item: 'Item', @@ -566,13 +567,19 @@ export default { responsible: 'Responsible', worker: 'Worker', redelivery: 'Redelivery', + null: 'No', + agency: 'Agency', + delivery: 'Delivery', }, basicData: { customer: 'Customer', assignedTo: 'Assigned', created: 'Created', state: 'State', - picked: 'Picked', + pickup: 'Pickup', + null: 'No', + agency: 'Agency', + delivery: 'Delivery', }, photo: { fileDescription: 'Claim id {claimId} from client {clientName} id {clientId}', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index a4aa9d8cc..1525f6ac6 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -544,6 +544,7 @@ export default { assignedTo: 'Asignada a', attendedBy: 'Atendida por', created: 'Creada', + pickup: 'Recogida', state: 'Estado', details: 'Detalles', item: 'Artículo', @@ -565,13 +566,19 @@ export default { responsible: 'Responsable', worker: 'Trabajador', redelivery: 'Devolución', + null: 'No', + agency: 'Agencia', + delivery: 'Reparto', }, basicData: { customer: 'Cliente', assignedTo: 'Asignada a', created: 'Creada', state: 'Estado', - picked: 'Recogida', + pickup: 'Recogida', + null: 'No', + agency: 'Agencia', + delivery: 'Reparto', }, photo: { fileDescription: diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index c7c5ab8a2..57ecc6cad 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -24,7 +24,7 @@ const claimFilter = { 'workerFk', 'claimStateFk', 'packages', - 'hasToPickUp', + 'pickup', ], include: [ { @@ -51,6 +51,13 @@ function setClaimStates(data) { claimStatesCopy.value = data; } +// Simulate ENUM +let optionsList = [ + { id: null, description: t('claim.basicData.null') }, + { id: 'agency', description: t('claim.basicData.agency') }, + { id: 'delivery', description: t('claim.basicData.delivery') }, +]; + const workerFilter = { options: workers, filterFn: (options, value) => { @@ -168,13 +175,20 @@ const statesFilter = { type="number" /> - -
- + +
diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue index 612e0d755..19e3f00ef 100644 --- a/src/pages/Claim/Card/ClaimSummary.vue +++ b/src/pages/Claim/Card/ClaimSummary.vue @@ -220,10 +220,9 @@ function openDialog(dmsId) { /> - diff --git a/test/vitest/__tests__/components/common/VnLog.spec.js b/test/vitest/__tests__/components/common/VnLog.spec.js index b654bff9b..53d2732a0 100644 --- a/test/vitest/__tests__/components/common/VnLog.spec.js +++ b/test/vitest/__tests__/components/common/VnLog.spec.js @@ -38,10 +38,10 @@ describe('VnLog', () => { action: 'update', changedModel: 'Claim', oldInstance: { - hasToPickUp: false, + pickup: null, }, newInstance: { - hasToPickUp: true, + pickup: 'agency', }, creationDate: '2023-09-18T12:25:34.000Z', changedModelId: '1',