@hmcts/ccd-case-ui-toolkit 5.0.50-fee-pay-props → 5.0.50-fee-pay-props-rc2

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.
Files changed (124) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +231 -2882
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +1 -9
  6. package/esm2015/lib/shared/components/case-editor/case-access-utils/index.js +10 -1
  7. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +7 -17
  8. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +5 -52
  9. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -10
  10. package/esm2015/lib/shared/components/palette/base-field/abstract-form-field.component.js +2 -4
  11. package/esm2015/lib/shared/components/palette/case-link/index.js +1 -4
  12. package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +8 -28
  13. package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +66 -77
  14. package/esm2015/lib/shared/components/palette/palette.module.js +22 -68
  15. package/esm2015/lib/shared/components/palette/palette.service.js +4 -12
  16. package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +1 -10
  17. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  18. package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
  19. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  20. package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +1 -5
  21. package/esm2015/lib/shared/pipes/index.js +1 -2
  22. package/esm2015/lib/shared/pipes/pipes.module.js +4 -8
  23. package/esm2015/lib/shared/services/fields/fields.utils.js +2 -8
  24. package/esm2015/lib/shared/services/form/form-value.service.js +10 -9
  25. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +224 -2586
  26. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  27. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +0 -5
  28. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
  29. package/lib/shared/components/case-editor/case-access-utils/index.d.ts +3 -0
  30. package/lib/shared/components/case-editor/case-access-utils/index.d.ts.map +1 -1
  31. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +0 -2
  32. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  33. package/lib/shared/components/case-editor/services/cases.service.d.ts +0 -9
  34. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  35. package/lib/shared/components/case-editor/services/page-validation.service.d.ts +0 -1
  36. package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
  37. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  38. package/lib/shared/components/palette/case-link/index.d.ts +0 -3
  39. package/lib/shared/components/palette/case-link/index.d.ts.map +1 -1
  40. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts +0 -3
  41. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
  42. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +4 -13
  43. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
  44. package/lib/shared/components/palette/palette.module.d.ts +58 -67
  45. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  46. package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
  47. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +0 -1
  48. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
  49. package/lib/shared/domain/case-view/role-request.model.d.ts +1 -1
  50. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  51. package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
  52. package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
  53. package/lib/shared/domain/user/user-info.model.d.ts +2 -0
  54. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  55. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  56. package/lib/shared/pipes/index.d.ts +0 -1
  57. package/lib/shared/pipes/index.d.ts.map +1 -1
  58. package/lib/shared/pipes/pipes.module.d.ts +2 -3
  59. package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
  60. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  61. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  62. package/lib/shared/services/form/form-value.service.d.ts +0 -3
  63. package/lib/shared/services/form/form-value.service.d.ts.map +1 -1
  64. package/package.json +1 -1
  65. package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +0 -125
  66. package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +0 -198
  67. package/esm2015/lib/shared/components/palette/case-link/components/index.js +0 -10
  68. package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +0 -497
  69. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +0 -221
  70. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +0 -286
  71. package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +0 -76
  72. package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +0 -178
  73. package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +0 -216
  74. package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +0 -265
  75. package/esm2015/lib/shared/components/palette/case-link/domain/index.js +0 -3
  76. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +0 -2
  77. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +0 -19
  78. package/esm2015/lib/shared/components/palette/case-link/enums/index.js +0 -2
  79. package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +0 -33
  80. package/esm2015/lib/shared/components/palette/case-link/services/index.js +0 -2
  81. package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +0 -134
  82. package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +0 -27
  83. package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +0 -23
  84. package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +0 -2
  85. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts +0 -19
  86. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +0 -1
  87. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +0 -18
  88. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +0 -1
  89. package/lib/shared/components/palette/case-link/components/index.d.ts +0 -10
  90. package/lib/shared/components/palette/case-link/components/index.d.ts.map +0 -1
  91. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +0 -45
  92. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +0 -1
  93. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +0 -42
  94. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +0 -1
  95. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +0 -45
  96. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +0 -1
  97. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +0 -12
  98. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +0 -1
  99. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +0 -37
  100. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +0 -1
  101. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +0 -38
  102. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +0 -1
  103. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +0 -45
  104. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +0 -1
  105. package/lib/shared/components/palette/case-link/domain/index.d.ts +0 -3
  106. package/lib/shared/components/palette/case-link/domain/index.d.ts.map +0 -1
  107. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +0 -12
  108. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +0 -1
  109. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +0 -65
  110. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +0 -1
  111. package/lib/shared/components/palette/case-link/enums/index.d.ts +0 -2
  112. package/lib/shared/components/palette/case-link/enums/index.d.ts.map +0 -1
  113. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +0 -29
  114. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +0 -1
  115. package/lib/shared/components/palette/case-link/services/index.d.ts +0 -2
  116. package/lib/shared/components/palette/case-link/services/index.d.ts.map +0 -1
  117. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +0 -50
  118. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +0 -1
  119. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +0 -10
  120. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +0 -1
  121. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +0 -11
  122. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +0 -1
  123. package/lib/shared/pipes/link-cases-reason-code/index.d.ts +0 -2
  124. package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rx-polling'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('class-transformer'), require('underscore'), require('moment'), require('util'), require('@edium/fsm'), require('@angular/material/dialog'), require('@angular-material-components/datetime-picker'), require('@angular/cdk/overlay'), require('@angular/cdk/tree'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@hmcts/ccpay-web-component'), require('@hmcts/media-viewer'), require('@nicky-lenaers/ngx-scroll-to'), require('ngx-md'), require('@angular-material-components/moment-adapter'), require('@angular/cdk/portal'), require('ngx-pagination'), require('@angular/material/tabs')) :
3
3
  typeof define === 'function' && define.amd ? define('@hmcts/ccd-case-ui-toolkit', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rx-polling', 'rxjs', '@angular/common/http', 'rxjs/operators', 'class-transformer', 'underscore', 'moment', 'util', '@edium/fsm', '@angular/material/dialog', '@angular-material-components/datetime-picker', '@angular/cdk/overlay', '@angular/cdk/tree', '@angular/material/autocomplete', '@angular/material/core', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@hmcts/ccpay-web-component', '@hmcts/media-viewer', '@nicky-lenaers/ngx-scroll-to', 'ngx-md', '@angular-material-components/moment-adapter', '@angular/cdk/portal', 'ngx-pagination', '@angular/material/tabs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.i12, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global["@angular-material-components/moment-adapter"], global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
5
- })(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3, i12, i2$1, i1$5, momentAdapter, i6$2, i1$6, i9) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.i11, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global["@angular-material-components/moment-adapter"], global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
5
+ })(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3, i11, i2$1, i1$5, momentAdapter, i6$2, i1$6, i9) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -42,7 +42,7 @@
42
42
  var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
43
43
  var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
44
44
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
45
- var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
45
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
46
46
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
47
47
  var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
48
48
  var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
@@ -118,7 +118,7 @@
118
118
  i0__namespace.ɵɵtextInterpolate(ctx_r1.workhours);
119
119
  }
120
120
  }
121
- var _c0$_ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
121
+ var _c0$Y = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
122
122
  var _c1$r = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
123
123
  var FooterComponent = /** @class */ (function () {
124
124
  function FooterComponent() {
@@ -128,7 +128,7 @@
128
128
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
129
129
  FooterComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$r, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) {
130
130
  if (rf & 1) {
131
- i0__namespace.ɵɵprojectionDef(_c0$_);
131
+ i0__namespace.ɵɵprojectionDef(_c0$Y);
132
132
  i0__namespace.ɵɵelementStart(0, "footer", 0);
133
133
  i0__namespace.ɵɵelementStart(1, "div", 1);
134
134
  i0__namespace.ɵɵtemplate(2, FooterComponent_div_2_Template, 15, 0, "div", 2);
@@ -207,7 +207,7 @@
207
207
  i0__namespace.ɵɵtextInterpolate(ctx_r2.title);
208
208
  }
209
209
  }
210
- var _c0$Z = [[["", "headerNavigation", ""]]];
210
+ var _c0$X = [[["", "headerNavigation", ""]]];
211
211
  var _c1$q = ["[headerNavigation]"];
212
212
  var HeaderBarComponent = /** @class */ (function () {
213
213
  function HeaderBarComponent() {
@@ -221,7 +221,7 @@
221
221
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
222
222
  HeaderBarComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$q, decls: 15, vars: 8, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) {
223
223
  if (rf & 1) {
224
- i0__namespace.ɵɵprojectionDef(_c0$Z);
224
+ i0__namespace.ɵɵprojectionDef(_c0$X);
225
225
  i0__namespace.ɵɵelementStart(0, "header", 0);
226
226
  i0__namespace.ɵɵelementStart(1, "div", 1);
227
227
  i0__namespace.ɵɵelementStart(2, "div", 2);
@@ -282,7 +282,7 @@
282
282
  }] });
283
283
  })();
284
284
 
285
- var _c0$Y = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
285
+ var _c0$W = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
286
286
  var _c1$p = ["[leftNavLinks]", "[rightNavLinks]"];
287
287
  var NavigationComponent = /** @class */ (function () {
288
288
  function NavigationComponent() {
@@ -292,7 +292,7 @@
292
292
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
293
293
  NavigationComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$p, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
294
294
  if (rf & 1) {
295
- i0__namespace.ɵɵprojectionDef(_c0$Y);
295
+ i0__namespace.ɵɵprojectionDef(_c0$W);
296
296
  i0__namespace.ɵɵelementStart(0, "div");
297
297
  i0__namespace.ɵɵelementStart(1, "nav", 0);
298
298
  i0__namespace.ɵɵprojection(2);
@@ -437,7 +437,7 @@
437
437
  }], null, null);
438
438
  })();
439
439
 
440
- var _c0$X = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
440
+ var _c0$V = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
441
441
  var _c1$o = ["[topBody]", "[leftBody]", "[rightBody]"];
442
442
  var BodyComponent = /** @class */ (function () {
443
443
  function BodyComponent() {
@@ -447,7 +447,7 @@
447
447
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
448
448
  BodyComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$o, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
449
449
  if (rf & 1) {
450
- i0__namespace.ɵɵprojectionDef(_c0$X);
450
+ i0__namespace.ɵɵprojectionDef(_c0$V);
451
451
  i0__namespace.ɵɵelementStart(0, "div", 0);
452
452
  i0__namespace.ɵɵprojection(1);
453
453
  i0__namespace.ɵɵprojection(2, 1);
@@ -794,7 +794,7 @@
794
794
  return typeof state === "function" ? receiver === state : state.has(receiver);
795
795
  }
796
796
 
797
- var _c0$W = function (a0) { return { "govuk-input--error": a0 }; };
797
+ var _c0$U = function (a0) { return { "govuk-input--error": a0 }; };
798
798
  function DateInputComponent_div_16_Template(rf, ctx) {
799
799
  if (rf & 1) {
800
800
  var _r8_1 = i0__namespace.ɵɵgetCurrentView();
@@ -812,7 +812,7 @@
812
812
  i0__namespace.ɵɵadvance(1);
813
813
  i0__namespace.ɵɵproperty("for", ctx_r3.hourId());
814
814
  i0__namespace.ɵɵadvance(2);
815
- i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r3.isInvalid));
815
+ i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r3.isInvalid));
816
816
  }
817
817
  }
818
818
  function DateInputComponent_div_17_Template(rf, ctx) {
@@ -832,7 +832,7 @@
832
832
  i0__namespace.ɵɵadvance(1);
833
833
  i0__namespace.ɵɵproperty("for", ctx_r4.minuteId());
834
834
  i0__namespace.ɵɵadvance(2);
835
- i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r4.isInvalid));
835
+ i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r4.isInvalid));
836
836
  }
837
837
  }
838
838
  function DateInputComponent_div_18_Template(rf, ctx) {
@@ -852,7 +852,7 @@
852
852
  i0__namespace.ɵɵadvance(1);
853
853
  i0__namespace.ɵɵproperty("for", ctx_r5.secondId());
854
854
  i0__namespace.ɵɵadvance(2);
855
- i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r5.isInvalid));
855
+ i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r5.isInvalid));
856
856
  }
857
857
  }
858
858
  var DateInputComponent = /** @class */ (function () {
@@ -1086,15 +1086,15 @@
1086
1086
  i0__namespace.ɵɵadvance(2);
1087
1087
  i0__namespace.ɵɵproperty("for", ctx.dayId());
1088
1088
  i0__namespace.ɵɵadvance(2);
1089
- i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$W, ctx.isInvalid));
1089
+ i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$U, ctx.isInvalid));
1090
1090
  i0__namespace.ɵɵadvance(3);
1091
1091
  i0__namespace.ɵɵproperty("for", ctx.monthId());
1092
1092
  i0__namespace.ɵɵadvance(2);
1093
- i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$W, ctx.isInvalid));
1093
+ i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$U, ctx.isInvalid));
1094
1094
  i0__namespace.ɵɵadvance(3);
1095
1095
  i0__namespace.ɵɵproperty("for", ctx.yearId());
1096
1096
  i0__namespace.ɵɵadvance(2);
1097
- i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$W, ctx.isInvalid));
1097
+ i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$U, ctx.isInvalid));
1098
1098
  i0__namespace.ɵɵadvance(2);
1099
1099
  i0__namespace.ɵɵproperty("ngIf", ctx.isDateTime);
1100
1100
  i0__namespace.ɵɵadvance(1);
@@ -1175,7 +1175,7 @@
1175
1175
  i0__namespace.ɵɵelementContainerEnd();
1176
1176
  }
1177
1177
  }
1178
- var _c0$V = ["*"];
1178
+ var _c0$T = ["*"];
1179
1179
  exports.AlertMessageType = void 0;
1180
1180
  (function (AlertMessageType) {
1181
1181
  AlertMessageType["WARNING"] = "warning";
@@ -1196,7 +1196,7 @@
1196
1196
  AlertComponent.TYPE_ERROR = 'error';
1197
1197
  AlertComponent.TYPE_INFORMATION = 'information';
1198
1198
  AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
1199
- AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$V, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) {
1199
+ AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$T, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) {
1200
1200
  if (rf & 1) {
1201
1201
  i0__namespace.ɵɵprojectionDef();
1202
1202
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -1471,7 +1471,7 @@
1471
1471
  }] });
1472
1472
  })();
1473
1473
 
1474
- var _c0$U = function (a0) { return { "js-hidden": a0 }; };
1474
+ var _c0$S = function (a0) { return { "js-hidden": a0 }; };
1475
1475
  var _c1$n = ["*"];
1476
1476
  var TabComponent = /** @class */ (function () {
1477
1477
  function TabComponent() {
@@ -1487,7 +1487,7 @@
1487
1487
  i0__namespace.ɵɵelementEnd();
1488
1488
  }
1489
1489
  if (rf & 2) {
1490
- i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$U, !ctx.selected));
1490
+ i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$S, !ctx.selected));
1491
1491
  i0__namespace.ɵɵattribute("aria-hidden", !ctx.selected);
1492
1492
  }
1493
1493
  }, directives: [i1__namespace.NgClass], styles: [".tabs-toggle[_ngcontent-%COMP%]{display:block;padding:10px 15px 3px;margin-bottom:8px}.tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{color:#0b0c0c;text-decoration:none;border-bottom:none}.tabs-toggle[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#005ea5}@media (max-width:640px){.tabs-list[_ngcontent-%COMP%]{border-bottom:1px solid #bfc1c3;margin-left:-15px;margin-right:-15px}.tabs-toggle[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3}.tabs-toggle[_ngcontent-%COMP%]:focus{color:#0b0c0c;outline:none}}@media (min-width:641px){.tabs-panel[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3;clear:both;overflow:hidden}.tabs-list[_ngcontent-%COMP%]{float:left}.tabs-list-item[_ngcontent-%COMP%]{float:left;position:relative;bottom:-1px;padding-top:10px}.tabs-toggle[_ngcontent-%COMP%]{background-color:#dee0e2;border:1px solid transparent;float:left;margin:0 6px 0 0;text-decoration:none}.tabs-toggle[_ngcontent-%COMP%]:visited{color:#005ea5}.tabs-toggle-selected[_ngcontent-%COMP%], .tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{background-color:#fff;border-bottom:0;border-color:#bfc1c3;padding-bottom:11px;margin-bottom:0;color:#0b0c0c}}"] });
@@ -1510,7 +1510,7 @@
1510
1510
  }] });
1511
1511
  })();
1512
1512
 
1513
- var _c0$T = ["tab"];
1513
+ var _c0$R = ["tab"];
1514
1514
  var _c1$m = function () { return ["."]; };
1515
1515
  var _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1516
1516
  function TabsComponent_li_2_Template(rf, ctx) {
@@ -1564,7 +1564,7 @@
1564
1564
  }
1565
1565
  }, viewQuery: function TabsComponent_Query(rf, ctx) {
1566
1566
  if (rf & 1) {
1567
- i0__namespace.ɵɵviewQuery(_c0$T, 1);
1567
+ i0__namespace.ɵɵviewQuery(_c0$R, 1);
1568
1568
  }
1569
1569
  if (rf & 2) {
1570
1570
  var _t = void 0;
@@ -1643,7 +1643,7 @@
1643
1643
  }], null, null);
1644
1644
  })();
1645
1645
 
1646
- var _c0$S = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1646
+ var _c0$Q = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1647
1647
  var ActivityBannerComponent = /** @class */ (function () {
1648
1648
  function ActivityBannerComponent() {
1649
1649
  }
@@ -1664,7 +1664,7 @@
1664
1664
  i0__namespace.ɵɵelementEnd();
1665
1665
  }
1666
1666
  if (rf & 2) {
1667
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$S, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1667
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$Q, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1668
1668
  i0__namespace.ɵɵadvance(2);
1669
1669
  i0__namespace.ɵɵpropertyInterpolate("alt", ctx.description);
1670
1670
  i0__namespace.ɵɵpropertyInterpolate("src", ctx.imageLink, i0__namespace.ɵɵsanitizeUrl);
@@ -3036,14 +3036,6 @@
3036
3036
  if (!field || !field.field_type || !field.field_type.type) {
3037
3037
  return false;
3038
3038
  }
3039
- // Case link tab spacing alignment fix
3040
- // This Pipe needs to be re-visited
3041
- // to make it more generic to support and fix alignments issues for multiple tabs
3042
- if (field.field_type.collection_field_type &&
3043
- field.field_type.collection_field_type.id &&
3044
- field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
3045
- return true;
3046
- }
3047
3039
  if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
3048
3040
  if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
3049
3041
  return false;
@@ -3054,7 +3046,6 @@
3054
3046
  };
3055
3047
  return IsCompoundPipe;
3056
3048
  }());
3057
- IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
3058
3049
  IsCompoundPipe.COMPOUND_TYPES = [
3059
3050
  'Complex',
3060
3051
  'Label',
@@ -3919,12 +3910,6 @@
3919
3910
  FieldsUtils.isCollectionWithValue = function (pageFormFields) {
3920
3911
  return pageFormFields[0]['value'] !== undefined;
3921
3912
  };
3922
- FieldsUtils.isLinkedCasesCaseField = function (caseField) {
3923
- if (!caseField) {
3924
- return false;
3925
- }
3926
- return caseField.field_type.collection_field_type.id === 'CaseLink';
3927
- };
3928
3913
  FieldsUtils.cloneObject = function (obj) {
3929
3914
  return Object.assign({}, obj);
3930
3915
  };
@@ -4128,7 +4113,7 @@
4128
4113
  // If the Flags CaseField has a value, it is a root-level Complex field; if it does not, it is a Flags
4129
4114
  // CaseField that is a sub-field within another Complex field, so use the currentValue value (if any)
4130
4115
  // instead. The exception to this is the "caseFlags" Flags CaseField, which will have an empty object value
4131
- // initially or could be null or undefined, because no party name is required
4116
+ // initially, because no party name is required
4132
4117
  if (caseField.value && FieldsUtils.isNonEmptyObject(caseField.value) ||
4133
4118
  caseField.id === this.caseLevelCaseFlagsFieldId) {
4134
4119
  flags.push(this.mapCaseFieldToFlagsWithFormGroupPathObject(caseField, pathToFlagsFormGroup));
@@ -4864,9 +4849,7 @@
4864
4849
  };
4865
4850
  AbstractFormFieldComponent.prototype.addControlToFormGroup = function (control, parent, replace) {
4866
4851
  if (replace) {
4867
- if (this.caseField.field_type && this.caseField.field_type.collection_field_type
4868
- && this.caseField.field_type.collection_field_type.id === 'CaseLink'
4869
- && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4852
+ if (this.caseField.field_type && this.caseField.field_type.id === 'CaseLink' && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4870
4853
  parent.setControl('CaseReference', control['controls']['CaseReference']);
4871
4854
  }
4872
4855
  else {
@@ -6100,9 +6083,6 @@
6100
6083
  // Clear out any MultiSelect labels.
6101
6084
  FormValueService.removeMultiSelectLabels(data);
6102
6085
  };
6103
- /**
6104
- * Remove any empty or invalid array with only id
6105
- */
6106
6086
  FormValueService.prototype.removeInvalidCollectionData = function (data, field) {
6107
6087
  var e_10, _a;
6108
6088
  if (data[field.id] && data[field.id].length > 0) {
@@ -6183,13 +6163,17 @@
6183
6163
  // nothing for a given case field ID (hence the use of hasOwnProperty())
6184
6164
  if (data.hasOwnProperty(caseField.id) && caseField.value) {
6185
6165
  // Create new object for the case field ID within the data object, if necessary
6186
- if (!data[caseField.id]) {
6187
- data[caseField.id] = {};
6166
+ if (data[caseField.id]) {
6167
+ // Copy all values from the corresponding CaseField; this ensures all nested flag data (for example, a
6168
+ // Flags field within a Complex field or a collection of Complex fields) is copied across
6169
+ Object.keys(data[caseField.id]).forEach(function (key) {
6170
+ if (caseField.value.hasOwnProperty(key)) {
6171
+ data[caseField.id][key] = caseField.value[key];
6172
+ }
6173
+ });
6188
6174
  }
6189
- // Copy all values from the corresponding CaseField; this ensures all nested flag data (for example, a
6190
- // Flags field within a Complex field or a collection of Complex fields) is copied across
6191
- Object.keys(caseField.value).forEach(function (key) { return data[caseField.id][key] = caseField.value[key]; });
6192
6175
  }
6176
+ ;
6193
6177
  });
6194
6178
  }
6195
6179
  };
@@ -7980,6 +7964,9 @@
7980
7964
  else if (this.roleOrCategoryExists(CaseAccessUtils.ADMIN_ROLE, CaseAccessUtils.ADMIN_ROLE_CATEGORY, roleKeywords, roleCategories)) {
7981
7965
  return CaseAccessUtils.ADMIN_ROLE_CATEGORY;
7982
7966
  }
7967
+ else if (this.roleOrCategoryExists(CaseAccessUtils.CTSC_ROLE, CaseAccessUtils.CTSC_ROLE_CATEGORY, roleKeywords, roleCategories)) {
7968
+ return CaseAccessUtils.CTSC_ROLE_CATEGORY;
7969
+ }
7983
7970
  else {
7984
7971
  return CaseAccessUtils.LEGAL_OPERATIONS_ROLE_CATEGORY;
7985
7972
  }
@@ -8004,6 +7991,9 @@
8004
7991
  case CaseAccessUtils.ADMIN_ROLE_CATEGORY:
8005
7992
  roleName = accessType + "-access-" + CaseAccessUtils.ADMIN_ROLE_NAME;
8006
7993
  break;
7994
+ case CaseAccessUtils.CTSC_ROLE_CATEGORY:
7995
+ roleName = accessType + "-access-" + CaseAccessUtils.CTSC_ROLE_NAME;
7996
+ break;
8007
7997
  default:
8008
7998
  roleName = accessType + "-access-" + CaseAccessUtils.LEGAL_OPERATIONS_ROLE_NAME;
8009
7999
  break;
@@ -8064,6 +8054,9 @@
8064
8054
  CaseAccessUtils.CITIZEN_ROLE = 'citizen';
8065
8055
  CaseAccessUtils.CITIZEN_ROLE_CATEGORY = 'CITIZEN';
8066
8056
  CaseAccessUtils.CITIZEN_ROLE_NAME = 'citizen';
8057
+ CaseAccessUtils.CTSC_ROLE = 'ctsc';
8058
+ CaseAccessUtils.CTSC_ROLE_CATEGORY = 'CTSC';
8059
+ CaseAccessUtils.CTSC_ROLE_NAME = 'ctsc';
8067
8060
 
8068
8061
  var WizardPageFieldToCaseFieldMapper = /** @class */ (function () {
8069
8062
  function WizardPageFieldToCaseFieldMapper() {
@@ -8449,34 +8442,6 @@
8449
8442
  return rxjs.throwError(error);
8450
8443
  }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8451
8444
  };
8452
- /**
8453
- * TODO: Gets case link responses
8454
- * @returns case link responses
8455
- */
8456
- CasesService.prototype.getCaseLinkResponses = function () {
8457
- var _this = this;
8458
- var headers = new i1$2.HttpHeaders()
8459
- .set('experimental', 'true')
8460
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
8461
- .set('Content-Type', 'application/json');
8462
- var loadingToken = this.loadingService.register();
8463
- return this.http
8464
- .get('assets/getCaseReasons.json', { headers: headers, observe: 'body' })
8465
- .pipe(operators.map(function (reasons) {
8466
- return reasons.sort(function (reasonA, reasonB) { return reasonA.value_en > reasonB.value_en ? 1 : -1; });
8467
- }), operators.catchError(function (error) {
8468
- _this.errorService.setError(error);
8469
- return rxjs.throwError(error);
8470
- }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8471
- };
8472
- CasesService.prototype.getLinkedCases = function (caseId) {
8473
- var url = this.appConfig.getCaseDataStoreApiUrl() + "/" + caseId;
8474
- return this.http
8475
- .get(url)
8476
- .pipe(operators.catchError(function (error) {
8477
- return rxjs.throwError(error);
8478
- }));
8479
- };
8480
8445
  CasesService.prototype.getEventTrigger = function (caseTypeId, eventTriggerId, caseId, ignoreWarning) {
8481
8446
  var _this = this;
8482
8447
  ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
@@ -8512,7 +8477,7 @@
8512
8477
  .set('Content-Type', 'application/json');
8513
8478
  return this.http
8514
8479
  .post(url, eventData, { headers: headers, observe: 'body' })
8515
- .pipe(operators.map(function (body) { return _this.processResponseBody(body, eventData); }), operators.catchError(function (error) {
8480
+ .pipe(operators.catchError(function (error) {
8516
8481
  _this.errorService.setError(error);
8517
8482
  return rxjs.throwError(error);
8518
8483
  }));
@@ -8547,7 +8512,7 @@
8547
8512
  .set('Content-Type', 'application/json');
8548
8513
  return this.http
8549
8514
  .post(url, eventData, { headers: headers, observe: 'body' })
8550
- .pipe(operators.map(function (body) { return _this.processResponseBody(body, eventData); }), operators.catchError(function (error) {
8515
+ .pipe(operators.catchError(function (error) {
8551
8516
  _this.errorService.setError(error);
8552
8517
  return rxjs.throwError(error);
8553
8518
  }));
@@ -8587,10 +8552,6 @@
8587
8552
  }
8588
8553
  return url;
8589
8554
  };
8590
- CasesService.prototype.processResponseBody = function (body, eventData) {
8591
- this.processTasksOnSuccess(body, eventData.event);
8592
- return body;
8593
- };
8594
8555
  CasesService.prototype.initialiseEventTrigger = function (eventTrigger) {
8595
8556
  var _this = this;
8596
8557
  if (!eventTrigger.wizard_pages) {
@@ -8601,22 +8562,6 @@
8601
8562
  wizardPage.case_fields = _this.orderService.sort(_this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
8602
8563
  });
8603
8564
  };
8604
- CasesService.prototype.processTasksOnSuccess = function (caseData, eventData) {
8605
- // The following code is work allocation 1 related
8606
- if (this.appConfig.getWorkAllocationApiUrl().toLowerCase() === 'workallocation') {
8607
- // This is used a feature toggle to
8608
- // control the work allocation
8609
- if (!this.isPuiCaseManager()) {
8610
- this.workAllocationService.completeAppropriateTask(caseData.id, eventData.id, caseData.jurisdiction, caseData.case_type)
8611
- .subscribe(function () {
8612
- // Success. Do nothing.
8613
- }, function (error) {
8614
- // Show an appropriate warning about something that went wrong.
8615
- console.warn('Could not process tasks for this case event', error);
8616
- });
8617
- }
8618
- }
8619
- };
8620
8565
  /*
8621
8566
  Checks if the user has role of pui-case-manager and returns true or false
8622
8567
  */
@@ -8639,7 +8584,7 @@
8639
8584
  if (userInfoStr) {
8640
8585
  userInfo = JSON.parse(userInfoStr);
8641
8586
  }
8642
- var roleCategory = camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8587
+ var roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8643
8588
  var roleName = camUtils.getAMRoleName('challenged', roleCategory);
8644
8589
  var beginTime = new Date();
8645
8590
  var endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
@@ -8656,7 +8601,7 @@
8656
8601
  if (userInfoStr) {
8657
8602
  userInfo = JSON.parse(userInfoStr);
8658
8603
  }
8659
- var roleCategory = camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8604
+ var roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8660
8605
  var roleName = camUtils.getAMRoleName('specific', roleCategory);
8661
8606
  var id = userInfo.id ? userInfo.id : userInfo.uid;
8662
8607
  var payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
@@ -9300,8 +9245,7 @@
9300
9245
  .filter(function (caseField) { return !_this.isHidden(caseField, editForm); })
9301
9246
  .every(function (caseField) {
9302
9247
  var theControl = editForm.controls['data'].get(caseField.id);
9303
- return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl) &&
9304
- _this.checkCaseLinksCollectionField(caseField, theControl);
9248
+ return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl);
9305
9249
  });
9306
9250
  };
9307
9251
  PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
@@ -9329,13 +9273,6 @@
9329
9273
  PageValidationService.prototype.checkMandatoryField = function (caseField, theControl) {
9330
9274
  return this.caseFieldService.isMandatory(caseField) && theControl === null;
9331
9275
  };
9332
- PageValidationService.prototype.checkCaseLinksCollectionField = function (caseField, theControl) {
9333
- if (caseField && caseField.id === 'caseLinks') {
9334
- return theControl && theControl.value && Array.isArray(theControl.value) &&
9335
- theControl.value.length ? true : false;
9336
- }
9337
- return true;
9338
- };
9339
9276
  return PageValidationService;
9340
9277
  }());
9341
9278
  PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0__namespace.ɵɵinject(CaseFieldService)); };
@@ -9846,12 +9783,10 @@
9846
9783
  function CaseEditDataService() {
9847
9784
  this.title$ = new rxjs.BehaviorSubject(null);
9848
9785
  this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
9849
- this.linkError$ = new rxjs.BehaviorSubject(null);
9850
9786
  this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
9851
9787
  this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
9852
9788
  this.caseTitle$ = this.title$.asObservable();
9853
9789
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
9854
- this.caseLinkError$ = this.linkError$.asObservable();
9855
9790
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
9856
9791
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
9857
9792
  }
@@ -9861,18 +9796,12 @@
9861
9796
  CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
9862
9797
  this.eventTriggerName$.next(triggerName);
9863
9798
  };
9864
- CaseEditDataService.prototype.setCaseLinkError = function (error) {
9865
- this.linkError$.next(error);
9866
- };
9867
9799
  CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
9868
9800
  this.formValidationErrors$.next(validationErrors);
9869
9801
  };
9870
9802
  CaseEditDataService.prototype.clearFormValidationErrors = function () {
9871
9803
  this.formValidationErrors$.next([]);
9872
9804
  };
9873
- CaseEditDataService.prototype.clearCaseLinkError = function () {
9874
- this.linkError$.next(null);
9875
- };
9876
9805
  CaseEditDataService.prototype.addFormValidationError = function (validationError) {
9877
9806
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
9878
9807
  };
@@ -10294,27 +10223,18 @@
10294
10223
  _this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " exceeds the maximum length" });
