From 9473ff214aea43e0db39643d8c1cc73f6fedd256 Mon Sep 17 00:00:00 2001 From: AzuTear Date: Wed, 17 Jun 2026 14:22:00 +0200 Subject: [PATCH] Replace dashboard day trend with yearly metrics --- .../src/views/admin/AdminDashboardView.vue | 82 ++++++++++++------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/frontend/src/views/admin/AdminDashboardView.vue b/frontend/src/views/admin/AdminDashboardView.vue index dbffe3a..8b2abb1 100644 --- a/frontend/src/views/admin/AdminDashboardView.vue +++ b/frontend/src/views/admin/AdminDashboardView.vue @@ -51,6 +51,44 @@ const metricCards = computed(() => ) const maxCategoryVotes = computed(() => Math.max(...topCategories.value.map((category) => category.votes), 1)) const totalCategoryVotes = computed(() => topCategories.value.reduce((sum, category) => sum + category.votes, 0)) +const yearTotals = computed(() => [ + { + label: 'Nominierungen gesamt', + value: metrics.value.find((metric) => metric.label === 'Nominierungen')?.value ?? 0, + note: `im Award-Jahr ${store.adminSeasonDetail.year}`, + icon: Sparkles, + }, + { + label: 'Stimmen gesamt', + value: metrics.value.find((metric) => metric.label === 'Stimmen')?.value ?? 0, + note: 'alle abgegebenen Votes', + icon: BarChart3, + }, + { + label: 'Kandidaten', + value: store.adminSeasonDetail.candidates.length, + note: 'fuer Voting und Archiv gepflegt', + icon: Users, + }, + { + label: 'Kategorien', + value: store.adminSeasonDetail.categories.length, + note: 'aktive Award-Kategorien', + icon: Tags, + }, + { + label: 'Offene Reviews', + value: store.adminSeasonDetail.pendingNominations.length, + note: 'brauchen Team-Entscheidung', + icon: Clock3, + }, + { + label: 'Risikohinweise', + value: store.admin.riskFlags.length, + note: 'aktuell offen', + icon: ShieldAlert, + }, +]) const priorityActions = computed(() => [ { label: 'Reviews bearbeiten', @@ -85,16 +123,6 @@ const priorityActions = computed(() => [ tone: 'emerald', }, ]) -const dayTrend = [ - { label: 'Mo', nominations: 48, votes: 62, reviews: 26 }, - { label: 'Di', nominations: 55, votes: 67, reviews: 24 }, - { label: 'Mi', nominations: 51, votes: 74, reviews: 20 }, - { label: 'Do', nominations: 63, votes: 78, reviews: 18 }, - { label: 'Fr', nominations: 69, votes: 86, reviews: 15 }, - { label: 'Sa', nominations: 76, votes: 91, reviews: 13 }, - { label: 'So', nominations: 82, votes: 96, reviews: 12 }, -] -const maxDayValue = Math.max(...dayTrend.flatMap((day) => [day.nominations, day.votes, day.reviews]))