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>
52 lines
2.6 KiB
PHP
52 lines
2.6 KiB
PHP
@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="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>
|