10295
10224
  fieldElement.markAsDirty();
10296
10225
  }
10297
- else if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10298
- _this.validationErrors.push({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10299
- }
10300
10226
  else if (fieldElement.invalid) {
10301
10227
  if (casefield.isComplex()) {
10302
10228
  _this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id_1);
10303
10229
  }
10304
10230
  else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
10305
- if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10306
- _this.caseEditDataService.addFormValidationError({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10307
- // this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
10308
- }
10309
- else {
10310
- var fieldArray = fieldElement;
10311
- if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10312
- id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10313
- }
10314
- fieldArray.controls.forEach(function (c) {
10315
- _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10316
- });
10231
+ var fieldArray = fieldElement;
10232
+ if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10233
+ id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10317
10234
  }
10235
+ fieldArray.controls.forEach(function (c) {
10236
+ _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10237
+ });
10318
10238
  }
10319
10239
  else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
10320
10240
  // Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
@@ -10581,7 +10501,6 @@
10581
10501
  CaseEditPageComponent.prototype.syncCaseEditDataService = function () {
10582
10502
  var _this = this;
10583
10503
  this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
10584
- this.caseEditDataService.setCaseLinkError(this.caseLinkError);
10585
10504
  this.caseEditDataService.setCaseTitle(this.getCaseTitle());
10586
10505
  this.caseEditDataService.caseFormValidationErrors$.subscribe({
10587
10506
  next: function (validationErrors) { return _this.validationErrors = validationErrors; }
@@ -11109,10 +11028,6 @@
11109
11028
  };
11110
11029
  ReadFieldsFilterPipe.keepField = function (field, value, ignoreLabels) {
11111
11030
  if (ignoreLabels === void 0) { ignoreLabels = false; }
11112
- // We should always render the caselinks tables from and to regardless whether it has valid value or not
11113
- if (field.id === 'caseLinks') {
11114
- return true;
11115
- }
11116
11031
  // We shouldn't ditch labels.
11117
11032
  if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
11118
11033
  return true;
@@ -11400,163 +11315,6 @@
11400
11315
  }], null, null);
11401
11316
  })();
11402
11317
 
11403
- var LinkedCasesService = /** @class */ (function () {
11404
- function LinkedCasesService(jurisdictionService, searchService) {
11405
- var _this = this;
11406
- this.jurisdictionService = jurisdictionService;
11407
- this.searchService = searchService;
11408
- this.caseFieldValue = [];
11409
- this.isLinkedCasesEventTrigger = false;
11410
- this.linkCaseReasons = [];
11411
- this.linkedCases = [];
11412
- this.initialCaseLinks = [];
11413
- this.editMode = false;
11414
- this.jurisdictionsResponse = [];
11415
- this.serverError = null;
11416
- this.serverLinkedApiError = null;
11417
- this.isServerReasonCodeError = false;
11418
- this.caseJurisdictionID = null;
11419
- this.groupLinkedCasesByCaseType = function (arrObj, key) {
11420
- return arrObj.reduce(function (rv, x) {
11421
- (rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
11422
- return rv;
11423
- }, {});
11424
- };
11425
- this.jurisdictionService.getJurisdictions().subscribe(function (jurisdictions) {
11426
- _this.jurisdictionsResponse = jurisdictions;
11427
- }, function (error) {
11428
- _this.serverJurisdictionError = true;
11429
- });
11430
- }
11431
- LinkedCasesService.prototype.constructElasticSearchQuery = function (caseIds, size) {
11432
- return {
11433
- query: {
11434
- terms: {
11435
- reference: caseIds,
11436
- },
11437
- },
11438
- size: size,
11439
- };
11440
- };
11441
- LinkedCasesService.prototype.mapResponse = function (esSearchCasesResponse) {
11442
- var caseInfo = this.caseFieldValue.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
11443
- return caseInfo && {
11444
- caseReference: esSearchCasesResponse.case_id,
11445
- caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
11446
- caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
11447
- service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
11448
- state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
11449
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
11450
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
11451
- };
11452
- };
11453
- LinkedCasesService.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
11454
- return rxjs.forkJoin(searchCasesResponse);
11455
- };
11456
- LinkedCasesService.prototype.getAllLinkedCaseInformation = function () {
11457
- var _this = this;
11458
- var searchCasesResponse = [];
11459
- var linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
11460
- Object.keys(linkedCaseIds).forEach(function (key) {
11461
- var esQuery = _this.constructElasticSearchQuery(linkedCaseIds[key], 100);
11462
- var query = _this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
11463
- searchCasesResponse.push(query);
11464
- });
11465
- if (searchCasesResponse.length) {
11466
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
11467
- var casesResponse = [];
11468
- searchCases.forEach(function (response) {
11469
- response.results.forEach(function (result) {
11470
- casesResponse.push(_this.mapResponse(result));
11471
- });
11472
- });
11473
- var caseLinks = casesResponse.map(function (item) {
11474
- return {
11475
- caseReference: item.caseReference,
11476
- caseName: item.caseName,
11477
- caseService: item.service,
11478
- caseType: item.caseType,
11479
- unlink: false,
11480
- reasons: item.reasons && item.reasons.map(function (reason) {
11481
- return {
11482
- reasonCode: reason
11483
- };
11484
- }),
11485
- };
11486
- });
11487
- _this.linkedCases = caseLinks;
11488
- _this.serverLinkedApiError = null;
11489
- }, function (err) {
11490
- _this.serverLinkedApiError = {
11491
- id: 'backendError', message: 'Some case information is not available at the moment'
11492
- };
11493
- });
11494
- }
11495
- };
11496
- LinkedCasesService.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
11497
- var _this = this;
11498
- var selectedJurisdiction = this.jurisdictionsResponse &&
11499
- this.jurisdictionsResponse.find(function (item) { return item.id === _this.caseDetails.case_type.jurisdiction.id; });
11500
- var selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(function (item) { return item.id === _this.caseDetails.case_type.id; });
11501
- var state = selectedCaseType && selectedCaseType.states.find(function (item) { return item.id === fieldValue; });
11502
- switch (fieldName) {
11503
- case 'JURISDICTION':
11504
- return selectedJurisdiction && selectedJurisdiction.description;
11505
- case 'CASE_TYPE':
11506
- return selectedCaseType && selectedCaseType.name;
11507
- case 'CASE_TYPE_DESCRIPTION':
11508
- return selectedCaseType && selectedCaseType.description;
11509
- case 'STATE':
11510
- return state && state.name || fieldValue;
11511
- case 'STATE_DESCRIPTION':
11512
- return state && state.description || fieldValue;
11513
- default:
11514
- break;
11515
- }
11516
- };
11517
- LinkedCasesService.prototype.getCaseName = function (searchCasesResponse) {
11518
- var caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
11519
- var tabs = searchCasesResponse.tabs.filter(function (tab) {
11520
- var caseNameHmctsInternalField = tab.fields.find(function (field) { return field.id === 'caseNameHmctsInternal'; });
11521
- if (caseNameHmctsInternalField) {
11522
- caseName = caseNameHmctsInternalField.value;
11523
- }
11524
- });
11525
- return caseName;
11526
- };
11527
- return LinkedCasesService;
11528
- }());
11529
- LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
11530
- LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0__namespace.ɵɵinject(JurisdictionService), i0__namespace.ɵɵinject(SearchService)); };
11531
- LinkedCasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
11532
- (function () {
11533
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesService, [{
11534
- type: i0.Injectable
11535
- }], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null);
11536
- })();
11537
-
11538
- var LinkCasesReasonValuePipe = /** @class */ (function () {
11539
- function LinkCasesReasonValuePipe(linkedCasesService) {
11540
- this.linkedCasesService = linkedCasesService;
11541
- }
11542
- LinkCasesReasonValuePipe.prototype.transform = function (reasonCode) {
11543
- var reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
11544
- this.linkedCasesService.linkCaseReasons.find(function (reason) { return reason.key === reasonCode; });
11545
- return reasonCodeMapping && reasonCodeMapping.value_en;
11546
- };
11547
- return LinkCasesReasonValuePipe;
11548
- }());
11549
- LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
11550
- LinkCasesReasonValuePipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
11551
- (function () {
11552
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
11553
- type: i0.Pipe,
11554
- args: [{
11555
- name: 'ccdLinkCasesReasonValue'
11556
- }]
11557
- }], function () { return [{ type: LinkedCasesService }]; }, null);
11558
- })();
11559
-
11560
11318
  var SortOrder;
11561
11319
  (function (SortOrder) {
11562
11320
  SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
@@ -11597,8 +11355,7 @@
11597
11355
  CcdCYAPageLabelFilterPipe,
11598
11356
  ReadFieldsFilterPipe,
11599
11357
  CcdTabFieldsPipe,
11600
- CcdPageFieldsPipe,
11601
- LinkCasesReasonValuePipe
11358
+ CcdPageFieldsPipe
11602
11359
  ];
11603
11360
  var PipesModule = /** @class */ (function () {
11604
11361
  function PipesModule() {
@@ -11618,16 +11375,14 @@
11618
11375
  CcdCYAPageLabelFilterPipe,
11619
11376
  ReadFieldsFilterPipe,
11620
11377
  CcdTabFieldsPipe,
11621
- CcdPageFieldsPipe,
11622
- LinkCasesReasonValuePipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11378
+ CcdPageFieldsPipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11623
11379
  SortSearchResultPipe,
11624
11380
  CcdCaseTitlePipe,
11625
11381
  CcdCollectionTableCaseFieldsFilterPipe,
11626
11382
  CcdCYAPageLabelFilterPipe,
11627
11383
  ReadFieldsFilterPipe,
11628
11384
  CcdTabFieldsPipe,
11629
- CcdPageFieldsPipe,
11630
- LinkCasesReasonValuePipe] });
11385
+ CcdPageFieldsPipe] });
11631
11386
  })();
11632
11387
  (function () {
11633
11388
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PipesModule, [{
@@ -11687,7 +11442,7 @@
11687
11442
  return AddressOption;
11688
11443
  }());
11689
11444
 
11690
- var _c0$R = ["writeComplexFieldComponent"];
11445
+ var _c0$P = ["writeComplexFieldComponent"];
11691
11446
  function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) {
11692
11447
  if (rf & 1) {
11693
11448
  i0__namespace.ɵɵelementStart(0, "span", 14);
@@ -11901,7 +11656,7 @@
11901
11656
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0__namespace.ɵɵdirectiveInject(AddressesService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe)); };
11902
11657
  WriteAddressFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
11903
11658
  if (rf & 1) {
11904
- i0__namespace.ɵɵviewQuery(_c0$R, 1);
11659
+ i0__namespace.ɵɵviewQuery(_c0$P, 1);
11905
11660
  i0__namespace.ɵɵviewQuery(FocusElementDirective, 1);
11906
11661
  }
11907
11662
  if (rf & 2) {
@@ -12561,7 +12316,7 @@
12561
12316
  i0__namespace.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
12562
12317
  }
12563
12318
  }
12564
- var _c0$Q = function (a0) { return { "form-group-error": a0 }; };
12319
+ var _c0$O = function (a0) { return { "form-group-error": a0 }; };
12565
12320
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) {
12566
12321
  if (rf & 1) {
12567
12322
  i0__namespace.ɵɵelementStart(0, "div", 8);
@@ -12582,7 +12337,7 @@
12582
12337
  i0__namespace.ɵɵadvance(1);
12583
12338
  i0__namespace.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
12584
12339
  i0__namespace.ɵɵadvance(1);
12585
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$Q, ctx_r1.errorMessages.length > 0));
12340
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$O, ctx_r1.errorMessages.length > 0));
12586
12341
  i0__namespace.ɵɵadvance(1);
12587
12342
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
12588
12343
  i0__namespace.ɵɵadvance(1);
@@ -12968,8 +12723,8 @@
12968
12723
 
12969
12724
  function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) {
12970
12725
  if (rf & 1) {
12971
- i0__namespace.ɵɵelementStart(0, "a", 2);
12972
- i0__namespace.ɵɵelementStart(1, "span", 3);
12726
+ i0__namespace.ɵɵelementStart(0, "a", 1);
12727
+ i0__namespace.ɵɵelementStart(1, "span", 2);
12973
12728
  i0__namespace.ɵɵtext(2);
12974
12729
  i0__namespace.ɵɵpipe(3, "ccdCaseReference");
12975
12730
  i0__namespace.ɵɵelementEnd();
@@ -12982,60 +12737,38 @@
12982
12737
  i0__namespace.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0__namespace.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
12983
12738
  }
12984
12739
  }
12985
- function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) {
12986
- if (rf & 1) {
12987
- i0__namespace.ɵɵelementContainerStart(0);
12988
- i0__namespace.ɵɵelement(1, "ccd-read-linked-cases", 4);
12989
- i0__namespace.ɵɵelementContainerEnd();
12990
- }
12991
- if (rf & 2) {
12992
- var ctx_r1 = i0__namespace.ɵɵnextContext();
12993
- i0__namespace.ɵɵadvance(1);
12994
- i0__namespace.ɵɵproperty("caseField", ctx_r1.caseField);
12995
- }
12996
- }
12997
12740
  var ReadCaseLinkFieldComponent = /** @class */ (function (_super) {
12998
12741
  __extends(ReadCaseLinkFieldComponent, _super);
12999
12742
  function ReadCaseLinkFieldComponent() {
13000
- var _this = _super.apply(this, __spread(arguments)) || this;
13001
- _this.paletteContext = exports.PaletteContext;
13002
- return _this;
12743
+ return _super !== null && _super.apply(this, arguments) || this;
13003
12744
  }
13004
12745
  ReadCaseLinkFieldComponent.prototype.hasReference = function () {
13005
12746
  return this.caseField.value && this.caseField.value.CaseReference;
13006
12747
  };
13007
- ReadCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
13008
- return (this.caseField.field_type &&
13009
- this.caseField.field_type.type === 'Collection' &&
13010
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13011
- };
13012
12748
  return ReadCaseLinkFieldComponent;
13013
12749
  }(AbstractFieldReadComponent));
13014
12750
  ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
13015
- ReadCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["target", "_blank", 3, "href", 4, "ngIf"], [4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"], [3, "caseField"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) {
12751
+ ReadCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["target", "_blank", 3, "href", 4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) {
13016
12752
  if (rf & 1) {
13017
12753
  i0__namespace.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
13018
- i0__namespace.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
13019
12754
  }
13020
12755
  if (rf & 2) {
13021
12756
  i0__namespace.ɵɵproperty("ngIf", ctx.hasReference());
13022
- i0__namespace.ɵɵadvance(1);
13023
- i0__namespace.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
13024
12757
  }
13025
- }, encapsulation: 2 });
12758
+ }, directives: [i1__namespace.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
13026
12759
  var ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
13027
12760
  (function () {
13028
12761
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
13029
12762
  type: i0.Component,
13030
12763
  args: [{
13031
12764
  selector: 'ccd-read-case-link-field',
13032
- templateUrl: 'read-case-link-field.html',
12765
+ templateUrl: 'read-case-link-field.html'
13033
12766
  }]
13034
12767
  }], null, null);
13035
12768
  })();
13036
12769
 
13037
- var _c0$P = ["writeComplexFieldComponent"];
13038
- function WriteCaseLinkFieldComponent_div_1_span_2_Template(rf, ctx) {
12770
+ var _c0$N = ["writeComplexFieldComponent"];
12771
+ function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) {
13039
12772
  if (rf & 1) {
13040
12773
  i0__namespace.ɵɵelementStart(0, "span", 6);
13041
12774
  i0__namespace.ɵɵtext(1);
@@ -13043,77 +12776,56 @@
13043
12776
  i0__namespace.ɵɵelementEnd();
13044
12777
  }
13045
12778
  if (rf & 2) {
13046
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
12779
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
13047
12780
  i0__namespace.ɵɵadvance(1);
13048
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.caseField));
12781
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
13049
12782
  }
13050
12783
  }
13051
- function WriteCaseLinkFieldComponent_div_1_span_3_Template(rf, ctx) {
12784
+ function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) {
13052
12785
  if (rf & 1) {
13053
12786
  i0__namespace.ɵɵelementStart(0, "span", 7);
13054
12787
  i0__namespace.ɵɵtext(1);
13055
12788
  i0__namespace.ɵɵelementEnd();
13056
12789
  }
13057
12790
  if (rf & 2) {
13058
- var ctx_r3 = i0__namespace.ɵɵnextContext(2);
13059
- i0__namespace.ɵɵadvance(1);
13060
- i0__namespace.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
13061
- }
13062
- }
13063
- function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) {
13064
- if (rf & 1) {
13065
- i0__namespace.ɵɵelementStart(0, "div", 1);
13066
- i0__namespace.ɵɵelementStart(1, "label", 2);
13067
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
13068
- i0__namespace.ɵɵelementEnd();
13069
- i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
13070
- i0__namespace.ɵɵelement(4, "input", 5);
13071
- i0__namespace.ɵɵelementEnd();
13072
- }
13073
- if (rf & 2) {
13074
- var ctx_r0 = i0__namespace.ɵɵnextContext();
13075
- i0__namespace.ɵɵadvance(1);
13076
- i0__namespace.ɵɵproperty("for", ctx_r0.id());
13077
- i0__namespace.ɵɵadvance(1);
13078
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.label);
13079
- i0__namespace.ɵɵadvance(1);
13080
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
12791
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
13081
12792
  i0__namespace.ɵɵadvance(1);
13082
- i0__namespace.ɵɵproperty("id", ctx_r0.id())("formControl", ctx_r0.caseReferenceControl);
12793
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
13083
12794
  }
13084
12795
  }
13085
- function WriteCaseLinkFieldComponent_div_2_Template(rf, ctx) {
12796
+ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
13086
12797
  if (rf & 1) {
13087
- var _r5_1 = i0__namespace.ɵɵgetCurrentView();
13088
- i0__namespace.ɵɵelementStart(0, "div", 1);
13089
- i0__namespace.ɵɵelementStart(1, "ccd-write-linked-cases", 8);
13090
- i0__namespace.ɵɵlistener("onLinkedCasesSelected", function WriteCaseLinkFieldComponent_div_2_Template_ccd_write_linked_cases_onLinkedCasesSelected_1_listener() { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r4 = i0__namespace.ɵɵnextContext(); return ctx_r4.submitLinkedCases(); });
13091
- i0__namespace.ɵɵelementEnd();
12798
+ i0__namespace.ɵɵelementStart(0, "span", 8);
12799
+ i0__namespace.ɵɵtext(1);
12800
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
13092
12801
  i0__namespace.ɵɵelementEnd();
13093
12802
  }
13094
12803
  if (rf & 2) {
13095
- var ctx_r1 = i0__namespace.ɵɵnextContext();
12804
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
13096
12805
  i0__namespace.ɵɵadvance(1);
13097
- i0__namespace.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
12806
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
13098
12807
  }
13099
12808
  }
