cat-qw-lib 0.43.61 → 0.43.63

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.
@@ -1387,10 +1387,8 @@ class BaseFormComponent {
1387
1387
  }
1388
1388
  else {
1389
1389
  console.log("record =>", this.record);
1390
- this.initialRecord = JSON.parse(JSON.stringify(this.record));
1391
- const cloneRecrd = structuredClone(this.record);
1390
+ this.initialRecord = structuredClone(this.record);
1392
1391
  console.log("initialRecord =>", this.initialRecord);
1393
- console.log("cloneRecrd =>", cloneRecrd);
1394
1392
  }
1395
1393
  this.formStateService.selectIsFormNavigating()
1396
1394
  .pipe(takeUntil(this.destroy$))
@@ -1401,6 +1399,8 @@ class BaseFormComponent {
1401
1399
  });
1402
1400
  }
1403
1401
  handleBeforeUnload(event) {
1402
+ console.log("Browser ini", this.initialRecord);
1403
+ console.log("angular rec", this.record);
1404
1404
  const hasChanges = JSON.stringify(this.initialRecord) !== JSON.stringify(this.record);
1405
1405
  const isSaved = this.formStateService.getIsFormSaved(); // Ensure this method exists
1406
1406
  if (hasChanges && !isSaved) {
@@ -1409,6 +1409,8 @@ class BaseFormComponent {
1409
1409
  }
1410
1410
  }
1411
1411
  checkUnsavedChanges() {
1412
+ console.log("angular", this.initialRecord);
1413
+ console.log("angular", this.record);
1412
1414
  const hasChanges = JSON.stringify(this.initialRecord) !== JSON.stringify(this.record);
1413
1415
  const isSaved = this.formStateService.getIsFormSaved(); // Ensure this method exists
1414
1416
  this.formStateService.setShowConfirmation(hasChanges && !isSaved);