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) => {