12809
+ var _c1$k = function (a0) { return { "form-group-error": a0 }; };
13100
12810
  var WriteCaseLinkFieldComponent = /** @class */ (function (_super) {
13101
12811
  __extends(WriteCaseLinkFieldComponent, _super);
13102
- function WriteCaseLinkFieldComponent(linkedCasesService) {
13103
- var _this = _super.call(this) || this;
13104
- _this.linkedCasesService = linkedCasesService;
13105
- _this.caseFields = [];
13106
- return _this;
12812
+ function WriteCaseLinkFieldComponent() {
12813
+ return _super !== null && _super.apply(this, arguments) || this;
13107
12814
  }
13108
12815
  WriteCaseLinkFieldComponent.prototype.ngOnInit = function () {
13109
12816
  var e_1, _a;
13110
- this.formArray = this.registerControl(new i2.FormArray([]), true);
13111
- this.formArray['caseField'] = this.caseField;
13112
- if (!this.hasCaseLinkCollection()) {
12817
+ if (this.caseField.value) {
13113
12818
  this.caseLinkGroup = this.registerControl(new i2.FormGroup({
13114
12819
  CaseReference: new i2.FormControl(this.caseField.value.CaseReference, i2.Validators.required),
13115
12820
  }), true);
13116
12821
  }
12822
+ else {
12823
+ this.caseLinkGroup = this.registerControl(new i2.FormGroup({
12824
+ CaseReference: new i2.FormControl(null, i2.Validators.required),
12825
+ }), true);
12826
+ }
12827
+ this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
12828
+ this.caseReferenceControl.setValidators(this.caseReferenceValidator());
13117
12829
  // Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
13118
12830
  // field uses the Complex type, it is meant to be treated as one field
13119
12831
  if (this.caseField && this.caseField.field_type.type === 'Complex') {
@@ -13131,18 +12843,23 @@
13131
12843
  finally { if (e_1) throw e_1.error; }
13132
12844
  }
13133
12845
  }
13134
- this.containsCaseLinkCollection = this.hasCaseLinkCollection();
13135
12846
  };
13136
- WriteCaseLinkFieldComponent.prototype.submitLinkedCases = function () {
13137
- var formGroup = this.formGroup;
13138
- if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
13139
- var unlinkedCaseRefereneIds_1 = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
13140
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue
13141
- .filter(function (item) { return unlinkedCaseRefereneIds_1.indexOf(item.id) === -1; });
13142
- }
13143
- else if (formGroup.value && formGroup.value.caseLinks && this.linkedCasesService.linkedCases) {
13144
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
13145
- }
12847
+ WriteCaseLinkFieldComponent.prototype.caseReferenceValidator = function () {
12848
+ var _this = this;
12849
+ return function (control) {
12850
+ if (control.value) {
12851
+ if (_this.validCaseReference(control.value)) {
12852
+ return null;
12853
+ }
12854
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12855
+ }
12856
+ else {
12857
+ if (control.touched) {
12858
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12859
+ }
12860
+ }
12861
+ return null;
12862
+ };
13146
12863
  };
13147
12864
  WriteCaseLinkFieldComponent.prototype.validCaseReference = function (valueString) {
13148
12865
  if (!valueString) {
@@ -13150,36 +12867,43 @@
13150
12867
  }
13151
12868
  return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
13152
12869
  };
13153
- WriteCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
13154
- return (this.caseField.field_type &&
13155
- this.caseField.field_type.type === 'Collection' &&
13156
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13157
- };
13158
12870
  return WriteCaseLinkFieldComponent;
13159
12871
  }(AbstractFieldWriteComponent));
13160
- WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return new (t || WriteCaseLinkFieldComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
12872
+ WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
13161
12873
  WriteCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) {
13162
12874
  if (rf & 1) {
13163
- i0__namespace.ɵɵviewQuery(_c0$P, 1);
12875
+ i0__namespace.ɵɵviewQuery(_c0$N, 1);
13164
12876
  }
13165
12877
  if (rf & 2) {
13166
12878
  var _t = void 0;
13167
12879
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
13168
12880
  }
13169
- }, inputs: { caseFields: "caseFields", formGroup: "formGroup" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["class", "form-group", 4, "ngIf"], [1, "form-group"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [3, "caseFields", "caseField", "formGroup", "isLinkedCasesJourney", "onLinkedCasesSelected"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) {
12881
+ }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 6, vars: 9, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) {
13170
12882
  if (rf & 1) {
13171
- i0__namespace.ɵɵelementContainerStart(0);
13172
- i0__namespace.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
13173
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
13174
- i0__namespace.ɵɵelementContainerEnd();
12883
+ i0__namespace.ɵɵelementStart(0, "div", 0);
12884
+ i0__namespace.ɵɵelementStart(1, "label", 1);
12885
+ i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
12886
+ i0__namespace.ɵɵelementEnd();
12887
+ i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
12888
+ i0__namespace.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
12889
+ i0__namespace.ɵɵelement(5, "input", 5);
12890
+ i0__namespace.ɵɵelementEnd();
13175
12891
  }
13176
12892
  if (rf & 2) {
12893
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12894
+ i0__namespace.ɵɵadvance(1);
12895
+ i0__namespace.ɵɵproperty("for", ctx.id());
12896
+ i0__namespace.ɵɵadvance(1);
12897
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
12898
+ i0__namespace.ɵɵadvance(1);
12899
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
13177
12900
  i0__namespace.ɵɵadvance(1);
13178
- i0__namespace.ɵɵproperty("ngIf", !ctx.containsCaseLinkCollection);
12901
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
13179
12902
  i0__namespace.ɵɵadvance(1);
13180
- i0__namespace.ɵɵproperty("ngIf", ctx.containsCaseLinkCollection);
12903
+ i0__namespace.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
13181
12904
  }
13182
- }, encapsulation: 2 });
12905
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12906
+ var ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
13183
12907
  (function () {
13184
12908
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
13185
12909
  type: i0.Component,
@@ -13187,17 +12911,13 @@
13187
12911
  selector: 'ccd-write-case-link-field',
13188
12912
  templateUrl: 'write-case-link-field.html'
13189
12913
  }]
13190
- }], function () { return [{ type: LinkedCasesService }]; }, { caseFields: [{
13191
- type: i0.Input
13192
- }], formGroup: [{
13193
- type: i0.Input
13194
- }], writeComplexFieldComponent: [{
12914
+ }], null, { writeComplexFieldComponent: [{
13195
12915
  type: i0.ViewChild,
13196
- args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
12916
+ args: ['writeComplexFieldComponent']
13197
12917
  }] });
13198
12918
  })();
13199
12919
 
13200
- var _c0$O = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
12920
+ var _c0$M = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
13201
12921
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
13202
12922
  if (rf & 1) {
13203
12923
  i0__namespace.ɵɵelementStart(0, "tbody");
@@ -13212,10 +12932,10 @@
13212
12932
  if (rf & 2) {
13213
12933
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
13214
12934
  i0__namespace.ɵɵadvance(4);
13215
- i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$O, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
12935
+ i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$M, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
13216
12936
  }
13217
12937
  }
13218
- var _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12938
+ var _c1$j = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
13219
12939
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
13220
12940
  if (rf & 1) {
13221
12941
  i0__namespace.ɵɵelementStart(0, "tr");
@@ -13229,7 +12949,7 @@
13229
12949
  var i_r5 = ctx.index;
13230
12950
  var ctx_r3 = i0__namespace.ɵɵnextContext(3);
13231
12951
  i0__namespace.ɵɵadvance(2);
13232
- i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction5(4, _c1$k, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
12952
+ i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction5(4, _c1$j, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
13233
12953
  }
13234
12954
  }
13235
12955
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -13363,7 +13083,7 @@
13363
13083
  }], function () { return [{ type: i1__namespace$3.MatDialogRef }]; }, null);
13364
13084
  })();
13365
13085
 
13366
- var _c0$N = ["collectionItem"];
13086
+ var _c0$L = ["collectionItem"];
13367
13087
  function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) {
13368
13088
  if (rf & 1) {
13369
13089
  i0__namespace.ɵɵelementStart(0, "span", 9);
@@ -13776,7 +13496,7 @@
13776
13496
  WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(i2__namespace$1.ScrollToService), i0__namespace.ɵɵdirectiveInject(ProfileNotifier)); };
13777
13497
  WriteCollectionFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) {
13778
13498
  if (rf & 1) {
13779
- i0__namespace.ɵɵviewQuery(_c0$N, 1);
13499
+ i0__namespace.ɵɵviewQuery(_c0$L, 1);
13780
13500
  }
13781
13501
  if (rf & 2) {
13782
13502
  var _t = void 0;
@@ -14364,7 +14084,7 @@
14364
14084
  }], null, null);
14365
14085
  })();
14366
14086
 
14367
- var _c0$M = ["fileInput"];
14087
+ var _c0$K = ["fileInput"];
14368
14088
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) {
14369
14089
  if (rf & 1) {
14370
14090
  i0__namespace.ɵɵelementStart(0, "span", 12);
@@ -14398,7 +14118,7 @@
14398
14118
  i0__namespace.ɵɵproperty("caseField", ctx_r2.caseField);
14399
14119
  }
14400
14120
  }
14401
- var _c1$j = function (a0) { return { "form-group-error bottom-30": a0 }; };
14121
+ var _c1$i = function (a0) { return { "form-group-error bottom-30": a0 }; };
14402
14122
  var WriteDocumentFieldComponent = /** @class */ (function (_super) {
14403
14123
  __extends(WriteDocumentFieldComponent, _super);
14404
14124
  function WriteDocumentFieldComponent(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
@@ -14658,7 +14378,7 @@
14658
14378
  WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(FileUploadStateService)); };
14659
14379
  WriteDocumentFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
14660
14380
  if (rf & 1) {
14661
- i0__namespace.ɵɵviewQuery(_c0$M, 1);
14381
+ i0__namespace.ɵɵviewQuery(_c0$K, 1);
14662
14382
  }
14663
14383
  if (rf & 2) {
14664
14384
  var _t = void 0;
@@ -14700,7 +14420,7 @@
14700
14420
  i0__namespace.ɵɵelementEnd();
14701
14421
  }
14702
14422
  if (rf & 2) {
14703
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$j, !ctx.valid));
14423
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$i, !ctx.valid));
14704
14424
  i0__namespace.ɵɵadvance(1);
14705
14425
  i0__namespace.ɵɵproperty("for", ctx.id());
14706
14426
  i0__namespace.ɵɵadvance(1);
@@ -14858,7 +14578,7 @@
14858
14578
  i0__namespace.ɵɵtextInterpolate(type_r5.label);
14859
14579
  }
14860
14580
  }
14861
- var _c0$L = function (a0) { return { "form-group-error": a0 }; };
14581
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14862
14582
  var WriteDynamicListFieldComponent = /** @class */ (function (_super) {
14863
14583
  __extends(WriteDynamicListFieldComponent, _super);
14864
14584
  function WriteDynamicListFieldComponent() {
@@ -14907,7 +14627,7 @@
14907
14627
  i0__namespace.ɵɵelementEnd();
14908
14628
  }
14909
14629
  if (rf & 2) {
14910
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$L, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14630
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$J, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14911
14631
  i0__namespace.ɵɵadvance(1);
14912
14632
  i0__namespace.ɵɵproperty("for", ctx.id());
14913
14633
  i0__namespace.ɵɵadvance(1);
@@ -15057,7 +14777,7 @@
15057
14777
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
15058
14778
  }
15059
14779
  }
15060
- var _c0$K = function (a0) { return { selected: a0 }; };
14780
+ var _c0$I = function (a0) { return { selected: a0 }; };
15061
14781
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
15062
14782
  if (rf & 1) {
15063
14783
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -15070,7 +14790,7 @@
15070
14790
  if (rf & 2) {
15071
14791
  var radioButton_r5 = ctx.$implicit;
15072
14792
  var ctx_r4 = i0__namespace.ɵɵnextContext();
15073
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14793
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
15074
14794
  i0__namespace.ɵɵadvance(1);
15075
14795
  i0__namespace.ɵɵpropertyInterpolate("name", ctx_r4.id());
15076
14796
  i0__namespace.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
@@ -15080,7 +14800,7 @@
15080
14800
  i0__namespace.ɵɵtextInterpolate(radioButton_r5.label);
15081
14801
  }
15082
14802
  }
15083
- var _c1$i = function (a0) { return { "form-group-error": a0 }; };
14803
+ var _c1$h = function (a0) { return { "form-group-error": a0 }; };
15084
14804
  var WriteDynamicRadioListFieldComponent = /** @class */ (function (_super) {
15085
14805
  __extends(WriteDynamicRadioListFieldComponent, _super);
15086
14806
  function WriteDynamicRadioListFieldComponent() {
@@ -15128,7 +14848,7 @@
15128
14848
  i0__namespace.ɵɵelementEnd();
15129
14849
  }
15130
14850
  if (rf & 2) {
15131
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$i, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14851
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$h, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15132
14852
  i0__namespace.ɵɵadvance(3);
15133
14853
  i0__namespace.ɵɵproperty("for", ctx.id());
15134
14854
  i0__namespace.ɵɵadvance(1);
@@ -15235,8 +14955,8 @@
15235
14955
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
15236
14956
  }
15237
14957
  }
15238
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
15239
- var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14958
+ var _c0$H = function (a0) { return { "form-group-error": a0 }; };
14959
+ var _c1$g = function (a0) { return { "govuk-input--error": a0 }; };
15240
14960
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
15241
14961
  __extends(WriteEmailFieldComponent, _super);
15242
14962
  function WriteEmailFieldComponent() {
@@ -15260,7 +14980,7 @@
15260
14980
  i0__namespace.ɵɵelementEnd();
15261
14981
  }
15262
14982
  if (rf & 2) {
15263
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14983
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$H, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
15264
14984
  i0__namespace.ɵɵadvance(1);
15265
14985
  i0__namespace.ɵɵproperty("for", ctx.id());
15266
14986
  i0__namespace.ɵɵadvance(1);
@@ -15270,7 +14990,7 @@
15270
14990
  i0__namespace.ɵɵadvance(1);
15271
14991
  i0__namespace.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15272
14992
  i0__namespace.ɵɵadvance(1);
15273
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$h, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
14993
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$g, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15274
14994
  }
15275
14995
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15276
14996
  var ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
@@ -15392,7 +15112,7 @@
15392
15112
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
15393
15113
  }
15394
15114
  }
15395
- var _c0$I = function (a0) { return { "form-group-error": a0 }; };
15115
+ var _c0$G = function (a0) { return { "form-group-error": a0 }; };
15396
15116
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
15397
15117
  __extends(WriteFixedListFieldComponent, _super);
15398
15118
  function WriteFixedListFieldComponent() {
@@ -15441,7 +15161,7 @@
15441
15161
  i0__namespace.ɵɵelementEnd();
15442
15162
  }
15443
15163
  if (rf & 2) {
15444
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15164
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15445
15165
  i0__namespace.ɵɵadvance(1);
15446
15166
  i0__namespace.ɵɵproperty("for", ctx.id());
15447
15167
  i0__namespace.ɵɵadvance(1);
@@ -15559,7 +15279,7 @@
15559
15279
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
15560
15280
  }
15561
15281
  }
15562
- var _c0$H = function (a0) { return { selected: a0 }; };
15282
+ var _c0$F = function (a0) { return { selected: a0 }; };
15563
15283
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15564
15284
  if (rf & 1) {
15565
15285
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -15572,7 +15292,7 @@
15572
15292
  if (rf & 2) {
15573
15293
  var radioButton_r4 = ctx.$implicit;
15574
15294
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15575
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15295
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$F, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15576
15296
  i0__namespace.ɵɵadvance(1);
15577
15297
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
15578
15298
  i0__namespace.ɵɵadvance(1);
@@ -15581,7 +15301,7 @@
15581
15301
  i0__namespace.ɵɵtextInterpolate(radioButton_r4.label);
15582
15302
  }
15583
15303
  }
15584
- var _c1$g = function (a0) { return { "form-group-error": a0 }; };
15304
+ var _c1$f = function (a0) { return { "form-group-error": a0 }; };
15585
15305
  var WriteFixedRadioListFieldComponent = /** @class */ (function (_super) {
15586
15306
  __extends(WriteFixedRadioListFieldComponent, _super);
15587
15307
  function WriteFixedRadioListFieldComponent() {
@@ -15612,7 +15332,7 @@
15612
15332
  i0__namespace.ɵɵelementEnd();
15613
15333
  }
15614
15334
  if (rf & 2) {
15615
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$g, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15335
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$f, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15616
15336
  i0__namespace.ɵɵadvance(3);
15617
15337
  i0__namespace.ɵɵproperty("for", ctx.id());
15618
15338
  i0__namespace.ɵɵadvance(1);
@@ -15742,7 +15462,7 @@
15742
15462
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15743
15463
  }
15744
15464
  }
15745
- var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15465
+ var _c0$E = function (a0) { return { "hide-autocomplete": a0 }; };
15746
15466
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15747
15467
  if (rf & 1) {
15748
15468
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15754,7 +15474,7 @@
15754
15474
  if (rf & 2) {
15755
15475
  var judicialUser_r5 = ctx.$implicit;
15756
15476
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15757
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15477
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15758
15478
  i0__namespace.ɵɵadvance(1);
15759
15479
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15760
15480
  }
@@ -16101,7 +15821,7 @@
16101
15821
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
16102
15822
  }
16103
15823
  }
16104
- var _c0$F = function (a0) { return { "form-group-error": a0 }; };
15824
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
16105
15825
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
16106
15826
  __extends(WriteMoneyGbpFieldComponent, _super);
16107
15827
  function WriteMoneyGbpFieldComponent() {
@@ -16131,7 +15851,7 @@
16131
15851
  i0__namespace.ɵɵelementEnd();
16132
15852
  }
16133
15853
  if (rf & 2) {
16134
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$F, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15854
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
16135
15855
  i0__namespace.ɵɵadvance(1);
16136
15856
  i0__namespace.ɵɵproperty("for", ctx.id());
16137
15857
  i0__namespace.ɵɵadvance(1);
@@ -16279,7 +15999,7 @@
16279
15999
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
16280
16000
  }
16281
16001
  }
16282
- var _c0$E = function (a0) { return { "error": a0 }; };
16002
+ var _c0$C = function (a0) { return { "error": a0 }; };
16283
16003
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
16284
16004
  __extends(WriteMultiSelectListFieldComponent, _super);
16285
16005
  function WriteMultiSelectListFieldComponent() {
@@ -16343,7 +16063,7 @@
16343
16063
  i0__namespace.ɵɵelementEnd();
16344
16064
  }
16345
16065
  if (rf & 2) {
16346
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$E, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16066
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16347
16067
  i0__namespace.ɵɵadvance(3);
16348
16068
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
16349
16069
  i0__namespace.ɵɵadvance(1);
@@ -16434,8 +16154,8 @@
16434
16154
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
16435
16155
  }
16436
16156
  }
16437
- var _c0$D = function (a0) { return { "form-group-error": a0 }; };
16438
- var _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
16157
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
16158
+ var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16439
16159
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
16440
16160
  __extends(WriteNumberFieldComponent, _super);
16441
16161
  function WriteNumberFieldComponent() {
@@ -16459,7 +16179,7 @@
16459
16179
  i0__namespace.ɵɵelementEnd();
16460
16180
  }
16461
16181
  if (rf & 2) {
16462
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$D, !ctx.numberControl.valid && ctx.numberControl.dirty));
16182
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
16463
16183
  i0__namespace.ɵɵadvance(1);
16464
16184
  i0__namespace.ɵɵproperty("for", ctx.id());
16465
16185
  i0__namespace.ɵɵadvance(1);
@@ -16469,7 +16189,7 @@
16469
16189
  i0__namespace.ɵɵadvance(1);
16470
16190
  i0__namespace.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
16471
16191
  i0__namespace.ɵɵadvance(1);
16472
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16192
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16473
16193
  }
16474
16194
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.NumberValueAccessor, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
16475
16195
  var ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
@@ -16760,7 +16480,7 @@
16760
16480
  i0__namespace.ɵɵelementEnd();
16761
16481
  }
16762
16482
  }
16763
- var _c0$C = function (a0) { return { "scroll-container ": a0 }; };
16483
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
16764
16484
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
16765
16485
  if (rf & 1) {
16766
16486
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -16776,7 +16496,7 @@
16776
16496
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
16777
16497
  var tmp_0_0 = null;
16778
16498
  var tmp_2_0 = null;
16779
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$C, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16499
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16780
16500
  i0__namespace.ɵɵadvance(2);
16781
16501
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
16782
16502
  i0__namespace.ɵɵadvance(2);
@@ -17251,8 +16971,8 @@
17251
16971
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label));
17252
16972
  }
17253
16973
  }
17254
- var _c0$B = function (a0) { return { "form-group-error": a0 }; };
17255
- var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16974
+ var _c0$z = function (a0) { return { "form-group-error": a0 }; };
16975
+ var _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
17256
16976
  var WritePhoneUKFieldComponent = /** @class */ (function (_super) {
17257
16977
  __extends(WritePhoneUKFieldComponent, _super);
17258
16978
  function WritePhoneUKFieldComponent() {
@@ -17276,7 +16996,7 @@
17276
16996
  i0__namespace.ɵɵelementEnd();
17277
16997
  }
17278
16998
  if (rf & 2) {
17279
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
16999
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
17280
17000
  i0__namespace.ɵɵadvance(1);
17281
17001
  i0__namespace.ɵɵproperty("for", ctx.id());
17282
17002
  i0__namespace.ɵɵadvance(1);
@@ -17286,7 +17006,7 @@
17286
17006
  i0__namespace.ɵɵadvance(1);
17287
17007
  i0__namespace.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
17288
17008
  i0__namespace.ɵɵadvance(1);
17289
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
17009
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
17290
17010
  }
17291
17011
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17292
17012
  var ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
@@ -17368,8 +17088,8 @@
17368
17088
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label));
17369
17089
  }
17370
17090
  }
17371
- var _c0$A = function (a0) { return { "form-group-error": a0 }; };
17372
- var _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
17091
+ var _c0$y = function (a0) { return { "form-group-error": a0 }; };
17092
+ var _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
17373
17093
  var WriteTextAreaFieldComponent = /** @class */ (function (_super) {
17374
17094
  __extends(WriteTextAreaFieldComponent, _super);
17375
17095
  function WriteTextAreaFieldComponent(browserService) {
@@ -17404,7 +17124,7 @@
17404
17124
  i0__namespace.ɵɵelementEnd();
17405
17125
  }
17406
17126
  if (rf & 2) {
17407
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$A, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17127
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17408
17128
  i0__namespace.ɵɵadvance(1);
17409
17129
  i0__namespace.ɵɵproperty("for", ctx.id());
17410
17130
  i0__namespace.ɵɵadvance(1);
@@ -17414,7 +17134,7 @@
17414
17134
  i0__namespace.ɵɵadvance(1);
17415
17135
  i0__namespace.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
17416
17136
  i0__namespace.ɵɵadvance(1);
17417
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
17137
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
17418
17138
  }
17419
17139
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17420
17140
  (function () {
@@ -17496,8 +17216,8 @@
17496
17216
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label));
17497
17217
  }
17498
17218
  }
17499
- var _c0$z = function (a0) { return { "form-group-error": a0 }; };
17500
- var _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
17219
+ var _c0$x = function (a0) { return { "form-group-error": a0 }; };
17220
+ var _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
17501
17221
  var WriteTextFieldComponent = /** @class */ (function (_super) {
17502
17222
  __extends(WriteTextFieldComponent, _super);
17503
17223
  function WriteTextFieldComponent() {
@@ -17526,7 +17246,7 @@
17526
17246
  i0__namespace.ɵɵelementEnd();
17527
17247
  }
17528
17248
  if (rf & 2) {
17529
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17249
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$x, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17530
17250
  i0__namespace.ɵɵadvance(1);
17531
17251
  i0__namespace.ɵɵproperty("for", ctx.id());
17532
17252
  i0__namespace.ɵɵadvance(1);
@@ -17536,7 +17256,7 @@
17536
17256
  i0__namespace.ɵɵadvance(1);
17537
17257
  i0__namespace.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
17538
17258
  i0__namespace.ɵɵadvance(1);
17539
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
17259
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$b, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
17540
17260
  }
17541
17261
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17542
17262
  var ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteTextFieldComponent);
@@ -17734,7 +17454,7 @@
17734
17454
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label));
17735
17455
  }
17736
17456
  }
17737
- var _c0$y = function (a0) { return { selected: a0 }; };
17457
+ var _c0$w = function (a0) { return { selected: a0 }; };
17738
17458
  function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
17739
17459
  if (rf & 1) {
17740
17460
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -17747,7 +17467,7 @@
17747
17467
  if (rf & 2) {
17748
17468
  var value_r4 = ctx.$implicit;
17749
17469
  var ctx_r3 = i0__namespace.ɵɵnextContext();
17750
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, ctx_r3.yesNoControl.value === value_r4));
17470
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$w, ctx_r3.yesNoControl.value === value_r4));
17751
17471
  i0__namespace.ɵɵadvance(1);
17752
17472
  i0__namespace.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
17753
17473
  i0__namespace.ɵɵattribute("name", ctx_r3.id());
@@ -17757,7 +17477,7 @@
17757
17477
  i0__namespace.ɵɵtextInterpolate(value_r4);
17758
17478
  }
17759
17479
  }
17760
- var _c1$b = function (a0) { return { "form-group-error": a0 }; };
17480
+ var _c1$a = function (a0) { return { "form-group-error": a0 }; };
17761
17481
  var WriteYesNoFieldComponent = /** @class */ (function (_super) {
17762
17482
  __extends(WriteYesNoFieldComponent, _super);
17763
17483
  function WriteYesNoFieldComponent(yesNoService) {
@@ -17788,7 +17508,7 @@
17788
17508
  i0__namespace.ɵɵelementEnd();
17789
17509
  }
17790
17510
  if (rf & 2) {
17791
- i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
17511
+ i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
17792
17512
  i0__namespace.ɵɵadvance(3);
17793
17513
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
17794
17514
  i0__namespace.ɵɵadvance(1);
@@ -17852,25 +17572,17 @@
17852
17572
  return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
17853
17573
  case 'OrderSummary':
17854
17574
  return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
17575
+ case 'CaseLink':
17576
+ return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17855
17577
  case 'Organisation':
17856
17578
  return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
17857
17579
  case 'JudicialUser':
17858
17580
  return write ? WriteJudicialUserFieldComponent : ReadJudicialUserFieldComponent;
17859
- case 'CaseLink':
17860
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17861
17581
  default:
17862
17582
  return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
17863
17583
  }
17864
17584
  case 'Collection':
17865
- switch (caseField.field_type.collection_field_type.id) {
17866
- case 'CaseLink':
17867
- if (caseField.id === 'caseLinks') {
17868
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17869
- }
17870
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17871
- default:
17872
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17873
- }
17585
+ return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17874
17586
  case 'MultiSelectList':
17875
17587
  return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
17876
17588
  case 'Document':
@@ -17910,7 +17622,7 @@
17910
17622
  }], null, null);
17911
17623
  })();
17912
17624
 
17913
- var _c0$x = ["fieldContainer"];
17625
+ var _c0$v = ["fieldContainer"];
17914
17626
  var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
17915
17627
  var FieldReadComponent = /** @class */ (function (_super) {
17916
17628
  __extends(FieldReadComponent, _super);
@@ -17959,7 +17671,7 @@
17959
17671
  FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
17960
17672
  FieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) {
17961
17673
  if (rf & 1) {
17962
- i0__namespace.ɵɵviewQuery(_c0$x, 1, i0.ViewContainerRef);
17674
+ i0__namespace.ɵɵviewQuery(_c0$v, 1, i0.ViewContainerRef);
17963
17675
  }
17964
17676
  if (rf & 2) {
17965
17677
  var _t = void 0;
@@ -18000,7 +17712,7 @@
18000
17712
  }] });
18001
17713
  })();
18002
17714
 
18003
- var _c0$w = ["fieldContainer"];
17715
+ var _c0$u = ["fieldContainer"];
18004
17716
  var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
