From 3870f34ef8842daf2d62b2ca371b7b05258c611b Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Fri, 30 Jan 2026 13:34:02 +0100 Subject: [PATCH] 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. --- frontend/src/components/DashboardWidget.vue | 6 +- frontend/src/views/home/LoggedInView.vue | 65 +++++++++++---------- 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/frontend/src/components/DashboardWidget.vue b/frontend/src/components/DashboardWidget.vue index 66e2129..11dcb36 100644 --- a/frontend/src/components/DashboardWidget.vue +++ b/frontend/src/components/DashboardWidget.vue @@ -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 []; diff --git a/frontend/src/views/home/LoggedInView.vue b/frontend/src/views/home/LoggedInView.vue index aec6088..aa2da1d 100644 --- a/frontend/src/views/home/LoggedInView.vue +++ b/frontend/src/views/home/LoggedInView.vue @@ -58,29 +58,30 @@