Adds dashboard stat cards and demo banner

Introduces StatCard ViewComponent with configurable stat display
Adds demo mode banner to application layout
Refactors dashboard stats to use dynamic component rendering

Improves dashboard presentation and user experience
This commit is contained in:
Janus C. H. Knudsen 2026-01-11 11:17:51 +01:00
parent 217a9cd95c
commit 9b2ace7bc0
5 changed files with 272 additions and 30 deletions

View file

@ -1,5 +1,5 @@
@page "/"
@using PlanTempus.Application.Features.Dashboard.Pages
@using PlanTempus.Application.Features.Dashboard.Pages
@model PlanTempus.Application.Features.Dashboard.Pages.IndexModel
@{
ViewData["Title"] = "Dashboard";
@ -8,34 +8,10 @@
<swp-page-container>
<!-- Stats Bar -->
<swp-stats-bar>
<swp-stat-card class="highlight">
<swp-stat-value>12</swp-stat-value>
<swp-stat-label>Bookinger i dag</swp-stat-label>
<swp-stat-trend class="up">
<i class="ph ph-check-circle"></i>
4 gennemført, 2 i gang
</swp-stat-trend>
</swp-stat-card>
<swp-stat-card class="success">
<swp-stat-value>8.450 kr</swp-stat-value>
<swp-stat-label>Forventet omsætning</swp-stat-label>
<swp-stat-trend class="up">
<i class="ph ph-trend-up"></i>
+12% vs. gennemsnit
</swp-stat-trend>
</swp-stat-card>
<swp-stat-card>
<swp-stat-value>78%</swp-stat-value>
<swp-stat-label>Belægningsgrad</swp-stat-label>
<swp-stat-trend class="up">
<i class="ph ph-trend-up"></i>
God kapacitet
</swp-stat-trend>
</swp-stat-card>
<swp-stat-card class="warning">
<swp-stat-value>4</swp-stat-value>
<swp-stat-label>Kræver opmærksomhed</swp-stat-label>
</swp-stat-card>
@await Component.InvokeAsync("StatCard", "bookings-today")
@await Component.InvokeAsync("StatCard", "expected-revenue")
@await Component.InvokeAsync("StatCard", "occupancy-rate")
@await Component.InvokeAsync("StatCard", "needs-attention")
</swp-stats-bar>
<!-- Dashboard Content -->