From b798819191f1afb0c5b1c6d2bad01304982a93e3 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sun, 12 Jul 2026 17:51:23 +0000 Subject: [PATCH] Replace native browser confirms with Ladill confirm dialogs. Mobile ticket cancel now uses the shared modal UI instead of window.confirm. Co-authored-by: Cursor --- .../views/components/confirm-dialog.blade.php | 69 +++++++++++++++++++ resources/views/qms/mobile/show.blade.php | 17 +++-- 2 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 resources/views/components/confirm-dialog.blade.php 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 + + +
+
+
diff --git a/resources/views/qms/mobile/show.blade.php b/resources/views/qms/mobile/show.blade.php index 54277b5..8179b74 100644 --- a/resources/views/qms/mobile/show.blade.php +++ b/resources/views/qms/mobile/show.blade.php @@ -28,10 +28,19 @@ -
- @csrf - Cancel ticket -
+
+ + + Cancel ticket + + +
@endif