@hmcts/ccd-case-ui-toolkit 7.3.58 → 7.3.60-fix-case-filter-issue

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.
@@ -34461,6 +34461,7 @@ class WorkbasketFiltersComponent {
34461
34461
  }
34462
34462
  }
34463
34463
  onJurisdictionIdChange() {
34464
+ this.clearStoredWorkbasketFilterValues();
34464
34465
  if (this.selected.jurisdiction) {
34465
34466
  this.jurisdictionService.announceSelectedJurisdiction(this.selected.jurisdiction);
34466
34467
  this.selectedJurisdictionCaseTypes = this.selected.jurisdiction.caseTypes.length > 0
@@ -34475,7 +34476,7 @@ class WorkbasketFiltersComponent {
34475
34476
  this.selected.caseState = null;
34476
34477
  this.clearWorkbasketInputs();
34477
34478
  if (!this.isApplyButtonDisabled()) {
34478
- this.onCaseTypeIdChange();
34479
+ this.onCaseTypeIdChange(false);
34479
34480
  }
34480
34481
  }
34481
34482
  else {
@@ -34483,7 +34484,10 @@ class WorkbasketFiltersComponent {
34483
34484
  this.resetCaseState();
34484
34485
  }
34485
34486
  }
34486
- onCaseTypeIdChange() {
34487
+ onCaseTypeIdChange(clearStoredValues = true) {
34488
+ if (clearStoredValues) {
34489
+ this.clearStoredWorkbasketFilterValues();
34490
+ }
34487
34491
  if (this.selected.caseType) {
34488
34492
  this.selectedCaseTypeStates = this.sortStates(this.selected.caseType.states);
34489
34493
  this.selected.caseState = null;
@@ -34579,7 +34583,7 @@ class WorkbasketFiltersComponent {
34579
34583
  this.selectedJurisdictionCaseTypes = this.selected.jurisdiction.caseTypes;
34580
34584
  this.selected.caseType = this.selectCaseType(this.selected, this.selectedJurisdictionCaseTypes, routeSnapshot);
34581
34585
  if (this.selected.caseType) {
34582
- this.onCaseTypeIdChange();
34586
+ this.onCaseTypeIdChange(false);
34583
34587
  this.selected.caseState = this.selectCaseState(this.selected.caseType, routeSnapshot);
34584
34588
  }
34585
34589
  this.workbasketDefaults = true;
@@ -34626,6 +34630,9 @@ class WorkbasketFiltersComponent {
34626
34630
  this.workbasketInputsReady = false;
34627
34631
  this.workbasketInputs = [];
34628
34632
  }
34633
+ clearStoredWorkbasketFilterValues() {
34634
+ this.windowService.removeLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
34635
+ }
34629
34636
  resetCaseState() {
34630
34637
  this.defaults.state_id = null;
34631
34638
  this.selected.caseState = null;