Deploy Ladill Queue / deploy (push) Successful in 56s
Phases 1–6: tickets, counters, displays, appointments, workflows, rules, analytics, reports, feedback, admin, device API, and Gitea deploy workflow for queue.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
42 lines
2.6 KiB
PHP
42 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">{{ $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 border bg-white p-4 dark:border-slate-700 dark:bg-slate-900">
|
|
<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 border bg-white p-6 dark:border-slate-700 dark:bg-slate-900">
|
|
@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"><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"><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 pb-2 text-sm"><dt class="text-slate-600">{{ str_replace('_', ' ', $key) }}</dt><dd class="font-medium">{{ $value }}</dd></div>
|
|
@endif
|
|
@endforeach
|
|
</dl>
|
|
@endif
|
|
</div>
|
|
</x-app-layout>
|