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)); -