@hmcts/ccd-case-ui-toolkit 7.3.60-fix-case-filter-issue → 7.3.60
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);
|
|
@@ -34461,7 +34468,6 @@ class WorkbasketFiltersComponent {
|
|
|
34461
34468
|
}
|
|
34462
34469
|
}
|
|
34463
34470
|
onJurisdictionIdChange() {
|
|
34464
|
-
this.clearStoredWorkbasketFilterValues();
|
|
34465
34471
|
if (this.selected.jurisdiction) {
|
|
34466
34472
|
this.jurisdictionService.announceSelectedJurisdiction(this.selected.jurisdiction);
|
|
34467
34473
|
this.selectedJurisdictionCaseTypes = this.selected.jurisdiction.caseTypes.length > 0
|
|
@@ -34476,7 +34482,7 @@ class WorkbasketFiltersComponent {
|
|
|
34476
34482
|
this.selected.caseState = null;
|
|
34477
34483
|
this.clearWorkbasketInputs();
|
|
34478
34484
|
if (!this.isApplyButtonDisabled()) {
|
|
34479
|
-
this.onCaseTypeIdChange(
|
|
34485
|
+
this.onCaseTypeIdChange();
|
|
34480
34486
|
}
|
|
34481
34487
|
}
|
|
34482
34488
|
else {
|
|
@@ -34484,10 +34490,7 @@ class WorkbasketFiltersComponent {
|
|
|
34484
34490
|
this.resetCaseState();
|
|
34485
34491
|
}
|
|
34486
34492
|
}
|
|
34487
|
-
onCaseTypeIdChange(
|
|
34488
|
-
if (clearStoredValues) {
|
|
34489
|
-
this.clearStoredWorkbasketFilterValues();
|
|
34490
|
-
}
|
|
34493
|
+
onCaseTypeIdChange() {
|
|
34491
34494
|
if (this.selected.caseType) {
|
|
34492
34495
|
this.selectedCaseTypeStates = this.sortStates(this.selected.caseType.states);
|
|
34493
34496
|
this.selected.caseState = null;
|
|
@@ -34583,7 +34586,7 @@ class WorkbasketFiltersComponent {
|
|
|
34583
34586
|
this.selectedJurisdictionCaseTypes = this.selected.jurisdiction.caseTypes;
|
|
34584
34587
|
this.selected.caseType = this.selectCaseType(this.selected, this.selectedJurisdictionCaseTypes, routeSnapshot);
|
|
34585
34588
|
if (this.selected.caseType) {
|
|
34586
|
-
this.onCaseTypeIdChange(
|
|
34589
|
+
this.onCaseTypeIdChange();
|
|
34587
34590
|
this.selected.caseState = this.selectCaseState(this.selected.caseType, routeSnapshot);
|
|
34588
34591
|
}
|
|
34589
34592
|
this.workbasketDefaults = true;
|
|
@@ -34630,9 +34633,6 @@ class WorkbasketFiltersComponent {
|
|
|
34630
34633
|
this.workbasketInputsReady = false;
|
|
34631
34634
|
this.workbasketInputs = [];
|
|
34632
34635
|
}
|
|
34633
|
-
clearStoredWorkbasketFilterValues() {
|
|
34634
|
-
this.windowService.removeLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
34635
|
-
}
|
|
34636
34636
|
resetCaseState() {
|
|
34637
34637
|
this.defaults.state_id = null;
|
|
34638
34638
|
this.selected.caseState = null;
|