From f3066e5b6cb8ed8929ea1ba8f98a5a3b93002986 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sun, 7 Jun 2026 20:54:27 +0000 Subject: [PATCH] Replace native confirm with a styled delete modal for payment QRs. Bottom sheet on mobile and centered dialog on desktop, with clear consequences and the public link shown before confirming. Co-authored-by: Cursor --- .../partials/delete-modal.blade.php | 38 +++++++++++++++++++ .../views/mini/payment-qrs/show.blade.php | 19 +++++----- 2 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 resources/views/mini/payment-qrs/partials/delete-modal.blade.php diff --git a/resources/views/mini/payment-qrs/partials/delete-modal.blade.php b/resources/views/mini/payment-qrs/partials/delete-modal.blade.php new file mode 100644 index 0000000..2fdb3e5 --- /dev/null +++ b/resources/views/mini/payment-qrs/partials/delete-modal.blade.php @@ -0,0 +1,38 @@ +@php + $businessName = $qrCode->content()['business_name'] ?? $qrCode->label; +@endphp + + +
+
+
+ + + +
+

Delete payment QR?

+

+ {{ $qrCode->label }} + @if($businessName !== $qrCode->label) + ยท {{ $businessName }} + @endif + will be removed permanently. The payment link will stop working and printed codes for this till will no longer accept payments. +

+

{{ $qrCode->publicUrl() }}

+
+ +
+ @csrf + @method('DELETE') + + +
+
+
diff --git a/resources/views/mini/payment-qrs/show.blade.php b/resources/views/mini/payment-qrs/show.blade.php index 266bddc..f74d637 100644 --- a/resources/views/mini/payment-qrs/show.blade.php +++ b/resources/views/mini/payment-qrs/show.blade.php @@ -64,16 +64,17 @@ -
-

Delete payment QR

-

Removes this QR and its payment link. Scans will stop working. This cannot be undone.

-
- @csrf - @method('DELETE') - -
+
+

Danger zone

+

Remove this payment QR and deactivate its link.

+
+ + @include('mini.payment-qrs.partials.delete-modal', ['qrCode' => $qrCode])