@hmcts/ccd-case-ui-toolkit 4.7.6-hearings-tab → 4.7.6-tab-not-defined

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.
package/RELEASE-NOTES.md CHANGED
@@ -1,7 +1,11 @@
1
1
  ## RELEASE NOTES
2
2
 
3
+ ### Version 4.7.6-tab-not-defined-error"
4
+ **EUI-4562** Case details Active tasks tab on success not returning to active tasks page
5
+
3
6
  ### Version 4.7.6-hearings-tab
4
7
  **EUI-4441** Add hearings tab in case details
8
+ **EUI-4627** Can't access /hearings tab from URL
5
9
 
6
10
  ### Version 4.7.0-EUI-4412-order-fields-CYA-page
7
11
  **EUI-4414** Field order on the CYA page changes
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @hmcts/ccd-case-ui-toolkit - Case UI Toolkit
3
- * @version v4.7.6-hearings-tab
3
+ * @version v4.7.6-tab-not-defined
4
4
  * @link undefined
5
5
  * @license MIT
6
6
  */
@@ -15219,6 +15219,7 @@ var CaseHeaderComponent = /** @class */ (function () {
15219
15219
  this.caseTitle = new domain_1.CaseField();
15220
15220
  if (!this.isDraft() && this.caseDetails.state.title_display) {
15221
15221
  this.caseTitle.label = this.caseDetails.state.title_display;
15222
+ this.label = this.caseTitle.label;
15222
15223
  this.caseFields = this.getCaseFields();
15223
15224
  }
15224
15225
  };
@@ -16761,16 +16762,35 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
16761
16762
  var matTab;
16762
16763
  var url = this.location.path(true);
16763
16764
  var hashValue = url.substring(url.indexOf('#') + 1);
16764
- // if we have prepended tabs route to one of the prepended tabs
16765
- if (!url.includes('#') && this.prependedTabs && this.prependedTabs.length) {
16765
+ if (!url.includes('#')) {
16766
16766
  var paths = url.split('/');
16767
- var tabName_1 = decodeURIComponent(paths[paths.length - 1]);
16768
- var selectedTab_1 = this.prependedTabs.find(function (caseTab) { return caseTab.id.toLowerCase() === tabName_1.toLowerCase(); });
16769
- var tab = selectedTab_1 ? selectedTab_1.id : 'tasks';
16770
- this.router.navigate(['cases', 'case-details', this.caseDetails.case_id, tab]).then(function () {
16771
- matTab = _this.tabGroup._tabs.find(function (x) { return x.textLabel === selectedTab_1.label; });
16772
- _this.tabGroup.selectedIndex = matTab.position;
16773
- });
16767
+ // lastPath can be /caseId, or the tabs /tasks, /hearings etc.
16768
+ var lastPath_1 = decodeURIComponent(paths[paths.length - 1]);
16769
+ var foundTab_1 = null;
16770
+ var additionalTabs = this.prependedTabs.concat(this.appendedTabs);
16771
+ if (additionalTabs && additionalTabs.length) {
16772
+ foundTab_1 = additionalTabs.find(function (caseTab) { return caseTab.id.toLowerCase() === lastPath_1.toLowerCase(); });
16773
+ }
16774
+ // found tasks or hearing tab
16775
+ if (foundTab_1) {
16776
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id, foundTab_1.id]).then(function () {
16777
+ matTab = _this.tabGroup._tabs.find(function (x) { return x.textLabel === foundTab_1.label; });
16778
+ if (matTab && matTab.position) {
16779
+ _this.tabGroup.selectedIndex = matTab.position;
16780
+ }
16781
+ });
16782
+ // last path is caseId
16783
+ }
16784
+ else {
16785
+ // sort with the order of CCD predefined tabs
16786
+ this.caseDetails.tabs.sort(function (aTab, bTab) { return aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0); });
16787
+ // preselect the 1st order of CCD predefined tabs
16788
+ var preSelectTab_1 = this.caseDetails.tabs[0];
16789
+ this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
16790
+ matTab = _this.tabGroup._tabs.find(function (x) { return x.textLabel === preSelectTab_1.label; });
16791
+ _this.tabGroup.selectedIndex = matTab.position;
16792
+ });
16793
+ }
16774
16794
  }
