Refactor age display logic in DashboardWidget: Simplify age representation to always show years, removing the conditional check for days. This change streamlines the age display functionality.
This commit is contained in:
@@ -127,11 +127,7 @@ export default {
|
||||
const numAge = Number(ageValue);
|
||||
// Backend gibt Tage zurück (calcAge verwendet differenceInDays)
|
||||
// Wenn < 365 Tage: Tage anzeigen, sonst Jahre
|
||||
if (numAge < 365) {
|
||||
return `${numAge} ${this.$t('falukant.overview.metadata.days')}`;
|
||||
} else {
|
||||
return `${numAge} ${this.$t('falukant.overview.metadata.years')}`;
|
||||
}
|
||||
return `${numAge} ${this.$t('falukant.overview.metadata.years')}`;
|
||||
},
|
||||
dataList() {
|
||||
if (!Array.isArray(this.data) || this.data.length === 0) return [];
|
||||
|
||||
Reference in New Issue
Block a user