18005
17717
  var FieldWriteComponent = /** @class */ (function (_super) {
18006
17718
  __extends(FieldWriteComponent, _super);
@@ -18048,7 +17760,7 @@
18048
17760
  FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
18049
17761
  FieldWriteComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) {
18050
17762
  if (rf & 1) {
18051
- i0__namespace.ɵɵviewQuery(_c0$w, 3, i0.ViewContainerRef);
17763
+ i0__namespace.ɵɵviewQuery(_c0$u, 3, i0.ViewContainerRef);
18052
17764
  }
18053
17765
  if (rf & 2) {
18054
17766
  var _t = void 0;
@@ -18111,7 +17823,7 @@
18111
17823
  i0__namespace.ɵɵprojection(0);
18112
17824
  }
18113
17825
  }
18114
- var _c0$v = ["*"];
17826
+ var _c0$t = ["*"];
18115
17827
  var FieldReadLabelComponent = /** @class */ (function (_super) {
18116
17828
  __extends(FieldReadLabelComponent, _super);
18117
17829
  function FieldReadLabelComponent() {
@@ -18149,7 +17861,7 @@
18149
17861
  return FieldReadLabelComponent;
18150
17862
  }(AbstractFieldReadComponent));
18151
17863
  FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
18152
- FieldReadLabelComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$v, decls: 4, vars: 5, consts: [[3, "hidden"], ["class", "case-field", 4, "ngIf", "ngIfElse"], ["caseFieldValue", ""], [1, "case-field"], [1, "case-field__label"], [1, "case-field__value"], [4, "ngTemplateOutlet"]], template: function FieldReadLabelComponent_Template(rf, ctx) {
17864
+ FieldReadLabelComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$t, decls: 4, vars: 5, consts: [[3, "hidden"], ["class", "case-field", 4, "ngIf", "ngIfElse"], ["caseFieldValue", ""], [1, "case-field"], [1, "case-field__label"], [1, "case-field__value"], [4, "ngTemplateOutlet"]], template: function FieldReadLabelComponent_Template(rf, ctx) {
18153
17865
  if (rf & 1) {
18154
17866
  i0__namespace.ɵɵprojectionDef();
18155
17867
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -18188,7 +17900,7 @@
18188
17900
  i0__namespace.ɵɵelementContainer(0);
18189
17901
  }
18190
17902
  }
18191
- var _c0$u = function (a0) { return { cat: a0, level: 1 }; };
17903
+ var _c0$s = function (a0) { return { cat: a0, level: 1 }; };
18192
17904
  function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
18193
17905
  if (rf & 1) {
18194
17906
  i0__namespace.ɵɵelementContainerStart(0);
@@ -18200,7 +17912,7 @@
18200
17912
  i0__namespace.ɵɵnextContext();
18201
17913
  var _r1 = i0__namespace.ɵɵreference(13);
18202
17914
  i0__namespace.ɵɵadvance(1);
18203
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$u, cat_r3));
17915
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$s, cat_r3));
18204
17916
  }
18205
17917
  }
18206
17918
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) {
@@ -18208,7 +17920,7 @@
18208
17920
  i0__namespace.ɵɵelementContainer(0);
18209
17921
  }
18210
17922
  }
18211
- var _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
17923
+ var _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
18212
17924
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
18213
17925
  if (rf & 1) {
18214
17926
  i0__namespace.ɵɵelementContainerStart(0);
@@ -18221,7 +17933,7 @@
18221
17933
  i0__namespace.ɵɵnextContext();
18222
17934
  var _r1 = i0__namespace.ɵɵreference(13);
18223
17935
  i0__namespace.ɵɵadvance(1);
18224
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
17936
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
18225
17937
  }
18226
17938
  }
18227
17939
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -18442,8 +18154,8 @@
18442
18154
  i0__namespace.ɵɵproperty("ngForOf", ctx_r1.menuItems);
18443
18155
  }
18444
18156
  }
18445
- var _c0$t = [[["", "trigger", ""]]];
18446
- var _c1$9 = ["[trigger]"];
18157
+ var _c0$r = [[["", "trigger", ""]]];
18158
+ var _c1$8 = ["[trigger]"];
18447
18159
  var CaseFileViewOverlayMenuComponent = /** @class */ (function () {
18448
18160
  function CaseFileViewOverlayMenuComponent() {
18449
18161
  this.title = '';
@@ -18458,9 +18170,9 @@
18458
18170
  return CaseFileViewOverlayMenuComponent;
18459
18171
  }());
18460
18172
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
18461
- CaseFileViewOverlayMenuComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) {
18173
+ CaseFileViewOverlayMenuComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$8, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) {
18462
18174
  if (rf & 1) {
18463
- i0__namespace.ɵɵprojectionDef(_c0$t);
18175
+ i0__namespace.ɵɵprojectionDef(_c0$r);
18464
18176
  i0__namespace.ɵɵelementStart(0, "div");
18465
18177
  i0__namespace.ɵɵelementStart(1, "button", 0, 1);
18466
18178
  i0__namespace.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -19307,8 +19019,8 @@
19307
19019
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
19308
19020
  }
19309
19021
  }
19310
- var _c0$s = function (a0) { return { "form-group-error": a0 }; };
19311
- var _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
19022
+ var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19023
+ var _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
19312
19024
  function SelectFlagTypeComponent_div_9_Template(rf, ctx) {
19313
19025
  if (rf & 1) {
19314
19026
  i0__namespace.ɵɵelementStart(0, "div", 15);
@@ -19324,11 +19036,11 @@
19324
19036
  if (rf & 2) {
19325
19037
  var ctx_r2 = i0__namespace.ɵɵnextContext();
19326
19038
  i0__namespace.ɵɵadvance(1);
19327
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$s, ctx_r2.flagTypeErrorMessage.length > 0));
19039
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$q, ctx_r2.flagTypeErrorMessage.length > 0));
19328
19040
  i0__namespace.ɵɵadvance(3);
19329
19041
  i0__namespace.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
19330
19042
  i0__namespace.ɵɵadvance(1);
19331
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$8, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19043
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$7, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19332
19044
  }
19333
19045
  }
19334
19046
  function SelectFlagTypeComponent_div_10_Template(rf, ctx) {
@@ -19486,7 +19198,7 @@
19486
19198
  if (rf & 2) {
19487
19199
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
19488
19200
  i0__namespace.ɵɵadvance(1);
19489
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$s, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19201
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$q, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19490
19202
  i0__namespace.ɵɵadvance(4);
19491
19203
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
19492
19204
  i0__namespace.ɵɵadvance(1);
@@ -19598,7 +19310,7 @@
19598
19310
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
19599
19311
  }
19600
19312
  }
19601
- var _c0$r = function (a0) { return { "form-group-error": a0 }; };
19313
+ var _c0$p = function (a0) { return { "form-group-error": a0 }; };
19602
19314
  function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) {
19603
19315
  if (rf & 1) {
19604
19316
  i0__namespace.ɵɵelementStart(0, "div", 25);
@@ -19615,7 +19327,7 @@
19615
19327
  if (rf & 2) {
19616
19328
  var ctx_r5 = i0__namespace.ɵɵnextContext();
19617
19329
  i0__namespace.ɵɵadvance(1);
19618
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$r, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19330
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$p, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19619
19331
  i0__namespace.ɵɵadvance(2);
19620
19332
  i0__namespace.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
19621
19333
  i0__namespace.ɵɵadvance(1);
@@ -19790,7 +19502,7 @@
19790
19502
  var _r2 = i0__namespace.ɵɵreference(12);
19791
19503
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
19792
19504
  i0__namespace.ɵɵadvance(1);
19793
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$r, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
19505
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$p, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
19794
19506
  i0__namespace.ɵɵadvance(2);
19795
19507
  i0__namespace.ɵɵproperty("for", ctx.languageSearchTermControlName);
19796
19508
  i0__namespace.ɵɵadvance(1);
@@ -19924,7 +19636,7 @@
19924
19636
  i0__namespace.ɵɵelementEnd();
19925
19637
  }
19926
19638
  }
19927
- var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19639
+ var _c0$o = function (a0) { return { "form-group-error": a0 }; };
19928
19640
  var SelectFlagLocationComponent = /** @class */ (function () {
19929
19641
  function SelectFlagLocationComponent() {
19930
19642
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20013,7 +19725,7 @@
20013
19725
  if (rf & 2) {
20014
19726
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20015
19727
  i0__namespace.ɵɵadvance(1);
20016
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$q, ctx.errorMessages.length > 0));
19728
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20017
19729
  i0__namespace.ɵɵadvance(4);
20018
19730
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
20019
19731
  i0__namespace.ɵɵadvance(1);
@@ -20077,7 +19789,7 @@
20077
19789
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
20078
19790
  }
20079
19791
  }
20080
- var _c0$p = function (a0) { return { "form-group-error": a0 }; };
19792
+ var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20081
19793
  var AddCommentsComponent = /** @class */ (function () {
20082
19794
  function AddCommentsComponent() {
20083
19795
  this.optional = false;
@@ -20158,7 +19870,7 @@
20158
19870
  if (rf & 2) {
20159
19871
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20160
19872
  i0__namespace.ɵɵadvance(2);
20161
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$p, ctx.errorMessages.length > 0));
19873
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$n, ctx.errorMessages.length > 0));
20162
19874
  i0__namespace.ɵɵadvance(2);
20163
19875
  i0__namespace.ɵɵproperty("for", ctx.flagCommentsControlName);
20164
19876
  i0__namespace.ɵɵadvance(1);
@@ -20238,7 +19950,7 @@
20238
19950
  i0__namespace.ɵɵelementEnd();
20239
19951
  }
20240
19952
  }
20241
- var _c0$o = function (a0) { return { "form-group-error": a0 }; };
19953
+ var _c0$m = function (a0) { return { "form-group-error": a0 }; };
20242
19954
  var ManageCaseFlagsComponent = /** @class */ (function () {
20243
19955
  function ManageCaseFlagsComponent() {
20244
19956
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20398,7 +20110,7 @@
20398
20110
  if (rf & 2) {
20399
20111
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20400
20112
  i0__namespace.ɵɵadvance(1);
20401
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20113
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$m, ctx.errorMessages.length > 0));
20402
20114
  i0__namespace.ɵɵadvance(4);
20403
20115
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
20404
20116
  i0__namespace.ɵɵadvance(1);
@@ -20468,8 +20180,8 @@
20468
20180
  i0__namespace.ɵɵelementEnd();
20469
20181
  }
20470
20182
  }
20471
- var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20472
- var _c1$7 = function (a0) { return { "govuk-tag--grey": a0 }; };
20183
+ var _c0$l = function (a0) { return { "form-group-error": a0 }; };
20184
+ var _c1$6 = function (a0) { return { "govuk-tag--grey": a0 }; };
20473
20185
  var UpdateFlagComponent = /** @class */ (function () {
20474
20186
  function UpdateFlagComponent() {
20475
20187
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20590,7 +20302,7 @@
20590
20302
  if (rf & 2) {
20591
20303
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20592
20304
  i0__namespace.ɵɵadvance(2);
20593
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$n, ctx.errorMessages.length > 0));
20305
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$l, ctx.errorMessages.length > 0));
20594
20306
  i0__namespace.ɵɵadvance(2);
20595
20307
  i0__namespace.ɵɵproperty("for", ctx.updateFlagControlName);
20596
20308
  i0__namespace.ɵɵadvance(1);
@@ -20606,7 +20318,7 @@
20606
20318
  i0__namespace.ɵɵadvance(3);
20607
20319
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
20608
20320
  i0__namespace.ɵɵadvance(6);
20609
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$7, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20321
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$6, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20610
20322
  i0__namespace.ɵɵadvance(1);
20611
20323
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
20612
20324
  i0__namespace.ɵɵadvance(2);
@@ -20734,2309 +20446,6 @@
20734
20446
  }] });
20735
20447
  })();
20736
20448
 
