Replace native browser confirms with Ladill confirm dialogs.
Deploy Ladill Frontdesk / deploy (push) Successful in 43s
Deploy Ladill Frontdesk / deploy (push) Successful in 43s
Visits, devices, and admin destructive actions now use the shared modal UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,10 +22,18 @@
|
||||
</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>
|
||||
<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>
|
||||
<x-btn type="button" variant="danger" size="sm">Remove</x-btn>
|
||||
</x-slot:trigger>
|
||||
</x-confirm-dialog>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
|
||||
@@ -16,10 +16,17 @@
|
||||
<p class="font-medium">{{ $desk->name }}</p>
|
||||
<p class="text-xs text-slate-500">{{ $desk->location ?? '—' }}</p>
|
||||
</div>
|
||||
<form method="POST" action="{{ route('frontdesk.desks.destroy', [$building, $desk]) }}" onsubmit="return confirm('Remove this desk?')">
|
||||
@csrf @method('DELETE')
|
||||
<x-btn type="submit" variant="danger" size="sm">Remove</x-btn>
|
||||
</form>
|
||||
<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>
|
||||
|
||||
@@ -38,10 +38,18 @@
|
||||
<td class="px-4 py-3">{{ $member->branch?->name ?? 'All branches' }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
@if ($member->user_ref !== auth()->user()->public_id)
|
||||
<form method="POST" action="{{ route('frontdesk.members.destroy', $member) }}" class="inline" onsubmit="return confirm('Remove this member?')">
|
||||
@csrf @method('DELETE')
|
||||
<x-btn type="submit" variant="danger" size="sm">Remove</x-btn>
|
||||
</form>
|
||||
<x-confirm-dialog
|
||||
:name="'remove-member-'.$member->id"
|
||||
title="Remove this member?"
|
||||
message="They will lose access to this Frontdesk organization."
|
||||
:action="route('frontdesk.members.destroy', $member)"
|
||||
method="DELETE"
|
||||
confirm-label="Remove member"
|
||||
>
|
||||
<x-slot:trigger>
|
||||
<x-btn type="button" variant="danger" size="sm">Remove</x-btn>
|
||||
</x-slot:trigger>
|
||||
</x-confirm-dialog>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user