Refactor SaleSection component: Introduce methods section to organize component logic, enhancing readability and maintainability. This change improves the structure of the component by clearly separating computed properties and methods.

This commit is contained in:
Torsten Schulz (local)
2026-01-29 15:11:16 +01:00
parent 032e336b65
commit ba63b3504f

View File

@@ -251,6 +251,8 @@
return new Date(a.eta).getTime() - new Date(b.eta).getTime();
});
},
},
methods: {
speedLabel(value) {
if (value == null) return this.$t('falukant.branch.transport.speed.unknown') || '—';
if (typeof value === 'object') {
@@ -264,7 +266,6 @@
const translated = this.$t(tKey);
return (!translated || translated === tKey) ? key : translated;
},
},
async mounted() {
await this.loadInventory();
await this.loadTransports();