20737
- exports.LinkedCasesPages = void 0;
20738
- (function (LinkedCasesPages) {
20739
- LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
20740
- LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
20741
- LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
20742
- LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
20743
- LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
20744
- })(exports.LinkedCasesPages || (exports.LinkedCasesPages = {}));
20745
- exports.LinkedCasesErrorMessages = void 0;
20746
- (function (LinkedCasesErrorMessages) {
20747
- LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
20748
- LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
20749
- LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
20750
- LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
20751
- LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
20752
- LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
20753
- LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
20754
- LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
20755
- LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
20756
- LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
20757
- LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
20758
- LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
20759
- })(exports.LinkedCasesErrorMessages || (exports.LinkedCasesErrorMessages = {}));
20760
- exports.LinkedCasesEventTriggers = void 0;
20761
- (function (LinkedCasesEventTriggers) {
20762
- LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
20763
- LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
20764
- })(exports.LinkedCasesEventTriggers || (exports.LinkedCasesEventTriggers = {}));
20765
- exports.Patterns = void 0;
20766
- (function (Patterns) {
20767
- Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
20768
- })(exports.Patterns || (exports.Patterns = {}));
20769
-
20770
- function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) {
20771
- if (rf & 1) {
20772
- i0__namespace.ɵɵelementStart(0, "p", 5);
20773
- i0__namespace.ɵɵelementStart(1, "span", 6);
20774
- i0__namespace.ɵɵtext(2, "Error:");
20775
- i0__namespace.ɵɵelementEnd();
20776
- i0__namespace.ɵɵtext(3);
20777
- i0__namespace.ɵɵelementEnd();
20778
- }
20779
- if (rf & 2) {
20780
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
20781
- i0__namespace.ɵɵadvance(3);
20782
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
20783
- }
20784
- }
20785
- function BeforeYouStartComponent_div_1_Template(rf, ctx) {
20786
- if (rf & 1) {
20787
- var _r4_1 = i0__namespace.ɵɵgetCurrentView();
20788
- i0__namespace.ɵɵelementStart(0, "div");
20789
- i0__namespace.ɵɵelementStart(1, "h1", 1);
20790
- i0__namespace.ɵɵtext(2, "There is a problem");
20791
- i0__namespace.ɵɵelementEnd();
20792
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
20793
- i0__namespace.ɵɵelementStart(4, "p", 3);
20794
- i0__namespace.ɵɵelementStart(5, "a", 4);
20795
- i0__namespace.ɵɵlistener("click", function BeforeYouStartComponent_div_1_Template_a_click_5_listener() { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.onBack(); });
20796
- i0__namespace.ɵɵtext(6, "Go back to the Linked cases tab");
20797
- i0__namespace.ɵɵelementEnd();
20798
- i0__namespace.ɵɵelementEnd();
20799
- i0__namespace.ɵɵelementEnd();
20800
- }
20801
- if (rf & 2) {
20802
- var ctx_r0 = i0__namespace.ɵɵnextContext();
20803
- i0__namespace.ɵɵadvance(3);
20804
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
20805
- }
20806
- }
20807
- function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) {
20808
- if (rf & 1) {
20809
- i0__namespace.ɵɵelementStart(0, "div", 11);
20810
- i0__namespace.ɵɵelementStart(1, "p", 3);
20811
- i0__namespace.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
20812
- i0__namespace.ɵɵelementEnd();
20813
- i0__namespace.ɵɵelementStart(3, "p", 3);
20814
- i0__namespace.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
20815
- i0__namespace.ɵɵelementEnd();
20816
- i0__namespace.ɵɵelementEnd();
20817
- }
20818
- }
20819
- function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) {
20820
- if (rf & 1) {
20821
- i0__namespace.ɵɵelementStart(0, "div", 12);
20822
- i0__namespace.ɵɵelementStart(1, "p", 3);
20823
- i0__namespace.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
20824
- i0__namespace.ɵɵelementEnd();
20825
- i0__namespace.ɵɵelementEnd();
20826
- }
20827
- }
20828
- function BeforeYouStartComponent_div_2_Template(rf, ctx) {
20829
- if (rf & 1) {
20830
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
20831
- i0__namespace.ɵɵelementStart(0, "div");
20832
- i0__namespace.ɵɵelementStart(1, "h1", 1);
20833
- i0__namespace.ɵɵtext(2, "Before you start");
20834
- i0__namespace.ɵɵelementEnd();
20835
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
20836
- i0__namespace.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
20837
- i0__namespace.ɵɵelementStart(5, "div", 9);
20838
- i0__namespace.ɵɵelementStart(6, "button", 10);
20839
- i0__namespace.ɵɵlistener("click", function BeforeYouStartComponent_div_2_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onNext(); });
20840
- i0__namespace.ɵɵtext(7, "Next");
20841
- i0__namespace.ɵɵelementEnd();
20842
- i0__namespace.ɵɵelementEnd();
20843
- i0__namespace.ɵɵelementEnd();
20844
- }
20845
- if (rf & 2) {
20846
- var ctx_r1 = i0__namespace.ɵɵnextContext();
20847
- i0__namespace.ɵɵadvance(3);
20848
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
20849
- i0__namespace.ɵɵadvance(1);
20850
- i0__namespace.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
20851
- }
20852
- }
20853
- var BeforeYouStartComponent = /** @class */ (function () {
20854
- function BeforeYouStartComponent(router, linkedCasesService) {
20855
- this.router = router;
20856
- this.linkedCasesService = linkedCasesService;
20857
- this.linkedCasesStateEmitter = new i0.EventEmitter();
20858
- this.isLinkCasesJourney = false;
20859
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
20860
- // re-initiate the state based on the casefield value
20861
- var linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(function (item) { return item; }).map(function (item) { return item.id; });
20862
- this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(function (item) { return linkedCaseRefereneIds.indexOf(item.caseReference) !== -1; });
20863
- this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
20864
- }
20865
- BeforeYouStartComponent.prototype.onNext = function () {
20866
- this.linkedCasesStateEmitter.emit({
20867
- currentLinkedCasesPage: exports.LinkedCasesPages.BEFORE_YOU_START,
20868
- errorMessages: this.errorMessages,
20869
- navigateToNextPage: true
20870
- });
20871
- };
20872
- BeforeYouStartComponent.prototype.onBack = function () {
20873
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
20874
- window.location.hash = 'Linked cases';
20875
- });
20876
- };
20877
- return BeforeYouStartComponent;
20878
- }());
20879
- BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
20880
- BeforeYouStartComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BeforeYouStartComponent, selectors: [["ccd-linked-cases-before-you-start"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 3, vars: 2, consts: [[4, "ngIf"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "link-cases-journey", 4, "ngIf"], ["id", "manage-link-cases-journey", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], ["id", "link-cases-journey"], ["id", "manage-link-cases-journey"]], template: function BeforeYouStartComponent_Template(rf, ctx) {
20881
- if (rf & 1) {
20882
- i0__namespace.ɵɵelementStart(0, "div");
20883
- i0__namespace.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
20884
- i0__namespace.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
20885
- i0__namespace.ɵɵelementEnd();
20886
- }
20887
- if (rf & 2) {
20888
- i0__namespace.ɵɵadvance(1);
20889
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
20890
- i0__namespace.ɵɵadvance(1);
20891
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
20892
- }
20893
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
20894
- (function () {
20895
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BeforeYouStartComponent, [{
20896
- type: i0.Component,
20897
- args: [{
20898
- selector: 'ccd-linked-cases-before-you-start',
20899
- templateUrl: './before-you-start.component.html'
20900
- }]
20901
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
20902
- type: i0.Output
20903
- }] });
20904
- })();
20905
-
20906
- function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) {
20907
- if (rf & 1) {
20908
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
20909
- i0__namespace.ɵɵelementStart(0, "tr", 7);
20910
- i0__namespace.ɵɵelementStart(1, "td", 14);
20911
- i0__namespace.ɵɵtext(2);
20912
- i0__namespace.ɵɵelement(3, "br");
20913
- i0__namespace.ɵɵtext(4);
20914
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
20915
- i0__namespace.ɵɵelementEnd();
20916
- i0__namespace.ɵɵelementStart(6, "td", 14);
20917
- i0__namespace.ɵɵelementStart(7, "a", 15);
20918
- i0__namespace.ɵɵlistener("click", function CheckYourAnswersComponent_table_4_tr_9_Template_a_click_7_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(2); return ctx_r7.onChange(); });
20919
- i0__namespace.ɵɵtext(8, "Change");
20920
- i0__namespace.ɵɵelementEnd();
20921
- i0__namespace.ɵɵelementEnd();
20922
- i0__namespace.ɵɵelementEnd();
20923
- }
20924
- if (rf & 2) {
20925
- var case_r6 = ctx.$implicit;
20926
- i0__namespace.ɵɵadvance(2);
20927
- i0__namespace.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
20928
- i0__namespace.ɵɵadvance(2);
20929
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
20930
- }
20931
- }
20932
- function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) {
20933
- if (rf & 1) {
20934
- i0__namespace.ɵɵelementStart(0, "tr", 7);
20935
- i0__namespace.ɵɵelementStart(1, "td", 16);
20936
- i0__namespace.ɵɵtext(2, " None ");
20937
- i0__namespace.ɵɵelementEnd();
20938
- i0__namespace.ɵɵelementEnd();
20939
- }
20940
- }
20941
- function CheckYourAnswersComponent_table_4_Template(rf, ctx) {
20942
- if (rf & 1) {
20943
- i0__namespace.ɵɵelementStart(0, "table", 13);
20944
- i0__namespace.ɵɵelementStart(1, "caption", 5);
20945
- i0__namespace.ɵɵtext(2, "Cases to unlink");
20946
- i0__namespace.ɵɵelementEnd();
20947
- i0__namespace.ɵɵelementStart(3, "thead", 6);
20948
- i0__namespace.ɵɵelementStart(4, "tr", 7);
20949
- i0__namespace.ɵɵelementStart(5, "th", 8);
20950
- i0__namespace.ɵɵtext(6, "Case name and number");
20951
- i0__namespace.ɵɵelementEnd();
20952
- i0__namespace.ɵɵelement(7, "th", 8);
20953
- i0__namespace.ɵɵelementEnd();
20954
- i0__namespace.ɵɵelementEnd();
20955
- i0__namespace.ɵɵelementStart(8, "tbody", 10);
20956
- i0__namespace.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
20957
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
20958
- i0__namespace.ɵɵelementEnd();
20959
- i0__namespace.ɵɵelementEnd();
20960
- }
20961
- if (rf & 2) {
20962
- var ctx_r0 = i0__namespace.ɵɵnextContext();
20963
- i0__namespace.ɵɵadvance(9);
20964
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
20965
- i0__namespace.ɵɵadvance(1);
20966
- i0__namespace.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
20967
- }
20968
- }
20969
- function CheckYourAnswersComponent_th_15_Template(rf, ctx) {
20970
- if (rf & 1) {
20971
- i0__namespace.ɵɵelement(0, "th", 8);
20972
- }
20973
- }
20974
- function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) {
20975
- if (rf & 1) {
20976
- i0__namespace.ɵɵelement(0, "br");
20977
- }
20978
- }
20979
- function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) {
20980
- if (rf & 1) {
20981
- i0__namespace.ɵɵelementStart(0, "span");
20982
- i0__namespace.ɵɵtext(1);
20983
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
20984
- i0__namespace.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
20985
- i0__namespace.ɵɵelementEnd();
20986
- }
20987
- if (rf & 2) {
20988
- var reason_r12 = ctx.$implicit;
20989
- var isLast_r13 = ctx.last;
20990
- i0__namespace.ɵɵadvance(1);
20991
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
20992
- i0__namespace.ɵɵadvance(2);
20993
- i0__namespace.ɵɵproperty("ngIf", !isLast_r13);
20994
- }
20995
- }
20996
- function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) {
20997
- if (rf & 1) {
20998
- var _r16_1 = i0__namespace.ɵɵgetCurrentView();
20999
- i0__namespace.ɵɵelementStart(0, "td", 14);
21000
- i0__namespace.ɵɵelementStart(1, "a", 15);
21001
- i0__namespace.ɵɵlistener("click", function CheckYourAnswersComponent_tr_17_td_10_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r16_1); var ctx_r15 = i0__namespace.ɵɵnextContext(2); return ctx_r15.onChange(); });
21002
- i0__namespace.ɵɵtext(2, "Change");
21003
- i0__namespace.ɵɵelementEnd();
21004
- i0__namespace.ɵɵelementEnd();
21005
- }
21006
- }
21007
- function CheckYourAnswersComponent_tr_17_Template(rf, ctx) {
21008
- if (rf & 1) {
21009
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21010
- i0__namespace.ɵɵelementStart(1, "td", 14);
21011
- i0__namespace.ɵɵelementStart(2, "span");
21012
- i0__namespace.ɵɵtext(3);
21013
- i0__namespace.ɵɵelement(4, "br");
21014
- i0__namespace.ɵɵtext(5);
21015
- i0__namespace.ɵɵpipe(6, "ccdCaseReference");
21016
- i0__namespace.ɵɵelementEnd();
21017
- i0__namespace.ɵɵelementEnd();
21018
- i0__namespace.ɵɵelementStart(7, "td", 14);
21019
- i0__namespace.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
21020
- i0__namespace.ɵɵelementEnd();
21021
- i0__namespace.ɵɵelement(9, "td", 14);
21022
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
21023
- i0__namespace.ɵɵelementEnd();
21024
- }
21025
- if (rf & 2) {
21026
- var case_r9 = ctx.$implicit;
21027
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21028
- i0__namespace.ɵɵadvance(3);
21029
- i0__namespace.ɵɵtextInterpolate1("", case_r9.caseName, " ");
21030
- i0__namespace.ɵɵadvance(2);
21031
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
21032
- i0__namespace.ɵɵadvance(3);
21033
- i0__namespace.ɵɵproperty("ngForOf", case_r9.reasons);
21034
- i0__namespace.ɵɵadvance(2);
21035
- i0__namespace.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
21036
- }
21037
- }
21038
- function CheckYourAnswersComponent_tr_18_Template(rf, ctx) {
21039
- if (rf & 1) {
21040
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21041
- i0__namespace.ɵɵelementStart(1, "td", 20);
21042
- i0__namespace.ɵɵtext(2, " None ");
21043
- i0__namespace.ɵɵelementEnd();
21044
- i0__namespace.ɵɵelementEnd();
21045
- }
21046
- }
21047
- var CheckYourAnswersComponent = /** @class */ (function () {
21048
- function CheckYourAnswersComponent(linkedCasesService) {
21049
- this.linkedCasesService = linkedCasesService;
21050
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21051
- }
21052
- CheckYourAnswersComponent.prototype.ngOnInit = function () {
21053
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
21054
- this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
21055
- this.linkedCases = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return !linkedCase.unlink; });
21056
- this.casesToUnlink = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
21057
- };
21058
- CheckYourAnswersComponent.prototype.onChange = function () {
21059
- this.linkedCasesService.editMode = true;
21060
- this.linkedCasesStateEmitter.emit({
21061
- currentLinkedCasesPage: exports.LinkedCasesPages.CHECK_YOUR_ANSWERS,
21062
- navigateToPreviousPage: true,
21063
- navigateToNextPage: true
21064
- });
21065
- };
21066
- return CheckYourAnswersComponent;
21067
- }());
21068
- CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21069
- CheckYourAnswersComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CheckYourAnswersComponent, selectors: [["ccd-linked-cases-check-your-answers"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 19, vars: 5, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["id", "cases-to-unlink-table", "class", "govuk-table", 4, "ngIf"], ["id", "linked-cases-table", 1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header"], ["scope", "col", "class", "govuk-table__header", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], ["id", "cases-to-unlink-table", 1, "govuk-table"], [1, "govuk-table__cell"], ["href", "javascript:void(0)", 1, "govuk-link", "govuk-link--no-visited-state", "float-right", 3, "click"], ["colspan", "2", 1, "govuk-table__cell"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__cell", 4, "ngIf"], [4, "ngIf"], ["colspan", "4", 1, "govuk-table__cell"]], template: function CheckYourAnswersComponent_Template(rf, ctx) {
21070
- if (rf & 1) {
21071
- i0__namespace.ɵɵelementStart(0, "div", 0);
21072
- i0__namespace.ɵɵelementStart(1, "div", 1);
21073
- i0__namespace.ɵɵelementStart(2, "h1", 2);
21074
- i0__namespace.ɵɵtext(3, "Check your answers");
21075
- i0__namespace.ɵɵelementEnd();
21076
- i0__namespace.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
21077
- i0__namespace.ɵɵelementStart(5, "table", 4);
21078
- i0__namespace.ɵɵelementStart(6, "caption", 5);
21079
- i0__namespace.ɵɵtext(7);
21080
- i0__namespace.ɵɵelementEnd();
21081
- i0__namespace.ɵɵelementStart(8, "thead", 6);
21082
- i0__namespace.ɵɵelementStart(9, "tr", 7);
21083
- i0__namespace.ɵɵelementStart(10, "th", 8);
21084
- i0__namespace.ɵɵtext(11, "Case name and number");
21085
- i0__namespace.ɵɵelementEnd();
21086
- i0__namespace.ɵɵelementStart(12, "th", 8);
21087
- i0__namespace.ɵɵtext(13, "Reasons for case link");
21088
- i0__namespace.ɵɵelementEnd();
21089
- i0__namespace.ɵɵelement(14, "th", 8);
21090
- i0__namespace.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
21091
- i0__namespace.ɵɵelementEnd();
21092
- i0__namespace.ɵɵelementEnd();
21093
- i0__namespace.ɵɵelementStart(16, "tbody", 10);
21094
- i0__namespace.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
21095
- i0__namespace.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
21096
- i0__namespace.ɵɵelementEnd();
21097
- i0__namespace.ɵɵelementEnd();
21098
- i0__namespace.ɵɵelementEnd();
21099
- i0__namespace.ɵɵelementEnd();
21100
- }
21101
- if (rf & 2) {
21102
- i0__namespace.ɵɵadvance(4);
21103
- i0__namespace.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
21104
- i0__namespace.ɵɵadvance(3);
21105
- i0__namespace.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
21106
- i0__namespace.ɵɵadvance(8);
21107
- i0__namespace.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
21108
- i0__namespace.ɵɵadvance(2);
21109
- i0__namespace.ɵɵproperty("ngForOf", ctx.linkedCases);
21110
- i0__namespace.ɵɵadvance(1);
21111
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCases.length);
21112
- }
21113
- }, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
21114
- (function () {
21115
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CheckYourAnswersComponent, [{
21116
- type: i0.Component,
21117
- args: [{
21118
- selector: 'ccd-linked-cases-check-your-answers',
21119
- templateUrl: './check-your-answers.component.html',
21120
- styleUrls: ['./check-your-answers.component.scss']
21121
- }]
21122
- }], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21123
- type: i0.Output
21124
- }] });
21125
- })();
21126
-
21127
- var ValidatorsUtils = /** @class */ (function () {
21128
- function ValidatorsUtils() {
21129
- }
21130
- ValidatorsUtils.prototype.numberLengthValidator = function (inputLength) {
21131
- return function (control) {
21132
- return control.value.length !== inputLength ? { isValid: false } : null;
21133
- };
21134
- };
21135
- ValidatorsUtils.prototype.formArraySelectedValidator = function () {
21136
- return function (control) {
21137
- return control.value.every(function (option) { return !option.selected; }) ? { isValid: false } : null;
21138
- };
21139
- };
21140
- ValidatorsUtils.prototype.regexPattern = function (regexPattern) {
21141
- return function (control) {
21142
- var regex = new RegExp(regexPattern);
21143
- return regex.test(control.value) ? null : { isValid: false };
21144
- };
21145
- };
21146
- return ValidatorsUtils;
21147
- }());
21148
- ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
21149
- ValidatorsUtils.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
21150
- (function () {
21151
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ValidatorsUtils, [{
21152
- type: i0.Injectable,
21153
- args: [{ providedIn: 'root' }]
21154
- }], null, null);
21155
- })();
21156
-
21157
- function LinkCasesComponent_div_8_span_4_Template(rf, ctx) {
21158
- if (rf & 1) {
21159
- i0__namespace.ɵɵelementStart(0, "span", 28);
21160
- i0__namespace.ɵɵelementStart(1, "span", 29);
21161
- i0__namespace.ɵɵtext(2, "Error:");
21162
- i0__namespace.ɵɵelementEnd();
21163
- i0__namespace.ɵɵtext(3);
21164
- i0__namespace.ɵɵelementEnd();
21165
- }
21166
- if (rf & 2) {
21167
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
21168
- i0__namespace.ɵɵadvance(3);
21169
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
21170
- }
21171
- }
21172
- function LinkCasesComponent_div_8_span_10_Template(rf, ctx) {
21173
- if (rf & 1) {
21174
- i0__namespace.ɵɵelementStart(0, "span", 28);
21175
- i0__namespace.ɵɵelementStart(1, "span", 29);
21176
- i0__namespace.ɵɵtext(2, "Error:");
21177
- i0__namespace.ɵɵelementEnd();
21178
- i0__namespace.ɵɵtext(3);
21179
- i0__namespace.ɵɵelementEnd();
21180
- }
21181
- if (rf & 2) {
21182
- var ctx_r5 = i0__namespace.ɵɵnextContext(2);
21183
- i0__namespace.ɵɵadvance(3);
21184
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
21185
- }
21186
- }
21187
- function LinkCasesComponent_div_8_div_12_Template(rf, ctx) {
21188
- if (rf & 1) {
21189
- i0__namespace.ɵɵelementStart(0, "div", 30);
21190
- i0__namespace.ɵɵelement(1, "input", 31);
21191
- i0__namespace.ɵɵelementStart(2, "label", 32);
21192
- i0__namespace.ɵɵtext(3);
21193
- i0__namespace.ɵɵelementEnd();
21194
- i0__namespace.ɵɵelementEnd();
21195
- }
21196
- if (rf & 2) {
21197
- var reason_r8 = ctx.$implicit;
21198
- var pos_r9 = ctx.index;
21199
- i0__namespace.ɵɵproperty("formGroupName", pos_r9);
21200
- i0__namespace.ɵɵadvance(1);
21201
- i0__namespace.ɵɵpropertyInterpolate("id", reason_r8.key);
21202
- i0__namespace.ɵɵproperty("value", reason_r8.value_en);
21203
- i0__namespace.ɵɵadvance(1);
21204
- i0__namespace.ɵɵpropertyInterpolate("for", reason_r8.key);
21205
- i0__namespace.ɵɵadvance(1);
21206
- i0__namespace.ɵɵtextInterpolate(reason_r8.value_en);
21207
- }
21208
- }
21209
- function LinkCasesComponent_div_8_span_15_Template(rf, ctx) {
21210
- if (rf & 1) {
21211
- i0__namespace.ɵɵelementStart(0, "span", 28);
21212
- i0__namespace.ɵɵelementStart(1, "span", 29);
21213
- i0__namespace.ɵɵtext(2, "Error:");
21214
- i0__namespace.ɵɵelementEnd();
21215
- i0__namespace.ɵɵtext(3);
21216
- i0__namespace.ɵɵelementEnd();
21217
- }
21218
- if (rf & 2) {
21219
- var ctx_r7 = i0__namespace.ɵɵnextContext(2);
21220
- i0__namespace.ɵɵadvance(3);
21221
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
21222
- }
21223
- }
21224
- var _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
21225
- function LinkCasesComponent_div_8_Template(rf, ctx) {
21226
- if (rf & 1) {
21227
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
21228
- i0__namespace.ɵɵelementStart(0, "div", 21);
21229
- i0__namespace.ɵɵelementStart(1, "h3", 22);
21230
- i0__namespace.ɵɵtext(2, "Enter case reference");
21231
- i0__namespace.ɵɵelementEnd();
21232
- i0__namespace.ɵɵelementStart(3, "div", 5);
21233
- i0__namespace.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
21234
- i0__namespace.ɵɵelement(5, "input", 23);
21235
- i0__namespace.ɵɵelementEnd();
21236
- i0__namespace.ɵɵelementStart(6, "h3", 22);
21237
- i0__namespace.ɵɵtext(7, "Why should these cases be linked?");
21238
- i0__namespace.ɵɵelementEnd();
21239
- i0__namespace.ɵɵelementStart(8, "div", 24);
21240
- i0__namespace.ɵɵtext(9, " Select all that apply. ");
21241
- i0__namespace.ɵɵelementEnd();
21242
- i0__namespace.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
21243
- i0__namespace.ɵɵelementStart(11, "div", 25);
21244
- i0__namespace.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
21245
- i0__namespace.ɵɵelementEnd();
21246
- i0__namespace.ɵɵelement(13, "br");
21247
- i0__namespace.ɵɵelement(14, "br");
21248
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
21249
- i0__namespace.ɵɵelementStart(16, "button", 27);
21250
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_16_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.submitCaseInfo(); });
21251
- i0__namespace.ɵɵtext(17, "Propose case link");
21252
- i0__namespace.ɵɵelementEnd();
21253
- i0__namespace.ɵɵelementEnd();
21254
- }
21255
- if (rf & 2) {
21256
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21257
- i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
21258
- i0__namespace.ɵɵadvance(3);
21259
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
21260
- i0__namespace.ɵɵadvance(1);
21261
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
21262
- i0__namespace.ɵɵadvance(6);
21263
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
21264
- i0__namespace.ɵɵadvance(1);
21265
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
21266
- i0__namespace.ɵɵadvance(1);
21267
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
21268
- i0__namespace.ɵɵadvance(3);
21269
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
21270
- }
21271
- }
21272
- function LinkCasesComponent_span_13_Template(rf, ctx) {
21273
- if (rf & 1) {
21274
- i0__namespace.ɵɵelementStart(0, "span", 28);
21275
- i0__namespace.ɵɵelementStart(1, "span", 29);
21276
- i0__namespace.ɵɵtext(2, "Error:");
21277
- i0__namespace.ɵɵelementEnd();
21278
- i0__namespace.ɵɵtext(3);
21279
- i0__namespace.ɵɵelementEnd();
21280
- }
21281
- if (rf & 2) {
21282
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21283
- i0__namespace.ɵɵadvance(3);
21284
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
21285
- }
21286
- }
21287
- function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
21288
- if (rf & 1) {
21289
- i0__namespace.ɵɵelementStart(0, "span");
21290
- i0__namespace.ɵɵtext(1);
21291
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21292
- i0__namespace.ɵɵelement(3, "br");
21293
- i0__namespace.ɵɵelementEnd();
21294
- }
21295
- if (rf & 2) {
21296
- var reason_r15 = ctx.$implicit;
21297
- i0__namespace.ɵɵadvance(1);
21298
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
21299
- }
21300
- }
21301
- var _c1$6 = function (a0) { return { "table-group-error": a0 }; };
21302
- function LinkCasesComponent_tr_31_Template(rf, ctx) {
21303
- if (rf & 1) {
21304
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
21305
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21306
- i0__namespace.ɵɵelementStart(1, "td", 33);
21307
- i0__namespace.ɵɵelement(2, "div", 34);
21308
- i0__namespace.ɵɵelementStart(3, "span");
21309
- i0__namespace.ɵɵtext(4);
21310
- i0__namespace.ɵɵelement(5, "br");
21311
- i0__namespace.ɵɵtext(6);
21312
- i0__namespace.ɵɵpipe(7, "ccdCaseReference");
21313
- i0__namespace.ɵɵelementEnd();
21314
- i0__namespace.ɵɵelementEnd();
21315
- i0__namespace.ɵɵelementStart(8, "td", 35);
21316
- i0__namespace.ɵɵtext(9);
21317
- i0__namespace.ɵɵelementEnd();
21318
- i0__namespace.ɵɵelementStart(10, "td", 33);
21319
- i0__namespace.ɵɵtext(11);
21320
- i0__namespace.ɵɵelementEnd();
21321
- i0__namespace.ɵɵelementStart(12, "td", 35);
21322
- i0__namespace.ɵɵtext(13);
21323
- i0__namespace.ɵɵelementEnd();
21324
- i0__namespace.ɵɵelementStart(14, "td", 33);
21325
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
21326
- i0__namespace.ɵɵelementEnd();
21327
- i0__namespace.ɵɵelementStart(16, "td", 33);
21328
- i0__namespace.ɵɵelementStart(17, "a", 37);
21329
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { i0__namespace.ɵɵrestoreView(_r17_1); var pos_r13 = ctx.index; var case_r12 = ctx.$implicit; var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onSelectedLinkedCaseRemove(pos_r13, case_r12.caseReference); });
21330
- i0__namespace.ɵɵtext(18, "Remove");
21331
- i0__namespace.ɵɵelementEnd();
21332
- i0__namespace.ɵɵelementEnd();
21333
- i0__namespace.ɵɵelementEnd();
21334
- }
21335
- if (rf & 2) {
21336
- var case_r12 = ctx.$implicit;
21337
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21338
- i0__namespace.ɵɵadvance(2);
21339
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
21340
- i0__namespace.ɵɵadvance(2);
21341
- i0__namespace.ɵɵtextInterpolate1("", case_r12.caseName, " ");
21342
- i0__namespace.ɵɵadvance(2);
21343
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
21344
- i0__namespace.ɵɵadvance(2);
21345
- i0__namespace.ɵɵproperty("title", case_r12.caseTypeDescription);
21346
- i0__namespace.ɵɵadvance(1);
21347
- i0__namespace.ɵɵtextInterpolate(case_r12.caseType);
21348
- i0__namespace.ɵɵadvance(2);
21349
- i0__namespace.ɵɵtextInterpolate(case_r12.caseService);
21350
- i0__namespace.ɵɵadvance(1);
21351
- i0__namespace.ɵɵproperty("title", case_r12.caseStateDescription);
21352
- i0__namespace.ɵɵadvance(1);
21353
- i0__namespace.ɵɵtextInterpolate(case_r12.caseState);
21354
- i0__namespace.ɵɵadvance(2);
21355
- i0__namespace.ɵɵproperty("ngForOf", case_r12.reasons);
21356
- i0__namespace.ɵɵadvance(2);
21357
- i0__namespace.ɵɵattribute("id", case_r12.caseReference);
21358
- }
21359
- }
21360
- function LinkCasesComponent_tr_32_Template(rf, ctx) {
21361
- if (rf & 1) {
21362
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21363
- i0__namespace.ɵɵelementStart(1, "td", 38);
21364
- i0__namespace.ɵɵtext(2, " None ");
21365
- i0__namespace.ɵɵelementEnd();
21366
- i0__namespace.ɵɵelementEnd();
21367
- }
21368
- }
21369
- var LinkCasesComponent = /** @class */ (function () {
21370
- function LinkCasesComponent(casesService, fb, validatorsUtils, linkedCasesService) {
21371
- this.casesService = casesService;
21372
- this.fb = fb;
21373
- this.validatorsUtils = validatorsUtils;
21374
- this.linkedCasesService = linkedCasesService;
21375
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21376
- this.errorMessages = [];
21377
- this.selectedCases = [];
21378
- this.linkCaseReasons = [];
21379
- this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
21380
- }
21381
- LinkCasesComponent.prototype.ngOnInit = function () {
21382
- this.caseId = this.linkedCasesService.caseId;
21383
- this.caseName = this.linkedCasesService.caseName;
21384
- this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
21385
- this.initForm();
21386
- if (this.linkedCasesService.editMode) {
21387
- // this may have includes the currently added one but yet to be submitted.
21388
- this.selectedCases = this.linkedCasesService.linkedCases;
21389
- }
21390
- else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
21391
- this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
21392
- }
21393
- };
21394
- LinkCasesComponent.prototype.initForm = function () {
21395
- this.linkCaseForm = this.fb.group({
21396
- caseNumber: ['', [i2.Validators.minLength(16), this.validatorsUtils.regexPattern(exports.Patterns.CASE_REF)]],
21397
- reasonType: this.getReasonTypeFormArray,
21398
- });
21399
- };
21400
- Object.defineProperty(LinkCasesComponent.prototype, "getReasonTypeFormArray", {
21401
- get: function () {
21402
- var _this = this;
21403
- return this.fb.array(this.linkCaseReasons.map(function (val) { return _this.fb.group({
21404
- key: [val.key],
21405
- value_en: [val.value_en],
21406
- value_cy: [val.value_cy],
21407
- hint_text_en: [val.hint_text_en],
21408
- hint_text_cy: [val.hint_text_cy],
21409
- lov_order: [val.lov_order],
21410
- parent_key: [val.parent_key],
21411
- selected: [!!val.selected],
21412
- }); }), this.validatorsUtils.formArraySelectedValidator());
21413
- },
21414
- enumerable: false,
21415
- configurable: true
21416
- });
21417
- LinkCasesComponent.prototype.submitCaseInfo = function () {
21418
- this.errorMessages = [];
21419
- this.caseReasonError = null;
21420
- this.caseNumberError = null;
21421
- this.caseSelectionError = null;
21422
- this.noSelectedCaseError = null;
21423
- if (this.linkCaseForm.valid &&
21424
- !this.isCaseSelected(this.selectedCases) &&
21425
- !this.isCaseSelected(this.linkedCasesService.linkedCases) &&
21426
- !this.isCaseSelectedSameAsCurrentCase()) {
21427
- this.getCaseInfo();
21428
- }
21429
- else {
21430
- this.showErrorInfo();
21431
- }
21432
- };
21433
- LinkCasesComponent.prototype.isCaseSelected = function (linkedCases) {
21434
- if (linkedCases.length === 0) {
21435
- return false;
21436
- }
21437
- var caseNumber = this.linkCaseForm.value.caseNumber;
21438
- return !!linkedCases.find(function (caseLink) { return caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''); });
21439
- };
21440
- LinkCasesComponent.prototype.isCaseSelectedSameAsCurrentCase = function () {
21441
- return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
21442
- };
21443
- LinkCasesComponent.prototype.showErrorInfo = function () {
21444
- if (this.linkCaseForm.controls.caseNumber.invalid) {
21445
- this.caseNumberError = exports.LinkedCasesErrorMessages.CaseNumberError;
21446
- this.errorMessages.push({
21447
- title: 'dummy-case-number',
21448
- description: exports.LinkedCasesErrorMessages.CaseNumberError,
21449
- fieldId: 'caseNumber',
21450
- });
21451
- }
21452
- if (this.linkCaseForm.controls.reasonType.invalid) {
21453
- this.caseReasonError = exports.LinkedCasesErrorMessages.ReasonSelectionError;
21454
- this.errorMessages.push({
21455
- title: 'dummy-case-reason',
21456
- description: exports.LinkedCasesErrorMessages.ReasonSelectionError,
21457
- fieldId: 'caseReason',
21458
- });
21459
- }
21460
- if (this.isCaseSelected(this.selectedCases)) {
21461
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CaseProposedError;
21462
- this.errorMessages.push({
21463
- title: 'dummy-case-number',
21464
- description: exports.LinkedCasesErrorMessages.CaseProposedError,
21465
- fieldId: 'caseNumber',
21466
- });
21467
- }
21468
- if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
21469
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CasesLinkedError;
21470
- this.errorMessages.push({
21471
- title: 'dummy-case-number',
21472
- description: exports.LinkedCasesErrorMessages.CasesLinkedError,
21473
- fieldId: 'caseNumber',
21474
- });
21475
- }
21476
- if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
21477
- this.errorMessages.push({
21478
- title: 'dummy-case-number',
21479
- description: exports.LinkedCasesErrorMessages.ProposedCaseWithIn,
21480
- fieldId: 'caseNumber',
21481
- });
21482
- }
21483
- window.scrollTo(0, 0);
21484
- this.emitLinkedCasesState(false);
21485
- };
21486
- LinkCasesComponent.prototype.getCaseInfo = function () {
21487
- var _this = this;
21488
- var caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
21489
- this.casesService
21490
- .getCaseViewV2(caseNumberData)
21491
- .subscribe(function (caseView) {
21492
- _this.linkedCasesService.caseDetails = caseView;
21493
- var caseLink = {
21494
- caseReference: caseView.case_id,
21495
- reasons: _this.getSelectedCaseReasons(),
21496
- createdDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21497
- caseType: caseView.case_type.name || '',
21498
- caseTypeDescription: caseView.case_type.description || '',
21499
- caseState: caseView.state.name || '',
21500
- caseStateDescription: caseView.state.description || '',
21501
- caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
21502
- caseName: _this.linkedCasesService.getCaseName(caseView),
21503
- };
21504
- var ccdApiCaseLinkData = {
21505
- CaseReference: caseView.case_id,
21506
- CaseType: caseView.case_type.id,
21507
- CreatedDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21508
- ReasonForLink: _this.getSelectedCCDTypeCaseReason()
21509
- };
21510
- if (!_this.linkedCasesService.caseFieldValue) {
21511
- _this.linkedCasesService.caseFieldValue = [];
21512
- }
21513
- _this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
21514
- _this.selectedCases.push(caseLink);
21515
- _this.initForm();
21516
- _this.emitLinkedCasesState(false);
21517
- }, function (error) {
21518
- _this.caseNumberError = exports.LinkedCasesErrorMessages.CaseCheckAgainError;
21519
- _this.errorMessages.push({
21520
- title: 'dummy-case-number',
21521
- description: exports.LinkedCasesErrorMessages.CaseCheckAgainError,
21522
- fieldId: 'caseNumber',
21523
- });
21524
- _this.emitLinkedCasesState(false);
21525
- window.scrollTo(0, 0);
21526
- return rxjs.throwError(error);
21527
- });
21528
- };
21529
- // Return linked cases state and error messages to the parent
21530
- LinkCasesComponent.prototype.emitLinkedCasesState = function (isNavigateToNextPage) {
21531
- this.linkedCasesStateEmitter.emit({
21532
- currentLinkedCasesPage: exports.LinkedCasesPages.LINK_CASE,
21533
- errorMessages: this.errorMessages,
21534
- navigateToNextPage: isNavigateToNextPage,
21535
- });
21536
- };
21537
- LinkCasesComponent.prototype.getSelectedCaseReasons = function () {
21538
- var selectedReasons = [];
21539
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21540
- if (selectedReason.selected) {
21541
- selectedReasons.push({
21542
- reasonCode: selectedReason.key
21543
- });
21544
- }
21545
- });
21546
- return selectedReasons;
21547
- };
21548
- LinkCasesComponent.prototype.getSelectedCCDTypeCaseReason = function () {
21549
- var selectedReasons = [];
21550
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21551
- if (selectedReason.selected) {
21552
- selectedReasons.push({
21553
- value: {
21554
- Reason: selectedReason.key,
21555
- }
21556
- });
21557
- }
21558
- });
21559
- return selectedReasons;
21560
- };
21561
- LinkCasesComponent.prototype.onSelectedLinkedCaseRemove = function (pos, selectedCaseReference) {
21562
- var caseFieldValue = this.linkedCasesService.caseFieldValue || [];
21563
- var updatedItems = caseFieldValue.filter(function (item) { return item.value && item.value.CaseReference !== selectedCaseReference; });
21564
- if (updatedItems) {
21565
- this.linkedCasesService.caseFieldValue = updatedItems;
21566
- }
21567
- this.selectedCases.splice(pos, 1);
21568
- };
21569
- LinkCasesComponent.prototype.onNext = function () {
21570
- this.errorMessages = [];
21571
- this.caseReasonError = null;
21572
- this.caseNumberError = null;
21573
- this.caseSelectionError = null;
21574
- this.noSelectedCaseError = null;
21575
- var navigateToNextPage = true;
21576
- if (this.selectedCases.length) {
21577
- this.linkedCasesService.linkedCases = this.selectedCases;
21578
- }
21579
- else {
21580
- this.noSelectedCaseError = exports.LinkedCasesErrorMessages.CaseSelectionError;
21581
- this.errorMessages.push({
21582
- title: 'dummy-case-selection',
21583
- description: exports.LinkedCasesErrorMessages.CaseSelectionError,
21584
- fieldId: 'caseReason',
21585
- });
21586
- navigateToNextPage = false;
21587
- }
21588
- this.emitLinkedCasesState(navigateToNextPage);
21589
- };
21590
- return LinkCasesComponent;
21591
- }());
21592
- LinkCasesComponent.ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(ValidatorsUtils), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21593
- LinkCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 36, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "300", 1, "govuk-table__header"], ["scope", "col", "width", "150", 1, "govuk-table__header"], ["scope", "col", "width", "200", 1, "govuk-table__header"], ["scope", "col", "width", "400", 1, "govuk-table__header"], ["scope", "col", "width", "50", 1, "govuk-table__header"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-heading-s"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes", 3, "ngClass"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) {
21594
- if (rf & 1) {
21595
- i0__namespace.ɵɵelementStart(0, "div", 0);
21596
- i0__namespace.ɵɵelementStart(1, "div", 1);
21597
- i0__namespace.ɵɵelementStart(2, "div");
21598
- i0__namespace.ɵɵelementStart(3, "span", 2);
21599
- i0__namespace.ɵɵtext(4);
21600
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
21601
- i0__namespace.ɵɵelementEnd();
21602
- i0__namespace.ɵɵelementStart(6, "h1", 3);
21603
- i0__namespace.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
21604
- i0__namespace.ɵɵelementEnd();
21605
- i0__namespace.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
21606
- i0__namespace.ɵɵelement(9, "hr");
21607
- i0__namespace.ɵɵelement(10, "br");
21608
- i0__namespace.ɵɵelement(11, "br");
21609
- i0__namespace.ɵɵelementStart(12, "div", 5);
21610
- i0__namespace.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
21611
- i0__namespace.ɵɵelementStart(14, "table", 7);
21612
- i0__namespace.ɵɵelementStart(15, "caption", 8);
21613
- i0__namespace.ɵɵtext(16, "Proposed case links ");
21614
- i0__namespace.ɵɵelementEnd();
21615
- i0__namespace.ɵɵelementStart(17, "thead", 9);
21616
- i0__namespace.ɵɵelementStart(18, "tr", 10);
21617
- i0__namespace.ɵɵelementStart(19, "th", 11);
21618
- i0__namespace.ɵɵtext(20, "Case name and number");
21619
- i0__namespace.ɵɵelementEnd();
21620
- i0__namespace.ɵɵelementStart(21, "th", 12);
21621
- i0__namespace.ɵɵtext(22, "Case type ");
21622
- i0__namespace.ɵɵelementEnd();
21623
- i0__namespace.ɵɵelementStart(23, "th", 13);
21624
- i0__namespace.ɵɵtext(24, "Service");
21625
- i0__namespace.ɵɵelementEnd();
21626
- i0__namespace.ɵɵelementStart(25, "th", 13);
21627
- i0__namespace.ɵɵtext(26, "State");
21628
- i0__namespace.ɵɵelementEnd();
21629
- i0__namespace.ɵɵelementStart(27, "th", 14);
21630
- i0__namespace.ɵɵtext(28, "Reasons for case link");
21631
- i0__namespace.ɵɵelementEnd();
21632
- i0__namespace.ɵɵelement(29, "th", 15);
21633
- i0__namespace.ɵɵelementEnd();
21634
- i0__namespace.ɵɵelementEnd();
21635
- i0__namespace.ɵɵelementStart(30, "tbody", 16);
21636
- i0__namespace.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
21637
- i0__namespace.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
21638
- i0__namespace.ɵɵelementEnd();
21639
- i0__namespace.ɵɵelementEnd();
21640
- i0__namespace.ɵɵelementEnd();
21641
- i0__namespace.ɵɵelementStart(33, "div", 19);
21642
- i0__namespace.ɵɵelementStart(34, "button", 20);
21643
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
21644
- i0__namespace.ɵɵtext(35, "Next");
21645
- i0__namespace.ɵɵelementEnd();
21646
- i0__namespace.ɵɵelementEnd();
21647
- i0__namespace.ɵɵelementEnd();
21648
- i0__namespace.ɵɵelementEnd();
21649
- i0__namespace.ɵɵelementEnd();
21650
- }
21651
- if (rf & 2) {
21652
- i0__namespace.ɵɵadvance(4);
21653
- i0__namespace.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0__namespace.ɵɵpipeBind1(5, 7, ctx.caseId), "");
21654
- i0__namespace.ɵɵadvance(4);
21655
- i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
21656
- i0__namespace.ɵɵadvance(4);
21657
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
21658
- i0__namespace.ɵɵadvance(1);
21659
- i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
21660
- i0__namespace.ɵɵadvance(18);
21661
- i0__namespace.ɵɵproperty("ngForOf", ctx.selectedCases);
21662
- i0__namespace.ɵɵadvance(1);
21663
- i0__namespace.ɵɵproperty("ngIf", !ctx.selectedCases.length);
21664
- }
21665
- }, styles: [".no-visited-state[_ngcontent-%COMP%]{color:#1d70b8;cursor:pointer}.no-visited-state[_ngcontent-%COMP%]:hover{color:#003078}.govuk-checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes[_ngcontent-%COMP%] .govuk-checkboxes__item[_ngcontent-%COMP%]{display:flex} .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row[_ngcontent-%COMP%]{position:relative}.govuk-table__row[_ngcontent-%COMP%] .table-group-error[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 20px);margin-left:-15px}"] });
21666
- (function () {
21667
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesComponent, [{
21668
- type: i0.Component,
21669
- args: [{
21670
- selector: 'ccd-link-cases',
21671
- styleUrls: ['./link-cases.component.scss'],
21672
- templateUrl: './link-cases.component.html',
21673
- }]
21674
- }], function () { return [{ type: CasesService }, { type: i2__namespace.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21675
- type: i0.Output
21676
- }] });
21677
- })();
21678
-
21679
- function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) {
21680
- if (rf & 1) {
21681
- var _r3_1 = i0__namespace.ɵɵgetCurrentView();
21682
- i0__namespace.ɵɵelementStart(0, "a", 2);
21683
- i0__namespace.ɵɵlistener("click", function LinkedCasesFromTableComponent_a_0_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r3_1); var ctx_r2 = i0__namespace.ɵɵnextContext(); return ctx_r2.onClick(); });
21684
- i0__namespace.ɵɵtext(1);
21685
- i0__namespace.ɵɵelementEnd();
21686
- }
21687
- if (rf & 2) {
21688
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21689
- i0__namespace.ɵɵadvance(1);
21690
- i0__namespace.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
21691
- }
21692
- }
21693
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) {
21694
- if (rf & 1) {
21695
- i0__namespace.ɵɵelementStart(0, "span");
21696
- i0__namespace.ɵɵtext(1);
21697
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21698
- i0__namespace.ɵɵelement(3, "br");
21699
- i0__namespace.ɵɵelementEnd();
21700
- }
21701
- if (rf & 2) {
21702
- var reason_r11 = ctx.$implicit;
21703
- i0__namespace.ɵɵadvance(1);
21704
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
21705
- }
21706
- }
21707
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) {
21708
- if (rf & 1) {
21709
- i0__namespace.ɵɵelementStart(0, "td", 14);
21710
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
21711
- i0__namespace.ɵɵelementEnd();
21712
- }
21713
- if (rf & 2) {
21714
- var details_r9 = ctx.$implicit;
21715
- i0__namespace.ɵɵadvance(1);
21716
- i0__namespace.ɵɵproperty("ngForOf", details_r9.reasons);
21717
- }
21718
- }
21719
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) {
21720
- if (rf & 1) {
21721
- i0__namespace.ɵɵelementStart(0, "tr", 5);
21722
- i0__namespace.ɵɵelementStart(1, "td", 11);
21723
- i0__namespace.ɵɵelementStart(2, "p", 12);
21724
- i0__namespace.ɵɵelementStart(3, "a", 13);
21725
- i0__namespace.ɵɵelementStart(4, "span");
21726
- i0__namespace.ɵɵtext(5);
21727
- i0__namespace.ɵɵelement(6, "br");
21728
- i0__namespace.ɵɵtext(7);
21729
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
21730
- i0__namespace.ɵɵelementEnd();
21731
- i0__namespace.ɵɵelementEnd();
21732
- i0__namespace.ɵɵelementEnd();
21733
- i0__namespace.ɵɵelementEnd();
21734
- i0__namespace.ɵɵelementStart(9, "td", 14);
21735
- i0__namespace.ɵɵelementStart(10, "span", 15);
21736
- i0__namespace.ɵɵtext(11);
21737
- i0__namespace.ɵɵelementEnd();
21738
- i0__namespace.ɵɵelementEnd();
21739
- i0__namespace.ɵɵelementStart(12, "td", 14);
21740
- i0__namespace.ɵɵelementStart(13, "span");
21741
- i0__namespace.ɵɵtext(14);
21742
- i0__namespace.ɵɵelementEnd();
21743
- i0__namespace.ɵɵelementEnd();
21744
- i0__namespace.ɵɵelementStart(15, "td", 14);
21745
- i0__namespace.ɵɵelementStart(16, "span", 15);
21746
- i0__namespace.ɵɵtext(17);
21747
- i0__namespace.ɵɵelementEnd();
21748
- i0__namespace.ɵɵelementEnd();
21749
- i0__namespace.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
21750
- i0__namespace.ɵɵelementEnd();
21751
- }
21752
- if (rf & 2) {
21753
- var case_r7 = ctx.$implicit;
21754
- i0__namespace.ɵɵadvance(3);
21755
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
21756
- i0__namespace.ɵɵadvance(2);
21757
- i0__namespace.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
21758
- i0__namespace.ɵɵadvance(2);
21759
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
21760
- i0__namespace.ɵɵadvance(3);
21761
- i0__namespace.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
21762
- i0__namespace.ɵɵadvance(1);
21763
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdCaseType);
21764
- i0__namespace.ɵɵadvance(3);
21765
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
21766
- i0__namespace.ɵɵadvance(2);
21767
- i0__namespace.ɵɵproperty("title", case_r7.stateDescription);
21768
- i0__namespace.ɵɵadvance(1);
21769
- i0__namespace.ɵɵtextInterpolate(case_r7.state);
21770
- i0__namespace.ɵɵadvance(1);
21771
- i0__namespace.ɵɵproperty("ngForOf", case_r7.linkDetails);
21772
- }
21773
- }
21774
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) {
21775
- if (rf & 1) {
21776
- i0__namespace.ɵɵelementStart(0, "tr", 5);
21777
- i0__namespace.ɵɵelementStart(1, "td", 18);
21778
- i0__namespace.ɵɵtext(2, " None ");
21779
- i0__namespace.ɵɵelementEnd();
21780
- i0__namespace.ɵɵelementEnd();
21781
- }
21782
- }
21783
- function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) {
21784
- if (rf & 1) {
21785
- i0__namespace.ɵɵelementStart(0, "tbody", 8);
21786
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
21787
- i0__namespace.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
21788
- i0__namespace.ɵɵelementEnd();
21789
- }
21790
- if (rf & 2) {
21791
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
21792
- i0__namespace.ɵɵadvance(1);
21793
- i0__namespace.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
21794
- i0__namespace.ɵɵadvance(1);
21795
- i0__namespace.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
21796
- }
21797
- }
21798
- function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) {
21799
- if (rf & 1) {
21800
- i0__namespace.ɵɵelementStart(0, "table", 3);
21801
- i0__namespace.ɵɵelementStart(1, "thead", 4);
21802
- i0__namespace.ɵɵelementStart(2, "tr", 5);
21803
- i0__namespace.ɵɵelementStart(3, "th", 6);
21804
- i0__namespace.ɵɵtext(4, "Case name and number");
21805
- i0__namespace.ɵɵelementEnd();
21806
- i0__namespace.ɵɵelementStart(5, "th", 6);
21807
- i0__namespace.ɵɵtext(6, "Case type ");
21808
- i0__namespace.ɵɵelementEnd();
21809
- i0__namespace.ɵɵelementStart(7, "th", 6);
21810
- i0__namespace.ɵɵtext(8, "Service");
21811
- i0__namespace.ɵɵelementEnd();
21812
- i0__namespace.ɵɵelementStart(9, "th", 6);
21813
- i0__namespace.ɵɵtext(10, "State");
21814
- i0__namespace.ɵɵelementEnd();
21815
- i0__namespace.ɵɵelementStart(11, "th", 6);
21816
- i0__namespace.ɵɵtext(12, "Reasons for case link");
21817
- i0__namespace.ɵɵelementEnd();
21818
- i0__namespace.ɵɵelementEnd();
21819
- i0__namespace.ɵɵelementEnd();
21820
- i0__namespace.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
21821
- i0__namespace.ɵɵelementEnd();
21822
- }
21823
- if (rf & 2) {
21824
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21825
- i0__namespace.ɵɵadvance(13);
21826
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
21827
- }
21828
- }
21829
- exports.PageType = void 0;
21830
- (function (PageType) {
21831
- PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
21832
- PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
21833
- })(exports.PageType || (exports.PageType = {}));
21834
- var LinkedCasesFromTableComponent = /** @class */ (function () {
21835
- function LinkedCasesFromTableComponent(route, casesService, linkedCasesService) {
21836
- this.route = route;
21837
- this.casesService = casesService;
21838
- this.linkedCasesService = linkedCasesService;
21839
- this.notifyAPIFailure = new i0.EventEmitter(false);
21840
- this.pageType = exports.PageType;
21841
- this.getLinkedCasesResponse = [];
21842
- this.showHideLinkText = 'Show';
21843
- this.noLinkedCases = true;
21844
- this.isServerError = false;
21845
- }
21846
- LinkedCasesFromTableComponent.prototype.ngAfterViewInit = function () {
21847
- var labelField = document.getElementsByClassName('case-viewer-label');
21848
- if (labelField && labelField.length) {
21849
- labelField[0].replaceWith('');
21850
- }
21851
- };
21852
- LinkedCasesFromTableComponent.prototype.ngOnInit = function () {
21853
- this.fetchPageData();
21854
- if (this.route.snapshot.data.case) {
21855
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
21856
- }
21857
- };
21858
- LinkedCasesFromTableComponent.prototype.fetchPageData = function () {
21859
- var _this = this;
21860
- this.caseId = this.route.snapshot.data.case.case_id;
21861
- this.getLinkedCases().subscribe(function (response) {
21862
- _this.isServerError = false;
21863
- _this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(function (item) {
21864
- var mappedCasetype = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
21865
- var mappedCasetypeDescription = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
21866
- var mappedCaseState = _this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
21867
- var mappedCaseStateDescription = _this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
21868
- var mappedCaseService = _this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
21869
- return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
21870
- });
21871
- _this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
21872
- }, function (err) {
21873
- _this.isServerError = true;
21874
- _this.notifyAPIFailure.emit(true);
21875
- });
21876
- };
21877
- LinkedCasesFromTableComponent.prototype.getLinkedCases = function () {
21878
- return this.casesService.getLinkedCases(this.caseId);
21879
- };
21880
- LinkedCasesFromTableComponent.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
21881
- return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
21882
- };
21883
- LinkedCasesFromTableComponent.prototype.onClick = function () {
21884
- this.showHideLinkText = this.showHideLinkText === 'Show'
21885
- ? 'Hide'
21886
- : 'Show';
21887
- };
21888
- return LinkedCasesFromTableComponent;
21889
- }());
21890
- LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
21891
- LinkedCasesFromTableComponent.ɵfac = function LinkedCasesFromTableComponent_Factory(t) { return new (t || LinkedCasesFromTableComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21892
- LinkedCasesFromTableComponent.ɵcmp = i0__namespace.ɵɵ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) {
21893
- if (rf & 1) {
21894
- i0__namespace.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
21895
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
21896
- }
21897
- if (rf & 2) {
21898
- i0__namespace.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
21899
- i0__namespace.ɵɵadvance(1);
21900
- i0__namespace.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
21901
- }
21902
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
21903
- (function () {
21904
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
21905
- type: i0.Component,
21906
- args: [{
21907
- selector: 'ccd-linked-cases-from-table',
21908
- templateUrl: './linked-cases-from-table.component.html',
21909
- styleUrls: ['./linked-cases-from-table.component.scss']
21910
- }]
21911
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
21912
- type: i0.Input
21913
- }], notifyAPIFailure: [{
21914
- type: i0.Output
21915
- }] });
21916
- })();
21917
-
21918
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) {
21919
- if (rf & 1) {
21920
- i0__namespace.ɵɵelementStart(0, "a", 16);
21921
- i0__namespace.ɵɵtext(1);
21922
- i0__namespace.ɵɵelementEnd();
21923
- }
21924
- if (rf & 2) {
21925
- var case_r3 = i0__namespace.ɵɵnextContext(3).$implicit;
21926
- var ctx_r9 = i0__namespace.ɵɵnextContext(2);
21927
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
21928
- i0__namespace.ɵɵadvance(1);
21929
- i0__namespace.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
21930
- }
21931
- }
21932
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) {
21933
- if (rf & 1) {
21934
- i0__namespace.ɵɵelement(0, "br");
21935
- }
21936
- }
21937
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) {
21938
- if (rf & 1) {
21939
- i0__namespace.ɵɵelementStart(0, "span");
21940
- i0__namespace.ɵɵtext(1);
21941
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21942
- i0__namespace.ɵɵelementStart(3, "span");
21943
- i0__namespace.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
21944
- i0__namespace.ɵɵelementEnd();
21945
- i0__namespace.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
21946
- i0__namespace.ɵɵelementEnd();
21947
- }
21948
- if (rf & 2) {
21949
- var reason_r6 = ctx.$implicit;
21950
- var isLast_r8 = ctx.last;
21951
- var ctx_r5 = i0__namespace.ɵɵnextContext(4);
21952
- i0__namespace.ɵɵadvance(1);
21953
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 3, reason_r6), "");
21954
- i0__namespace.ɵɵadvance(3);
21955
- i0__namespace.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
21956
- i0__namespace.ɵɵadvance(1);
21957
- i0__namespace.ɵɵproperty("ngIf", !isLast_r8);
21958
- }
21959
- }
21960
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) {
21961
- if (rf & 1) {
21962
- i0__namespace.ɵɵelementStart(0, "td");
21963
- i0__namespace.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
21964
- i0__namespace.ɵɵelementEnd();
21965
- }
21966
- if (rf & 2) {
21967
- var case_r3 = i0__namespace.ɵɵnextContext().$implicit;
21968
- i0__namespace.ɵɵadvance(1);
21969
- i0__namespace.ɵɵproperty("ngForOf", case_r3.reasons);
21970
- }
21971
- }
21972
- function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) {
21973
- if (rf & 1) {
21974
- i0__namespace.ɵɵelementStart(0, "tr", 4);
21975
- i0__namespace.ɵɵelementStart(1, "td");
21976
- i0__namespace.ɵɵelementStart(2, "p", 9);
21977
- i0__namespace.ɵɵelementStart(3, "a", 10);
21978
- i0__namespace.ɵɵelementStart(4, "span", 11);
21979
- i0__namespace.ɵɵtext(5);
21980
- i0__namespace.ɵɵelement(6, "br");
21981
- i0__namespace.ɵɵtext(7);
21982
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
21983
- i0__namespace.ɵɵelementEnd();
21984
- i0__namespace.ɵɵelementEnd();
21985
- i0__namespace.ɵɵelementEnd();
21986
- i0__namespace.ɵɵelementEnd();
21987
- i0__namespace.ɵɵelementStart(9, "td");
21988
- i0__namespace.ɵɵelementStart(10, "span", 12);
21989
- i0__namespace.ɵɵtext(11);
21990
- i0__namespace.ɵɵelementEnd();
21991
- i0__namespace.ɵɵelementEnd();
21992
- i0__namespace.ɵɵelementStart(12, "td");
21993
- i0__namespace.ɵɵelementStart(13, "span");
21994
- i0__namespace.ɵɵtext(14);
21995
- i0__namespace.ɵɵelementEnd();
21996
- i0__namespace.ɵɵelementEnd();
21997
- i0__namespace.ɵɵelementStart(15, "td");
21998
- i0__namespace.ɵɵelementStart(16, "span", 12);
21999
- i0__namespace.ɵɵtext(17);
22000
- i0__namespace.ɵɵelementEnd();
22001
- i0__namespace.ɵɵelementEnd();
22002
- i0__namespace.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
22003
- i0__namespace.ɵɵelementEnd();
22004
- }
22005
- if (rf & 2) {
22006
- var case_r3 = ctx.$implicit;
22007
- i0__namespace.ɵɵadvance(3);
22008
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
22009
- i0__namespace.ɵɵadvance(2);
22010
- i0__namespace.ɵɵtextInterpolate1("", case_r3.caseName, " ");
22011
- i0__namespace.ɵɵadvance(2);
22012
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
22013
- i0__namespace.ɵɵadvance(3);
22014
- i0__namespace.ɵɵproperty("title", case_r3.caseTypeDescription);
22015
- i0__namespace.ɵɵadvance(1);
22016
- i0__namespace.ɵɵtextInterpolate(case_r3.caseType);
22017
- i0__namespace.ɵɵadvance(3);
22018
- i0__namespace.ɵɵtextInterpolate(case_r3.service);
22019
- i0__namespace.ɵɵadvance(2);
22020
- i0__namespace.ɵɵproperty("title", case_r3.stateDescription);
22021
- i0__namespace.ɵɵadvance(1);
22022
- i0__namespace.ɵɵtextInterpolate(case_r3.state);
22023
- i0__namespace.ɵɵadvance(1);
22024
- i0__namespace.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
22025
- }
22026
- }
22027
- function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) {
22028
- if (rf & 1) {
22029
- i0__namespace.ɵɵelementStart(0, "tr", 4);
22030
- i0__namespace.ɵɵelementStart(1, "td", 17);
22031
- i0__namespace.ɵɵtext(2, " None ");
22032
- i0__namespace.ɵɵelementEnd();
22033
- i0__namespace.ɵɵelementEnd();
22034
- }
22035
- }
22036
- function LinkedCasesToTableComponent_table_2_Template(rf, ctx) {
22037
- if (rf & 1) {
22038
- i0__namespace.ɵɵelementStart(0, "table", 3);
22039
- i0__namespace.ɵɵelementStart(1, "thead");
22040
- i0__namespace.ɵɵelementStart(2, "tr", 4);
22041
- i0__namespace.ɵɵelementStart(3, "th", 5);
22042
- i0__namespace.ɵɵtext(4, "Case name and number");
22043
- i0__namespace.ɵɵelementEnd();
22044
- i0__namespace.ɵɵelementStart(5, "th", 5);
22045
- i0__namespace.ɵɵtext(6, "Case type ");
22046
- i0__namespace.ɵɵelementEnd();
22047
- i0__namespace.ɵɵelementStart(7, "th", 5);
22048
- i0__namespace.ɵɵtext(8, "Service");
22049
- i0__namespace.ɵɵelementEnd();
22050
- i0__namespace.ɵɵelementStart(9, "th", 5);
22051
- i0__namespace.ɵɵtext(10, "State");
22052
- i0__namespace.ɵɵelementEnd();
22053
- i0__namespace.ɵɵelementStart(11, "th", 5);
22054
- i0__namespace.ɵɵtext(12, "Reasons for case link");
22055
- i0__namespace.ɵɵelementEnd();
22056
- i0__namespace.ɵɵelementEnd();
22057
- i0__namespace.ɵɵelementEnd();
22058
- i0__namespace.ɵɵelementStart(13, "tbody", 6);
22059
- i0__namespace.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
22060
- i0__namespace.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
22061
- i0__namespace.ɵɵelementEnd();
22062
- i0__namespace.ɵɵelementEnd();
22063
- }
22064
- if (rf & 2) {
22065
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22066
- i0__namespace.ɵɵadvance(14);
22067
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
22068
- i0__namespace.ɵɵadvance(1);
22069
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
22070
- }
22071
- }
22072
- var LinkedCasesToTableComponent = /** @class */ (function () {
22073
- function LinkedCasesToTableComponent(route, linkedCasesService, casesService) {
22074
- this.route = route;
22075
- this.linkedCasesService = linkedCasesService;
22076
- this.casesService = casesService;
22077
- this.notifyAPIFailure = new i0.EventEmitter(false);
22078
- this.linkedCasesFromResponse = [];
22079
- this.isServerError = false;
22080
- this.jurisdictionsResponse = [];
22081
- }
22082
- LinkedCasesToTableComponent.prototype.ngAfterViewInit = function () {
22083
- var labelField = document.getElementsByClassName('govuk-heading-l');
22084
- if (labelField && labelField.length) {
22085
- labelField[0].replaceWith('');
22086
- }
22087
- labelField = document.getElementsByClassName('heading-h2');
22088
- if (labelField && labelField.length) {
22089
- labelField[0].replaceWith('');
22090
- }
22091
- };
22092
- LinkedCasesToTableComponent.prototype.ngOnInit = function () {
22093
- this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
22094
- this.getAllLinkedCaseInformation();
22095
- if (this.route.snapshot.data.case) {
22096
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
22097
- }
22098
- };
22099
- LinkedCasesToTableComponent.prototype.getCaseRefereneLink = function (caseRef) {
22100
- return caseRef.slice(this.caseId.length - 4);
22101
- };
22102
- LinkedCasesToTableComponent.prototype.sortLinkedCasesByReasonCode = function (searchCasesResponse) {
22103
- var topLevelresultArray = [];
22104
- var secondLevelresultArray = [];
22105
- searchCasesResponse.forEach(function (item) {
22106
- var reasons = item && item.reasons || [];
22107
- var consolidatedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE; });
22108
- var progressedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE; });
22109
- var arrayItem;
22110
- if (progressedStateReason) {
22111
- arrayItem = Object.assign({}, item);
22112
- topLevelresultArray.push(arrayItem);
22113
- }
22114
- else if (consolidatedStateReason) {
22115
- arrayItem = Object.assign({}, item);
22116
- secondLevelresultArray = __spread([Object.assign({}, item)], secondLevelresultArray);
22117
- }
22118
- else {
22119
- arrayItem = Object.assign({}, item);
22120
- secondLevelresultArray.push(Object.assign({}, item));
22121
- }
22122
- });
22123
- return topLevelresultArray.concat(secondLevelresultArray);
22124
- };
22125
- LinkedCasesToTableComponent.prototype.getAllLinkedCaseInformation = function () {
22126
- var _this = this;
22127
- var searchCasesResponse = [];
22128
- var caseFieldValue = this.caseField ? this.caseField.value : [];
22129
- // Generate the list of observables
22130
- caseFieldValue.forEach(function (fieldValue) {
22131
- if (fieldValue && fieldValue.id) {
22132
- searchCasesResponse.push(_this.casesService.getCaseViewV2(fieldValue.id));
22133
- }
22134
- });
22135
- if (searchCasesResponse.length) {
22136
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22137
- var casesResponse = [];
22138
- searchCases.forEach(function (response) {
22139
- casesResponse.push(_this.mapResponse(response));
22140
- });
22141
- _this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
22142
- _this.isLoaded = true;
22143
- var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
22144
- return {
22145
- caseReference: item.caseReference,
22146
- caseName: item.caseName,
22147
- caseService: item.service,
22148
- caseType: item.caseType,
22149
- unlink: false,
22150
- reasons: item.reasons && item.reasons.map(function (reason) {
22151
- return {
22152
- reasonCode: reason
22153
- };
22154
- }),
22155
- };
22156
- });
22157
- _this.linkedCasesService.initialCaseLinks = caseLinks;
22158
- _this.linkedCasesService.linkedCases = caseLinks;
22159
- _this.isServerError = false;
22160
- }, function (err) {
22161
- _this.isServerError = true;
22162
- _this.notifyAPIFailure.emit(true);
22163
- });
22164
- }
22165
- };
22166
- LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22167
- return rxjs.forkJoin(searchCasesResponse);
22168
- };
22169
- LinkedCasesToTableComponent.prototype.hasLeadCaseOrConsolidated = function (reasonCode) {
22170
- return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
22171
- reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
22172
- };
22173
- LinkedCasesToTableComponent.prototype.mapResponse = function (esSearchCasesResponse) {
22174
- var caseInfo = this.caseField.value.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
22175
- return caseInfo && {
22176
- caseReference: esSearchCasesResponse.case_id,
22177
- caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
22178
- caseType: esSearchCasesResponse.case_type.name || '',
22179
- caseTypeDescription: esSearchCasesResponse.case_type.description || '',
22180
- service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
22181
- state: esSearchCasesResponse.state.name || '',
22182
- stateDescription: esSearchCasesResponse.state.description || '',
22183
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
22184
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
22185
- };
22186
- };
22187
- return LinkedCasesToTableComponent;
22188
- }());
22189
- LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
22190
- LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
22191
- LinkedCasesToTableComponent.ɵfac = function LinkedCasesToTableComponent_Factory(t) { return new (t || LinkedCasesToTableComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CasesService)); };
22192
- LinkedCasesToTableComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: LinkedCasesToTableComponent, selectors: [["ccd-linked-cases-to-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 3, vars: 1, consts: [[1, "govuk-grid-row", "govuk-!-margin-bottom-2"], [1, "govuk-grid-column-full"], ["aria-describedby", "table to display cases linked TO", 4, "ngIf"], ["aria-describedby", "table to display cases linked TO"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 3, "href"], [1, "govuk-link"], [3, "title"], [4, "ngIf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesToTableComponent_Template(rf, ctx) {
22193
- if (rf & 1) {
22194
- i0__namespace.ɵɵelementStart(0, "div", 0);
22195
- i0__namespace.ɵɵelementStart(1, "div", 1);
22196
- i0__namespace.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
22197
- i0__namespace.ɵɵelementEnd();
22198
- i0__namespace.ɵɵelementEnd();
22199
- }
22200
- if (rf & 2) {
22201
- i0__namespace.ɵɵadvance(2);
22202
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
22203
- }
22204
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
22205
- (function () {
22206
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
22207
- type: i0.Component,
22208
- args: [{
22209
- selector: 'ccd-linked-cases-to-table',
22210
- templateUrl: './linked-cases-to-table.component.html',
22211
- styleUrls: ['./linked-cases-to-table.component.scss']
22212
- }]
22213
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
22214
- type: i0.Input
22215
- }], notifyAPIFailure: [{
22216
- type: i0.Output
22217
- }] });
22218
- })();
22219
-
22220
- function NoLinkedCasesComponent_h1_2_Template(rf, ctx) {
22221
- if (rf & 1) {
22222
- i0__namespace.ɵɵelementStart(0, "h1", 9);
22223
- i0__namespace.ɵɵtext(1, "There is a problem");
22224
- i0__namespace.ɵɵelementEnd();
22225
- }
22226
- }
22227
- function NoLinkedCasesComponent_p_3_Template(rf, ctx) {
22228
- if (rf & 1) {
22229
- i0__namespace.ɵɵelementStart(0, "p", 10);
22230
- i0__namespace.ɵɵelementStart(1, "span", 11);
22231
- i0__namespace.ɵɵtext(2, "Error:");
22232
- i0__namespace.ɵɵelementEnd();
22233
- i0__namespace.ɵɵtext(3);
22234
- i0__namespace.ɵɵelementEnd();
22235
- }
22236
- if (rf & 2) {
22237
- var ctx_r1 = i0__namespace.ɵɵnextContext();
22238
- i0__namespace.ɵɵadvance(3);
22239
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
22240
- }
22241
- }
22242
- function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) {
22243
- if (rf & 1) {
22244
- i0__namespace.ɵɵelementStart(0, "p", 5);
22245
- i0__namespace.ɵɵtext(1, "There are no cases linked to this one.");
22246
- i0__namespace.ɵɵelementEnd();
22247
- }
22248
- }
22249
- var NoLinkedCasesComponent = /** @class */ (function () {
22250
- function NoLinkedCasesComponent(router, linkedCasesService) {
22251
- this.router = router;
22252
- this.linkedCasesService = linkedCasesService;
22253
- }
22254
- NoLinkedCasesComponent.prototype.onBack = function () {
22255
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
22256
- window.location.hash = 'Linked cases';
22257
- });
22258
- };
22259
- return NoLinkedCasesComponent;
22260
- }());
22261
- NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
22262
- NoLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: NoLinkedCasesComponent, selectors: [["ccd-no-linked-cases"]], decls: 12, vars: 3, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], ["class", "govuk-heading-xl", 4, "ngIf"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf", "ngIfElse"], ["noLinkedCases", ""], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-button-group"], ["type", "button", "id", "back-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function NoLinkedCasesComponent_Template(rf, ctx) {
22263
- if (rf & 1) {
22264
- i0__namespace.ɵɵelementStart(0, "div", 0);
22265
- i0__namespace.ɵɵelementStart(1, "div", 1);
22266
- i0__namespace.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
22267
- i0__namespace.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
22268
- i0__namespace.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0__namespace.ɵɵtemplateRefExtractor);
22269
- i0__namespace.ɵɵelementStart(6, "p", 5);
22270
- i0__namespace.ɵɵelementStart(7, "a", 6);
22271
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
22272
- i0__namespace.ɵɵtext(8, "Go back to the Linked cases tab");
22273
- i0__namespace.ɵɵelementEnd();
22274
- i0__namespace.ɵɵelementEnd();
22275
- i0__namespace.ɵɵelementStart(9, "div", 7);
22276
- i0__namespace.ɵɵelementStart(10, "button", 8);
22277
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
22278
- i0__namespace.ɵɵtext(11, "Back");
22279
- i0__namespace.ɵɵelementEnd();
22280
- i0__namespace.ɵɵelementEnd();
22281
- i0__namespace.ɵɵelementEnd();
22282
- i0__namespace.ɵɵelementEnd();
22283
- }
22284
- if (rf & 2) {
22285
- var _r2 = i0__namespace.ɵɵreference(5);
22286
- i0__namespace.ɵɵadvance(2);
22287
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
22288
- i0__namespace.ɵɵadvance(1);
22289
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
22290
- }
22291
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
22292
- (function () {
22293
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NoLinkedCasesComponent, [{
22294
- type: i0.Component,
22295
- args: [{
22296
- selector: 'ccd-no-linked-cases',
22297
- templateUrl: './no-linked-cases.component.html'
22298
- }]
22299
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, null);
22300
- })();
22301
-
22302
- function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) {
22303
- if (rf & 1) {
22304
- i0__namespace.ɵɵelementStart(0, "p", 11);
22305
- i0__namespace.ɵɵelementStart(1, "span", 12);
22306
- i0__namespace.ɵɵtext(2, "Error:");
22307
- i0__namespace.ɵɵelementEnd();
22308
- i0__namespace.ɵɵtext(3);
22309
- i0__namespace.ɵɵelementEnd();
22310
- }
22311
- if (rf & 2) {
22312
- var ctx_r2 = i0__namespace.ɵɵnextContext(3);
22313
- i0__namespace.ɵɵadvance(3);
22314
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
22315
- }
22316
- }
22317
- function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) {
22318
- if (rf & 1) {
22319
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
22320
- i0__namespace.ɵɵelementStart(0, "div", 13);
22321
- i0__namespace.ɵɵelementStart(1, "input", 14);
22322
- i0__namespace.ɵɵlistener("change", function UnLinkCasesComponent_div_0_div_4_div_3_Template_input_change_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(3); return ctx_r5.onChange($event.target); });
22323
- i0__namespace.ɵɵelementEnd();
22324
- i0__namespace.ɵɵelementStart(2, "label", 15);
22325
- i0__namespace.ɵɵtext(3);
22326
- i0__namespace.ɵɵpipe(4, "ccdCaseReference");
22327
- i0__namespace.ɵɵelementEnd();
22328
- i0__namespace.ɵɵelementEnd();
22329
- }
22330
- if (rf & 2) {
22331
- var case_r4 = ctx.$implicit;
22332
- i0__namespace.ɵɵadvance(1);
22333
- i0__namespace.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
22334
- i0__namespace.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
22335
- i0__namespace.ɵɵadvance(1);
22336
- i0__namespace.ɵɵpropertyInterpolate("for", case_r4.caseReference);
22337
- i0__namespace.ɵɵadvance(1);
22338
- i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
22339
- }
22340
- }
22341
- var _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
22342
- function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
22343
- if (rf & 1) {
22344
- i0__namespace.ɵɵelementStart(0, "div", 7);
22345
- i0__namespace.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
22346
- i0__namespace.ɵɵelementStart(2, "div", 9);
22347
- i0__namespace.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
22348
- i0__namespace.ɵɵelementEnd();
22349
- i0__namespace.ɵɵelementEnd();
22350
- }
22351
- if (rf & 2) {
22352
- var ctx_r1 = i0__namespace.ɵɵnextContext(2);
22353
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
22354
- i0__namespace.ɵɵadvance(1);
22355
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
22356
- i0__namespace.ɵɵadvance(2);
22357
- i0__namespace.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
22358
- }
22359
- }
22360
- function UnLinkCasesComponent_div_0_Template(rf, ctx) {
22361
- if (rf & 1) {
22362
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
22363
- i0__namespace.ɵɵelementStart(0, "div", 1);
22364
- i0__namespace.ɵɵelementStart(1, "div", 2);
22365
- i0__namespace.ɵɵelementStart(2, "h1", 3);
22366
- i0__namespace.ɵɵtext(3, "Select the cases you want to unlink from this case");
22367
- i0__namespace.ɵɵelementEnd();
22368
- i0__namespace.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
22369
- i0__namespace.ɵɵelementStart(5, "div", 5);
22370
- i0__namespace.ɵɵelementStart(6, "button", 6);
22371
- i0__namespace.ɵɵlistener("click", function UnLinkCasesComponent_div_0_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onNext(); });
22372
- i0__namespace.ɵɵtext(7, "Next");
22373
- i0__namespace.ɵɵelementEnd();
22374
- i0__namespace.ɵɵelementEnd();
22375
- i0__namespace.ɵɵelementEnd();
22376
- i0__namespace.ɵɵelementEnd();
22377
- }
22378
- if (rf & 2) {
22379
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22380
- i0__namespace.ɵɵadvance(4);
22381
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
22382
- }
22383
- }
22384
- var UnLinkCasesComponent = /** @class */ (function () {
22385
- function UnLinkCasesComponent(caseEdit, fb, casesService, linkedCasesService) {
22386
- this.caseEdit = caseEdit;
22387
- this.fb = fb;
22388
- this.casesService = casesService;
22389
- this.linkedCasesService = linkedCasesService;
22390
- this.linkedCasesStateEmitter = new i0.EventEmitter();
22391
- this.notifyAPIFailure = new i0.EventEmitter(false);
22392
- this.linkedCases = [];
22393
- this.errorMessages = [];
22394
- this.isServerError = false;
22395
- }
22396
- UnLinkCasesComponent.prototype.ngOnInit = function () {
22397
- this.getLinkedCases();
22398
- };
22399
- UnLinkCasesComponent.prototype.getLinkedCases = function () {
22400
- var _this = this;
22401
- this.caseId = this.linkedCasesService.caseId;
22402
- if (this.linkedCasesService.linkedCases.length > 0) {
22403
- this.linkedCases = this.linkedCasesService.linkedCases;
22404
- this.getAllLinkedCaseInformation();
22405
- }
22406
- else {
22407
- this.casesService.getCaseViewV2(this.caseId).subscribe(function (caseView) {
22408
- var linkedCasesTab = caseView.tabs.find(function (tab) { return tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID; });
22409
- if (linkedCasesTab) {
22410
- var linkedCases = linkedCasesTab.fields[0].value;
22411
- _this.linkedCases = linkedCases;
22412
- _this.linkedCasesService.linkedCases = linkedCases;
22413
- _this.getAllLinkedCaseInformation();
22414
- }
22415
- });
22416
- }
22417
- };
22418
- UnLinkCasesComponent.prototype.getAllLinkedCaseInformation = function () {
22419
- var _this = this;
22420
- var searchCasesResponse = [];
22421
- this.linkedCases.forEach(function (linkedCase) {
22422
- searchCasesResponse.push(_this.casesService.getCaseViewV2(linkedCase.caseReference));
22423
- });
22424
- if (searchCasesResponse.length) {
22425
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22426
- searchCases.forEach(function (response) {
22427
- var linkedCaseFromList = _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; });
22428
- if (linkedCaseFromList) {
22429
- var caseName = _this.linkedCasesService.getCaseName(response);
22430
- _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; }).caseName = caseName;
22431
- }
22432
- });
22433
- _this.initForm();
22434
- _this.linkedCasesService.linkedCases = _this.linkedCases;
22435
- _this.isServerError = false;
22436
- }, function (err) {
22437
- _this.isServerError = true;
22438
- _this.notifyAPIFailure.emit(true);
22439
- });
22440
- }
22441
- };
22442
- UnLinkCasesComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22443
- return rxjs.forkJoin(searchCasesResponse);
22444
- };
22445
- UnLinkCasesComponent.prototype.initForm = function () {
22446
- this.unlinkCaseForm = this.fb.group({
22447
- linkedCases: this.getLinkedCasesFormArray
22448
- });
22449
- };
22450
- Object.defineProperty(UnLinkCasesComponent.prototype, "getLinkedCasesFormArray", {
22451
- get: function () {
22452
- var _this = this;
22453
- var formFieldArray = this.linkedCases.map(function (val) { return _this.fb.group({
22454
- caseReference: val.caseReference,
22455
- reasons: val.reasons,
22456
- createdDateTime: val.createdDateTime,
22457
- caseType: val.caseType,
22458
- caseState: val.caseState,
22459
- caseService: val.caseService,
22460
- caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
22461
- unlink: val.unlink
22462
- }); });
22463
- return this.fb.array(formFieldArray);
22464
- },
22465
- enumerable: false,
22466
- configurable: true
22467
- });
22468
- UnLinkCasesComponent.prototype.onChange = function (caseSelected) {
22469
- this.resetErrorMessages();
22470
- var selectedCase = this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === caseSelected.value; });
22471
- if (selectedCase) {
22472
- selectedCase.unlink = caseSelected.checked ? true : false;
22473
- }
22474
- };
22475
- UnLinkCasesComponent.prototype.onNext = function () {
22476
- this.resetErrorMessages();
22477
- var navigateToNextPage = true;
22478
- var casesMarkedToUnlink = this.linkedCases.find(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
22479
- if (!casesMarkedToUnlink) {
22480
- this.errorMessages.push({
22481
- title: 'case-selection',
22482
- description: exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError,
22483
- fieldId: "case-reference-" + this.linkedCases[0].caseReference
22484
- });
22485
- this.unlinkErrorMessage = exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError;
22486
- navigateToNextPage = false;
22487
- }
22488
- var unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
22489
- var updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(function (item) { return unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1; });
22490
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(updatedLinkedCases || []) });
22491
- // Return linked cases state and error messages to the parent
22492
- this.linkedCasesStateEmitter.emit({
22493
- currentLinkedCasesPage: exports.LinkedCasesPages.UNLINK_CASE,
22494
- errorMessages: this.errorMessages,
22495
- navigateToNextPage: navigateToNextPage
22496
- });
22497
- };
22498
- UnLinkCasesComponent.prototype.resetErrorMessages = function () {
22499
- this.errorMessages = [];
22500
- this.unlinkErrorMessage = null;
22501
- };
22502
- return UnLinkCasesComponent;
22503
- }());
22504
- UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
22505
- UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
22506
- UnLinkCasesComponent.ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
22507
- UnLinkCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: UnLinkCasesComponent, selectors: [["ccd-unlink-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter", notifyAPIFailure: "notifyAPIFailure" }, decls: 1, vars: 1, consts: [["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["class", "govuk-form-group form-group", 3, "ngClass", "formGroup", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-form-group", "form-group", 3, "ngClass", "formGroup"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 4, "ngFor", "ngForOf"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item"], ["formArrayName", "linkedCases", "name", "linkedCases", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "value", "checked", "change"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"]], template: function UnLinkCasesComponent_Template(rf, ctx) {
22508
- if (rf & 1) {
22509
- i0__namespace.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
22510
- }
22511
- if (rf & 2) {
22512
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
22513
- }
22514
- }, directives: [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgForOf, i2__namespace.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
22515
- (function () {
22516
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(UnLinkCasesComponent, [{
22517
- type: i0.Component,
22518
- args: [{
22519
- selector: 'ccd-unlink-cases',
22520
- templateUrl: './unlink-cases.component.html'
22521
- }]
22522
- }], function () { return [{ type: CaseEditComponent }, { type: i2__namespace.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
22523
- type: i0.Output
22524
- }], notifyAPIFailure: [{
22525
- type: i0.Output
22526
- }] });
22527
- })();
22528
-
22529
- function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) {
22530
- if (rf & 1) {
22531
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
22532
- i0__namespace.ɵɵelementStart(0, "div", 7);
22533
- i0__namespace.ɵɵelementStart(1, "ul", 8);
22534
- i0__namespace.ɵɵelementStart(2, "li");
22535
- i0__namespace.ɵɵelementStart(3, "a", 9);
22536
- i0__namespace.ɵɵlistener("click", function WriteLinkedCasesComponent_div_0_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var errorMessage_r7 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
22537
- i0__namespace.ɵɵtext(4);
22538
- i0__namespace.ɵɵelementEnd();
22539
- i0__namespace.ɵɵelementEnd();
22540
- i0__namespace.ɵɵelementEnd();
22541
- i0__namespace.ɵɵelementEnd();
22542
- }
22543
- if (rf & 2) {
22544
- var errorMessage_r7 = ctx.$implicit;
22545
- i0__namespace.ɵɵadvance(4);
22546
- i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
22547
- }
22548
- }
22549
- function WriteLinkedCasesComponent_div_0_Template(rf, ctx) {
22550
- if (rf & 1) {
22551
- i0__namespace.ɵɵelementStart(0, "div", 4);
22552
- i0__namespace.ɵɵelementStart(1, "h2", 5);
22553
- i0__namespace.ɵɵtext(2, " There is a problem ");
22554
- i0__namespace.ɵɵelementEnd();
22555
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
22556
- i0__namespace.ɵɵelementEnd();
22557
- }
22558
- if (rf & 2) {
22559
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22560
- i0__namespace.ɵɵadvance(3);
22561
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
22562
- }
22563
- }
22564
- function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) {
22565
- if (rf & 1) {
22566
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
22567
- i0__namespace.ɵɵelementContainerStart(0);
22568
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
22569
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_3_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.onLinkedCasesStateEmitted($event); });
22570
- i0__namespace.ɵɵelementEnd();
22571
- i0__namespace.ɵɵelementContainerEnd();
22572
- }
22573
- }
22574
- function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) {
22575
- if (rf & 1) {
22576
- var _r13_1 = i0__namespace.ɵɵgetCurrentView();
22577
- i0__namespace.ɵɵelementContainerStart(0);
22578
- i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
22579
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_4_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r13_1); var ctx_r12 = i0__namespace.ɵɵnextContext(); return ctx_r12.onLinkedCasesStateEmitted($event); });
22580
- i0__namespace.ɵɵelementEnd();
22581
- i0__namespace.ɵɵelementContainerEnd();
22582
- }
22583
- }
22584
- function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) {
22585
- if (rf & 1) {
22586
- var _r15_1 = i0__namespace.ɵɵgetCurrentView();
22587
- i0__namespace.ɵɵelementContainerStart(0);
22588
- i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 10);
22589
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_5_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r15_1); var ctx_r14 = i0__namespace.ɵɵnextContext(); return ctx_r14.onLinkedCasesStateEmitted($event); });
22590
- i0__namespace.ɵɵelementEnd();
22591
- i0__namespace.ɵɵelementContainerEnd();
22592
- }
22593
- }
22594
- function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) {
22595
- if (rf & 1) {
22596
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
22597
- i0__namespace.ɵɵelementContainerStart(0);
22598
- i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
22599
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
22600
- i0__namespace.ɵɵelementEnd();
22601
- i0__namespace.ɵɵelementContainerEnd();
22602
- }
22603
- }
22604
- function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
22605
- if (rf & 1) {
22606
- var _r19_1 = i0__namespace.ɵɵgetCurrentView();
22607
- i0__namespace.ɵɵelementContainerStart(0);
22608
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
22609
- i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_7_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r19_1); var ctx_r18 = i0__namespace.ɵɵnextContext(); return ctx_r18.onLinkedCasesStateEmitted($event); });
22610
- i0__namespace.ɵɵelementEnd();
22611
- i0__namespace.ɵɵelementContainerEnd();
22612
- }
22613
- }
22614
- var WriteLinkedCasesComponent = /** @class */ (function (_super) {
22615
- __extends(WriteLinkedCasesComponent, _super);
22616
- function WriteLinkedCasesComponent(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
22617
- var _this = _super.call(this) || this;
22618
- _this.caseEdit = caseEdit;
22619
- _this.appConfig = appConfig;
22620
- _this.commonDataService = commonDataService;
22621
- _this.casesService = casesService;
22622
- _this.linkedCasesService = linkedCasesService;
22623
- _this.caseEditDataService = caseEditDataService;
22624
- _this.onLinkedCasesSelected = new i0.EventEmitter();
22625
- _this.isLinkedCasesJourney = false;
22626
- _this.linkedCasesPages = exports.LinkedCasesPages;
22627
- _this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
22628
- _this.linkedCases = [];
22629
- _this.errorMessages = [];
22630
- return _this;
22631
- }
22632
- WriteLinkedCasesComponent.prototype.ngOnInit = function () {
22633
- var _this = this;
22634
- this.caseEditDataService.clearFormValidationErrors();
22635
- this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
22636
- this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
22637
- this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
22638
- this.linkedCasesService.editMode = false;
22639
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
22640
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
22641
- next: function (reasons) {
22642
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
22643
- }
22644
- });
22645
- this.getLinkedCases();
22646
- this.caseEditDataService.caseEventTriggerName$.subscribe({
22647
- next: function (name) {
22648
- _this.linkedCasesService.isLinkedCasesEventTrigger
22649
- = (name === exports.LinkedCasesEventTriggers.LINK_CASES);
22650
- }
22651
- });
22652
- };
22653
- WriteLinkedCasesComponent.prototype.ngAfterViewInit = function () {
22654
- var labelField = document.getElementsByClassName('govuk-heading-l');
22655
- if (labelField && labelField.length) {
22656
- labelField[0].replaceWith('');
22657
- }
22658
- labelField = document.getElementsByClassName('heading-h2');
22659
- if (labelField && labelField.length) {
22660
- labelField[0].replaceWith('');
22661
- }
22662
- };
22663
- WriteLinkedCasesComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
22664
- var _this = this;
22665
- this.errorMessages = [];
22666
- this.caseEditDataService.clearFormValidationErrors();
22667
- if (linkedCasesState.navigateToNextPage) {
22668
- this.linkedCasesPage = this.getNextPage(linkedCasesState);
22669
- this.setContinueButtonValidationErrorMessage();
22670
- this.proceedToNextPage();
22671
- }
22672
- else {
22673
- if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
22674
- linkedCasesState.errorMessages.forEach(function (errorMessage, index) {
22675
- _this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
22676
- });
22677
- }
22678
- }
22679
- };
22680
- WriteLinkedCasesComponent.prototype.isAtFinalState = function () {
22681
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22682
- };
22683
- WriteLinkedCasesComponent.prototype.setContinueButtonValidationErrorMessage = function () {
22684
- var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
22685
- ? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
22686
- : exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
22687
- var buttonId = this.linkedCasesService.linkedCases.length === 0
22688
- ? 'back-button'
22689
- : 'next-button';
22690
- this.caseEditDataService.setCaseLinkError({
22691
- componentId: buttonId,
22692
- errorMessage: errorMessage
22693
- });
22694
- };
22695
- WriteLinkedCasesComponent.prototype.proceedToNextPage = function () {
22696
- if (this.isAtFinalPage()) {
22697
- // Continue button event must be allowed in final page
22698
- this.caseEditDataService.clearCaseLinkError();
22699
- // Trigger validation to clear the "notAtFinalPage" error if now at the final state
22700
- this.formGroup.updateValueAndValidity();
22701
- // update form value
22702
- this.onLinkedCasesSelected.emit();
22703
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(this.linkedCasesService.caseFieldValue) });
22704
- }
22705
- };
22706
- WriteLinkedCasesComponent.prototype.isAtFinalPage = function () {
22707
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22708
- };
22709
- WriteLinkedCasesComponent.prototype.getNextPage = function (linkedCasesState) {
22710
- if ((this.linkedCasesPage === exports.LinkedCasesPages.BEFORE_YOU_START) ||
22711
- (linkedCasesState.currentLinkedCasesPage === exports.LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
22712
- return this.isLinkedCasesJourney
22713
- ? exports.LinkedCasesPages.LINK_CASE
22714
- : exports.LinkedCasesPages.UNLINK_CASE;
22715
- }
22716
- return exports.LinkedCasesPages.CHECK_YOUR_ANSWERS;
22717
- };
22718
- WriteLinkedCasesComponent.prototype.getLinkedCases = function () {
22719
- var _this = this;
22720
- this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
22721
- var caseViewFiltered = caseView.tabs.filter(function (tab) {
22722
- var linkField = tab.fields.some(function (_a) {
22723
- var field_type = _a.field_type;
22724
- return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
22725
- });
22726
- return linkField;
22727
- });
22728
- if (caseViewFiltered) {
22729
- var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { return filtered.fields.length && filtered.fields[0].value; });
22730
- _this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
22731
- _this.linkedCasesService.getAllLinkedCaseInformation();
22732
- }
22733
- // Initialise the first page to display
22734
- _this.linkedCasesPage = _this.linkedCasesService.isLinkedCasesEventTrigger ||
22735
- (_this.linkedCasesService.caseFieldValue && _this.linkedCasesService.caseFieldValue.length > 0
22736
- && !_this.linkedCasesService.serverLinkedApiError)
22737
- ? exports.LinkedCasesPages.BEFORE_YOU_START
22738
- : exports.LinkedCasesPages.NO_LINKED_CASES;
22739
- // Initialise the error to be displayed when clicked on Continue button
22740
- _this.setContinueButtonValidationErrorMessage();
22741
- });
22742
- };
22743
- WriteLinkedCasesComponent.prototype.navigateToErrorElement = function (elementId) {
22744
- if (elementId) {
22745
- var htmlElement = document.getElementById(elementId);
22746
- if (htmlElement) {
22747
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
22748
- htmlElement.focus();
22749
- }
22750
- }
22751
- };
22752
- return WriteLinkedCasesComponent;
22753
- }(AbstractFieldWriteComponent));
22754
- WriteLinkedCasesComponent.ɵfac = function WriteLinkedCasesComponent_Factory(t) { return new (t || WriteLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
22755
- WriteLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesComponent, selectors: [["ccd-write-linked-cases"]], inputs: { caseFields: "caseFields", caseField: "caseField", isLinkedCasesJourney: "isLinkedCasesJourney", formGroup: "formGroup" }, outputs: { onLinkedCasesSelected: "onLinkedCasesSelected" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesComponent_Template(rf, ctx) {
22756
- if (rf & 1) {
22757
- i0__namespace.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
22758
- i0__namespace.ɵɵelementStart(1, "div", 1);
22759
- i0__namespace.ɵɵelementStart(2, "div", 2);
22760
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
22761
- i0__namespace.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
22762
- i0__namespace.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
22763
- i0__namespace.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
22764
- i0__namespace.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
22765
- i0__namespace.ɵɵelementEnd();
22766
- i0__namespace.ɵɵelementEnd();
22767
- }
22768
- if (rf & 2) {
22769
- i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
22770
- i0__namespace.ɵɵadvance(1);
22771
- i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
22772
- i0__namespace.ɵɵadvance(1);
22773
- i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
22774
- i0__namespace.ɵɵadvance(1);
22775
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
22776
- i0__namespace.ɵɵadvance(1);
22777
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
22778
- i0__namespace.ɵɵadvance(1);
22779
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
22780
- i0__namespace.ɵɵadvance(1);
22781
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
22782
- i0__namespace.ɵɵadvance(1);
22783
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
22784
- }
22785
- }, encapsulation: 2 });
22786
- (function () {
22787
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
22788
- type: i0.Component,
22789
- args: [{
22790
- selector: 'ccd-write-linked-cases',
22791
- templateUrl: './write-linked-cases.component.html'
22792
- }]
22793
- }], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
22794
- type: i0.Input
22795
- }], caseField: [{
22796
- type: i0.Input
22797
- }], onLinkedCasesSelected: [{
22798
- type: i0.Output
22799
- }], isLinkedCasesJourney: [{
22800
- type: i0.Input
22801
- }], formGroup: [{
22802
- type: i0.Input
22803
- }] });
22804
- })();
22805
-
22806
- function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
22807
- if (rf & 1) {
22808
- i0__namespace.ɵɵelementContainer(0);
22809
- }
22810
- }
22811
- function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) {
22812
- if (rf & 1) {
22813
- i0__namespace.ɵɵelementContainer(0);
22814
- }
22815
- }
22816
- function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) {
22817
- if (rf & 1) {
22818
- i0__namespace.ɵɵelementContainer(0);
22819
- }
22820
- }
22821
- function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) {
22822
- if (rf & 1) {
22823
- i0__namespace.ɵɵelementContainer(0);
22824
- }
22825
- }
22826
- function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) {
22827
- if (rf & 1) {
22828
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
22829
- i0__namespace.ɵɵelementStart(0, "div", 8);
22830
- i0__namespace.ɵɵelementStart(1, "p", 9);
22831
- i0__namespace.ɵɵtext(2);
22832
- i0__namespace.ɵɵelementEnd();
22833
- i0__namespace.ɵɵelementStart(3, "span", 10);
22834
- i0__namespace.ɵɵelementStart(4, "a", 11);
22835
- i0__namespace.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_16_Template_a_click_4_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var ctx_r8 = i0__namespace.ɵɵnextContext(); return ctx_r8.reloadCurrentRoute(); });
22836
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
22837
- i0__namespace.ɵɵelementEnd();
22838
- i0__namespace.ɵɵelementEnd();
22839
- i0__namespace.ɵɵelementEnd();
22840
- }
22841
- if (rf & 2) {
22842
- var ctx_r5 = i0__namespace.ɵɵnextContext();
22843
- i0__namespace.ɵɵadvance(2);
22844
- i0__namespace.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
22845
- }
22846
- }
22847
- function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) {
22848
- if (rf & 1) {
22849
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
22850
- i0__namespace.ɵɵelementStart(0, "div", 8);
22851
- i0__namespace.ɵɵelementStart(1, "p", 9);
22852
- i0__namespace.ɵɵtext(2);
22853
- i0__namespace.ɵɵelementEnd();
22854
- i0__namespace.ɵɵelementStart(3, "span", 10);
22855
- i0__namespace.ɵɵelementStart(4, "a", 11);
22856
- i0__namespace.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_18_Template_a_click_4_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.reloadCurrentRoute(); });
22857
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
22858
- i0__namespace.ɵɵelementEnd();
22859
- i0__namespace.ɵɵelementEnd();
22860
- i0__namespace.ɵɵelementEnd();
22861
- }
22862
- if (rf & 2) {
22863
- var ctx_r7 = i0__namespace.ɵɵnextContext();
22864
- i0__namespace.ɵɵadvance(2);
22865
- i0__namespace.ɵɵtextInterpolate(ctx_r7.serverError.message);
22866
- }
22867
- }
22868
- var ReadLinkedCasesComponent = /** @class */ (function () {
22869
- function ReadLinkedCasesComponent(router, linkedCasesService, appConfig, commonDataService) {
22870
- this.router = router;
22871
- this.linkedCasesService = linkedCasesService;
22872
- this.appConfig = appConfig;
22873
- this.commonDataService = commonDataService;
22874
- this.reasonListLoaded = false;
22875
- this.reload = false;
22876
- this.serverError = null;
22877
- this.serverLinkedApiError = null;
22878
- this.isServerReasonCodeError = false;
22879
- this.isServerJurisdictionError = false;
22880
- this.isServerLinkedFromError = false;
22881
- this.isServerLinkedToError = false;
22882
- }
22883
- ReadLinkedCasesComponent.prototype.ngOnInit = function () {
22884
- var _this = this;
22885
- this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
22886
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
22887
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
22888
- next: function (reasons) {
22889
- _this.reasonListLoaded = true;
22890
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
22891
- },
22892
- error: function (error) {
22893
- _this.isServerReasonCodeError = true;
22894
- _this.linkedCasesService.isServerReasonCodeError = true;
22895
- }
22896
- });
22897
- this.serverLinkedApiError = {
22898
- id: 'backendError', message: 'Some case information is not available at the moment'
22899
- };
22900
- this.serverError = {
22901
- id: 'backendError', message: 'There has been a system error and your request could not be processed.'
22902
- };
22903
- };
22904
- ReadLinkedCasesComponent.prototype.ngAfterViewInit = function () {
22905
- this.linkedCasesService.caseFieldValue = this.caseField.value || [];
22906
- var labelField = document.getElementsByClassName('govuk-heading-l');
22907
- if (labelField && labelField.length) {
22908
- labelField[0].replaceWith('');
22909
- }
22910
- labelField = document.getElementsByClassName('heading-h2');
22911
- if (labelField && labelField.length) {
22912
- labelField[0].replaceWith('');
22913
- }
22914
- labelField = document.getElementsByClassName('case-viewer-label');
22915
- if (labelField && labelField.length) {
22916
- labelField[0].replaceWith('');
22917
- }
22918
- };
22919
- ReadLinkedCasesComponent.prototype.reloadCurrentRoute = function () {
22920
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(function () {
22921
- window.location.hash = 'Linked cases';
22922
- });
22923
- };
22924
- ReadLinkedCasesComponent.prototype.getFailureLinkedToNotification = function (evt) {
22925
- this.isServerLinkedToError = true;
22926
- };
22927
- ReadLinkedCasesComponent.prototype.getFailureLinkedFromNotification = function (evt) {
22928
- this.isServerLinkedFromError = true;
22929
- };
22930
- return ReadLinkedCasesComponent;
22931
- }());
22932
- ReadLinkedCasesComponent.ɵfac = function ReadLinkedCasesComponent_Factory(t) { return new (t || ReadLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService)); };
22933
- ReadLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadLinkedCasesComponent, selectors: [["ccd-read-linked-cases"]], inputs: { caseField: "caseField" }, decls: 20, vars: 10, consts: [[1, "govuk-!-margin-bottom-2"], [1, "heading-h1"], [1, "table-sub-heading"], ["reloadPage", "reload", 3, "caseField", "notifyAPIFailure"], [4, "ngIf", "ngIfThen"], [1, "govuk-!-margin-top-8"], ["singleApiError", ""], ["multiApisError", ""], [1, "govuk-main-wrapper"], [1, "govuk-body"], [1, "govuk-body", "align-left"], ["href", "javascript:void(0)", "id", "reload-linked-cases-tab", 1, "govuk-link", 3, "click"]], template: function ReadLinkedCasesComponent_Template(rf, ctx) {
22934
- if (rf & 1) {
22935
- i0__namespace.ɵɵelementStart(0, "div");
22936
- i0__namespace.ɵɵelementStart(1, "div", 0);
22937
- i0__namespace.ɵɵelementStart(2, "h1", 1);
22938
- i0__namespace.ɵɵtext(3, "Linked cases");
22939
- i0__namespace.ɵɵelementEnd();
22940
- i0__namespace.ɵɵelementStart(4, "label", 2);
22941
- i0__namespace.ɵɵtext(5, "This case is linked to");
22942
- i0__namespace.ɵɵelementEnd();
22943
- i0__namespace.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
22944
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
22945
- i0__namespace.ɵɵelementEnd();
22946
- i0__namespace.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
22947
- i0__namespace.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
22948
- i0__namespace.ɵɵelementEnd();
22949
- i0__namespace.ɵɵelementStart(9, "div", 5);
22950
- i0__namespace.ɵɵelementStart(10, "label", 2);
22951
- i0__namespace.ɵɵtext(11, "This case is linked from");
22952
- i0__namespace.ɵɵelementEnd();
22953
- i0__namespace.ɵɵelement(12, "br");
22954
- i0__namespace.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
22955
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
22956
- i0__namespace.ɵɵelementEnd();
22957
- i0__namespace.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
22958
- i0__namespace.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
22959
- i0__namespace.ɵɵelementEnd();
22960
- i0__namespace.ɵɵelementEnd();
22961
- i0__namespace.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0__namespace.ɵɵtemplateRefExtractor);
22962
- i0__namespace.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0__namespace.ɵɵtemplateRefExtractor);
22963
- }
22964
- if (rf & 2) {
22965
- var _r4 = i0__namespace.ɵɵreference(17);
22966
- var _r6 = i0__namespace.ɵɵreference(19);
22967
- i0__namespace.ɵɵadvance(6);
22968
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
22969
- i0__namespace.ɵɵadvance(1);
22970
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
22971
- i0__namespace.ɵɵadvance(1);
22972
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
22973
- i0__namespace.ɵɵadvance(5);
22974
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
22975
- i0__namespace.ɵɵadvance(1);
22976
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
22977
- i0__namespace.ɵɵadvance(1);
22978
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
22979
- }
22980
- }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
22981
- (function () {
22982
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
22983
- type: i0.Component,
22984
- args: [{
22985
- selector: 'ccd-read-linked-cases',
22986
- templateUrl: './read-linked-cases.component.html',
22987
- styleUrls: ['./read-linked-cases.component.scss']
22988
- }]
22989
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
22990
- type: i0.Input
22991
- }] });
22992
- })();
22993
-
22994
- var LinkCaseReason = /** @class */ (function () {
22995
- function LinkCaseReason() {
22996
- }
22997
- return LinkCaseReason;
22998
- }());
22999
- var CCDCaseLinkType = /** @class */ (function () {
23000
- function CCDCaseLinkType() {
23001
- }
23002
- return CCDCaseLinkType;
23003
- }());
23004
- var CaseLink = /** @class */ (function () {
23005
- function CaseLink() {
23006
- }
23007
- return CaseLink;
23008
- }());
23009
- var LinkReason = /** @class */ (function () {
23010
- function LinkReason() {
23011
- }
23012
- return LinkReason;
23013
- }());
23014
- var LinkedCasesResponse = /** @class */ (function () {
23015
- function LinkedCasesResponse() {
23016
- }
23017
- return LinkedCasesResponse;
23018
- }());
23019
- var CaseLinkResponse = /** @class */ (function () {
23020
- function CaseLinkResponse() {
23021
- }
23022
- return CaseLinkResponse;
23023
- }());
23024
- var LinkDetails = /** @class */ (function () {
23025
- function LinkDetails() {
23026
- }
23027
- return LinkDetails;
23028
- }());
23029
- var Terms = /** @class */ (function () {
23030
- function Terms() {
23031
- }
23032
- return Terms;
23033
- }());
23034
- var ESQueryType = /** @class */ (function () {
23035
- function ESQueryType() {
23036
- }
23037
- return ESQueryType;
23038
- }());
23039
-
23040
20449
  var CollectionCreateCheckerService = /** @class */ (function () {
23041
20450
  function CollectionCreateCheckerService() {
23042
20451
  }
@@ -25081,7 +22490,6 @@
25081
22490
  ReadComplexFieldTableComponent,
25082
22491
  ReadComplexFieldCollectionTableComponent,
25083
22492
  ReadCaseFlagFieldComponent,
25084
- ReadLinkedCasesComponent,
25085
22493
  // Write
25086
22494
  WriteJudicialUserFieldComponent,
25087
22495
  WriteAddressFieldComponent,
@@ -25117,15 +22525,7 @@
25117
22525
  CaseFileViewFolderSortComponent,
25118
22526
  CaseFileViewOverlayMenuComponent,
25119
22527
  CaseFileViewFolderDocumentActionsComponent,
25120
- CaseFileViewFolderSelectorComponent,
25121
- LinkedCasesToTableComponent,
25122
- LinkedCasesFromTableComponent,
25123
- BeforeYouStartComponent,
25124
- LinkCasesComponent,
25125
- CheckYourAnswersComponent,
25126
- WriteLinkedCasesComponent,
25127
- UnLinkCasesComponent,
25128
- NoLinkedCasesComponent
22528
+ CaseFileViewFolderSelectorComponent
25129
22529
  ];
25130
22530
  var PaletteModule = /** @class */ (function () {
25131
22531
  function PaletteModule() {
@@ -25144,7 +22544,6 @@
25144
22544
  FileUploadStateService,
25145
22545
  FileUploadProgressGuard,
25146
22546
  WindowService,
25147
- LinkedCasesService,
25148
22547
  CommonDataService,
25149
22548
  JurisdictionService,
25150
22549
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25176,7 +22575,7 @@
25176
22575
  i3.PaymentLibModule,
25177
22576
  i2$1.ScrollToModule.forRoot(),
25178
22577
  i1$3.MatDialogModule,
25179
- i12.MediaViewerModule,
22578
+ i11.MediaViewerModule,
25180
22579
  LoadingModule
25181
22580
  ], i4.NgxMatDatetimePickerModule,
25182
22581
  i4.NgxMatNativeDateModule,
@@ -25240,7 +22639,6 @@
25240
22639
  ReadComplexFieldTableComponent,
25241
22640
  ReadComplexFieldCollectionTableComponent,
25242
22641
  ReadCaseFlagFieldComponent,
25243
- ReadLinkedCasesComponent,
25244
22642
  // Write
25245
22643
  WriteJudicialUserFieldComponent,
25246
22644
  WriteAddressFieldComponent,
@@ -25276,15 +22674,7 @@
25276
22674
  CaseFileViewFolderSortComponent,
25277
22675
  CaseFileViewOverlayMenuComponent,
25278
22676
  CaseFileViewFolderDocumentActionsComponent,
25279
- CaseFileViewFolderSelectorComponent,
25280
- LinkedCasesToTableComponent,
25281
- LinkedCasesFromTableComponent,
25282
- BeforeYouStartComponent,
25283
- LinkCasesComponent,
25284
- CheckYourAnswersComponent,
25285
- WriteLinkedCasesComponent,
25286
- UnLinkCasesComponent,
25287
- NoLinkedCasesComponent], imports: [i1.CommonModule,
22677
+ CaseFileViewFolderSelectorComponent], imports: [i1.CommonModule,
25288
22678
  i1$1.RouterModule,
25289
22679
  i2.FormsModule,
25290
22680
  i2.ReactiveFormsModule,
@@ -25309,7 +22699,7 @@
25309
22699
  i7.CdkTreeModule,
25310
22700
  i1$4.OverlayModule,
25311
22701
  i3.PaymentLibModule, i2__namespace$1.ScrollToModule, i1$3.MatDialogModule,
25312
- i12.MediaViewerModule,
22702
+ i11.MediaViewerModule,
25313
22703
  LoadingModule], exports: [i4.NgxMatDatetimePickerModule,
25314
22704
  i4.NgxMatNativeDateModule,
25315
22705
  i4.NgxMatTimepickerModule,
@@ -25358,7 +22748,6 @@
25358
22748
  ReadComplexFieldTableComponent,
25359
22749
  ReadComplexFieldCollectionTableComponent,
25360
22750
  ReadCaseFlagFieldComponent,
25361
- ReadLinkedCasesComponent,
25362
22751
  // Write
25363
22752
  WriteJudicialUserFieldComponent,
25364
22753
  WriteAddressFieldComponent,
@@ -25394,15 +22783,7 @@
25394
22783
  CaseFileViewFolderSortComponent,
25395
22784
  CaseFileViewOverlayMenuComponent,
25396
22785
  CaseFileViewFolderDocumentActionsComponent,
25397
- CaseFileViewFolderSelectorComponent,
25398
- LinkedCasesToTableComponent,
25399
- LinkedCasesFromTableComponent,
25400
- BeforeYouStartComponent,
25401
- LinkCasesComponent,
25402
- CheckYourAnswersComponent,
25403
- WriteLinkedCasesComponent,
25404
- UnLinkCasesComponent,
25405
- NoLinkedCasesComponent] });
22786
+ CaseFileViewFolderSelectorComponent] });
25406
22787
  })();
