mmhglobal-dynamicform 2.0.0-beta.21 → 2.0.0-beta.23
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/README.md +9 -0
- package/esm2020/lib/services/main.service.mjs +10 -5
- package/esm2020/lib/zgrid/zgrid.component.mjs +4 -2
- package/fesm2015/mmhglobal-dynamicform.mjs +12 -5
- package/fesm2015/mmhglobal-dynamicform.mjs.map +1 -1
- package/fesm2020/mmhglobal-dynamicform.mjs +12 -5
- package/fesm2020/mmhglobal-dynamicform.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2150,6 +2150,10 @@ class MainService {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
// used in grid to refresh data and will set to false after that.
|
|
2152
2152
|
this.storageService.set("navigatedReloadGrid", JSON.stringify(true));
|
|
2153
|
+
// clear cloneNewModel cache(if have)
|
|
2154
|
+
if (this.cacheService.getCache("cloneNewModel")) {
|
|
2155
|
+
this.cacheService.clearCache("cloneNewModel");
|
|
2156
|
+
}
|
|
2153
2157
|
this.router.navigate([backNavigationURL], { replaceUrl: true });
|
|
2154
2158
|
}
|
|
2155
2159
|
else {
|
|
@@ -2330,7 +2334,7 @@ class MainService {
|
|
|
2330
2334
|
fg.patchValue(resp);
|
|
2331
2335
|
}
|
|
2332
2336
|
fg.markAsPristine();
|
|
2333
|
-
if (_group.isCloseAfterSuccess && !_group.isCloneNew) {
|
|
2337
|
+
if ((_group.isCloseAfterSuccess || _group.isCloseAfterCreated) && !_group.isCloneNew) {
|
|
2334
2338
|
this.backNavigation(null, _group, this);
|
|
2335
2339
|
}
|
|
2336
2340
|
}
|
|
@@ -2382,7 +2386,7 @@ class MainService {
|
|
|
2382
2386
|
return this.afterUpdateModel(_group, zmodel);
|
|
2383
2387
|
}), tap$1((resp) => {
|
|
2384
2388
|
if (resp) {
|
|
2385
|
-
if (_group.isCloseAfterSuccess) {
|
|
2389
|
+
if (_group.isCloseAfterSuccess || _group.isCloseAfterUpdated) {
|
|
2386
2390
|
this.backNavigation(null, _group, this);
|
|
2387
2391
|
}
|
|
2388
2392
|
}
|
|
@@ -2403,13 +2407,13 @@ class MainService {
|
|
|
2403
2407
|
_group = group['_' + event.data.SubType];
|
|
2404
2408
|
}
|
|
2405
2409
|
}
|
|
2406
|
-
Object.assign(_group.
|
|
2407
|
-
Object.assign(_group.zModel, {
|
|
2410
|
+
Object.assign(_group.form.value, {
|
|
2408
2411
|
Id: 0,
|
|
2409
2412
|
WFS_StatusCode: null,
|
|
2410
2413
|
WFS_StatusId: null,
|
|
2411
2414
|
WFS_StatusName: null
|
|
2412
2415
|
});
|
|
2416
|
+
Object.assign(_group.zModel, _group.form.value);
|
|
2413
2417
|
this.cacheService.setCache("cloneNewModel", group.zModel);
|
|
2414
2418
|
this.newModel(null, group);
|
|
2415
2419
|
group.isTriggered = false;
|
|
@@ -2447,6 +2451,7 @@ class MainService {
|
|
|
2447
2451
|
}), tap$1((resp) => {
|
|
2448
2452
|
if (resp) {
|
|
2449
2453
|
//this.historyBack();
|
|
2454
|
+
fg.reset();
|
|
2450
2455
|
this.backNavigation(null, _group, this);
|
|
2451
2456
|
}
|
|
2452
2457
|
}));
|
|
@@ -7562,6 +7567,7 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
7562
7567
|
else {
|
|
7563
7568
|
this.zgrid.grid.data = gData;
|
|
7564
7569
|
}
|
|
7570
|
+
this.inlineEditedFormGroups = {};
|
|
7565
7571
|
this.createFormControls(this.zgrid.gridColumns);
|
|
7566
7572
|
const gridData = this.getGridData();
|
|
7567
7573
|
this.setupPopoverFeature(this.columns, gridData);
|
|
@@ -7608,7 +7614,7 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
7608
7614
|
ngAfterViewChecked() {
|
|
7609
7615
|
const isBackNavigated = (sessionStorage.getItem("navigatedReloadGrid") === 'true');
|
|
7610
7616
|
if (isBackNavigated) {
|
|
7611
|
-
if (this.isUseLocalData()) {
|
|
7617
|
+
if (!this.isUseLocalData()) {
|
|
7612
7618
|
this.getData();
|
|
7613
7619
|
}
|
|
7614
7620
|
this.cdr.detectChanges();
|
|
@@ -7945,6 +7951,7 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
7945
7951
|
}
|
|
7946
7952
|
getData() {
|
|
7947
7953
|
if (this.zgrid) {
|
|
7954
|
+
this.inlineEditedFormGroups = {};
|
|
7948
7955
|
this.zgrid.getDataBinding();
|
|
7949
7956
|
}
|
|
7950
7957
|
}
|