@hmcts/ccd-case-ui-toolkit 7.0.39-callback-event-errors-rework → 7.0.39-case-consolidated-link

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.
@@ -16008,20 +16008,43 @@ function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) { if (rf & 1) {
16008
16008
  i0.ɵɵadvance(1);
16009
16009
  i0.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
16010
16010
  } }
16011
+ function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_a_4_Template(rf, ctx) { if (rf & 1) {
16012
+ i0.ɵɵelementStart(0, "a", 20);
16013
+ i0.ɵɵtext(1);
16014
+ i0.ɵɵelementEnd();
16015
+ } if (rf & 2) {
16016
+ const case_r7 = i0.ɵɵnextContext(3).$implicit;
16017
+ const ctx_r14 = i0.ɵɵnextContext(3);
16018
+ i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0.ɵɵsanitizeUrl);
16019
+ i0.ɵɵadvance(1);
16020
+ i0.ɵɵtextInterpolate(ctx_r14.getCaseReferenceLink(case_r7.caseReference));
16021
+ } }
16022
+ function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_br_5_Template(rf, ctx) { if (rf & 1) {
16023
+ i0.ɵɵelement(0, "br");
16024
+ } }
16011
16025
  function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) { if (rf & 1) {
16012
16026
  i0.ɵɵelementStart(0, "span");
16013
16027
  i0.ɵɵtext(1);
16014
16028
  i0.ɵɵpipe(2, "ccdLinkCasesFromReasonValue");
16015
- i0.ɵɵelement(3, "br");
16029
+ i0.ɵɵelementStart(3, "span");
16030
+ i0.ɵɵtemplate(4, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_a_4_Template, 2, 2, "a", 18);
16031
+ i0.ɵɵelementEnd();
16032
+ i0.ɵɵtemplate(5, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_br_5_Template, 1, 0, "br", 19);
16016
16033
  i0.ɵɵelementEnd();
16017
16034
  } if (rf & 2) {
16018
16035
  const reason_r11 = ctx.$implicit;
16036
+ const isLast_r13 = ctx.last;
16037
+ const ctx_r10 = i0.ɵɵnextContext(5);
16019
16038
  i0.ɵɵadvance(1);
16020
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, reason_r11), " ");
16039
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 3, reason_r11), "");
16040
+ i0.ɵɵadvance(3);
16041
+ i0.ɵɵproperty("ngIf", ctx_r10.hasLeadCaseOrConsolidated(reason_r11.reasonCode));
16042
+ i0.ɵɵadvance(1);
16043
+ i0.ɵɵproperty("ngIf", !isLast_r13);
16021
16044
  } }
16022
16045
  function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) { if (rf & 1) {
16023
16046
  i0.ɵɵelementStart(0, "td", 14);
16024
- i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
16047
+ i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 6, 5, "span", 17);
16025
16048
  i0.ɵɵelementEnd();
16026
16049
  } if (rf & 2) {
16027
16050
  const details_r9 = ctx.$implicit;
@@ -16068,7 +16091,7 @@ function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) {
16068
16091
  i0.ɵɵproperty("ngForOf", case_r7.linkDetails);
16069
16092
  } }
16070
16093
  function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) { if (rf & 1) {
16071
- i0.ɵɵelementStart(0, "tr", 5)(1, "td", 18);
16094
+ i0.ɵɵelementStart(0, "tr", 5)(1, "td", 21);
16072
16095
  i0.ɵɵtext(2, " None ");
16073
16096
  i0.ɵɵelementEnd()();
16074
16097
  } }
