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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user