tuain-ng-forms-lib 17.2.6 → 17.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3168,6 +3168,8 @@ class BasicFormComponent extends FormStructureAndData {
|
|
|
3168
3168
|
_actionServerError = [];
|
|
3169
3169
|
_fieldServerError = [];
|
|
3170
3170
|
_tableServerError = [];
|
|
3171
|
+
// Acciones en curso dentro del formulario
|
|
3172
|
+
_actionsInProgress = {};
|
|
3171
3173
|
// Datos complementarios del formulario
|
|
3172
3174
|
inputDataFields = {};
|
|
3173
3175
|
extraData = {};
|
|
@@ -3669,7 +3671,16 @@ class BasicFormComponent extends FormStructureAndData {
|
|
|
3669
3671
|
let serverError = false;
|
|
3670
3672
|
let actionResult = null;
|
|
3671
3673
|
if (action.backend) {
|
|
3672
|
-
|
|
3674
|
+
if (this._actionsInProgress[action.actionCode]) {
|
|
3675
|
+
const { sent } = this._actionsInProgress[action.actionCode];
|
|
3676
|
+
console.log(`Acción ${action.actionCode} en ejecución desde ${sent}`);
|
|
3677
|
+
}
|
|
3678
|
+
else {
|
|
3679
|
+
this._actionsInProgress[action.actionCode] = { sent: new Date() };
|
|
3680
|
+
actionResult = await this.requestFormAction(action.actionCode);
|
|
3681
|
+
this._actionsInProgress[action.actionCode] = null;
|
|
3682
|
+
delete this._actionsInProgress[action.actionCode];
|
|
3683
|
+
}
|
|
3673
3684
|
}
|
|
3674
3685
|
await this.finishAction(action, actionResult, serverError);
|
|
3675
3686
|
serverError = !!this.errorOccured();
|