Files
ladill-queue/resources/views/qms/reports/show.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

44 lines
2.6 KiB
PHP

<x-app-layout :title="$label">
<div class="mb-6 flex flex-wrap items-end justify-between gap-4">
<div>
<a href="{{ route('qms.reports.index') }}" class="text-sm text-indigo-600"> Reports</a>
<h1 class="mt-2 text-2xl font-semibold text-slate-900">{{ $label }}</h1>
</div>
@if ($canExport)
<a href="{{ route('qms.reports.export', array_merge(['type' => $type], request()->only(['from', 'to', 'branch_id']))) }}" class="btn-primary">Export CSV</a>
@endif
</div>
<form method="GET" class="mb-6 flex flex-wrap gap-3 rounded-2xl bg-white p-4 shadow-sm">
<input type="date" name="from" value="{{ $from }}" class="rounded-lg border-slate-300 text-sm">
<input type="date" name="to" value="{{ $to }}" class="rounded-lg border-slate-300 text-sm">
<select name="branch_id" class="rounded-lg border-slate-300 text-sm">
<option value="">All branches</option>
@foreach ($branches as $branch)
<option value="{{ $branch->id }}" @selected($branchId == $branch->id)>{{ $branch->name }}</option>
@endforeach
</select>
<button type="submit" class="rounded-lg bg-slate-100 px-4 py-2 text-sm">Apply</button>
</form>
<div class="rounded-2xl bg-white p-6 shadow-sm">
@if ($type === 'wait_times' && isset($data['hourly']))
<table class="w-full text-sm"><thead><tr><th class="text-left py-2">Hour</th><th class="text-right">Avg wait (sec)</th></tr></thead>
<tbody>@foreach ($data['hourly'] as $row)<tr class="border-t border-slate-100"><td class="py-2">{{ $row['hour'] }}:00</td><td class="text-right">{{ $row['avg_wait_seconds'] }}</td></tr>@endforeach</tbody>
</table>
@elseif ($type === 'counters' && isset($data['counters']))
<table class="w-full text-sm"><thead><tr><th class="text-left py-2">Counter</th><th class="text-right">Served</th></tr></thead>
<tbody>@foreach ($data['counters'] as $row)<tr class="border-t border-slate-100"><td class="py-2">{{ $row['name'] }}</td><td class="text-right">{{ $row['served'] }}</td></tr>@endforeach</tbody>
</table>
@else
<dl class="space-y-3">
@foreach ($data as $key => $value)
@if (!is_array($value))
<div class="flex justify-between border-b border-slate-100 pb-2 text-sm"><dt class="text-slate-600">{{ str_replace('_', ' ', $key) }}</dt><dd class="font-medium text-slate-900">{{ $value }}</dd></div>
@endif
@endforeach
</dl>
@endif
</div>
</x-app-layout>