From adcbd5dca179b1ad833377176c62418fa86d2fbb Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 10 Feb 2025 09:09:44 +0100 Subject: [PATCH] feat: refs #6802 add DepartmentDescriptorProxy to various components and update department handling --- src/pages/Claim/Card/ClaimDescriptor.vue | 9 ++++---- .../Customer/Defaulter/CustomerDefaulter.vue | 14 ++++++------ src/pages/Item/ItemRequest.vue | 22 +++++++++++++++++++ src/pages/Ticket/TicketList.vue | 1 - 4 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue index 5bb238e61..4e4a67fb7 100644 --- a/src/pages/Claim/Card/ClaimDescriptor.vue +++ b/src/pages/Claim/Card/ClaimDescriptor.vue @@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n'; import { toDateHourMinSec, toPercentage } from 'src/filters'; import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue'; import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue'; +import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; @@ -68,10 +69,10 @@ onMounted(async () => { [ }, }, }, - { - align: 'left', - name: 'isWorker', - label: t('Is worker'), - }, { align: 'left', name: 'departmentFk', @@ -136,6 +131,11 @@ const columns = computed(() => [ label: t('Has recovery'), name: 'hasRecovery', }, + { + align: 'left', + name: 'isWorker', + label: t('customer.params.isWorker'), + }, ]); const viewAddObservation = (rowsSelected) => { @@ -158,7 +158,7 @@ function exprBuilder(param, value) { case 'workerFk': return { [`co.${param}`]: value }; case 'departmentFk': - return { [`wd.${param}`]: value }; + return { [`c.${param}`]: value }; case 'amount': case 'clientFk': return { [`d.${param}`]: value }; @@ -255,5 +255,5 @@ es: Credit I.: Crédito A. Credit insurance: Crédito asegurado From: Desde - Has recovery: Tiene recobro + Has recovery: Recobro diff --git a/src/pages/Item/ItemRequest.vue b/src/pages/Item/ItemRequest.vue index 76e4b8083..676fd0a34 100644 --- a/src/pages/Item/ItemRequest.vue +++ b/src/pages/Item/ItemRequest.vue @@ -3,6 +3,7 @@ import { ref, computed, onMounted } from 'vue'; import { useI18n } from 'vue-i18n'; import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue'; import { useStateStore } from 'stores/useStateStore'; import { toCurrency } from 'filters/index'; import useNotify from 'src/composables/useNotify.js'; @@ -61,6 +62,7 @@ const columns = computed(() => [ columnClass: 'expand', }, { + align: 'left', label: t('item.buyRequest.requester'), name: 'requesterName', component: 'select', @@ -77,6 +79,19 @@ const columns = computed(() => [ }, columnClass: 'shrink', }, + { + align: 'left', + name: 'departmentFk', + label: t('customer.summary.team'), + component: 'select', + attrs: { + url: 'Departments', + }, + columnField: { + component: null, + }, + format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName), + }, { label: t('item.buyRequest.requested'), name: 'quantity', @@ -107,6 +122,7 @@ const columns = computed(() => [ }, columnClass: 'shrink', }, + { label: t('globals.item'), name: 'item', @@ -263,6 +279,12 @@ const onDenyAccept = (_, responseData) => { +