From c2a56382e1b44bd94fbbfd9f23fe436e57042521 Mon Sep 17 00:00:00 2001 From: nexxo Date: Mon, 27 Jul 2026 16:21:27 +0200 Subject: [PATCH] Build the dashboard cards to the template, and name what has no source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Card by card against the approved template: label with a chevron, the figure and its unit on one line, a line of context underneath, a bar across the foot. The order matches too — storage, seats, transfer, then the fourth slot. Three of the template's four visuals have no data behind them, and the code now says so where someone will read it rather than leaving the next person to wonder why the charts are missing: - Storage consumption is never sampled. The card states the contractually agreed allowance instead of drawing a ring at an invented level. - instance_traffic keeps one row per period, not a daily series, so there is nothing to draw a sparkline from. The share of the allowance is real, so that card carries a bar. - monitoring_targets records a state and a check time but no uptime figure, so there is no availability percentage to show. That slot carries the last backup — the thing this product is about and can actually prove. Co-Authored-By: Claude Opus 5 --- lang/de/dashboard.php | 1 + lang/en/dashboard.php | 1 + resources/views/livewire/dashboard.blade.php | 40 +++++++++++++++----- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/lang/de/dashboard.php b/lang/de/dashboard.php index 0d6ba0e..e84590a 100644 --- a/lang/de/dashboard.php +++ b/lang/de/dashboard.php @@ -31,6 +31,7 @@ return [ 'label' => 'Stammblatt', 'package' => 'Paket', 'operation' => 'Betriebsform', + 'last_backup' => 'Letzte Sicherung', 'location' => 'Serverstandort', 'users' => 'Benutzer', 'address' => 'Adresse', diff --git a/lang/en/dashboard.php b/lang/en/dashboard.php index 7cb8544..6026c2d 100644 --- a/lang/en/dashboard.php +++ b/lang/en/dashboard.php @@ -31,6 +31,7 @@ return [ 'label' => 'Master record', 'package' => 'Package', 'operation' => 'Operating mode', + 'last_backup' => 'Last backup', 'location' => 'Server location', 'users' => 'Users', 'address' => 'Address', diff --git a/resources/views/livewire/dashboard.blade.php b/resources/views/livewire/dashboard.blade.php index bc5cd5d..9f226db 100644 --- a/resources/views/livewire/dashboard.blade.php +++ b/resources/views/livewire/dashboard.blade.php @@ -54,10 +54,16 @@ @else {{-- ── What the customer has ───────────────────────────────────── - The template's metric card, and only the visuals there is data - for. Storage consumption is not measured yet, so that card states - the allowance instead of drawing a ring at an invented level — - this is the sheet a customer forwards to their auditor. --}} + The template's four cards, in its order and its form: label with a + chevron, the figure and its unit on one line, a line of context + underneath, the visual on the right or a bar across the foot. + + Three of the template's visuals have no source yet — storage + consumption is not sampled, instance_traffic keeps one row per + period rather than a daily series, and monitoring_targets records + a state but no uptime figure. Those cards carry the form and state + what is true instead of drawing a chart at an invented level. This + is the sheet a customer forwards to their auditor. --}}
@if ($instance->quota_gb) @endif @@ -77,9 +84,11 @@ class="animate-rise [animation-delay:100ms]" > @if ($seats['total']) - - - +
+ {{-- R4: width is data, not decoration. --}} +
+
@endif
@@ -94,7 +103,6 @@ class="animate-rise [animation-delay:140ms]" >
- {{-- R4: width is data, not decoration. --}}
$state === 'ok', @@ -114,7 +122,21 @@ @endif - @if ($location) + {{-- Where the template shows availability. There is no uptime + figure to show, so this card carries the thing this product is + actually about and can prove: when the last backup ran and + whether it was verified. --}} + @php $lastBackup = collect($proofs)->firstWhere('key', 'backup'); @endphp + @if ($lastBackup) + + @elseif ($location)