25407
22788
  (function () {
25408
22789
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PaletteModule, [{
@@ -25436,7 +22817,7 @@
25436
22817
  i3.PaymentLibModule,
25437
22818
  i2$1.ScrollToModule.forRoot(),
25438
22819
  i1$3.MatDialogModule,
25439
- i12.MediaViewerModule,
22820
+ i11.MediaViewerModule,
25440
22821
  LoadingModule
25441
22822
  ],
25442
22823
  declarations: __spread([
@@ -25472,7 +22853,6 @@
25472
22853
  FileUploadStateService,
25473
22854
  FileUploadProgressGuard,
25474
22855
  WindowService,
25475
- LinkedCasesService,
25476
22856
  CommonDataService,
25477
22857
  JurisdictionService,
25478
22858
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25491,7 +22871,6 @@
25491
22871
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i1__namespace.NgForOf, ReadOrderSummaryRowComponent,
25492
22872
  ReadMoneyGbpFieldComponent], []);
25493
22873
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], []);
25494
- i0__namespace.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i1__namespace.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
25495
22874
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, ReadComplexFieldRawComponent,
25496
22875
  ReadComplexFieldCollectionTableComponent, i1__namespace.NgSwitchDefault, ReadComplexFieldTableComponent], []);
25497
22876
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i1__namespace.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe]);
@@ -25499,7 +22878,6 @@
25499
22878
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i1__namespace.NgForOf, i1__namespace.NgIf, FieldReadComponent,
25500
22879
  ReadCaseLinkFieldComponent], [ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i1__namespace.KeyValuePipe, IsCompoundPipe]);
