From 4669911162852a9cbfc687a67d1cfdd5ec67dd2f Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Thu, 5 Feb 2026 19:37:51 +0700 Subject: [PATCH] Group hubs by rail/sea in info panel --- app/components/catalog/InfoPanel.vue | 84 ++++++++++++++-------------- i18n/locales/en/catalog.json | 6 +- i18n/locales/ru/catalog.json | 6 +- 3 files changed, 50 insertions(+), 46 deletions(-) diff --git a/app/components/catalog/InfoPanel.vue b/app/components/catalog/InfoPanel.vue index 917c679..689be3a 100644 --- a/app/components/catalog/InfoPanel.vue +++ b/app/components/catalog/InfoPanel.vue @@ -190,41 +190,46 @@
{{ $t('catalog.info.noHubs') }}
-
-
- -
-
-
- -
-
Ближайший ЖД хаб
+
+ -
- -
+
@@ -338,18 +343,13 @@ const formatPrice = (price: number | string) => { return new Intl.NumberFormat('ru-RU').format(num) } -const formatDistance = (km?: number | null) => { - if (!km && km !== 0) return '' - return `${Math.round(km).toLocaleString('ru-RU')} км` -} +const railHubs = computed(() => + relatedHubs.value.filter(h => h.transportTypes?.includes('rail')) +) -const nearestRailHub = computed(() => { - return relatedHubs.value.find(h => h.transportTypes?.includes('rail')) -}) - -const nearestSeaHub = computed(() => { - return relatedHubs.value.find(h => h.transportTypes?.includes('sea')) -}) +const seaHubs = computed(() => + relatedHubs.value.filter(h => h.transportTypes?.includes('sea')) +) // Mock KYC teaser data (will be replaced with real data later) const kycTeaser = computed(() => { diff --git a/i18n/locales/en/catalog.json b/i18n/locales/en/catalog.json index 600d106..ad5225e 100644 --- a/i18n/locales/en/catalog.json +++ b/i18n/locales/en/catalog.json @@ -72,7 +72,9 @@ "active": "Active", "inactive": "Inactive", "sourcesCount": "Data Sources", - "viewFullKyc": "View full company profile" + "viewFullKyc": "View full company profile", + "railHubs": "Rail hubs", + "seaHubs": "Sea hubs" }, "modes": { "explore": "Explore", @@ -95,4 +97,4 @@ "list": "List", "applyFilter": "Apply filter" } -} +} \ No newline at end of file diff --git a/i18n/locales/ru/catalog.json b/i18n/locales/ru/catalog.json index b6f8a04..62379b8 100644 --- a/i18n/locales/ru/catalog.json +++ b/i18n/locales/ru/catalog.json @@ -72,7 +72,9 @@ "active": "Действующая", "inactive": "Недействующая", "sourcesCount": "Источников данных", - "viewFullKyc": "Подробнее о компании" + "viewFullKyc": "Подробнее о компании", + "railHubs": "ЖД хабы", + "seaHubs": "Морские хабы" }, "modes": { "explore": "Исследовать", @@ -95,4 +97,4 @@ "list": "Список", "applyFilter": "Применить фильтр" } -} +} \ No newline at end of file