cat-qw-lib 0.43.60 → 0.43.61

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.
@@ -1367,8 +1367,6 @@ class BaseFormComponent {
1367
1367
  this.baseQuery = baseQuery;
1368
1368
  this.subscriptions = [];
1369
1369
  this.record = {};
1370
- this.initialRecord = JSON.parse(JSON.stringify(this.record));
1371
- console.log("constructor=>", this.initialRecord);
1372
1370
  }
1373
1371
  message = [];
1374
1372
  attributeMode;
@@ -1388,36 +1386,31 @@ class BaseFormComponent {
1388
1386
  });
1389
1387
  }
1390
1388
  else {
1389
+ console.log("record =>", this.record);
1391
1390
  this.initialRecord = JSON.parse(JSON.stringify(this.record));
1392
- console.log("init initialRecord =>", this.initialRecord);
1391
+ const cloneRecrd = structuredClone(this.record);
1392
+ console.log("initialRecord =>", this.initialRecord);
1393
+ console.log("cloneRecrd =>", cloneRecrd);
1393
1394
  }
1394
1395
  this.formStateService.selectIsFormNavigating()
1395
1396
  .pipe(takeUntil(this.destroy$))
1396
1397
  .subscribe((res) => {
1397
1398
  if (res) {
1398
- console.log("0 unSavedCall", this.initialRecord);
1399
- console.log("1 unSavedCall", this.record);
1400
1399
  this.checkUnsavedChanges();
1401
1400
  }
1402
1401
  });
1403
1402
  }
1404
1403
  handleBeforeUnload(event) {
1405
- console.log("initialRecord =>", this.initialRecord);
1406
- console.log("Record =>", this.record);
1407
1404
  const hasChanges = JSON.stringify(this.initialRecord) !== JSON.stringify(this.record);
1408
1405
  const isSaved = this.formStateService.getIsFormSaved(); // Ensure this method exists
1409
1406
  if (hasChanges && !isSaved) {
1410
- console.log("window hasChanges=>", hasChanges, "isSaved", isSaved);
1411
1407
  event.preventDefault();
1412
1408
  event.returnValue = SHARED.BROWSER_WARNING;
1413
1409
  }
1414
1410
  }
1415
1411
  checkUnsavedChanges() {
1416
- console.log("initialRecord =>", this.initialRecord);
1417
- console.log("Record =>", this.record);
1418
1412
  const hasChanges = JSON.stringify(this.initialRecord) !== JSON.stringify(this.record);
1419
1413
  const isSaved = this.formStateService.getIsFormSaved(); // Ensure this method exists
1420
- console.log("angular hasChanges=>", hasChanges, "isSaved", isSaved);
1421
1414
  this.formStateService.setShowConfirmation(hasChanges && !isSaved);
1422
1415
  }
1423
1416
  handleSubmit() {