From 46cb18b5ef688f434ca16e06954bc6f7896b6a4d Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 21 Nov 2024 10:19:30 +0100 Subject: [PATCH] feat: refs #7301 add exclude inventory supplier from list --- src/components/common/VnDateBadge.vue | 31 ++++ src/pages/Item/Card/ItemDescriptor.vue | 6 +- src/pages/Item/Card/ItemDescriptorImage.vue | 4 +- src/pages/Item/Card/ItemLastEntries.vue | 146 +++++++++++++----- src/pages/Item/Card/ItemSummary.vue | 2 +- src/pages/Item/locale/en.yml | 1 + src/pages/Item/locale/es.yml | 3 +- src/pages/Monitor/Ticket/MonitorTickets.vue | 33 +--- .../integration/item/itemLastEntries.spec.js | 20 +++ 9 files changed, 172 insertions(+), 74 deletions(-) create mode 100644 src/components/common/VnDateBadge.vue create mode 100644 test/cypress/integration/item/itemLastEntries.spec.js diff --git a/src/components/common/VnDateBadge.vue b/src/components/common/VnDateBadge.vue new file mode 100644 index 000000000..fd6c9e8a4 --- /dev/null +++ b/src/components/common/VnDateBadge.vue @@ -0,0 +1,31 @@ + + diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue index c51b320b5..4705525fb 100644 --- a/src/pages/Item/Card/ItemDescriptor.vue +++ b/src/pages/Item/Card/ItemDescriptor.vue @@ -16,7 +16,7 @@ import { cloneItem } from 'src/pages/Item/composables/cloneItem'; const $props = defineProps({ id: { - type: Number, + type: [Number, String], required: false, default: null, }, @@ -29,7 +29,7 @@ const $props = defineProps({ default: null, }, saleFk: { - type: Number, + type: [Number, String], default: null, }, warehouseFk: { @@ -61,7 +61,7 @@ onMounted(async () => { const data = ref(useCardDescription()); const setData = async (entity) => { if (!entity) return; - data.value = useCardDescription(entity.name, entity.id); + data.value = useCardDescription(entity?.name, entity?.id); await updateStock(); }; diff --git a/src/pages/Item/Card/ItemDescriptorImage.vue b/src/pages/Item/Card/ItemDescriptorImage.vue index 735e5eb4f..972ba579c 100644 --- a/src/pages/Item/Card/ItemDescriptorImage.vue +++ b/src/pages/Item/Card/ItemDescriptorImage.vue @@ -16,7 +16,7 @@ const $props = defineProps({ default: null, }, entityId: { - type: String, + type: [String, Number], default: null, }, showEditButton: { @@ -67,7 +67,7 @@ const handlePhotoUpdated = (evt = false) => {