Files
ladill-frontdesk/resources/views/frontdesk/admin/desks/index.blade.php
T
isaaccladandCursor 8f555bf2bf
Deploy Ladill Frontdesk / deploy (push) Successful in 43s
Replace native browser confirms with Ladill confirm dialogs.
Visits, devices, and admin destructive actions now use the shared modal UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 17:51:22 +00:00

36 lines
1.8 KiB
PHP

<x-app-layout :title="$building->name.' desks'">
<x-btn href="{{ route('frontdesk.buildings.index', $building->branch) }}" variant="link" size="sm" plain class="mb-1"> Buildings</x-btn>
<h1 class="mt-1 text-xl font-semibold text-slate-900">{{ $building->name }}</h1>
<form method="POST" action="{{ route('frontdesk.desks.store', $building) }}" class="mt-6 flex gap-2 rounded-2xl border border-slate-200 bg-white p-4">
@csrf
<input type="text" name="name" placeholder="Desk name" required class="flex-1 rounded-lg border-slate-300 text-sm">
<input type="text" name="location" placeholder="Location" class="flex-1 rounded-lg border-slate-300 text-sm">
<button type="submit" class="btn-primary">Add</button>
</form>
<div class="mt-4 space-y-2">
@forelse ($desks as $desk)
<div class="flex items-center justify-between rounded-xl border border-slate-200 bg-white px-4 py-3">
<div>
<p class="font-medium">{{ $desk->name }}</p>
<p class="text-xs text-slate-500">{{ $desk->location ?? '—' }}</p>
</div>
<x-confirm-dialog
:name="'remove-desk-'.$desk->id"
title="Remove this desk?"
:action="route('frontdesk.desks.destroy', [$building, $desk])"
method="DELETE"
confirm-label="Remove desk"
>
<x-slot:trigger>
<x-btn type="button" variant="danger" size="sm">Remove</x-btn>
</x-slot:trigger>
</x-confirm-dialog>
</div>
@empty
<p class="text-sm text-slate-500">No reception desks yet.</p>
@endforelse
</div>
</x-app-layout>