From 317746b1f5ed078064be819ef0c71d9b59c60ee6 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 5 Jul 2024 07:10:41 +0200 Subject: [PATCH 01/11] hotfix: refs #6769 Changes --- src/pages/Item/Card/ItemDiary.vue | 71 +++++++++++++++---- src/pages/Item/locale/en.yml | 4 +- src/pages/Item/locale/es.yml | 4 +- src/pages/Order/Card/OrderDescriptorProxy.vue | 17 +++++ 4 files changed, 77 insertions(+), 19 deletions(-) create mode 100644 src/pages/Order/Card/OrderDescriptorProxy.vue diff --git a/src/pages/Item/Card/ItemDiary.vue b/src/pages/Item/Card/ItemDiary.vue index c2687e0fd..9e2deef1c 100644 --- a/src/pages/Item/Card/ItemDiary.vue +++ b/src/pages/Item/Card/ItemDiary.vue @@ -5,7 +5,9 @@ import { useRoute } from 'vue-router'; import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue'; import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue'; +import OrderDescriptorProxy from 'src/pages/Order/Card/OrderDescriptorProxy.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; +import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import FetchData from 'components/FetchData.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue'; @@ -45,8 +47,8 @@ const columns = computed(() => [ align: 'left', }, { - label: t('itemDiary.id'), - name: 'id', + label: t('itemDiary.origin'), + name: 'origin', align: 'left', }, { @@ -65,8 +67,8 @@ const columns = computed(() => [ }, { - label: t('itemDiary.client'), - name: 'client', + label: t('itemDiary.entity'), + name: 'entity', align: 'left', format: (val) => dashIfEmpty(val), }, @@ -111,10 +113,30 @@ const getBadgeAttrs = (_date) => { return attrs; }; -const getIdDescriptor = (row) => { - let descriptor = EntryDescriptorProxy; - if (row.isTicket) descriptor = TicketDescriptorProxy; - return descriptor; +const originTypeMap = { + entry: { + descriptor: EntryDescriptorProxy, + icon: 'vn:entry', + }, + ticket: { + descriptor: TicketDescriptorProxy, + icon: 'vn:ticket', + }, + order: { + descriptor: OrderDescriptorProxy, + icon: 'vn:basket', + }, +}; + +const entityTypeMap = { + client: { + descriptor: CustomerDescriptorProxy, + icon: 'vn:client', + }, + supplier: { + descriptor: SupplierDescriptorProxy, + icon: 'vn:supplier', + }, }; onMounted(async () => { @@ -206,10 +228,10 @@ onUnmounted(() => (stateStore.rightDrawer = false)); -