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
|
@@ -2155,6 +2155,10 @@ class MainService {
|
|
|
2155
2155
|
}
|
|
2156
2156
|
// used in grid to refresh data and will set to false after that.
|
|
2157
2157
|
this.storageService.set("navigatedReloadGrid", JSON.stringify(true));
|
|
2158
|
+
// clear cloneNewModel cache(if have)
|
|
2159
|
+
if (this.cacheService.getCache("cloneNewModel")) {
|
|
2160
|
+
this.cacheService.clearCache("cloneNewModel");
|
|
2161
|
+
}
|
|
2158
2162
|
this.router.navigate([backNavigationURL], { replaceUrl: true });
|
|
2159
2163
|
}
|
|
2160
2164
|
else {
|
|
@@ -2335,7 +2339,7 @@ class MainService {
|
|
|
2335
2339
|
fg.patchValue(resp);
|
|
2336
2340
|
}
|
|
2337
2341
|
fg.markAsPristine();
|
|
2338
|
-
if (_group.isCloseAfterSuccess && !_group.isCloneNew) {
|
|
2342
|
+
if ((_group.isCloseAfterSuccess || _group.isCloseAfterCreated) && !_group.isCloneNew) {
|
|
2339
2343
|
this.backNavigation(null, _group, this);
|
|
2340
2344
|
}
|
|
2341
2345
|
}
|
|
@@ -2387,7 +2391,7 @@ class MainService {
|
|
|
2387
2391
|
return this.afterUpdateModel(_group, zmodel);
|
|
2388
2392
|
}), tap$1((resp) => {
|
|
2389
2393
|
if (resp) {
|
|
2390
|
-
if (_group.isCloseAfterSuccess) {
|
|
2394
|
+
if (_group.isCloseAfterSuccess || _group.isCloseAfterUpdated) {
|
|
2391
2395
|
this.backNavigation(null, _group, this);
|
|
2392
2396
|
}
|
|
2393
2397
|
}
|
|
@@ -2408,13 +2412,13 @@ class MainService {
|
|
|
2408
2412
|
_group = group['_' + event.data.SubType];
|
|
2409
2413
|
}
|
|
2410
2414
|
}
|
|
2411
|
-
Object.assign(_group.
|
|
2412
|
-
Object.assign(_group.zModel, {
|
|
2415
|
+
Object.assign(_group.form.value, {
|
|
2413
2416
|
Id: 0,
|
|
2414
2417
|
WFS_StatusCode: null,
|
|
2415
2418
|
WFS_StatusId: null,
|
|
2416
2419
|
WFS_StatusName: null
|
|
2417
2420
|
});
|
|
2421
|
+
Object.assign(_group.zModel, _group.form.value);
|
|
2418
2422
|
this.cacheService.setCache("cloneNewModel", group.zModel);
|
|
2419
2423
|
this.newModel(null, group);
|
|
2420
2424
|
group.isTriggered = false;
|
|
@@ -2452,6 +2456,7 @@ class MainService {
|
|
|
2452
2456
|
}), tap$1((resp) => {
|
|
2453
2457
|
if (resp) {
|
|
2454
2458
|
//this.historyBack();
|
|
2459
|
+
fg.reset();
|
|
2455
2460
|
this.backNavigation(null, _group, this);
|
|
2456
2461
|
}
|
|
2457
2462
|
}));
|
|
@@ -7581,6 +7586,7 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
7581
7586
|
else {
|
|
7582
7587
|
this.zgrid.grid.data = gData;
|
|
7583
7588
|
}
|
|
7589
|
+
this.inlineEditedFormGroups = {};
|
|
7584
7590
|
this.createFormControls(this.zgrid.gridColumns);
|
|
7585
7591
|
const gridData = this.getGridData();
|
|
7586
7592
|
this.setupPopoverFeature(this.columns, gridData);
|
|
@@ -7627,7 +7633,7 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
7627
7633
|
ngAfterViewChecked() {
|
|
7628
7634
|
const isBackNavigated = (sessionStorage.getItem("navigatedReloadGrid") === 'true');
|
|
7629
7635
|
if (isBackNavigated) {
|
|
7630
|
-
if (this.isUseLocalData()) {
|
|
7636
|
+
if (!this.isUseLocalData()) {
|
|
7631
7637
|
this.getData();
|
|
7632
7638
|
}
|
|
7633
7639
|
this.cdr.detectChanges();
|
|
@@ -7964,6 +7970,7 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
7964
7970
|
}
|
|
7965
7971
|
getData() {
|
|
7966
7972
|
if (this.zgrid) {
|
|
7973
|
+
this.inlineEditedFormGroups = {};
|
|
7967
7974
|
this.zgrid.getDataBinding();
|
|
7968
7975
|
}
|
|
7969
7976
|
}
|