From 05c91ca352dbb941e67c022e911f23a33f45d8d8 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Thu, 5 Feb 2026 20:21:36 +0700 Subject: [PATCH] Show supplier/origin in offer cards --- app/components/CalcResultContent.vue | 9 +++++++++ app/components/MapSidebar.vue | 2 ++ app/components/catalog/CatalogMapPanel.vue | 2 ++ app/components/catalog/CatalogOffersSection.vue | 2 ++ app/components/catalog/InfoPanel.vue | 1 + app/components/catalog/OfferResultCard.vue | 16 +++++++++++++++- app/components/catalog/QuotePanel.vue | 2 ++ i18n/locales/en/catalogOfferCard.json | 5 ++++- i18n/locales/ru/catalogOfferCard.json | 5 ++++- 9 files changed, 41 insertions(+), 3 deletions(-) diff --git a/app/components/CalcResultContent.vue b/app/components/CalcResultContent.vue index 121e1ed..f7497cd 100644 --- a/app/components/CalcResultContent.vue +++ b/app/components/CalcResultContent.vue @@ -20,6 +20,7 @@ { return supplier?.kycProfileUuid || null } +const getSupplierName = (offerUuid?: string | null) => { + if (!offerUuid) return null + const offer = offersData.value.get(offerUuid) + if (!offer?.teamUuid) return null + const supplier = suppliersData.value.get(offer.teamUuid) + return supplier?.name || null +} + // Navigate to offer detail page const navigateToOffer = (offerUuid?: string | null) => { if (!offerUuid) return diff --git a/app/components/MapSidebar.vue b/app/components/MapSidebar.vue index 96fa860..53e043d 100644 --- a/app/components/MapSidebar.vue +++ b/app/components/MapSidebar.vue @@ -84,6 +84,7 @@
- {{ locationName || 'Локация' }} + {{ supplierDisplay }} + + {{ t('catalogOfferCard.labels.origin_label') }}: {{ originDisplay }} + {{ productName }}
@@ -29,6 +32,7 @@ import type { RouteStage } from './RouteStepper.vue' const props = withDefaults(defineProps<{ locationName?: string + supplierName?: string productName?: string pricePerUnit?: number | null currency?: string | null @@ -45,6 +49,16 @@ defineEmits<{ select: [] }>() +const { t } = useI18n() + +const supplierDisplay = computed(() => { + return props.supplierName || t('catalogOfferCard.labels.supplier_unknown') +}) + +const originDisplay = computed(() => { + return props.locationName || t('catalogOfferCard.labels.origin_unknown') +}) + const priceDisplay = computed(() => { if (!props.pricePerUnit) return null const currSymbol = getCurrencySymbol(props.currency) diff --git a/app/components/catalog/QuotePanel.vue b/app/components/catalog/QuotePanel.vue index d0be421..6dfe02b 100644 --- a/app/components/catalog/QuotePanel.vue +++ b/app/components/catalog/QuotePanel.vue @@ -27,6 +27,7 @@ @click="emit('select-offer', offer)" >