@hmcts/ccd-case-ui-toolkit 7.3.52-exui-4309 → 7.3.52-exui-4291

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.
@@ -11328,7 +11328,6 @@ class CaseEditPageComponent {
11328
11328
  }
11329
11329
  ngOnInit() {
11330
11330
  initDialog();
11331
- this.clearValidationErrors();
11332
11331
  this.eventTrigger = this.caseEdit.eventTrigger;
11333
11332
  this.editForm = this.caseEdit.form;
11334
11333
  this.wizard = this.caseEdit.wizard;
@@ -11384,7 +11383,6 @@ class CaseEditPageComponent {
11384
11383
  this.dialogRefAfterClosedSub?.unsubscribe();
11385
11384
  this.saveDraftSub?.unsubscribe();
11386
11385
  this.caseFormValidationErrorsSub?.unsubscribe();
11387
- this.clearValidationErrors();
11388
11386
  this.multipageComponentStateService.reset();
11389
11387
  }
11390
11388
  applyValuesChanged(valuesChanged) {
@@ -11408,7 +11406,7 @@ class CaseEditPageComponent {
11408
11406
  * EUI-3732 - Breathing space data not persisted on Previous button click with ExpUI Demo
11409
11407
  */
11410
11408
  toPreviousPage() {
11411
- this.clearValidationErrors();
11409
+ this.caseEditDataService.clearFormValidationErrors();
11412
11410
  const caseEventData = this.buildCaseEventData(true);
11413
11411
  caseEventData.data = caseEventData.event_data;
11414
11412
  this.updateFormData(caseEventData);
@@ -11581,7 +11579,7 @@ class CaseEditPageComponent {
11581
11579
  this.editForm.controls['data'].removeControl('caseLinksFlag');
11582
11580
  }
11583
11581
  }
11584
- this.clearValidationErrors();
11582
+ this.caseEditDataService.clearFormValidationErrors();
11585
11583
  this.checkForStagesCompleted();
11586
11584
  if (this.currentPageIsNotValid()) {
11587
11585
  // The generateErrorMessage method filters out the hidden fields.
@@ -11741,7 +11739,7 @@ class CaseEditPageComponent {
11741
11739
  else {
11742
11740
  this.caseEdit.cancelled.emit();
11743
11741
  }
11744
- this.clearValidationErrors();
11742
+ this.caseEditDataService.clearFormValidationErrors();
11745
11743
  this.multipageComponentStateService.reset();
11746
11744
  }
11747
11745
  resetLinkedCaseJourney() {
@@ -11809,7 +11807,6 @@ class CaseEditPageComponent {
11809
11807
  console.log('handleError ', error);
11810
11808
  }
11811
11809
  resetErrors() {
11812
- this.clearValidationErrors();
11813
11810
  this.caseEdit.error = null;
11814
11811
  this.caseEdit.ignoreWarning = false;
11815
11812
  this.triggerText = this.getTriggerText();
@@ -11817,10 +11814,6 @@ class CaseEditPageComponent {
11817
11814
  this.caseEdit.callbackErrorsSubject.next(null);
11818
11815
  }
11819
11816
  }
11820
- clearValidationErrors() {
11821
- this.validationErrors = [];
11822
- this.caseEditDataService?.clearFormValidationErrors?.();
11823
- }
11824
11817
  saveDraft() {
11825
11818
  if (this.eventTrigger.can_save_draft) {
11826
11819
  const draftCaseEventData = this.formValueService.sanitise(this.editForm.value);