tuain-form-manager 1.1.18 → 1.1.21
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.
- package/lib/form-manager.js +2 -9
- package/lib/form.js +7 -6
- package/package.json +1 -1
package/lib/form-manager.js
CHANGED
|
@@ -153,24 +153,17 @@ class FormManager {
|
|
|
153
153
|
errorObj = this.errMgr.get(modErrs.formActionExec.formNotFound, errorDetail);
|
|
154
154
|
return [errorObj, null];
|
|
155
155
|
}
|
|
156
|
-
this.logger.log({
|
|
157
|
-
level: 'info',
|
|
158
|
-
label: 'FormManager',
|
|
159
|
-
action: 'executeFormAction',
|
|
160
|
-
message: `------ START FORM ACTION ${formCode} / ${actionCode} ------`
|
|
161
|
-
+ `Se da inicio a la ejecución de la acción ${actionCode} para ${formCode}`,
|
|
162
|
-
});
|
|
163
156
|
[errorObj, resultForm] = await formCustomObject.executeFormAction(actionCode);
|
|
164
157
|
this.logger.log({
|
|
165
158
|
level: 'info',
|
|
166
159
|
label: 'FormManager',
|
|
167
160
|
action: 'executeFormAction',
|
|
168
|
-
message:
|
|
161
|
+
message: `END FORM ACTION ${formCode} / ${actionCode} / ${errorObj?.errorCode ?? ''}`,
|
|
169
162
|
});
|
|
170
163
|
return [errorObj, resultForm];
|
|
171
164
|
} catch (err) {
|
|
172
165
|
const errorDetail = `Excepción no controlada: ${err.message}\n${err.stack}`
|
|
173
|
-
|
|
166
|
+
+ `------ END BY EXCEPTION FORM ACTION ${formCode} / ${actionCode} ------`;
|
|
174
167
|
this.logger.log({
|
|
175
168
|
level: 'error',
|
|
176
169
|
label: 'FormManager',
|
package/lib/form.js
CHANGED
|
@@ -79,9 +79,9 @@ class Form {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// eslint-disable-next-line class-methods-use-this
|
|
82
|
-
startOperation() {}
|
|
82
|
+
startOperation() { }
|
|
83
83
|
// eslint-disable-next-line class-methods-use-this
|
|
84
|
-
getData() {}
|
|
84
|
+
getData() { }
|
|
85
85
|
async start() {
|
|
86
86
|
const customizeDef = await this.startOperation();
|
|
87
87
|
if (customizeDef) { return customizeDef; }
|
|
@@ -218,11 +218,11 @@ class Form {
|
|
|
218
218
|
|
|
219
219
|
addTableRequest(tableRequest) {
|
|
220
220
|
const {
|
|
221
|
-
tableCode, visible, currentPage, requestedPage,
|
|
221
|
+
tableCode, visible, currentPage, requestedPage, currentFilter,
|
|
222
222
|
recordsPerPage, sortingColumn, sortingDirection,
|
|
223
223
|
} = tableRequest;
|
|
224
224
|
this._requestData.formData.tables[tableCode] = tableRequest;
|
|
225
|
-
const constraints = { visible, currentPage, requestedPage, recordsPerPage, sortingColumn, sortingDirection };
|
|
225
|
+
const constraints = { visible, currentPage, requestedPage, recordsPerPage, sortingColumn, sortingDirection, currentFilter };
|
|
226
226
|
this.setTableConstraints(tableCode, constraints);
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -363,7 +363,7 @@ class Form {
|
|
|
363
363
|
const {
|
|
364
364
|
visible = true, currentPage = 1, requestedPage = 1,
|
|
365
365
|
recordsPerPage = DEFAULT_RECORDS_PAGE,
|
|
366
|
-
sortingColumn, sortingDirection,
|
|
366
|
+
sortingColumn, sortingDirection, currentFilter,
|
|
367
367
|
} = constraints;
|
|
368
368
|
const tableDef = this.getTableDefinition(tableCode);
|
|
369
369
|
if (!tableDef) { return; }
|
|
@@ -376,6 +376,7 @@ class Form {
|
|
|
376
376
|
sortingDirection,
|
|
377
377
|
totalRecordsNumber: 0,
|
|
378
378
|
recordsNumber: 0,
|
|
379
|
+
currentFilter,
|
|
379
380
|
};
|
|
380
381
|
}
|
|
381
382
|
|
|
@@ -496,7 +497,7 @@ class Form {
|
|
|
496
497
|
this.logger.log({
|
|
497
498
|
level: 'debug',
|
|
498
499
|
label: 'executeFormAction',
|
|
499
|
-
message: `
|
|
500
|
+
message: `START FORM ACTION ${actionCode} / ${this.formCode}/${this.formSubject ?? ''}`,
|
|
500
501
|
});
|
|
501
502
|
try {
|
|
502
503
|
errorObj = await callback(actionCode);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tuain-form-manager",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
4
4
|
"description": "Component library to perform operations on Tuain Development Framework forms to interchange information on web or mobile applications based on the data interchange of abstract forms making trnasformation on the data upon actions required on both sides (front and back)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|