diff --git a/src/pages/Item/Card/ItemDescriptorImage.vue b/src/pages/Item/Card/ItemDescriptorImage.vue index ab09fdbe1..0523f0c10 100644 --- a/src/pages/Item/Card/ItemDescriptorImage.vue +++ b/src/pages/Item/Card/ItemDescriptorImage.vue @@ -3,8 +3,7 @@ import { ref, onMounted } from 'vue'; import { useI18n } from 'vue-i18n'; import EditPictureForm from 'components/EditPictureForm.vue'; - -import { useSession } from 'src/composables/useSession'; +import VnImg from 'src/components/ui/VnImg.vue'; import axios from 'axios'; const $props = defineProps({ @@ -27,19 +26,12 @@ const $props = defineProps({ }); const { t } = useI18n(); -const { getTokenMultimedia } = useSession(); const image = ref(null); const editPhotoFormDialog = ref(null); const showEditPhotoForm = ref(false); const warehouseName = ref(null); -const getItemAvatar = async () => { - const token = getTokenMultimedia(); - const timeStamp = `timestamp=${Date.now()}`; - image.value = `/api/Images/catalog/200x200/${$props.entityId}/download?access_token=${token}&${timeStamp}`; -}; - const toggleEditPictureForm = () => { showEditPhotoForm.value = !showEditPhotoForm.value; }; @@ -62,28 +54,20 @@ const getWarehouseName = async (warehouseFk) => { }; onMounted(async () => { - getItemAvatar(); getItemConfigs(); image.value.store.$subscribe((x, v) => { handlePhotoUpdated(x.events.effect.newValue); }); }); -<<<<<<< Updated upstream -======= const handlePhotoUpdated = (url = null) => { image.value.reload(url); }; ->>>>>>> Stashed changes