25501
22880
  i0__namespace.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, CaseFlagSummaryListComponent, i1__namespace.NgSwitchDefault, i1__namespace.NgForOf, i1__namespace.NgIf, CaseFlagTableComponent], []);
25502
- i0__namespace.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i1__namespace.NgIf, LinkedCasesFromTableComponent], []);
25503
22881
  i0__namespace.ɵɵsetComponentScope(WriteAddressFieldComponent, [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, i2__namespace.SelectControlValueAccessor, i1__namespace.NgForOf, i2__namespace.NgSelectOption, i2__namespace.ɵangular_packages_forms_forms_z, WriteComplexFieldComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
25504
22882
  i0__namespace.ɵɵsetComponentScope(WriteComplexFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, FieldReadComponent, LabelSubstitutorDirective, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, FieldWriteComponent], [FieldLabelPipe, IsReadOnlyPipe]);
25505
22883
  i0__namespace.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i1__namespace.NgClass, i1__namespace.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe]);
@@ -25514,21 +22892,11 @@
25514
22892
  WriteOrganisationComplexFieldComponent], [i1__namespace.AsyncPipe]);
25515
22893
  i0__namespace.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
25516
22894
  i0__namespace.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i1__namespace.NgIf, DatetimePickerComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, WriteDateFieldComponent], []);
