Replace native browser confirms with Ladill confirm dialogs.
Deploy Ladill Care / deploy (push) Successful in 49s

Appointment cancel and other destructive actions now use the shared modal UI instead of window.confirm.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-12 17:51:13 +00:00
co-authored by Cursor
parent f1e28c7af8
commit 30b96b3956
8 changed files with 164 additions and 26 deletions
+12 -4
View File
@@ -15,10 +15,18 @@
@if ($canManage)
<div class="flex gap-2">
<a href="{{ route('care.patients.edit', $patient) }}" class="btn-primary">Edit</a>
<form method="POST" action="{{ route('care.patients.destroy', $patient) }}" onsubmit="return confirm('Archive this patient record?')">
@csrf @method('DELETE')
<x-btn type="submit" variant="danger">Archive</x-btn>
</form>
<x-confirm-dialog
:name="'archive-patient-'.$patient->id"
title="Archive this patient?"
message="The patient record will be archived and hidden from active lists."
:action="route('care.patients.destroy', $patient)"
method="DELETE"
confirm-label="Archive patient"
>
<x-slot:trigger>
<x-btn type="button" variant="danger">Archive</x-btn>
</x-slot:trigger>
</x-confirm-dialog>
</div>
@endif
</div>