@hmcts/ccd-case-ui-toolkit 7.3.52-exui-4425-rc-2 → 7.3.52-exui-4309

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