From 2a581147aa72c56aae32c731f0f51c81eb8d1e6e Mon Sep 17 00:00:00 2001
From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com>
Date: Tue, 27 Aug 2024 12:43:59 +0200
Subject: [PATCH] new confirm delete dialog
---
.../components/modal-confirmation.blade.php | 109 ++++--------------
.../livewire/project/shared/danger.blade.php | 72 ++++++++++--
2 files changed, 86 insertions(+), 95 deletions(-)
diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.php
index 7910d2eb2..56abba71d 100644
--- a/resources/views/components/modal-confirmation.blade.php
+++ b/resources/views/components/modal-confirmation.blade.php
@@ -1,62 +1,41 @@
@props([
'title' => 'Are you sure?',
'isErrorButton' => false,
- 'buttonTitle' => 'REWRITE THIS BUTTON TITLE PLEASSSSEEEE',
+ 'buttonTitle' => 'Confirm Action',
'buttonFullWidth' => false,
'customButton' => null,
'disabled' => false,
'action' => 'delete',
'content' => null,
])
-
@if ($customButton)
- @if ($buttonFullWidth)
-
- {{ $customButton }}
-
- @else
-
- {{ $customButton }}
-
- @endif
+
+ {{ $customButton }}
+
@else
@if ($content)
{{ $content }}
@else
- @if ($disabled)
- @if ($buttonFullWidth)
-
- {{ $buttonTitle }}
-
- @else
-
- {{ $buttonTitle }}
-
- @endif
- @elseif ($isErrorButton)
- @if ($buttonFullWidth)
-
- {{ $buttonTitle }}
-
- @else
-
- {{ $buttonTitle }}
-
- @endif
- @else
- @if ($buttonFullWidth)
-
- {{ $buttonTitle }}
-
- @else
-
- {{ $buttonTitle }}
-
- @endif
- @endif
+
+ {{ $buttonTitle }}
+
@endif
@endif
@@ -64,7 +43,7 @@
class="fixed top-0 lg:pt-10 left-0 z-[99] flex items-start justify-center w-screen h-screen" x-cloak>
{{ $title }}
- {{--
--}}
{{ $slot }}
-
-
Cancel
-
-
- @if ($attributes->whereStartsWith('wire:click')->first())
- @if ($isErrorButton)
-
Continue
-
- @else
-
Continue
-
- @endif
- @elseif ($attributes->whereStartsWith('@click')->first())
- @if ($isErrorButton)
-
get('@click') }}">Continue
-
- @else
-
get('@click') }}">Continue
-
- @endif
- @elseif ($action)
- @if ($isErrorButton)
-
Continue
-
- @else
-
Continue
-
- @endif
- @endif
-
diff --git a/resources/views/livewire/project/shared/danger.blade.php b/resources/views/livewire/project/shared/danger.blade.php
index 1e1365749..1b24d0593 100644
--- a/resources/views/livewire/project/shared/danger.blade.php
+++ b/resources/views/livewire/project/shared/danger.blade.php
@@ -5,13 +5,69 @@
This will stop your containers, delete all related data, etc. Beware! There is no coming
back!
+
- This resource will be deleted. It is not reversible. Please think
- again.
- Actions
-
-
-
-
+
+
+
+
Select the actions you want to perform:
+
+
+
+
+
+ Cancel
+
+ Continue
+
+
+
+
+
+
+
+
Warning
+
This operation is not reversible. Please proceed with caution.
+
+
The following actions will be performed:
+
+
Please type DELETE to confirm this destructive action:
+
+
+ Back
+
+ Permanently Delete
+
+
+
+
-
\ No newline at end of file
+