fix submit action

This commit is contained in:
ayntk-ai
2024-08-31 19:31:23 +02:00
parent f8226cf892
commit f857bbc437

View File

@@ -59,7 +59,15 @@
return;
}
}
$wire.call(this.submitAction, this.password, this.selectedActions)
const methodName = this.submitAction.split('(')[0];
const paramsMatch = this.submitAction.match(/\((.*?)\)/);
const params = paramsMatch ? paramsMatch[1].split(',').map(param => param.trim()) : [];
params.push(this.password);
params.push(this.selectedActions);
$wire[methodName](...params)
.then(result => {
if (result === true) {
this.modalOpen = false;