25517
- i0__namespace.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, WriteLinkedCasesComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
25518
22895
  i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
25519
22896
  i0__namespace.ɵɵsetComponentScope(
25520
22897
  // ComponentLauncher web components
25521
- CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25522
- i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25523
- i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25524
- i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25525
- i0__namespace.ɵɵsetComponentScope(LinkCasesComponent, [i1__namespace.NgIf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlName, i2__namespace.FormArrayName, i1__namespace.NgForOf, i2__namespace.FormGroupName, i2__namespace.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25526
- i0__namespace.ɵɵsetComponentScope(CheckYourAnswersComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25527
- i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
25528
- NoLinkedCasesComponent,
25529
- LinkCasesComponent,
25530
- UnLinkCasesComponent,
25531
- CheckYourAnswersComponent], []);
22898
+ CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
22899
+ i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
25532
22900
 
25533
22901
  var Confirmation = /** @class */ (function () {
25534
22902
  function Confirmation(caseId, status, header, body) {
@@ -35226,10 +32594,8 @@
35226
32594
  exports.AuthService = AuthService;
35227
32595
  exports.Banner = Banner;
35228
32596
  exports.BannersService = BannersService;
35229
- exports.BeforeYouStartComponent = BeforeYouStartComponent;
35230
32597
  exports.BodyComponent = BodyComponent;
35231
32598
  exports.BrowserService = BrowserService;
35232
- exports.CCDCaseLinkType = CCDCaseLinkType;
35233
32599
  exports.CallbackErrorsComponent = CallbackErrorsComponent;
35234
32600
  exports.CallbackErrorsContext = CallbackErrorsContext;
35235
32601
  exports.CaseAccessUtils = CaseAccessUtils;
@@ -35269,8 +32635,6 @@
35269
32635
  exports.CaseHeaderComponent = CaseHeaderComponent;
35270
32636
  exports.CaseHeaderModule = CaseHeaderModule;
35271
32637
  exports.CaseHistoryViewerFieldComponent = CaseHistoryViewerFieldComponent;
35272
- exports.CaseLink = CaseLink;
35273
- exports.CaseLinkResponse = CaseLinkResponse;
35274
32638
  exports.CaseListComponent = CaseListComponent;
35275
32639
  exports.CaseListFiltersComponent = CaseListFiltersComponent;
35276
32640
  exports.CaseListFiltersModule = CaseListFiltersModule;
@@ -35303,7 +32667,6 @@
35303
32667
  exports.CcdCollectionTableCaseFieldsFilterPipe = CcdCollectionTableCaseFieldsFilterPipe;
35304
32668
  exports.CcdPageFieldsPipe = CcdPageFieldsPipe;
35305
32669
  exports.CcdTabFieldsPipe = CcdTabFieldsPipe;
35306
- exports.CheckYourAnswersComponent = CheckYourAnswersComponent;
35307
32670
  exports.ConditionalShowFormDirective = ConditionalShowFormDirective;
35308
32671
  exports.ConditionalShowModule = ConditionalShowModule;
35309
32672
  exports.ConditionalShowRegistrarService = ConditionalShowRegistrarService;
@@ -35333,7 +32696,6 @@
35333
32696
  exports.DraftService = DraftService;
35334
32697
  exports.DynamicListPipe = DynamicListPipe;
35335
32698
  exports.DynamicRadioListPipe = DynamicRadioListPipe;
35336
- exports.ESQueryType = ESQueryType;
35337
32699
  exports.Embedded = Embedded;
35338
32700
  exports.ErrorMessageComponent = ErrorMessageComponent;
35339
32701
  exports.ErrorNotifierService = ErrorNotifierService;
@@ -35391,14 +32753,6 @@
35391
32753
  exports.LabelFieldComponent = LabelFieldComponent;
35392
32754
  exports.LabelSubstitutorDirective = LabelSubstitutorDirective;
35393
32755
  exports.LabelSubstitutorModule = LabelSubstitutorModule;
35394
- exports.LinkCaseReason = LinkCaseReason;
35395
- exports.LinkCasesComponent = LinkCasesComponent;
35396
- exports.LinkCasesReasonValuePipe = LinkCasesReasonValuePipe;
35397
- exports.LinkDetails = LinkDetails;
35398
- exports.LinkReason = LinkReason;
35399
- exports.LinkedCasesFromTableComponent = LinkedCasesFromTableComponent;
35400
- exports.LinkedCasesResponse = LinkedCasesResponse;
35401
- exports.LinkedCasesToTableComponent = LinkedCasesToTableComponent;
35402
32756
  exports.LoadingModule = LoadingModule;
35403
32757
  exports.LoadingService = LoadingService;
35404
32758
  exports.LoadingSpinnerComponent = LoadingSpinnerComponent;
@@ -35412,7 +32766,6 @@
35412
32766
  exports.NavigationComponent = NavigationComponent;
35413
32767
  exports.NavigationItemComponent = NavigationItemComponent;
35414
32768
  exports.NavigationNotifierService = NavigationNotifierService;
35415
- exports.NoLinkedCasesComponent = NoLinkedCasesComponent;
35416
32769
  exports.NoTasksAvailableComponent = NoTasksAvailableComponent;
35417
32770
  exports.NotificationBannerComponent = NotificationBannerComponent;
35418
32771
  exports.OrderService = OrderService;
@@ -35449,7 +32802,6 @@
35449
32802
  exports.ReadFixedListFieldComponent = ReadFixedListFieldComponent;
35450
32803
  exports.ReadFixedRadioListFieldComponent = ReadFixedRadioListFieldComponent;
35451
32804
  exports.ReadJudicialUserFieldComponent = ReadJudicialUserFieldComponent;
35452
- exports.ReadLinkedCasesComponent = ReadLinkedCasesComponent;
35453
32805
  exports.ReadMoneyGbpFieldComponent = ReadMoneyGbpFieldComponent;
35454
32806
  exports.ReadMultiSelectListFieldComponent = ReadMultiSelectListFieldComponent;
35455
32807
  exports.ReadNumberFieldComponent = ReadNumberFieldComponent;
@@ -35493,9 +32845,7 @@
35493
32845
  exports.TaskCancelledComponent = TaskCancelledComponent;
35494
32846
  exports.TaskConflictComponent = TaskConflictComponent;
35495
32847
  exports.TaskUnassignedComponent = TaskUnassignedComponent;
35496
- exports.Terms = Terms;
35497
32848
  exports.TestRouteSnapshotBuilder = TestRouteSnapshotBuilder;
35498
- exports.UnLinkCasesComponent = UnLinkCasesComponent;
35499
32849
  exports.UnsupportedFieldComponent = UnsupportedFieldComponent;
35500
32850
  exports.UpdateFlagComponent = UpdateFlagComponent;
35501
32851
  exports.WaysToPayFieldComponent = WaysToPayFieldComponent;
@@ -35524,7 +32874,6 @@
35524
32874
  exports.WriteFixedListFieldComponent = WriteFixedListFieldComponent;
35525
32875
  exports.WriteFixedRadioListFieldComponent = WriteFixedRadioListFieldComponent;
35526
32876
  exports.WriteJudicialUserFieldComponent = WriteJudicialUserFieldComponent;
35527
- exports.WriteLinkedCasesComponent = WriteLinkedCasesComponent;
35528
32877
  exports.WriteMoneyGbpFieldComponent = WriteMoneyGbpFieldComponent;
35529
32878
  exports.WriteMultiSelectListFieldComponent = WriteMultiSelectListFieldComponent;
35530
32879
  exports.WriteNumberFieldComponent = WriteNumberFieldComponent;