Files
ladill-queue/resources/views/qms/analytics/index.blade.php
T
isaaccladandCursor bf879d6abe
Deploy Ladill Queue / deploy (push) Successful in 36s
Add hero sections to Queue index pages and soften analytics cards.
Introduce shared x-qms.page-hero with summary stats across queues,
tickets, counters, admin pages, and insights; remove bordered cards on
Analytics, Reports, Feedback, and Branches list views.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 07:32:10 +00:00

52 lines
2.7 KiB
PHP

<x-app-layout title="Analytics">
<div class="space-y-6">
<x-qms.page-hero
badge="Live ops · Trends · Performance"
title="Analytics"
description="Real-time queue performance, wait times, and customer satisfaction across your organization."
:stats="[
['value' => number_format($overview['waiting'] ?? 0), 'label' => 'Waiting now'],
['value' => number_format($overview['served_today'] ?? 0), 'label' => 'Served today'],
['value' => $overview['feedback_avg_30d'] ?? '—', 'label' => 'Avg rating (30d)'],
]" />
<div class="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>
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
@foreach ([
'serving' => 'Being served',
'no_shows_today' => 'No-shows today',
'avg_wait_seconds' => 'Avg wait (sec)',
'appointments_today' => 'Appointments today',
] 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>
</x-app-layout>