cat-qw-lib 0.43.15 → 0.43.16
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/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -665,12 +665,13 @@ class BaseControlComponent {
|
|
|
665
665
|
this.baseStore.setIsFormSubmitted(false);
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
|
-
console.log(this.formStateService);
|
|
669
668
|
this.formStateService.selectIsFormNavigating().subscribe((res) => {
|
|
670
|
-
console.log("cat-qw", res);
|
|
671
669
|
if (res) {
|
|
672
|
-
|
|
673
|
-
|
|
670
|
+
this.formStateService.selectSUnsavedChanges().subscribe((res) => {
|
|
671
|
+
if (res) {
|
|
672
|
+
this.checkUnsavedChanges();
|
|
673
|
+
}
|
|
674
|
+
});
|
|
674
675
|
}
|
|
675
676
|
});
|
|
676
677
|
}
|
|
@@ -710,7 +711,6 @@ class BaseControlComponent {
|
|
|
710
711
|
checkUnsavedChanges() {
|
|
711
712
|
const hasChanges = JSON.stringify(this.initialRecord) !== JSON.stringify(this.record);
|
|
712
713
|
if (this.formStateService && hasChanges) {
|
|
713
|
-
console.log(hasChanges);
|
|
714
714
|
this.formStateService.setFormChanges(hasChanges);
|
|
715
715
|
}
|
|
716
716
|
}
|
|
@@ -1388,9 +1388,8 @@ class BaseFormComponent {
|
|
|
1388
1388
|
console.log('Record updated:', response);
|
|
1389
1389
|
this.record = {};
|
|
1390
1390
|
this.baseStore?.setIsApiValidated(null);
|
|
1391
|
-
console.log(this.formStateService);
|
|
1392
1391
|
if (this.formStateService) {
|
|
1393
|
-
this.formStateService.
|
|
1392
|
+
this.formStateService.setFormChanges(false);
|
|
1394
1393
|
}
|
|
1395
1394
|
this.onFormNavigate.emit(response);
|
|
1396
1395
|
},
|
|
@@ -1407,9 +1406,7 @@ class BaseFormComponent {
|
|
|
1407
1406
|
console.log('Record created:', response);
|
|
1408
1407
|
this.record = {};
|
|
1409
1408
|
this.baseStore?.setIsApiValidated(null);
|
|
1410
|
-
console.log(this.formStateService);
|
|
1411
1409
|
if (this.formStateService) {
|
|
1412
|
-
console.log("baseForm");
|
|
1413
1410
|
this.formStateService.setIsFormNavigating(false);
|
|
1414
1411
|
}
|
|
1415
1412
|
this.onFormNavigate.emit(response);
|