Replace native browser confirms with Ladill confirm dialogs.
Deploy Ladill Care / deploy (push) Successful in 49s
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user