16775
16795
  else {
16776
16796
  var regExp = new RegExp(CaseFullAccessViewComponent_1.UNICODE_SPACE, 'g');
@@ -28970,16 +28990,18 @@ var WorkbasketFiltersComponent = /** @class */ (function () {
28970
28990
  var formGroupLS = JSON.parse(this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE));
28971
28991
  // Form group local storage is available and contains regionList property
28972
28992
  if (util_1.isDefined(formGroupLS) && formGroupLS.hasOwnProperty(REGION_LIST_AND_FRC_FILTER)) {
28973
- // If regionList value does not match between local storage and form group
28974
- // then the filter value has been changed and we need to clear the old filter values
28975
- if (formGroupLS[REGION_LIST_AND_FRC_FILTER] !== this.formGroup.get(REGION_LIST_AND_FRC_FILTER).value) {
28976
- for (var key in formGroupLS) {
28977
- if (formGroupLS.hasOwnProperty(key)) {
28978
- var value = formGroupLS[key];
28979
- // Clear the filter form group control values if it has a value in local storage
28980
- // The regionList form group control value should be ignored as it always contain the latest value
28981
- if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
28982
- this.formGroup.get(key).setValue(null);
28993
+ if (this.formGroup.get(REGION_LIST_AND_FRC_FILTER)) {
28994
+ // If regionList value does not match between local storage and form group
28995
+ // then the filter value has been changed and we need to clear the old filter values
28996
+ if (formGroupLS[REGION_LIST_AND_FRC_FILTER] !== this.formGroup.get(REGION_LIST_AND_FRC_FILTER).value) {
28997
+ for (var key in formGroupLS) {
28998
+ if (formGroupLS.hasOwnProperty(key)) {
28999
+ var value = formGroupLS[key];
29000
+ // Clear the filter form group control values if it has a value in local storage
29001
+ // The regionList form group control value should be ignored as it always contain the latest value
29002
+ if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
29003
+ this.formGroup.get(key).setValue(null);
29004
+ }
28983
29005
  }
28984
29006
  }
28985
29007
  }
@@ -64171,7 +64193,7 @@ module.exports = "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-edit [submit]=\"
64171
64193
  /***/ 59541:
64172
64194
  /***/ ((module) => {
64173
64195
 
64174
- module.exports = "<h1 *ngIf=\"!caseTitle.label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n\n<div *ngIf=\"caseTitle.label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n"
64196
+ module.exports = "<h1 *ngIf=\"!label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n\n<div *ngIf=\"label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n"
64175
64197
 
64176
64198
  /***/ }),
64177
64199
 
@@ -64269,7 +64291,7 @@ module.exports = "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-viewer [hasPrint
64269
64291
  /***/ 67025:
64270
64292
  /***/ ((module) => {
64271
64293
 
64272
- module.exports = "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-basic-access-view *ngIf=\"!hasStandardAccess()\" [accessType]=\"userAccessType\" [caseDetails]=\"caseDetails\"></ccd-case-basic-access-view>\n <ccd-case-full-access-view *ngIf=\"hasStandardAccess()\" [caseDetails]=\"caseDetails\" [hasPrint]=\"hasPrint\" [hasEventSelector]=\"hasEventSelector\" [prependedTabs]=\"prependedTabs\" [appendedTabs]=\"appendedTabs\"></ccd-case-full-access-view>\n</div>\n"
64294
+ module.exports = "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-basic-access-view *ngIf=\"!hasStandardAccess()\"\n [accessType]=\"userAccessType\"\n [caseDetails]=\"caseDetails\">\n </ccd-case-basic-access-view>\n <ccd-case-full-access-view *ngIf=\"hasStandardAccess()\"\n [caseDetails]=\"caseDetails\"\n [hasPrint]=\"hasPrint\"\n [hasEventSelector]=\"hasEventSelector\"\n [prependedTabs]=\"prependedTabs\"\n [appendedTabs]=\"appendedTabs\">\n </ccd-case-full-access-view>\n</div>\n"
64273
64295
 
64274
64296
  /***/ }),
64275
64297