From a22e757ab7571d9d94c66b1986654937d88c065b Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:19:19 +0200 Subject: [PATCH] fix execute action on the last button --- .../components/modal-confirmation.blade.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.php index 5d65b5511..44a1d5d93 100644 --- a/resources/views/components/modal-confirmation.blade.php +++ b/resources/views/components/modal-confirmation.blade.php @@ -42,11 +42,20 @@ this.selectedActions = @js(collect($checkboxes)->where('model', true)->pluck('id')->toArray()); this.deleteText = ''; this.password = ''; - this.userConfirmText = ''; // Reset userConfirmText + this.userConfirmText = ''; }, step1ButtonText: @js($step1ButtonText), step2ButtonText: @js($step2ButtonText), step3ButtonText: @js($step3ButtonText), + executeAction() { + if (this.confirmWithPassword) { + $wire.call(this.action, this.selectedActions, this.password); + } else { + $wire.call(this.action, this.selectedActions); + } + this.modalOpen = false; + this.resetModal(); + }, copyConfirmText() { navigator.clipboard.writeText(this.confirmText); this.copied = true; @@ -301,10 +310,4 @@ - +