fix execute action on the last button
This commit is contained in:
@@ -42,11 +42,20 @@
|
|||||||
this.selectedActions = @js(collect($checkboxes)->where('model', true)->pluck('id')->toArray());
|
this.selectedActions = @js(collect($checkboxes)->where('model', true)->pluck('id')->toArray());
|
||||||
this.deleteText = '';
|
this.deleteText = '';
|
||||||
this.password = '';
|
this.password = '';
|
||||||
this.userConfirmText = ''; // Reset userConfirmText
|
this.userConfirmText = '';
|
||||||
},
|
},
|
||||||
step1ButtonText: @js($step1ButtonText),
|
step1ButtonText: @js($step1ButtonText),
|
||||||
step2ButtonText: @js($step2ButtonText),
|
step2ButtonText: @js($step2ButtonText),
|
||||||
step3ButtonText: @js($step3ButtonText),
|
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() {
|
copyConfirmText() {
|
||||||
navigator.clipboard.writeText(this.confirmText);
|
navigator.clipboard.writeText(this.confirmText);
|
||||||
this.copied = true;
|
this.copied = true;
|
||||||
@@ -301,10 +310,4 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
function executeAction() {
|
|
||||||
$wire[this.action](this.selectedActions, this.password);
|
|
||||||
this.modalOpen = false;
|
|
||||||
this.resetModal();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user