cat-qw-lib 0.43.6 → 0.43.7
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
|
@@ -666,10 +666,8 @@ class BaseControlComponent {
|
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
668
|
if (this.formStateService) {
|
|
669
|
-
console.log("formchage");
|
|
670
669
|
this.formStateService.selectIsFormNavigating().subscribe((res) => {
|
|
671
670
|
if (res) {
|
|
672
|
-
console.log("navsjj", res);
|
|
673
671
|
this.checkUnsavedChanges();
|
|
674
672
|
}
|
|
675
673
|
});
|
|
@@ -710,7 +708,8 @@ class BaseControlComponent {
|
|
|
710
708
|
}
|
|
711
709
|
checkUnsavedChanges() {
|
|
712
710
|
const hasChanges = JSON.stringify(this.initialRecord) !== JSON.stringify(this.record);
|
|
713
|
-
if (this.formStateService) {
|
|
711
|
+
if (this.formStateService && hasChanges) {
|
|
712
|
+
console.log(hasChanges);
|
|
714
713
|
this.formStateService.setFormChanges(hasChanges);
|
|
715
714
|
}
|
|
716
715
|
}
|
|
@@ -1389,6 +1388,7 @@ class BaseFormComponent {
|
|
|
1389
1388
|
this.record = {};
|
|
1390
1389
|
this.baseStore?.setIsApiValidated(null);
|
|
1391
1390
|
if (this.formStateService) {
|
|
1391
|
+
console.log("baseForm");
|
|
1392
1392
|
this.formStateService.setFormChanges(false);
|
|
1393
1393
|
}
|
|
1394
1394
|
this.onFormNavigate.emit(response);
|
|
@@ -1407,6 +1407,7 @@ class BaseFormComponent {
|
|
|
1407
1407
|
this.record = {};
|
|
1408
1408
|
this.baseStore?.setIsApiValidated(null);
|
|
1409
1409
|
if (this.formStateService) {
|
|
1410
|
+
console.log("baseForm");
|
|
1410
1411
|
this.formStateService.setFormChanges(false);
|
|
1411
1412
|
}
|
|
1412
1413
|
this.onFormNavigate.emit(response);
|