From 2f081841f922b0fd77676a40981b6497cd2d7d60 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 8 Feb 2024 13:59:37 +0100 Subject: [PATCH] refs #6795 fix claims --- src/components/common/VnSelectFilter.vue | 4 ++-- src/components/ui/CardSummary.vue | 7 +++---- src/components/ui/VnNotes.vue | 13 +++--------- src/composables/useArrayData.js | 3 ++- src/i18n/en/index.js | 1 + src/i18n/es/index.js | 1 + src/pages/Claim/Card/ClaimDescriptor.vue | 22 ++++++++++++++++++-- src/pages/Claim/Card/ClaimNotes.vue | 9 +++++++- src/pages/Claim/Card/ClaimSummary.vue | 26 ++++++++++++++++++------ src/pages/Claim/ClaimList.vue | 6 ------ 10 files changed, 60 insertions(+), 32 deletions(-) diff --git a/src/components/common/VnSelectFilter.vue b/src/components/common/VnSelectFilter.vue index accf92fc6..794d86e6b 100644 --- a/src/components/common/VnSelectFilter.vue +++ b/src/components/common/VnSelectFilter.vue @@ -79,7 +79,7 @@ onMounted(() => { if ($props.url && $props.modelValue) fetchFilter($props.modelValue); }); -async function filter(val, options) { +function filter(val, options) { const search = val.toString().toLowerCase(); if (!search) return options; @@ -119,7 +119,7 @@ async function filterHandler(val, update) { myOptions.value = await fetchFilter(val); return; } - myOptions.value = await filter(val, myOptionsOriginal.value); + myOptions.value = filter(val, myOptionsOriginal.value); }, (ref) => { if (val !== '' && ref.options.length > 0) { diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 33a6980d5..cb2c97746 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -90,17 +90,16 @@ watch(props, async () => { background-color: var(--vn-gray); > .q-card.vn-one { - width: 350px; flex: 1; } > .q-card.vn-two { - flex: 2; + flex: 40%; } > .q-card.vn-three { - flex: 4; + flex: 75%; } > .q-card.vn-max { - width: 100%; + flex: 100%; } > .q-card { diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue index fac74837f..0514b52e0 100644 --- a/src/components/ui/VnNotes.vue +++ b/src/components/ui/VnNotes.vue @@ -46,7 +46,7 @@ async function insert() { @@ -63,15 +63,8 @@ async function insert() { - - + + diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 3f031f1d1..b6b81f2d5 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -105,7 +105,8 @@ export function useArrayData(key, userOptions) { for (const row of response.data) store.data.push(row); } else { store.data = response.data; - updateRouter && updateStateParams(); + if (!document.querySelectorAll('[role="dialog"]')) + updateRouter && updateStateParams(); } store.isLoading = false; diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 3eb47d623..01f28e5f7 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -496,6 +496,7 @@ export default { responsible: 'Responsible', worker: 'Worker', redelivery: 'Redelivery', + returnOfMaterial: 'RMA', }, basicData: { customer: 'Customer', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index c4082cd71..793982b30 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -495,6 +495,7 @@ export default { responsible: 'Responsable', worker: 'Trabajador', redelivery: 'DevoluciĆ³n', + returnOfMaterial: 'RMA', }, basicData: { customer: 'Cliente', diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue index deaed94f8..2fa1ae528 100644 --- a/src/pages/Claim/Card/ClaimDescriptor.vue +++ b/src/pages/Claim/Card/ClaimDescriptor.vue @@ -1,5 +1,5 @@ diff --git a/src/pages/Claim/Card/ClaimNotes.vue b/src/pages/Claim/Card/ClaimNotes.vue index eeaffc85a..ed4c2040d 100644 --- a/src/pages/Claim/Card/ClaimNotes.vue +++ b/src/pages/Claim/Card/ClaimNotes.vue @@ -19,6 +19,12 @@ const claimFilter = { relation: 'worker', scope: { fields: ['id', 'firstName', 'lastName'], + include: { + relation: 'user', + scope: { + fields: ['id', 'nickname'], + }, + }, }, }, }; @@ -30,7 +36,8 @@ const body = { + + + + + - + {{ t('claim.summary.notes') }} @@ -248,6 +261,7 @@ function openDialog(dmsId) { + {{ t('claim.summary.photos') }} @@ -291,7 +305,7 @@ function openDialog(dmsId) { - + {{ t('claim.summary.actions') }} diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index 8c28b7a6a..945543822 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -118,12 +118,6 @@ function viewSummary(id) {