Files
ladill-queue/resources/views/qms/analytics/index.blade.php
T
isaaccladandCursor 89300fc6d6
Deploy Ladill Queue / deploy (push) Successful in 43s
Drop heroes from analytics pages and remove bordered show cards.
Analytics, Reports, Feedback, and Branches use simple headers again;
report and related show views use shadow panels instead of card borders.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 08:21:35 +00:00

45 lines
2.2 KiB
PHP

<x-app-layout title="Analytics">
<h1 class="mb-6 text-2xl font-semibold text-slate-900">Analytics</h1>
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
@foreach ([
'waiting' => 'Waiting now',
'serving' => 'Being served',
'served_today' => 'Served today',
'no_shows_today' => 'No-shows today',
'avg_wait_seconds' => 'Avg wait (sec)',
'appointments_today' => 'Appointments today',
'feedback_avg_30d' => 'Avg rating (30d)',
] as $key => $label)
<div class="rounded-2xl bg-white p-4 shadow-sm">
<div class="text-xs font-semibold uppercase text-slate-500">{{ $label }}</div>
<div class="mt-2 text-2xl font-semibold text-slate-900">{{ $overview[$key] ?? 0 }}</div>
</div>
@endforeach
</div>
<div class="mt-8 grid gap-6 lg:grid-cols-2">
<div class="rounded-2xl bg-white p-6 shadow-sm">
<h2 class="text-sm font-semibold uppercase text-slate-500">14-day trend</h2>
<table class="mt-4 w-full text-sm">
<thead><tr><th class="text-left py-1">Date</th><th class="text-right">Issued</th><th class="text-right">Completed</th></tr></thead>
<tbody>
@foreach ($trend as $day)
<tr class="border-t border-slate-100"><td class="py-1">{{ $day['date'] }}</td><td class="text-right">{{ $day['issued'] }}</td><td class="text-right">{{ $day['completed'] }}</td></tr>
@endforeach
</tbody>
</table>
</div>
<div class="rounded-2xl bg-white p-6 shadow-sm">
<h2 class="text-sm font-semibold uppercase text-slate-500">Busiest queues</h2>
<ul class="mt-4 space-y-2 text-sm">
@forelse ($overview['busiest_queues'] ?? [] as $q)
<li class="flex justify-between"><span>{{ $q['name'] }}</span><span class="font-medium">{{ $q['waiting'] }} waiting</span></li>
@empty
<li class="text-slate-500">No active queues.</li>
@endforelse
</ul>
</div>
</div>
</x-app-layout>