diff --git a/resources/views/care/admin/members/index.blade.php b/resources/views/care/admin/members/index.blade.php index e9e79d6..12dfbc9 100644 --- a/resources/views/care/admin/members/index.blade.php +++ b/resources/views/care/admin/members/index.blade.php @@ -32,10 +32,18 @@ {{ $member->branch?->name ?? 'All branches' }} @if ($member->user_ref !== auth()->user()->public_id) -
- @csrf @method('DELETE') - Remove -
+ + + Remove + + @endif diff --git a/resources/views/care/appointments/show.blade.php b/resources/views/care/appointments/show.blade.php index 1b6bc9a..c3bd61b 100644 --- a/resources/views/care/appointments/show.blade.php +++ b/resources/views/care/appointments/show.blade.php @@ -47,10 +47,17 @@ @endif @endif @if ($canManage && ! in_array($appointment->status, [\App\Models\Appointment::STATUS_COMPLETED, \App\Models\Appointment::STATUS_CANCELLED], true)) -
- @csrf - Cancel -
+ + + Cancel + + @endif diff --git a/resources/views/care/bills/show.blade.php b/resources/views/care/bills/show.blade.php index 343bb47..60c1079 100644 --- a/resources/views/care/bills/show.blade.php +++ b/resources/views/care/bills/show.blade.php @@ -9,7 +9,17 @@
Print @if ($canManage && ! in_array($bill->status, [\App\Models\Bill::STATUS_PAID, \App\Models\Bill::STATUS_VOID])) -
@csrfVoid
+ + + Void + + @endif
diff --git a/resources/views/care/consultations/show.blade.php b/resources/views/care/consultations/show.blade.php index 04546ee..e1577f6 100644 --- a/resources/views/care/consultations/show.blade.php +++ b/resources/views/care/consultations/show.blade.php @@ -11,10 +11,18 @@

@if ($canManage && ! $isCompleted) -
- @csrf - -
+ + + + + @endif @if ($canPrescribe) Prescribe diff --git a/resources/views/care/integrations/edit.blade.php b/resources/views/care/integrations/edit.blade.php index 5d126ca..9334f08 100644 --- a/resources/views/care/integrations/edit.blade.php +++ b/resources/views/care/integrations/edit.blade.php @@ -47,10 +47,19 @@ @if ($credential->sms_api_key_encrypted || $credential->hasValidSms()) -
- @csrf - -
+
+ + + + + +
@endif @endif @@ -98,10 +107,19 @@ @if ($credential->bird_api_key_encrypted || $credential->hasValidBird()) -
- @csrf - -
+
+ + + + + +
@endif @endif diff --git a/resources/views/care/patients/show.blade.php b/resources/views/care/patients/show.blade.php index 5b1a639..84f009c 100644 --- a/resources/views/care/patients/show.blade.php +++ b/resources/views/care/patients/show.blade.php @@ -15,10 +15,18 @@ @if ($canManage)
Edit -
- @csrf @method('DELETE') - Archive -
+ + + Archive + +
@endif diff --git a/resources/views/care/prescriptions/show.blade.php b/resources/views/care/prescriptions/show.blade.php index 862562e..8eb4c57 100644 --- a/resources/views/care/prescriptions/show.blade.php +++ b/resources/views/care/prescriptions/show.blade.php @@ -13,7 +13,17 @@
@csrf
@endif @if ($canManage && ! in_array($prescription->status, [\App\Models\Prescription::STATUS_DISPENSED, \App\Models\Prescription::STATUS_CANCELLED])) -
@csrfCancel
+ + + Cancel + + @endif diff --git a/resources/views/components/confirm-dialog.blade.php b/resources/views/components/confirm-dialog.blade.php new file mode 100644 index 0000000..1187a0d --- /dev/null +++ b/resources/views/components/confirm-dialog.blade.php @@ -0,0 +1,69 @@ +@props([ + 'name', + 'title', + 'message' => null, + 'action', + 'method' => 'POST', + 'confirmLabel' => 'Confirm', + 'cancelLabel' => 'Cancel', + 'variant' => 'danger', +]) + +@php + $confirmBtnClass = $variant === 'danger' + ? 'bg-red-600 hover:bg-red-700' + : 'bg-indigo-600 hover:bg-indigo-700'; + $iconWrapClass = $variant === 'danger' + ? 'bg-red-100 text-red-600' + : 'bg-indigo-100 text-indigo-600'; +@endphp + +@if(isset($trigger)) + + {{ $trigger }} + +@endif + + +
+
+
+ @if($variant === 'danger') + + + + @else + + + + @endif +
+

{{ $title }}

+ @if($message) +

{{ $message }}

+ @endif + @isset($details) +
{{ $details }}
+ @endisset +
+ +
+ @csrf + @if(strtoupper($method) !== 'POST') + @method($method) + @endif + @isset($fields) + {{ $fields }} + @endisset + + +
+
+