@hmcts/ccd-case-ui-toolkit 7.3.54-4300 → 7.3.54-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.
|
@@ -11398,6 +11398,7 @@ class CaseEditPageComponent {
|
|
|
11398
11398
|
}
|
|
11399
11399
|
ngOnInit() {
|
|
11400
11400
|
initDialog();
|
|
11401
|
+
this.clearValidationErrors();
|
|
11401
11402
|
this.eventTrigger = this.caseEdit.eventTrigger;
|
|
11402
11403
|
this.editForm = this.caseEdit.form;
|
|
11403
11404
|
this.wizard = this.caseEdit.wizard;
|
|
@@ -11453,6 +11454,7 @@ class CaseEditPageComponent {
|
|
|
11453
11454
|
this.dialogRefAfterClosedSub?.unsubscribe();
|
|
11454
11455
|
this.saveDraftSub?.unsubscribe();
|
|
11455
11456
|
this.caseFormValidationErrorsSub?.unsubscribe();
|
|
11457
|
+
this.clearValidationErrors();
|
|
11456
11458
|
this.multipageComponentStateService.reset();
|
|
11457
11459
|
}
|
|
11458
11460
|
applyValuesChanged(valuesChanged) {
|
|
@@ -11476,7 +11478,7 @@ class CaseEditPageComponent {
|
|
|
11476
11478
|
* EUI-3732 - Breathing space data not persisted on Previous button click with ExpUI Demo
|
|
11477
11479
|
*/
|
|
11478
11480
|
toPreviousPage() {
|
|
11479
|
-
this.
|
|
11481
|
+
this.clearValidationErrors();
|
|
11480
11482
|
const caseEventData = this.buildCaseEventData(true);
|
|
11481
11483
|
caseEventData.data = caseEventData.event_data;
|
|
11482
11484
|
this.updateFormData(caseEventData);
|
|
@@ -11649,7 +11651,7 @@ class CaseEditPageComponent {
|
|
|
11649
11651
|
this.editForm.controls['data'].removeControl('caseLinksFlag');
|
|
11650
11652
|
}
|
|
11651
11653
|
}
|
|
11652
|
-
this.
|
|
11654
|
+
this.clearValidationErrors();
|
|
11653
11655
|
this.checkForStagesCompleted();
|
|
11654
11656
|
if (this.currentPageIsNotValid()) {
|
|
11655
11657
|
// The generateErrorMessage method filters out the hidden fields.
|
|
@@ -11813,7 +11815,7 @@ class CaseEditPageComponent {
|
|
|
11813
11815
|
else {
|
|
11814
11816
|
this.caseEdit.cancelled.emit();
|
|
11815
11817
|
}
|
|
11816
|
-
this.
|
|
11818
|
+
this.clearValidationErrors();
|
|
11817
11819
|
this.multipageComponentStateService.reset();
|
|
11818
11820
|
}
|
|
11819
11821
|
resetLinkedCaseJourney() {
|
|
@@ -11881,6 +11883,7 @@ class CaseEditPageComponent {
|
|
|
11881
11883
|
console.log('handleError ', error);
|
|
11882
11884
|
}
|
|
11883
11885
|
resetErrors() {
|
|
11886
|
+
this.clearValidationErrors();
|
|
11884
11887
|
this.caseEdit.error = null;
|
|
11885
11888
|
this.caseEdit.ignoreWarning = false;
|
|
11886
11889
|
this.triggerText = this.getTriggerText();
|
|
@@ -11888,6 +11891,10 @@ class CaseEditPageComponent {
|
|
|
11888
11891
|
this.caseEdit.callbackErrorsSubject.next(null);
|
|
11889
11892
|
}
|
|
11890
11893
|
}
|
|
11894
|
+
clearValidationErrors() {
|
|
11895
|
+
this.validationErrors = [];
|
|
11896
|
+
this.caseEditDataService?.clearFormValidationErrors?.();
|
|
11897
|
+
}
|
|
11891
11898
|
saveDraft() {
|
|
11892
11899
|
if (this.eventTrigger.can_save_draft) {
|
|
11893
11900
|
const draftCaseEventData = this.formValueService.sanitise(this.editForm.value);
|