Add hero sections to Queue index pages and soften analytics cards.
Deploy Ladill Queue / deploy (push) Successful in 36s
Deploy Ladill Queue / deploy (push) Successful in 36s
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>
This commit is contained in:
@@ -1,42 +1,50 @@
|
||||
<x-app-layout title="Counters">
|
||||
<div class="flex flex-wrap items-start justify-between gap-4">
|
||||
<div>
|
||||
<h1 class="text-xl font-semibold text-slate-900">Counters</h1>
|
||||
<p class="mt-1 text-sm text-slate-500">Service desks and windows where staff call and serve tickets</p>
|
||||
</div>
|
||||
<a href="{{ route('qms.counters.create') }}" class="btn-primary">New counter</a>
|
||||
</div>
|
||||
<div class="space-y-6">
|
||||
<x-qms.page-hero
|
||||
badge="Desks · Windows · Consoles"
|
||||
title="Counters"
|
||||
description="Service desks and windows where staff call and serve tickets — each counter links to one or more queues."
|
||||
:stats="[
|
||||
['value' => number_format($heroStats['total']), 'label' => 'Counters'],
|
||||
['value' => number_format($heroStats['available']), 'label' => 'Available'],
|
||||
['value' => number_format($heroStats['busy']), 'label' => 'Busy'],
|
||||
]">
|
||||
<x-slot name="actions">
|
||||
<a href="{{ route('qms.counters.create') }}" class="btn-primary">New counter</a>
|
||||
</x-slot>
|
||||
</x-qms.page-hero>
|
||||
|
||||
<div class="mt-5 grid gap-4 md:grid-cols-2 xl:grid-cols-3">
|
||||
@forelse ($counters as $counter)
|
||||
<article class="flex flex-col rounded-2xl border border-slate-200 bg-white p-5 shadow-sm">
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
<a href="{{ route('qms.counters.show', $counter) }}" class="text-lg font-semibold text-slate-900 hover:text-indigo-700">{{ $counter->name }}</a>
|
||||
<p class="mt-1 text-sm text-slate-500">{{ $counter->branch?->name }}</p>
|
||||
</div>
|
||||
<x-counter-status :status="$counter->status" />
|
||||
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
|
||||
@forelse ($counters as $counter)
|
||||
<article class="flex flex-col rounded-2xl border border-slate-200 bg-white p-5 shadow-sm">
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
<a href="{{ route('qms.counters.show', $counter) }}" class="text-lg font-semibold text-slate-900 hover:text-indigo-700">{{ $counter->name }}</a>
|
||||
<p class="mt-1 text-sm text-slate-500">{{ $counter->branch?->name }}</p>
|
||||
</div>
|
||||
<x-counter-status :status="$counter->status" />
|
||||
</div>
|
||||
<p class="mt-4 text-sm text-slate-600">
|
||||
<span class="font-medium text-slate-700">Queues:</span>
|
||||
{{ $counter->serviceQueues->pluck('name')->join(', ') ?: 'None assigned' }}
|
||||
</p>
|
||||
<div class="mt-5 btn-group">
|
||||
<a href="{{ route('qms.console.show', $counter) }}" class="btn-primary flex-1 text-center text-sm">Open console</a>
|
||||
<a href="{{ route('qms.counters.show', $counter) }}" class="btn-secondary text-sm">Details</a>
|
||||
</div>
|
||||
</article>
|
||||
@empty
|
||||
<div class="col-span-full">
|
||||
<x-empty-state title="No counters yet" description="Create a counter for each service desk or teller window.">
|
||||
<x-slot:action>
|
||||
<a href="{{ route('qms.counters.create') }}" class="btn-primary">Create your first counter</a>
|
||||
</x-slot:action>
|
||||
</x-empty-state>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
<p class="mt-4 text-sm text-slate-600">
|
||||
<span class="font-medium text-slate-700">Queues:</span>
|
||||
{{ $counter->serviceQueues->pluck('name')->join(', ') ?: 'None assigned' }}
|
||||
</p>
|
||||
<div class="mt-5 btn-group">
|
||||
<a href="{{ route('qms.console.show', $counter) }}" class="btn-primary flex-1 text-center text-sm">Open console</a>
|
||||
<a href="{{ route('qms.counters.show', $counter) }}" class="btn-secondary text-sm">Details</a>
|
||||
</div>
|
||||
</article>
|
||||
@empty
|
||||
<div class="col-span-full">
|
||||
<x-empty-state title="No counters yet" description="Create a counter for each service desk or teller window.">
|
||||
<x-slot:action>
|
||||
<a href="{{ route('qms.counters.create') }}" class="btn-primary">Create your first counter</a>
|
||||
</x-slot:action>
|
||||
</x-empty-state>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
@if ($counters->hasPages())
|
||||
<div class="mt-4">{{ $counters->links() }}</div>
|
||||
@endif
|
||||
@if ($counters->hasPages())
|
||||
<div>{{ $counters->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user