Files
ladill-care/resources/views/care/admin/branches/index.blade.php
T
isaaccladandCursor 0b6cad75a6
Deploy Ladill Care / deploy (push) Successful in 37s
Add hero sections to Patients, Appointments, Queue, and admin index pages.
Introduce shared x-care.page-hero with summary stats so key list views
match the Ladill app hero pattern used across Frontdesk and Link.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 22:57:54 +00:00

44 lines
2.1 KiB
PHP

@php
$canManageBranches = app(\App\Services\Care\CarePermissions::class)->can(
auth()->user() ? app(\App\Services\Care\OrganizationResolver::class)->memberFor(auth()->user(), $organization) : null,
'admin.branches.manage'
);
@endphp
<x-app-layout title="Branches">
<div class="space-y-6">
<x-care.page-hero
badge="Locations · Sites · Coverage"
title="Branches"
description="Organize clinic locations and sites so patients, departments, and staff stay scoped to the right branch."
: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('care.branches.create') }}" class="btn-primary">Add branch</a>
</x-slot>
@endif
</x-care.page-hero>
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
<div class="border-b border-slate-100 px-6 py-4">
<h2 class="text-sm font-semibold text-slate-900">All branches</h2>
</div>
@forelse ($branches as $branch)
<div class="flex items-center justify-between border-b border-slate-50 px-6 py-4 last:border-b-0">
<div>
<p class="font-medium text-slate-900">{{ $branch->name }}</p>
<p class="text-sm text-slate-500">{{ $branch->address ?? 'No address' }} · {{ $branch->departments_count }} department(s)</p>
</div>
<a href="{{ route('care.branches.edit', $branch) }}" class="text-sm text-slate-600 hover:text-slate-800">Edit</a>
</div>
@empty
<p class="px-6 py-8 text-center text-sm text-slate-500">No branches yet.</p>
@endforelse
</div>
</div>
</x-app-layout>