diff --git a/app/components/catalog/InfoPanel.vue b/app/components/catalog/InfoPanel.vue index 6b93732..da5a520 100644 --- a/app/components/catalog/InfoPanel.vue +++ b/app/components/catalog/InfoPanel.vue @@ -159,7 +159,7 @@ -
+

{{ $t('catalog.info.suppliersNearby') }} @@ -347,6 +347,27 @@ const offersWithPrice = computed(() => relatedOffers.value.filter(o => o?.pricePerUnit != null) ) +const suppliersByUuid = computed(() => { + const map = new Map() + relatedSuppliers.value.forEach(supplier => { + if (supplier?.uuid && supplier?.name) { + map.set(supplier.uuid, supplier.name) + } + if (supplier?.teamUuid && supplier?.name) { + map.set(supplier.teamUuid, supplier.name) + } + }) + return map +}) + +const getOfferSupplierName = (offer: InfoOfferItem) => { + if (offer.supplierName) return offer.supplierName + if (offer.supplierUuid && suppliersByUuid.value.has(offer.supplierUuid)) { + return suppliersByUuid.value.get(offer.supplierUuid) + } + return null +} + const selectedProductName = computed(() => { if (!props.selectedProduct) return '' const match = relatedProducts.value.find(p => p.uuid === props.selectedProduct)