Deploy Ladill Frontdesk / deploy (push) Successful in 55s
Add warning, danger, and link button styles plus x-btn and x-danger-zone components so ghost text actions match the primary pill UI across edit screens and tables. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
1.9 KiB
PHP
36 lines
1.9 KiB
PHP
<x-app-layout :title="$branch->name.' buildings'">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<x-btn href="{{ route('frontdesk.branches.index') }}" variant="link" size="sm" plain>← Branches</x-btn>
|
|
<h1 class="mt-1 text-xl font-semibold text-slate-900">{{ $branch->name }}</h1>
|
|
</div>
|
|
</div>
|
|
|
|
<form method="POST" action="{{ route('frontdesk.buildings.store', $branch) }}" class="mt-6 flex gap-2 rounded-2xl border border-slate-200 bg-white p-4">
|
|
@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-24 rounded-lg border-slate-300 text-sm">
|
|
<button type="submit" class="btn-primary">Add</button>
|
|
</form>
|
|
|
|
<div class="mt-4 space-y-2">
|
|
@forelse ($buildings as $building)
|
|
<div class="flex items-center justify-between rounded-xl border border-slate-200 bg-white px-4 py-3">
|
|
<div>
|
|
<p class="font-medium">{{ $building->name }}</p>
|
|
<p class="text-xs text-slate-500">{{ $building->reception_desks_count }} desk(s)</p>
|
|
</div>
|
|
<div class="btn-group">
|
|
<x-btn href="{{ route('frontdesk.desks.index', $building) }}" variant="link" size="sm" plain>Desks</x-btn>
|
|
<form method="POST" action="{{ route('frontdesk.buildings.destroy', [$branch, $building]) }}" onsubmit="return confirm('Remove this building?')">
|
|
@csrf @method('DELETE')
|
|
<x-btn type="submit" variant="danger" size="sm">Remove</x-btn>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@empty
|
|
<p class="text-sm text-slate-500">No buildings yet.</p>
|
|
@endforelse
|
|
</div>
|
|
</x-app-layout>
|