From bccda8fba61abc4ed0db7beed5a9b1096f2caddb Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 4 Mar 2025 11:47:07 +0100 Subject: [PATCH] refactor: refs #6802 replace salesPerson references with department in claims and tickets --- src/i18n/locale/es.yml | 1 - src/pages/Claim/Card/ClaimLines.vue | 2 +- src/pages/Claim/Card/ClaimSummary.vue | 11 ++++++---- src/pages/Claim/ClaimFilter.vue | 16 ++++++-------- src/pages/Claim/ClaimList.vue | 21 +++++++++++++++++++ src/pages/Shelving/Card/ShelvingFilter.vue | 15 ++----------- src/pages/Ticket/Card/TicketEditMana.vue | 2 +- src/pages/Ticket/TicketAdvance.vue | 20 +++++++++--------- src/pages/Ticket/TicketFuture.vue | 2 +- .../integration/client/clientList.spec.js | 2 +- 10 files changed, 50 insertions(+), 42 deletions(-) diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 1281480c8..48b2162a6 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -529,7 +529,6 @@ ticket: state: Estado shipped: Enviado landed: Entregado - salesPerson: Comercial total: Total card: customerId: ID cliente diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue index dee03b95d..7c948bb2f 100644 --- a/src/pages/Claim/Card/ClaimLines.vue +++ b/src/pages/Claim/Card/ClaimLines.vue @@ -117,7 +117,7 @@ const selected = ref([]); const mana = ref(0); async function fetchMana() { const ticketId = claim.value.ticketFk; - const response = await axios.get(`Tickets/${ticketId}/getSalesPersonMana`); + const response = await axios.get(`Tickets/${ticketId}/getDepartmentMana`); mana.value = response.data; } diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue index 0bc18dc8d..8ad7af1af 100644 --- a/src/pages/Claim/Card/ClaimSummary.vue +++ b/src/pages/Claim/Card/ClaimSummary.vue @@ -19,6 +19,7 @@ import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue'; import ClaimDescriptorMenu from './ClaimDescriptorMenu.vue'; const route = useRoute(); @@ -255,10 +256,12 @@ function claimUrl(section) { :label="t('customer.summary.team')" > diff --git a/src/pages/Claim/ClaimFilter.vue b/src/pages/Claim/ClaimFilter.vue index 0fe7fc588..37146865c 100644 --- a/src/pages/Claim/ClaimFilter.vue +++ b/src/pages/Claim/ClaimFilter.vue @@ -44,15 +44,14 @@ const props = defineProps({ is-outlined /> diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue index 41d0c5598..06996c2c1 100644 --- a/src/pages/Claim/ClaimList.vue +++ b/src/pages/Claim/ClaimList.vue @@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'; import { toDate } from 'filters/index'; import ClaimFilter from './ClaimFilter.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; +import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import ClaimSummary from './Card/ClaimSummary.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; @@ -48,6 +49,20 @@ const columns = computed(() => [ }, columnClass: 'expand', }, + { + align: 'left', + name: 'departmentFk', + label: t('customer.summary.team'), + component: 'select', + attrs: { + url: 'Departments', + }, + create: true, + columnField: { + component: null, + }, + format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName), + }, { align: 'left', label: t('claim.attendedBy'), @@ -152,6 +167,12 @@ const STATE_COLOR = { +