Enhance transport mode handling by adding localized labels and updating related components in MapRegionsView and BranchView
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user