Enhance transport mode handling by adding localized labels and updating related components in MapRegionsView and BranchView

This commit is contained in:
Torsten Schulz (local)
2025-12-09 11:53:56 +01:00
parent 71c62cf5e8
commit 25d7c70058
4 changed files with 43 additions and 11 deletions

View File

@@ -102,7 +102,7 @@
</td>
<td>{{ v.type.capacity }}</td>
<td>{{ conditionLabel(v.condition) }}</td>
<td>{{ v.type.transportMode }}</td>
<td>{{ transportModeLabel(v.type.transportMode) }}</td>
<td>{{ speedLabel(v.type.speed) }}</td>
<td>{{ formatDateTime(v.availableFrom) }}</td>
<td>
@@ -611,6 +611,15 @@ export default {
return translated;
},
transportModeLabel(mode) {
if (!mode) return '';
const key = String(mode);
const tKey = `falukant.branch.transport.modes.${key}`;
const translated = this.$t(tKey);
if (!translated || translated === tKey) return mode;
return translated;
},
async loadVehicles() {
if (!this.selectedBranch) return;
try {