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,31 +1,51 @@
|
||||
@php
|
||||
$canManageBranches = app(\App\Services\Qms\QmsPermissions::class)->can(
|
||||
app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()),
|
||||
'admin.branches.manage'
|
||||
);
|
||||
@endphp
|
||||
|
||||
<x-app-layout title="Branches">
|
||||
<div class="mb-6 flex items-center justify-between">
|
||||
<h1 class="text-2xl font-semibold">Branches</h1>
|
||||
@if(app(\App\Services\Qms\QmsPermissions::class)->can(app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()), 'admin.branches.manage'))
|
||||
<a href="{{ route('qms.branches.create') }}" class="btn-primary">New branch</a>
|
||||
@endif
|
||||
</div>
|
||||
@include('partials.flash')
|
||||
<div class="overflow-hidden rounded-2xl border bg-white dark:border-slate-700 dark:bg-slate-900">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Name</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Code</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Departments</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Status</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@foreach ($branches as $branch)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-sm font-medium">{{ $branch->name }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $branch->code ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $branch->departments_count }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $branch->is_active ? 'Active' : 'Inactive' }}</td>
|
||||
<td class="px-4 py-3 text-right"><a href="{{ route('qms.branches.edit', $branch) }}" class="text-sm text-indigo-600">Edit</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="space-y-6">
|
||||
<x-qms.page-hero
|
||||
badge="Locations · Sites · Coverage"
|
||||
title="Branches"
|
||||
description="Organize queue operations by location — branches scope queues, counters, displays, and team access."
|
||||
:stats="[
|
||||
['value' => number_format($heroStats['total']), 'label' => 'Branches'],
|
||||
['value' => number_format($heroStats['active']), 'label' => 'Active'],
|
||||
['value' => number_format($heroStats['departments']), 'label' => 'Departments'],
|
||||
]">
|
||||
@if ($canManageBranches)
|
||||
<x-slot name="actions">
|
||||
<a href="{{ route('qms.branches.create') }}" class="btn-primary">New branch</a>
|
||||
</x-slot>
|
||||
@endif
|
||||
</x-qms.page-hero>
|
||||
|
||||
@include('partials.flash')
|
||||
|
||||
<div class="overflow-hidden rounded-2xl bg-white">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Name</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Code</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Departments</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Status</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@foreach ($branches as $branch)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-sm font-medium">{{ $branch->name }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $branch->code ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $branch->departments_count }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $branch->is_active ? 'Active' : 'Inactive' }}</td>
|
||||
<td class="px-4 py-3 text-right"><a href="{{ route('qms.branches.edit', $branch) }}" class="text-sm text-indigo-600">Edit</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@@ -1,31 +1,51 @@
|
||||
@php
|
||||
$canManageDepartments = app(\App\Services\Qms\QmsPermissions::class)->can(
|
||||
app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()),
|
||||
'admin.departments.manage'
|
||||
);
|
||||
@endphp
|
||||
|
||||
<x-app-layout title="Departments">
|
||||
<div class="mb-6 flex items-center justify-between">
|
||||
<h1 class="text-2xl font-semibold">Departments</h1>
|
||||
@if(app(\App\Services\Qms\QmsPermissions::class)->can(app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()), 'admin.departments.manage'))
|
||||
<a href="{{ route('qms.departments.create') }}" class="btn-primary">New department</a>
|
||||
@endif
|
||||
</div>
|
||||
@include('partials.flash')
|
||||
<div class="overflow-hidden rounded-2xl border bg-white dark:border-slate-700 dark:bg-slate-900">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Name</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Branch</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Type</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@forelse ($departments as $department)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-sm">{{ $department->name }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $department->branch?->name }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $types[$department->type] ?? $department->type }}</td>
|
||||
<td class="px-4 py-3 text-right"><a href="{{ route('qms.departments.edit', $department) }}" class="text-sm text-indigo-600">Edit</a></td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="4" class="px-6 py-12 text-center text-sm text-slate-500">No departments.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="space-y-6">
|
||||
<x-qms.page-hero
|
||||
badge="Reception · Service · Routing"
|
||||
title="Departments"
|
||||
description="Group queues and counters by department within each branch — reception, customer service, payments, and more."
|
||||
:stats="[
|
||||
['value' => number_format($heroStats['total']), 'label' => 'Departments'],
|
||||
['value' => number_format($heroStats['active']), 'label' => 'Active'],
|
||||
['value' => number_format($heroStats['branches']), 'label' => 'Branches'],
|
||||
]">
|
||||
@if ($canManageDepartments)
|
||||
<x-slot name="actions">
|
||||
<a href="{{ route('qms.departments.create') }}" class="btn-primary">New department</a>
|
||||
</x-slot>
|
||||
@endif
|
||||
</x-qms.page-hero>
|
||||
|
||||
@include('partials.flash')
|
||||
|
||||
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Name</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Branch</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Type</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@forelse ($departments as $department)
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-sm">{{ $department->name }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $department->branch?->name }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $types[$department->type] ?? $department->type }}</td>
|
||||
<td class="px-4 py-3 text-right"><a href="{{ route('qms.departments.edit', $department) }}" class="text-sm text-indigo-600">Edit</a></td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="4" class="px-6 py-12 text-center text-sm text-slate-500">No departments.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
@@ -1,38 +1,58 @@
|
||||
@php
|
||||
$canManageMembers = app(\App\Services\Qms\QmsPermissions::class)->can(
|
||||
app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()),
|
||||
'admin.members.manage'
|
||||
);
|
||||
@endphp
|
||||
|
||||
<x-app-layout title="Team">
|
||||
<div class="mb-6 flex items-center justify-between">
|
||||
<h1 class="text-2xl font-semibold">Team members</h1>
|
||||
@if(app(\App\Services\Qms\QmsPermissions::class)->can(app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()), 'admin.members.manage'))
|
||||
<a href="{{ route('qms.members.create') }}" class="btn-primary">Add member</a>
|
||||
@endif
|
||||
</div>
|
||||
@include('partials.flash')
|
||||
<div class="overflow-hidden rounded-2xl border bg-white dark:border-slate-700 dark:bg-slate-900">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Member</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Role</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Branch</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@foreach ($members as $member)
|
||||
@php
|
||||
$display = str_contains($member->user_ref, '@')
|
||||
? $member->user_ref
|
||||
: (\App\Models\User::where('public_id', $member->user_ref)->value('email') ?? $member->user_ref);
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-sm">{{ $display }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $roles[$member->role] ?? $member->role }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $member->branch?->name ?? 'All' }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
@if ($member->user_ref !== auth()->user()->public_id)
|
||||
<form method="POST" action="{{ route('qms.members.destroy', $member) }}">@csrf @method('DELETE')<button class="text-xs text-red-600">Remove</button></form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="space-y-6">
|
||||
<x-qms.page-hero
|
||||
badge="Roles · Access · Branch assignment"
|
||||
title="Team"
|
||||
description="Manage who can access Queue, their roles, and which branch each operator or admin belongs to."
|
||||
:stats="[
|
||||
['value' => number_format($heroStats['total']), 'label' => 'Members'],
|
||||
['value' => number_format($heroStats['operators']), 'label' => 'Operators'],
|
||||
['value' => number_format($heroStats['branches']), 'label' => 'Branches staffed'],
|
||||
]">
|
||||
@if ($canManageMembers)
|
||||
<x-slot name="actions">
|
||||
<a href="{{ route('qms.members.create') }}" class="btn-primary">Add member</a>
|
||||
</x-slot>
|
||||
@endif
|
||||
</x-qms.page-hero>
|
||||
|
||||
@include('partials.flash')
|
||||
|
||||
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Member</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Role</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Branch</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@foreach ($members as $member)
|
||||
@php
|
||||
$display = str_contains($member->user_ref, '@')
|
||||
? $member->user_ref
|
||||
: (\App\Models\User::where('public_id', $member->user_ref)->value('email') ?? $member->user_ref);
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="px-4 py-3 text-sm">{{ $display }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $roles[$member->role] ?? $member->role }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $member->branch?->name ?? 'All' }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
@if ($member->user_ref !== auth()->user()->public_id)
|
||||
<form method="POST" action="{{ route('qms.members.destroy', $member) }}">@csrf @method('DELETE')<button class="text-xs text-red-600">Remove</button></form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user