@@ -16167,6 +16190,13 @@ class LinkedCasesFromTableComponent {
16167
16190
  mapLookupIDToValueFromJurisdictions(fieldName, fieldValue) {
16168
16191
  return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
16169
16192
  }
16193
+ getCaseReferenceLink(caseRef) {
16194
+ return caseRef.slice(this.caseId.length - 4);
16195
+ }
16196
+ hasLeadCaseOrConsolidated(reasonCode) {
16197
+ return reasonCode === LinkedCasesFromTableComponent.CASE_PROGRESS_REASON_CODE ||
16198
+ reasonCode === LinkedCasesFromTableComponent.CASE_CONSOLIDATED_REASON_CODE;
16199
+ }
16170
16200
  onClick() {
16171
16201
  this.showHideLinkText = this.showHideLinkText === 'Show'
16172
16202
  ? 'Hide'
@@ -16174,8 +16204,10 @@ class LinkedCasesFromTableComponent {
16174
16204
  }
16175
16205
  }
16176
16206
  LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
16207
+ LinkedCasesFromTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
16208
+ LinkedCasesFromTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
16177
16209
  LinkedCasesFromTableComponent.ɵfac = function LinkedCasesFromTableComponent_Factory(t) { return new (t || LinkedCasesFromTableComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
16178
- LinkedCasesFromTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 2, vars: 2, consts: [["id", "show-hide-link", "class", "govuk-link", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "table to display cases linked from", 4, "ngIf"], ["id", "show-hide-link", "href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["aria-describedby", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) { if (rf & 1) {
16210
+ LinkedCasesFromTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 2, vars: 2, consts: [["id", "show-hide-link", "class", "govuk-link", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "table to display cases linked from", 4, "ngIf"], ["id", "show-hide-link", "href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["aria-describedby", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) { if (rf & 1) {
16179
16211
  i0.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
16180
16212
  i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
16181
16213
  } if (rf & 2) {
@@ -16185,7 +16217,7 @@ LinkedCasesFromTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
16185
16217
  } }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
16186
16218
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
16187
16219
  type: Component,
16188
- args: [{ selector: 'ccd-linked-cases-from-table', template: "<a *ngIf=\"!noLinkedCases && !isServerError\" id=\"show-hide-link\" class=\"govuk-link\" href=\"javascript:void(0)\"\n (click)=\"onClick()\">{{showHideLinkText}}</a>\n<table *ngIf=\"(getLinkedCasesResponse && showHideLinkText === 'Hide') || noLinkedCases\"\n aria-describedby=\"table to display cases linked from\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"getLinkedCasesResponse && (!isServerError && !isServerReasonCodeError)\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of getLinkedCasesResponse\">\n <td class=\"govuk-table__header case-table-column width-20\">\n <p class=\"govuk-body\"><a target=\"_blank\" class=\"govuk-link\" href=\"cases/case-details/{{case.caseReference}}\"\n rel=\"noopener\"><span>{{case.caseNameHmctsInternal}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td class=\"case-table-column\"><span [title]=\"case.ccdCaseTypeDescription\">{{case.ccdCaseType}}</span></td>\n <td class=\"case-table-column\"><span>{{case.ccdJurisdiction}}</span></td>\n <td class=\"case-table-column\"><span [title]=\"case.stateDescription\">{{case.state}}</span></td>\n <td class=\"case-table-column\" *ngFor=\"let details of case.linkDetails\">\n <span *ngFor=\"let reason of details.reasons; let i = index; let isLast = last\">\n {{reason | ccdLinkCasesFromReasonValue}} <br>\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"noLinkedCases\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody> \n</table>\n", styles: [".case-table-column{min-width:20%;max-width:20%}.heading-h2{margin-bottom:0}\n"] }]
16220
+ args: [{ selector: 'ccd-linked-cases-from-table', template: "<a *ngIf=\"!noLinkedCases && !isServerError\" id=\"show-hide-link\" class=\"govuk-link\" href=\"javascript:void(0)\"\n (click)=\"onClick()\">{{showHideLinkText}}</a>\n<table *ngIf=\"(getLinkedCasesResponse && showHideLinkText === 'Hide') || noLinkedCases\"\n aria-describedby=\"table to display cases linked from\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\" width=\"20%\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"getLinkedCasesResponse && (!isServerError && !isServerReasonCodeError)\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of getLinkedCasesResponse\">\n <td class=\"govuk-table__header case-table-column width-20\">\n <p class=\"govuk-body\"><a target=\"_blank\" class=\"govuk-link\" href=\"cases/case-details/{{case.caseReference}}\"\n rel=\"noopener\"><span>{{case.caseNameHmctsInternal}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td class=\"case-table-column\"><span [title]=\"case.ccdCaseTypeDescription\">{{case.ccdCaseType}}</span></td>\n <td class=\"case-table-column\"><span>{{case.ccdJurisdiction}}</span></td>\n <td class=\"case-table-column\"><span [title]=\"case.stateDescription\">{{case.state}}</span></td>\n <td class=\"case-table-column\" *ngFor=\"let details of case.linkDetails\">\n <span *ngFor=\"let reason of details.reasons; let i = index; let isLast = last\">\n {{reason | ccdLinkCasesFromReasonValue}}<span><a class=\"govuk-!-padding-left-1\"\n href=\"cases/case-details/{{ case.caseReference }}\"\n *ngIf=\"hasLeadCaseOrConsolidated(reason.reasonCode)\">{{getCaseReferenceLink(case.caseReference)}}</a></span>\n <br *ngIf=\"!isLast\" />\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"noLinkedCases\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody> \n</table>\n", styles: [".case-table-column{min-width:20%;max-width:20%}.heading-h2{margin-bottom:0}\n"] }]
16189
16221
  }], function () { return [{ type: i1$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
16190
16222
  type: Input
16191
16223
  }], notifyAPIFailure: [{