@nettyapps/ntybase 21.1.26 → 21.1.28
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.
|
@@ -1388,10 +1388,9 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1388
1388
|
if (this.hasValidValue(this.parameterGUID())) {
|
|
1389
1389
|
this.setFilter();
|
|
1390
1390
|
this.loadData();
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
//
|
|
1394
|
-
this.commonService.clearOutlet();
|
|
1391
|
+
// } else if(!this._isPopupValid()){
|
|
1392
|
+
// // Clear right side nav if parameterGUID is not provided
|
|
1393
|
+
// this.commonService.clearOutlet();
|
|
1395
1394
|
}
|
|
1396
1395
|
});
|
|
1397
1396
|
}
|
|
@@ -1596,6 +1595,14 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1596
1595
|
}
|
|
1597
1596
|
sessionStorage.setItem(this.searchValueName(), this.searchValue());
|
|
1598
1597
|
}
|
|
1598
|
+
async refreshData() {
|
|
1599
|
+
try {
|
|
1600
|
+
this.loadData();
|
|
1601
|
+
}
|
|
1602
|
+
catch (err) {
|
|
1603
|
+
this.alertService.showError(err);
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1599
1606
|
/**
|
|
1600
1607
|
* Update a single row in the grid
|
|
1601
1608
|
* @param rowData The updated row data
|
|
@@ -1607,7 +1614,7 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1607
1614
|
const field = idField || this.pkFieldName();
|
|
1608
1615
|
const id = rowData[field];
|
|
1609
1616
|
if (id === undefined || id === null) {
|
|
1610
|
-
this.
|
|
1617
|
+
this.refreshData();
|
|
1611
1618
|
return;
|
|
1612
1619
|
}
|
|
1613
1620
|
let rowNode = this.gridApi.getRowNode(id.toString());
|
|
@@ -1622,8 +1629,9 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1622
1629
|
}
|
|
1623
1630
|
if (rowNode) {
|
|
1624
1631
|
rowNode.setData(rowData);
|
|
1625
|
-
const params = { rowNodes: [rowNode], force: true, suppressFlash: false
|
|
1632
|
+
const params = { rowNodes: [rowNode], force: true, suppressFlash: false };
|
|
1626
1633
|
this.gridApi.refreshCells(params);
|
|
1634
|
+
this.recordList.update(currentList => currentList.map(item => item[field] === id ? rowData : item));
|
|
1627
1635
|
}
|
|
1628
1636
|
else {
|
|
1629
1637
|
this.loadData(); // Reload all data if row not found
|
|
@@ -1930,7 +1938,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
|
|
|
1930
1938
|
|
|
1931
1939
|
ModuleRegistry.registerModules([AllCommunityModule, StatusBarModule, ClientSideRowModelModule, ClipboardModule, ExcelExportModule, ColumnMenuModule,
|
|
1932
1940
|
ContextMenuModule, CellSelectionModule, HighlightChangesModule, RowSelectionModule, SetFilterModule, MultiFilterModule, TextFilterModule, NumberFilterModule, DateFilterModule]);
|
|
1933
|
-
// AgGrid Dark Mode Row Style
|
|
1934
1941
|
class NettyAgGridListBase extends NettyAgGridBase {
|
|
1935
1942
|
// ********************************************
|
|
1936
1943
|
// *** INPUTS ***
|
|
@@ -2109,14 +2116,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
|
|
|
2109
2116
|
error: (err) => this.alertService.showError('@dataLoadFailed', err),
|
|
2110
2117
|
});
|
|
2111
2118
|
}
|
|
2112
|
-
async refreshData() {
|
|
2113
|
-
try {
|
|
2114
|
-
this.loadData();
|
|
2115
|
-
}
|
|
2116
|
-
catch (err) {
|
|
2117
|
-
this.alertService.showError(err);
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
2119
|
async deleteSelected() {
|
|
2121
2120
|
if (!this.gridApi)
|
|
2122
2121
|
return;
|
|
@@ -2300,12 +2299,7 @@ class NettyAgGridListFilterBase extends NettyAgGridListBase {
|
|
|
2300
2299
|
* Triggers the filter component to refresh its data
|
|
2301
2300
|
*/
|
|
2302
2301
|
refreshFilterData() {
|
|
2303
|
-
|
|
2304
|
-
if (value > 10000) {
|
|
2305
|
-
value = 0;
|
|
2306
|
-
}
|
|
2307
|
-
value++;
|
|
2308
|
-
this.filterRefreshTrigger.set(value);
|
|
2302
|
+
this.filterRefreshTrigger.update(val => val > 10000 ? 1 : val + 1);
|
|
2309
2303
|
}
|
|
2310
2304
|
onReverseIsFilterValid() {
|
|
2311
2305
|
this.isFilterValid.update((a) => !a);
|
|
@@ -2369,14 +2363,6 @@ class NettyAgGridLogBase extends NettyAgGridBase {
|
|
|
2369
2363
|
error: (err) => this.alertService.showError('@dataLoadFailed', err),
|
|
2370
2364
|
});
|
|
2371
2365
|
}
|
|
2372
|
-
async refreshData() {
|
|
2373
|
-
try {
|
|
2374
|
-
this.loadData();
|
|
2375
|
-
}
|
|
2376
|
-
catch (err) {
|
|
2377
|
-
this.alertService.showError(err);
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
2366
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NettyAgGridLogBase, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2381
2367
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: NettyAgGridLogBase, isStandalone: true, selector: "ntybase-ag-grid-log-base", host: { attributes: { "ntybase-id": "NettyAgGridLogBase" } }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
2382
2368
|
}
|
|
@@ -2601,7 +2587,7 @@ class NettyAgGridSaveBase extends NettyAppsBase {
|
|
|
2601
2587
|
this.nettyAppsProxy.update(updateData).subscribe({
|
|
2602
2588
|
next: (updatedRecord) => {
|
|
2603
2589
|
this.initializeFormData(updatedRecord);
|
|
2604
|
-
this.commonService.notifyUpdate(
|
|
2590
|
+
this.commonService.notifyUpdate(this.recordType(), 'update', updatedRecord);
|
|
2605
2591
|
this.closeSidenav();
|
|
2606
2592
|
this.alertService.showSuccess('@recordUpdatedSuccessfully');
|
|
2607
2593
|
},
|
|
@@ -2695,12 +2681,7 @@ class NettyAgGridSaveBase extends NettyAppsBase {
|
|
|
2695
2681
|
disableClose: true,
|
|
2696
2682
|
hasBackdrop: false,
|
|
2697
2683
|
})
|
|
2698
|
-
.afterClosed()
|
|
2699
|
-
.subscribe((result) => {
|
|
2700
|
-
if (result === 'saved') {
|
|
2701
|
-
//this.updateRowInGrid;
|
|
2702
|
-
}
|
|
2703
|
-
});
|
|
2684
|
+
.afterClosed();
|
|
2704
2685
|
return;
|
|
2705
2686
|
}
|
|
2706
2687
|
// Log control
|