tuain-ng-forms-lib 17.2.9 → 17.2.13
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.
|
@@ -1889,7 +1889,7 @@ class RecordTable extends FormElement {
|
|
|
1889
1889
|
this.setAttr(attrs.selectedRecords, this.getSelectedRecords());
|
|
1890
1890
|
return true;
|
|
1891
1891
|
}
|
|
1892
|
-
setTableRecords(tableRecords, append) {
|
|
1892
|
+
setTableRecords(tableRecords, append = false, prepend = false) {
|
|
1893
1893
|
if (!append) {
|
|
1894
1894
|
this._tableRecords = [];
|
|
1895
1895
|
this._tableRecordObj = {};
|
|
@@ -1901,13 +1901,22 @@ class RecordTable extends FormElement {
|
|
|
1901
1901
|
for (const tableRecord of tableRecords) {
|
|
1902
1902
|
const recordReceived = new TableRecordData(tableRecord, this._columns, this._selectionField);
|
|
1903
1903
|
const recordIdKey = recordReceived.recordIdKey;
|
|
1904
|
-
|
|
1904
|
+
if (newRecordsObj[recordIdKey]) {
|
|
1905
|
+
continue;
|
|
1906
|
+
}
|
|
1907
|
+
if (prepend) {
|
|
1908
|
+
newRecords.unshift(recordReceived);
|
|
1909
|
+
}
|
|
1910
|
+
else {
|
|
1911
|
+
newRecords.push(recordReceived);
|
|
1912
|
+
}
|
|
1905
1913
|
newRecordsObj[recordIdKey] = recordReceived;
|
|
1906
1914
|
}
|
|
1907
1915
|
this._tableRecords = newRecords;
|
|
1908
1916
|
this._tableRecordObj = newRecordsObj;
|
|
1909
1917
|
}
|
|
1910
1918
|
appendRecords(records) { this.setTableRecords(records, true); }
|
|
1919
|
+
prependRecords(records) { this.setTableRecords(records, true, true); }
|
|
1911
1920
|
replaceRecords(records) { this.setTableRecords(records, false); }
|
|
1912
1921
|
setTableAppend(append) { this._appendPages = append; }
|
|
1913
1922
|
changePage(requestedPage) {
|
|
@@ -3641,7 +3650,7 @@ class BasicFormComponent extends FormStructureAndData {
|
|
|
3641
3650
|
}
|
|
3642
3651
|
if (this._actionsInProgress[code]) {
|
|
3643
3652
|
const { sent } = this._actionsInProgress[code];
|
|
3644
|
-
console.log(`
|
|
3653
|
+
console.log(`Reingreso sobre acción ${code} con ejecución previa ${sent}`);
|
|
3645
3654
|
return;
|
|
3646
3655
|
}
|
|
3647
3656
|
this._actionsInProgress[code] = { sent: new Date() };
|