-
-
-
-
-
Ближайший ЖД хаб
+
+
+
+
+
+
-
{{ formatDistance(nearestRailHub.distanceKm) }}
+
{{ $t('catalog.info.railHubs') }}
-
-
-
-
-
-
-
Ближайший морской хаб
-
-
{{ formatDistance(nearestSeaHub.distanceKm) }}
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
{{ $t('catalog.info.seaHubs') }}
+
+
+
+
+
+
@@ -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