diff --git a/app/components/catalog/InfoPanel.vue b/app/components/catalog/InfoPanel.vue index bfbac05..9c4cdee 100644 --- a/app/components/catalog/InfoPanel.vue +++ b/app/components/catalog/InfoPanel.vue @@ -41,15 +41,21 @@ {{ formatPrice(entity.pricePerUnit) }} {{ entity.currency || 'RUB' }}/{{ entity.unit || 't' }}

- - + + + {{ supplierDisplayName }} + + + @@ -209,6 +215,16 @@ const entityIcon = computed(() => { return 'lucide:info' }) +// Supplier name for offer (from entity or relatedSuppliers) +const supplierDisplayName = computed(() => { + if (props.entity?.supplierName) return props.entity.supplierName + if (props.entity?.teamName) return props.entity.teamName + if (relatedSuppliers.value.length > 0 && relatedSuppliers.value[0]?.name) { + return relatedSuppliers.value[0].name + } + return null +}) + // Format price const formatPrice = (price: number | string) => { const num = typeof price === 'string' ? parseFloat(price) : price diff --git a/app/pages/catalog/index.vue b/app/pages/catalog/index.vue index 7b22ee7..e8b25fe 100644 --- a/app/pages/catalog/index.vue +++ b/app/pages/catalog/index.vue @@ -298,12 +298,15 @@ const relatedPoints = computed(() => { }> = [] // Add current entity first (the one we're viewing in InfoPanel) - if (entity.value?.latitude && entity.value?.longitude) { + // For offers, coordinates are in locationLatitude/locationLongitude + const lat = entity.value?.latitude ?? entity.value?.locationLatitude + const lon = entity.value?.longitude ?? entity.value?.locationLongitude + if (lat && lon) { points.push({ uuid: infoId.value.uuid, - name: entity.value.name || '', - latitude: Number(entity.value.latitude), - longitude: Number(entity.value.longitude), + name: entity.value.name || entity.value.productName || '', + latitude: Number(lat), + longitude: Number(lon), type: infoId.value.type }) }