Files
ladill-frontdesk/resources/views/frontdesk/admin/buildings/index.blade.php
T
isaacclad 4ce45f4989
Deploy Ladill Frontdesk / deploy (push) Successful in 1m5s
Align Branches and Team settings UI with Care layout.
Use the shared settings page and card pattern for branch, team,
buildings, and desks screens, with Settings breadcrumbs and a
Branches & team hub card on the organization settings page.
2026-07-16 08:25:44 +00:00

49 lines
2.8 KiB
PHP

<x-app-layout :title="$branch->name.' buildings'">
<x-settings.page title="{{ $branch->name }}" description="Buildings and reception desks for this branch.">
<div class="mb-4 flex flex-wrap items-center gap-2 text-sm">
<a href="{{ route('frontdesk.settings') }}" class="text-slate-500 hover:text-slate-800">Settings</a>
<span class="text-slate-300">/</span>
<a href="{{ route('frontdesk.branches.index') }}" class="text-slate-500 hover:text-slate-800">Branches</a>
<span class="text-slate-300">/</span>
<span class="font-medium text-slate-900">Buildings</span>
</div>
<x-settings.card title="Add building">
<form method="POST" action="{{ route('frontdesk.buildings.store', $branch) }}" class="flex flex-col gap-3 sm:flex-row">
@csrf
<input type="text" name="name" placeholder="Building name" required class="flex-1 rounded-lg border-slate-300 text-sm">
<input type="text" name="floor_count" placeholder="Floors" class="w-full rounded-lg border-slate-300 text-sm sm:w-24">
<button type="submit" class="btn-primary shrink-0">Add</button>
</form>
</x-settings.card>
<x-settings.card title="Buildings">
@forelse ($buildings as $building)
<div class="flex items-center justify-between gap-4 border-b border-slate-50 py-3 last:border-b-0">
<div>
<p class="font-medium text-slate-900">{{ $building->name }}</p>
<p class="text-xs text-slate-500">{{ $building->reception_desks_count }} desk(s)</p>
</div>
<div class="flex items-center gap-3">
<a href="{{ route('frontdesk.desks.index', $building) }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">Desks</a>
<x-confirm-dialog
:name="'remove-building-'.$building->id"
title="Remove this building?"
message="Reception desks linked to this building will also be removed."
:action="route('frontdesk.buildings.destroy', [$branch, $building])"
method="DELETE"
confirm-label="Remove building"
>
<x-slot:trigger>
<button type="button" class="text-sm font-medium text-red-600 hover:text-red-800">Remove</button>
</x-slot:trigger>
</x-confirm-dialog>
</div>
</div>
@empty
<p class="text-sm text-slate-500">No buildings yet.</p>
@endforelse
</x-settings.card>
</x-settings.page>
</x-app-layout>