@hmcts/ccd-case-ui-toolkit 6.0.2-migration-dynamic-list → 6.0.2-migration-dynamic-list-rc1

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 +230 -2881
  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 +19 -65
  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 +223 -2585
  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 +60 -69
  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$Z = [[["", "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$Z);
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$_ = [[["", "headerNavigation", ""]]];
210
+ var _c0$Y = [[["", "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$_);
224
+ i0__namespace.ɵɵprojectionDef(_c0$Y);
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$Z = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
285
+ var _c0$X = [[["", "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$Z);
295
+ i0__namespace.ɵɵprojectionDef(_c0$X);
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$Y = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
440
+ var _c0$W = [[["", "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$Y);
450
+ i0__namespace.ɵɵprojectionDef(_c0$W);
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$X = function (a0) { return { "govuk-input--error": a0 }; };
797
+ var _c0$V = 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$X, 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$V, 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$X, 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$V, 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$X, 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$V, 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$X, ctx.isInvalid));
1089
+ i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$V, 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$X, ctx.isInvalid));
1093
+ i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$V, 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$X, ctx.isInvalid));
1097
+ i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$V, 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$W = ["*"];
1178
+ var _c0$U = ["*"];
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$W, 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$U, 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$V = function (a0) { return { "js-hidden": a0 }; };
1474
+ var _c0$T = 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$V, !ctx.selected));
1490
+ i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$T, !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$U = ["tab"];
1513
+ var _c0$S = ["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$U, 1);
1567
+ i0__namespace.ɵɵviewQuery(_c0$S, 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$T = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1646
+ var _c0$R = 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$T, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1667
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$R, 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',
@@ -3922,12 +3913,6 @@
3922
3913
  FieldsUtils.isCollectionWithValue = function (pageFormFields) {
3923
3914
  return pageFormFields[0]['value'] !== undefined;
3924
3915
  };
3925
- FieldsUtils.isLinkedCasesCaseField = function (caseField) {
3926
- if (!caseField) {
3927
- return false;
3928
- }
3929
- return caseField.field_type.collection_field_type.id === 'CaseLink';
3930
- };
3931
3916
  FieldsUtils.cloneObject = function (obj) {
3932
3917
  return Object.assign({}, obj);
3933
3918
  };
@@ -4131,7 +4116,7 @@
4131
4116
  // If the Flags CaseField has a value, it is a root-level Complex field; if it does not, it is a Flags
4132
4117
  // CaseField that is a sub-field within another Complex field, so use the currentValue value (if any)
4133
4118
  // instead. The exception to this is the "caseFlags" Flags CaseField, which will have an empty object value
4134
- // initially or could be null or undefined, because no party name is required
4119
+ // initially, because no party name is required
4135
4120
  if (caseField.value && FieldsUtils.isNonEmptyObject(caseField.value) ||
4136
4121
  caseField.id === this.caseLevelCaseFlagsFieldId) {
4137
4122
  flags.push(this.mapCaseFieldToFlagsWithFormGroupPathObject(caseField, pathToFlagsFormGroup));
@@ -4867,9 +4852,7 @@
4867
4852
  };
4868
4853
  AbstractFormFieldComponent.prototype.addControlToFormGroup = function (control, parent, replace) {
4869
4854
  if (replace) {
4870
- if (this.caseField.field_type && this.caseField.field_type.collection_field_type
4871
- && this.caseField.field_type.collection_field_type.id === 'CaseLink'
4872
- && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4855
+ if (this.caseField.field_type && this.caseField.field_type.id === 'CaseLink' && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4873
4856
  parent.setControl('CaseReference', control['controls']['CaseReference']);
4874
4857
  }
4875
4858
  else {
@@ -6118,9 +6101,6 @@
6118
6101
  // Clear out any MultiSelect labels.
6119
6102
  FormValueService.removeMultiSelectLabels(data);
6120
6103
  };
6121
- /**
6122
- * Remove any empty or invalid array with only id
6123
- */
6124
6104
  FormValueService.prototype.removeInvalidCollectionData = function (data, field) {
6125
6105
  var e_10, _a;
6126
6106
  if (data[field.id] && data[field.id].length > 0) {
@@ -6201,13 +6181,17 @@
6201
6181
  // nothing for a given case field ID (hence the use of hasOwnProperty())
6202
6182
  if (data.hasOwnProperty(caseField.id) && caseField.value) {
6203
6183
  // Create new object for the case field ID within the data object, if necessary
6204
- if (!data[caseField.id]) {
6205
- data[caseField.id] = {};
6184
+ if (data[caseField.id]) {
6185
+ // Copy all values from the corresponding CaseField; this ensures all nested flag data (for example, a
6186
+ // Flags field within a Complex field or a collection of Complex fields) is copied across
6187
+ Object.keys(data[caseField.id]).forEach(function (key) {
6188
+ if (caseField.value.hasOwnProperty(key)) {
6189
+ data[caseField.id][key] = caseField.value[key];
6190
+ }
6191
+ });
6206
6192
  }
6207
- // Copy all values from the corresponding CaseField; this ensures all nested flag data (for example, a
6208
- // Flags field within a Complex field or a collection of Complex fields) is copied across
6209
- Object.keys(caseField.value).forEach(function (key) { return data[caseField.id][key] = caseField.value[key]; });
6210
6193
  }
6194
+ ;
6211
6195
  });
6212
6196
  }
6213
6197
  };
@@ -7998,6 +7982,9 @@
7998
7982
  else if (this.roleOrCategoryExists(CaseAccessUtils.ADMIN_ROLE, CaseAccessUtils.ADMIN_ROLE_CATEGORY, roleKeywords, roleCategories)) {
7999
7983
  return CaseAccessUtils.ADMIN_ROLE_CATEGORY;
8000
7984
  }
7985
+ else if (this.roleOrCategoryExists(CaseAccessUtils.CTSC_ROLE, CaseAccessUtils.CTSC_ROLE_CATEGORY, roleKeywords, roleCategories)) {
7986
+ return CaseAccessUtils.CTSC_ROLE_CATEGORY;
7987
+ }
8001
7988
  else {
8002
7989
  return CaseAccessUtils.LEGAL_OPERATIONS_ROLE_CATEGORY;
8003
7990
  }
@@ -8022,6 +8009,9 @@
8022
8009
  case CaseAccessUtils.ADMIN_ROLE_CATEGORY:
8023
8010
  roleName = accessType + "-access-" + CaseAccessUtils.ADMIN_ROLE_NAME;
8024
8011
  break;
8012
+ case CaseAccessUtils.CTSC_ROLE_CATEGORY:
8013
+ roleName = accessType + "-access-" + CaseAccessUtils.CTSC_ROLE_NAME;
8014
+ break;
8025
8015
  default:
8026
8016
  roleName = accessType + "-access-" + CaseAccessUtils.LEGAL_OPERATIONS_ROLE_NAME;
8027
8017
  break;
@@ -8082,6 +8072,9 @@
8082
8072
  CaseAccessUtils.CITIZEN_ROLE = 'citizen';
8083
8073
  CaseAccessUtils.CITIZEN_ROLE_CATEGORY = 'CITIZEN';
8084
8074
  CaseAccessUtils.CITIZEN_ROLE_NAME = 'citizen';
8075
+ CaseAccessUtils.CTSC_ROLE = 'ctsc';
8076
+ CaseAccessUtils.CTSC_ROLE_CATEGORY = 'CTSC';
8077
+ CaseAccessUtils.CTSC_ROLE_NAME = 'ctsc';
8085
8078
 
8086
8079
  var WizardPageFieldToCaseFieldMapper = /** @class */ (function () {
8087
8080
  function WizardPageFieldToCaseFieldMapper() {
@@ -8467,34 +8460,6 @@
8467
8460
  return rxjs.throwError(error);
8468
8461
  }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8469
8462
  };
8470
- /**
8471
- * TODO: Gets case link responses
8472
- * @returns case link responses
8473
- */
8474
- CasesService.prototype.getCaseLinkResponses = function () {
8475
- var _this = this;
8476
- var headers = new i1$2.HttpHeaders()
8477
- .set('experimental', 'true')
8478
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
8479
- .set('Content-Type', 'application/json');
8480
- var loadingToken = this.loadingService.register();
8481
- return this.http
8482
- .get('assets/getCaseReasons.json', { headers: headers, observe: 'body' })
8483
- .pipe(operators.map(function (reasons) {
8484
- return reasons.sort(function (reasonA, reasonB) { return reasonA.value_en > reasonB.value_en ? 1 : -1; });
8485
- }), operators.catchError(function (error) {
8486
- _this.errorService.setError(error);
8487
- return rxjs.throwError(error);
8488
- }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8489
- };
8490
- CasesService.prototype.getLinkedCases = function (caseId) {
8491
- var url = this.appConfig.getCaseDataStoreApiUrl() + "/" + caseId;
8492
- return this.http
8493
- .get(url)
8494
- .pipe(operators.catchError(function (error) {
8495
- return rxjs.throwError(error);
8496
- }));
8497
- };
8498
8463
  CasesService.prototype.getEventTrigger = function (caseTypeId, eventTriggerId, caseId, ignoreWarning) {
8499
8464
  var _this = this;
8500
8465
  ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
@@ -8530,7 +8495,7 @@
8530
8495
  .set('Content-Type', 'application/json');
8531
8496
  return this.http
8532
8497
  .post(url, eventData, { headers: headers, observe: 'body' })
8533
- .pipe(operators.map(function (body) { return _this.processResponseBody(body, eventData); }), operators.catchError(function (error) {
8498
+ .pipe(operators.catchError(function (error) {
8534
8499
  _this.errorService.setError(error);
8535
8500
  return rxjs.throwError(error);
8536
8501
  }));
@@ -8565,7 +8530,7 @@
8565
8530
  .set('Content-Type', 'application/json');
8566
8531
  return this.http
8567
8532
  .post(url, eventData, { headers: headers, observe: 'body' })
8568
- .pipe(operators.map(function (body) { return _this.processResponseBody(body, eventData); }), operators.catchError(function (error) {
8533
+ .pipe(operators.catchError(function (error) {
8569
8534
  _this.errorService.setError(error);
8570
8535
  return rxjs.throwError(error);
8571
8536
  }));
@@ -8605,10 +8570,6 @@
8605
8570
  }
8606
8571
  return url;
8607
8572
  };
8608
- CasesService.prototype.processResponseBody = function (body, eventData) {
8609
- this.processTasksOnSuccess(body, eventData.event);
8610
- return body;
8611
- };
8612
8573
  CasesService.prototype.initialiseEventTrigger = function (eventTrigger) {
8613
8574
  var _this = this;
8614
8575
  if (!eventTrigger.wizard_pages) {
@@ -8619,22 +8580,6 @@
8619
8580
  wizardPage.case_fields = _this.orderService.sort(_this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
8620
8581
  });
8621
8582
  };
8622
- CasesService.prototype.processTasksOnSuccess = function (caseData, eventData) {
8623
- // The following code is work allocation 1 related
8624
- if (this.appConfig.getWorkAllocationApiUrl().toLowerCase() === 'workallocation') {
8625
- // This is used a feature toggle to
8626
- // control the work allocation
8627
- if (!this.isPuiCaseManager()) {
8628
- this.workAllocationService.completeAppropriateTask(caseData.id, eventData.id, caseData.jurisdiction, caseData.case_type)
8629
- .subscribe(function () {
8630
- // Success. Do nothing.
8631
- }, function (error) {
8632
- // Show an appropriate warning about something that went wrong.
8633
- console.warn('Could not process tasks for this case event', error);
8634
- });
8635
- }
8636
- }
8637
- };
8638
8583
  /*
8639
8584
  Checks if the user has role of pui-case-manager and returns true or false
8640
8585
  */
@@ -8657,7 +8602,7 @@
8657
8602
  if (userInfoStr) {
8658
8603
  userInfo = JSON.parse(userInfoStr);
8659
8604
  }
8660
- var roleCategory = camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8605
+ var roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8661
8606
  var roleName = camUtils.getAMRoleName('challenged', roleCategory);
8662
8607
  var beginTime = new Date();
8663
8608
  var endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
@@ -8674,7 +8619,7 @@
8674
8619
  if (userInfoStr) {
8675
8620
  userInfo = JSON.parse(userInfoStr);
8676
8621
  }
8677
- var roleCategory = camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8622
+ var roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8678
8623
  var roleName = camUtils.getAMRoleName('specific', roleCategory);
8679
8624
  var id = userInfo.id ? userInfo.id : userInfo.uid;
8680
8625
  var payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
@@ -9318,8 +9263,7 @@
9318
9263
  .filter(function (caseField) { return !_this.isHidden(caseField, editForm); })
9319
9264
  .every(function (caseField) {
9320
9265
  var theControl = editForm.controls['data'].get(caseField.id);
9321
- return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl) &&
9322
- _this.checkCaseLinksCollectionField(caseField, theControl);
9266
+ return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl);
9323
9267
  });
9324
9268
  };
9325
9269
  PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
@@ -9347,13 +9291,6 @@
9347
9291
  PageValidationService.prototype.checkMandatoryField = function (caseField, theControl) {
9348
9292
  return this.caseFieldService.isMandatory(caseField) && theControl === null;
9349
9293
  };
9350
- PageValidationService.prototype.checkCaseLinksCollectionField = function (caseField, theControl) {
9351
- if (caseField && caseField.id === 'caseLinks') {
9352
- return theControl && theControl.value && Array.isArray(theControl.value) &&
9353
- theControl.value.length ? true : false;
9354
- }
9355
- return true;
9356
- };
9357
9294
  return PageValidationService;
9358
9295
  }());
9359
9296
  PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0__namespace.ɵɵinject(CaseFieldService)); };
@@ -9864,12 +9801,10 @@
9864
9801
  function CaseEditDataService() {
9865
9802
  this.title$ = new rxjs.BehaviorSubject(null);
9866
9803
  this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
9867
- this.linkError$ = new rxjs.BehaviorSubject(null);
9868
9804
  this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
9869
9805
  this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
9870
9806
  this.caseTitle$ = this.title$.asObservable();
9871
9807
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
9872
- this.caseLinkError$ = this.linkError$.asObservable();
9873
9808
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
9874
9809
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
9875
9810
  }
@@ -9879,18 +9814,12 @@
9879
9814
  CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
9880
9815
  this.eventTriggerName$.next(triggerName);
9881
9816
  };
9882
- CaseEditDataService.prototype.setCaseLinkError = function (error) {
9883
- this.linkError$.next(error);
9884
- };
9885
9817
  CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
9886
9818
  this.formValidationErrors$.next(validationErrors);
9887
9819
  };
9888
9820
  CaseEditDataService.prototype.clearFormValidationErrors = function () {
9889
9821
  this.formValidationErrors$.next([]);
9890
9822
  };
9891
- CaseEditDataService.prototype.clearCaseLinkError = function () {
9892
- this.linkError$.next(null);
9893
- };
9894
9823
  CaseEditDataService.prototype.addFormValidationError = function (validationError) {
9895
9824
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
9896
9825
  };
@@ -10312,27 +10241,18 @@
10312
10241
  _this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " exceeds the maximum length" });
10313
10242
  fieldElement.markAsDirty();
10314
10243
  }
10315
- else if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10316
- _this.validationErrors.push({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10317
- }
10318
10244
  else if (fieldElement.invalid) {
10319
10245
  if (casefield.isComplex()) {
10320
10246
  _this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id_1);
10321
10247
  }
10322
10248
  else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
10323
- if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10324
- _this.caseEditDataService.addFormValidationError({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10325
- // this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
10326
- }
10327
- else {
10328
- var fieldArray = fieldElement;
10329
- if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10330
- id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10331
- }
10332
- fieldArray.controls.forEach(function (c) {
10333
- _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10334
- });
10249
+ var fieldArray = fieldElement;
10250
+ if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10251
+ id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10335
10252
  }
10253
+ fieldArray.controls.forEach(function (c) {
10254
+ _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10255
+ });
10336
10256
  }
10337
10257
  else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
10338
10258
  // Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
@@ -10599,7 +10519,6 @@
10599
10519
  CaseEditPageComponent.prototype.syncCaseEditDataService = function () {
10600
10520
  var _this = this;
10601
10521
  this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
10602
- this.caseEditDataService.setCaseLinkError(this.caseLinkError);
10603
10522
  this.caseEditDataService.setCaseTitle(this.getCaseTitle());
10604
10523
  this.caseEditDataService.caseFormValidationErrors$.subscribe({
10605
10524
  next: function (validationErrors) { return _this.validationErrors = validationErrors; }
@@ -11127,10 +11046,6 @@
11127
11046
  };
11128
11047
  ReadFieldsFilterPipe.keepField = function (field, value, ignoreLabels) {
11129
11048
  if (ignoreLabels === void 0) { ignoreLabels = false; }
11130
- // We should always render the caselinks tables from and to regardless whether it has valid value or not
11131
- if (field.id === 'caseLinks') {
11132
- return true;
11133
- }
11134
11049
  // We shouldn't ditch labels.
11135
11050
  if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
11136
11051
  return true;
@@ -11418,163 +11333,6 @@
11418
11333
  }], null, null);
11419
11334
  })();
11420
11335
 
11421
- var LinkedCasesService = /** @class */ (function () {
11422
- function LinkedCasesService(jurisdictionService, searchService) {
11423
- var _this = this;
11424
- this.jurisdictionService = jurisdictionService;
11425
- this.searchService = searchService;
11426
- this.caseFieldValue = [];
11427
- this.isLinkedCasesEventTrigger = false;
11428
- this.linkCaseReasons = [];
11429
- this.linkedCases = [];
11430
- this.initialCaseLinks = [];
11431
- this.editMode = false;
11432
- this.jurisdictionsResponse = [];
11433
- this.serverError = null;
11434
- this.serverLinkedApiError = null;
11435
- this.isServerReasonCodeError = false;
11436
- this.caseJurisdictionID = null;
11437
- this.groupLinkedCasesByCaseType = function (arrObj, key) {
11438
- return arrObj.reduce(function (rv, x) {
11439
- (rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
11440
- return rv;
11441
- }, {});
11442
- };
11443
- this.jurisdictionService.getJurisdictions().subscribe(function (jurisdictions) {
11444
- _this.jurisdictionsResponse = jurisdictions;
11445
- }, function (error) {
11446
- _this.serverJurisdictionError = true;
11447
- });
11448
- }
11449
- LinkedCasesService.prototype.constructElasticSearchQuery = function (caseIds, size) {
11450
- return {
11451
- query: {
11452
- terms: {
11453
- reference: caseIds,
11454
- },
11455
- },
11456
- size: size,
11457
- };
11458
- };
11459
- LinkedCasesService.prototype.mapResponse = function (esSearchCasesResponse) {
11460
- var caseInfo = this.caseFieldValue.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
11461
- return caseInfo && {
11462
- caseReference: esSearchCasesResponse.case_id,
11463
- caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
11464
- caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
11465
- service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
11466
- state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
11467
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
11468
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
11469
- };
11470
- };
11471
- LinkedCasesService.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
11472
- return rxjs.forkJoin(searchCasesResponse);
11473
- };
11474
- LinkedCasesService.prototype.getAllLinkedCaseInformation = function () {
11475
- var _this = this;
11476
- var searchCasesResponse = [];
11477
- var linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
11478
- Object.keys(linkedCaseIds).forEach(function (key) {
11479
- var esQuery = _this.constructElasticSearchQuery(linkedCaseIds[key], 100);
11480
- var query = _this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
11481
- searchCasesResponse.push(query);
11482
- });
11483
- if (searchCasesResponse.length) {
11484
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
11485
- var casesResponse = [];
11486
- searchCases.forEach(function (response) {
11487
- response.results.forEach(function (result) {
11488
- casesResponse.push(_this.mapResponse(result));
11489
- });
11490
- });
11491
- var caseLinks = casesResponse.map(function (item) {
11492
- return {
11493
- caseReference: item.caseReference,
11494
- caseName: item.caseName,
11495
- caseService: item.service,
11496
- caseType: item.caseType,
11497
- unlink: false,
11498
- reasons: item.reasons && item.reasons.map(function (reason) {
11499
- return {
11500
- reasonCode: reason
11501
- };
11502
- }),
11503
- };
11504
- });
11505
- _this.linkedCases = caseLinks;
11506
- _this.serverLinkedApiError = null;
11507
- }, function (err) {
11508
- _this.serverLinkedApiError = {
11509
- id: 'backendError', message: 'Some case information is not available at the moment'
11510
- };
11511
- });
11512
- }
11513
- };
11514
- LinkedCasesService.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
11515
- var _this = this;
11516
- var selectedJurisdiction = this.jurisdictionsResponse &&
11517
- this.jurisdictionsResponse.find(function (item) { return item.id === _this.caseDetails.case_type.jurisdiction.id; });
11518
- var selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(function (item) { return item.id === _this.caseDetails.case_type.id; });
11519
- var state = selectedCaseType && selectedCaseType.states.find(function (item) { return item.id === fieldValue; });
11520
- switch (fieldName) {
11521
- case 'JURISDICTION':
11522
- return selectedJurisdiction && selectedJurisdiction.description;
11523
- case 'CASE_TYPE':
11524
- return selectedCaseType && selectedCaseType.name;
11525
- case 'CASE_TYPE_DESCRIPTION':
11526
- return selectedCaseType && selectedCaseType.description;
11527
- case 'STATE':
11528
- return state && state.name || fieldValue;
11529
- case 'STATE_DESCRIPTION':
11530
- return state && state.description || fieldValue;
11531
- default:
11532
- break;
11533
- }
11534
- };
11535
- LinkedCasesService.prototype.getCaseName = function (searchCasesResponse) {
11536
- var caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
11537
- var tabs = searchCasesResponse.tabs.filter(function (tab) {
11538
- var caseNameHmctsInternalField = tab.fields.find(function (field) { return field.id === 'caseNameHmctsInternal'; });
11539
- if (caseNameHmctsInternalField) {
11540
- caseName = caseNameHmctsInternalField.value;
11541
- }
11542
- });
11543
- return caseName;
11544
- };
11545
- return LinkedCasesService;
11546
- }());
11547
- LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
11548
- LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0__namespace.ɵɵinject(JurisdictionService), i0__namespace.ɵɵinject(SearchService)); };
11549
- LinkedCasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
11550
- (function () {
11551
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesService, [{
11552
- type: i0.Injectable
11553
- }], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null);
11554
- })();
11555
-
11556
- var LinkCasesReasonValuePipe = /** @class */ (function () {
11557
- function LinkCasesReasonValuePipe(linkedCasesService) {
11558
- this.linkedCasesService = linkedCasesService;
11559
- }
11560
- LinkCasesReasonValuePipe.prototype.transform = function (reasonCode) {
11561
- var reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
11562
- this.linkedCasesService.linkCaseReasons.find(function (reason) { return reason.key === reasonCode; });
11563
- return reasonCodeMapping && reasonCodeMapping.value_en;
11564
- };
11565
- return LinkCasesReasonValuePipe;
11566
- }());
11567
- LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
11568
- LinkCasesReasonValuePipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
11569
- (function () {
11570
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
11571
- type: i0.Pipe,
11572
- args: [{
11573
- name: 'ccdLinkCasesReasonValue'
11574
- }]
11575
- }], function () { return [{ type: LinkedCasesService }]; }, null);
11576
- })();
11577
-
11578
11336
  var SortOrder;
11579
11337
  (function (SortOrder) {
11580
11338
  SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
@@ -11615,8 +11373,7 @@
11615
11373
  CcdCYAPageLabelFilterPipe,
11616
11374
  ReadFieldsFilterPipe,
11617
11375
  CcdTabFieldsPipe,
11618
- CcdPageFieldsPipe,
11619
- LinkCasesReasonValuePipe
11376
+ CcdPageFieldsPipe
11620
11377
  ];
11621
11378
  var PipesModule = /** @class */ (function () {
11622
11379
  function PipesModule() {
@@ -11636,16 +11393,14 @@
11636
11393
  CcdCYAPageLabelFilterPipe,
11637
11394
  ReadFieldsFilterPipe,
11638
11395
  CcdTabFieldsPipe,
11639
- CcdPageFieldsPipe,
11640
- LinkCasesReasonValuePipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11396
+ CcdPageFieldsPipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11641
11397
  SortSearchResultPipe,
11642
11398
  CcdCaseTitlePipe,
11643
11399
  CcdCollectionTableCaseFieldsFilterPipe,
11644
11400
  CcdCYAPageLabelFilterPipe,
11645
11401
  ReadFieldsFilterPipe,
11646
11402
  CcdTabFieldsPipe,
11647
- CcdPageFieldsPipe,
11648
- LinkCasesReasonValuePipe] });
11403
+ CcdPageFieldsPipe] });
11649
11404
  })();
11650
11405
  (function () {
11651
11406
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PipesModule, [{
@@ -11705,7 +11460,7 @@
11705
11460
  return AddressOption;
11706
11461
  }());
11707
11462
 
11708
- var _c0$S = ["writeComplexFieldComponent"];
11463
+ var _c0$Q = ["writeComplexFieldComponent"];
11709
11464
  function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) {
11710
11465
  if (rf & 1) {
11711
11466
  i0__namespace.ɵɵelementStart(0, "span", 14);
@@ -11919,7 +11674,7 @@
11919
11674
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0__namespace.ɵɵdirectiveInject(AddressesService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe)); };
11920
11675
  WriteAddressFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
11921
11676
  if (rf & 1) {
11922
- i0__namespace.ɵɵviewQuery(_c0$S, 1);
11677
+ i0__namespace.ɵɵviewQuery(_c0$Q, 1);
11923
11678
  i0__namespace.ɵɵviewQuery(FocusElementDirective, 1);
11924
11679
  }
11925
11680
  if (rf & 2) {
@@ -12579,7 +12334,7 @@
12579
12334
  i0__namespace.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
12580
12335
  }
12581
12336
  }
12582
- var _c0$R = function (a0) { return { "form-group-error": a0 }; };
12337
+ var _c0$P = function (a0) { return { "form-group-error": a0 }; };
12583
12338
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) {
12584
12339
  if (rf & 1) {
12585
12340
  i0__namespace.ɵɵelementStart(0, "div", 8);
@@ -12600,7 +12355,7 @@
12600
12355
  i0__namespace.ɵɵadvance(1);
12601
12356
  i0__namespace.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
12602
12357
  i0__namespace.ɵɵadvance(1);
12603
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$R, ctx_r1.errorMessages.length > 0));
12358
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$P, ctx_r1.errorMessages.length > 0));
12604
12359
  i0__namespace.ɵɵadvance(1);
12605
12360
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
12606
12361
  i0__namespace.ɵɵadvance(1);
@@ -12986,8 +12741,8 @@
12986
12741
 
12987
12742
  function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) {
12988
12743
  if (rf & 1) {
12989
- i0__namespace.ɵɵelementStart(0, "a", 2);
12990
- i0__namespace.ɵɵelementStart(1, "span", 3);
12744
+ i0__namespace.ɵɵelementStart(0, "a", 1);
12745
+ i0__namespace.ɵɵelementStart(1, "span", 2);
12991
12746
  i0__namespace.ɵɵtext(2);
12992
12747
  i0__namespace.ɵɵpipe(3, "ccdCaseReference");
12993
12748
  i0__namespace.ɵɵelementEnd();
@@ -13000,60 +12755,38 @@
13000
12755
  i0__namespace.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0__namespace.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
13001
12756
  }
13002
12757
  }
13003
- function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) {
13004
- if (rf & 1) {
13005
- i0__namespace.ɵɵelementContainerStart(0);
13006
- i0__namespace.ɵɵelement(1, "ccd-read-linked-cases", 4);
13007
- i0__namespace.ɵɵelementContainerEnd();
13008
- }
13009
- if (rf & 2) {
13010
- var ctx_r1 = i0__namespace.ɵɵnextContext();
13011
- i0__namespace.ɵɵadvance(1);
13012
- i0__namespace.ɵɵproperty("caseField", ctx_r1.caseField);
13013
- }
13014
- }
13015
12758
  var ReadCaseLinkFieldComponent = /** @class */ (function (_super) {
13016
12759
  __extends(ReadCaseLinkFieldComponent, _super);
13017
12760
  function ReadCaseLinkFieldComponent() {
13018
- var _this = _super.apply(this, __spread(arguments)) || this;
13019
- _this.paletteContext = exports.PaletteContext;
13020
- return _this;
12761
+ return _super !== null && _super.apply(this, arguments) || this;
13021
12762
  }
13022
12763
  ReadCaseLinkFieldComponent.prototype.hasReference = function () {
13023
12764
  return this.caseField.value && this.caseField.value.CaseReference;
13024
12765
  };
13025
- ReadCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
13026
- return (this.caseField.field_type &&
13027
- this.caseField.field_type.type === 'Collection' &&
13028
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13029
- };
13030
12766
  return ReadCaseLinkFieldComponent;
13031
12767
  }(AbstractFieldReadComponent));
13032
12768
  ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
13033
- 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) {
12769
+ 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) {
13034
12770
  if (rf & 1) {
13035
12771
  i0__namespace.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
13036
- i0__namespace.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
13037
12772
  }
13038
12773
  if (rf & 2) {
13039
12774
  i0__namespace.ɵɵproperty("ngIf", ctx.hasReference());
13040
- i0__namespace.ɵɵadvance(1);
13041
- i0__namespace.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
13042
12775
  }
13043
- }, encapsulation: 2 });
12776
+ }, directives: [i1__namespace.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
13044
12777
  var ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
13045
12778
  (function () {
13046
12779
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
13047
12780
  type: i0.Component,
13048
12781
  args: [{
13049
12782
  selector: 'ccd-read-case-link-field',
13050
- templateUrl: 'read-case-link-field.html',
12783
+ templateUrl: 'read-case-link-field.html'
13051
12784
  }]
13052
12785
  }], null, null);
13053
12786
  })();
13054
12787
 
13055
- var _c0$Q = ["writeComplexFieldComponent"];
13056
- function WriteCaseLinkFieldComponent_div_1_span_2_Template(rf, ctx) {
12788
+ var _c0$O = ["writeComplexFieldComponent"];
12789
+ function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) {
13057
12790
  if (rf & 1) {
13058
12791
  i0__namespace.ɵɵelementStart(0, "span", 6);
13059
12792
  i0__namespace.ɵɵtext(1);
@@ -13061,77 +12794,56 @@
13061
12794
  i0__namespace.ɵɵelementEnd();
13062
12795
  }
13063
12796
  if (rf & 2) {
13064
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
12797
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
13065
12798
  i0__namespace.ɵɵadvance(1);
13066
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.caseField));
12799
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
13067
12800
  }
13068
12801
  }
13069
- function WriteCaseLinkFieldComponent_div_1_span_3_Template(rf, ctx) {
12802
+ function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) {
13070
12803
  if (rf & 1) {
13071
12804
  i0__namespace.ɵɵelementStart(0, "span", 7);
13072
12805
  i0__namespace.ɵɵtext(1);
13073
12806
  i0__namespace.ɵɵelementEnd();
13074
12807
  }
13075
12808
  if (rf & 2) {
13076
- var ctx_r3 = i0__namespace.ɵɵnextContext(2);
13077
- i0__namespace.ɵɵadvance(1);
13078
- i0__namespace.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
13079
- }
13080
- }
13081
- function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) {
13082
- if (rf & 1) {
13083
- i0__namespace.ɵɵelementStart(0, "div", 1);
13084
- i0__namespace.ɵɵelementStart(1, "label", 2);
13085
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
13086
- i0__namespace.ɵɵelementEnd();
13087
- i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
13088
- i0__namespace.ɵɵelement(4, "input", 5);
13089
- i0__namespace.ɵɵelementEnd();
13090
- }
13091
- if (rf & 2) {
13092
- var ctx_r0 = i0__namespace.ɵɵnextContext();
13093
- i0__namespace.ɵɵadvance(1);
13094
- i0__namespace.ɵɵproperty("for", ctx_r0.id());
13095
- i0__namespace.ɵɵadvance(1);
13096
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.label);
13097
- i0__namespace.ɵɵadvance(1);
13098
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
12809
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
13099
12810
  i0__namespace.ɵɵadvance(1);
13100
- i0__namespace.ɵɵproperty("id", ctx_r0.id())("formControl", ctx_r0.caseReferenceControl);
12811
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
13101
12812
  }
13102
12813
  }
13103
- function WriteCaseLinkFieldComponent_div_2_Template(rf, ctx) {
12814
+ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
13104
12815
  if (rf & 1) {
13105
- var _r5_1 = i0__namespace.ɵɵgetCurrentView();
13106
- i0__namespace.ɵɵelementStart(0, "div", 1);
13107
- i0__namespace.ɵɵelementStart(1, "ccd-write-linked-cases", 8);
13108
- 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(); });
13109
- i0__namespace.ɵɵelementEnd();
12816
+ i0__namespace.ɵɵelementStart(0, "span", 8);
12817
+ i0__namespace.ɵɵtext(1);
12818
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
13110
12819
  i0__namespace.ɵɵelementEnd();
13111
12820
  }
13112
12821
  if (rf & 2) {
13113
- var ctx_r1 = i0__namespace.ɵɵnextContext();
12822
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
13114
12823
  i0__namespace.ɵɵadvance(1);
13115
- i0__namespace.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
12824
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
13116
12825
  }
13117
12826
  }
12827
+ var _c1$k = function (a0) { return { "form-group-error": a0 }; };
13118
12828
  var WriteCaseLinkFieldComponent = /** @class */ (function (_super) {
13119
12829
  __extends(WriteCaseLinkFieldComponent, _super);
13120
- function WriteCaseLinkFieldComponent(linkedCasesService) {
13121
- var _this = _super.call(this) || this;
13122
- _this.linkedCasesService = linkedCasesService;
13123
- _this.caseFields = [];
13124
- return _this;
12830
+ function WriteCaseLinkFieldComponent() {
12831
+ return _super !== null && _super.apply(this, arguments) || this;
13125
12832
  }
13126
12833
  WriteCaseLinkFieldComponent.prototype.ngOnInit = function () {
13127
12834
  var e_1, _a;
13128
- this.formArray = this.registerControl(new i2.FormArray([]), true);
13129
- this.formArray['caseField'] = this.caseField;
13130
- if (!this.hasCaseLinkCollection()) {
12835
+ if (this.caseField.value) {
13131
12836
  this.caseLinkGroup = this.registerControl(new i2.FormGroup({
13132
12837
  CaseReference: new i2.FormControl(this.caseField.value.CaseReference, i2.Validators.required),
13133
12838
  }), true);
13134
12839
  }
12840
+ else {
12841
+ this.caseLinkGroup = this.registerControl(new i2.FormGroup({
12842
+ CaseReference: new i2.FormControl(null, i2.Validators.required),
12843
+ }), true);
12844
+ }
12845
+ this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
12846
+ this.caseReferenceControl.setValidators(this.caseReferenceValidator());
13135
12847
  // Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
13136
12848
  // field uses the Complex type, it is meant to be treated as one field
13137
12849
  if (this.caseField && this.caseField.field_type.type === 'Complex') {
@@ -13149,18 +12861,23 @@
13149
12861
  finally { if (e_1) throw e_1.error; }
13150
12862
  }
13151
12863
  }
13152
- this.containsCaseLinkCollection = this.hasCaseLinkCollection();
13153
12864
  };
13154
- WriteCaseLinkFieldComponent.prototype.submitLinkedCases = function () {
13155
- var formGroup = this.formGroup;
13156
- if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
13157
- var unlinkedCaseRefereneIds_1 = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
13158
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue
13159
- .filter(function (item) { return unlinkedCaseRefereneIds_1.indexOf(item.id) === -1; });
13160
- }
13161
- else if (formGroup.value && formGroup.value.caseLinks && this.linkedCasesService.linkedCases) {
13162
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
13163
- }
12865
+ WriteCaseLinkFieldComponent.prototype.caseReferenceValidator = function () {
12866
+ var _this = this;
12867
+ return function (control) {
12868
+ if (control.value) {
12869
+ if (_this.validCaseReference(control.value)) {
12870
+ return null;
12871
+ }
12872
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12873
+ }
12874
+ else {
12875
+ if (control.touched) {
12876
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12877
+ }
12878
+ }
12879
+ return null;
12880
+ };
13164
12881
  };
13165
12882
  WriteCaseLinkFieldComponent.prototype.validCaseReference = function (valueString) {
13166
12883
  if (!valueString) {
@@ -13168,36 +12885,43 @@
13168
12885
  }
13169
12886
  return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
13170
12887
  };
13171
- WriteCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
13172
- return (this.caseField.field_type &&
13173
- this.caseField.field_type.type === 'Collection' &&
13174
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13175
- };
13176
12888
  return WriteCaseLinkFieldComponent;
13177
12889
  }(AbstractFieldWriteComponent));
13178
- WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return new (t || WriteCaseLinkFieldComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
12890
+ WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
13179
12891
  WriteCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) {
13180
12892
  if (rf & 1) {
13181
- i0__namespace.ɵɵviewQuery(_c0$Q, 1);
12893
+ i0__namespace.ɵɵviewQuery(_c0$O, 1);
13182
12894
  }
13183
12895
  if (rf & 2) {
13184
12896
  var _t = void 0;
13185
12897
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
13186
12898
  }
13187
- }, 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) {
12899
+ }, 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) {
13188
12900
  if (rf & 1) {
13189
- i0__namespace.ɵɵelementContainerStart(0);
13190
- i0__namespace.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
13191
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
13192
- i0__namespace.ɵɵelementContainerEnd();
12901
+ i0__namespace.ɵɵelementStart(0, "div", 0);
12902
+ i0__namespace.ɵɵelementStart(1, "label", 1);
12903
+ i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
12904
+ i0__namespace.ɵɵelementEnd();
12905
+ i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
12906
+ i0__namespace.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
12907
+ i0__namespace.ɵɵelement(5, "input", 5);
12908
+ i0__namespace.ɵɵelementEnd();
13193
12909
  }
13194
12910
  if (rf & 2) {
12911
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12912
+ i0__namespace.ɵɵadvance(1);
12913
+ i0__namespace.ɵɵproperty("for", ctx.id());
12914
+ i0__namespace.ɵɵadvance(1);
12915
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
12916
+ i0__namespace.ɵɵadvance(1);
12917
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
13195
12918
  i0__namespace.ɵɵadvance(1);
13196
- i0__namespace.ɵɵproperty("ngIf", !ctx.containsCaseLinkCollection);
12919
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
13197
12920
  i0__namespace.ɵɵadvance(1);
13198
- i0__namespace.ɵɵproperty("ngIf", ctx.containsCaseLinkCollection);
12921
+ i0__namespace.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
13199
12922
  }
13200
- }, encapsulation: 2 });
12923
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12924
+ var ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
13201
12925
  (function () {
13202
12926
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
13203
12927
  type: i0.Component,
@@ -13205,17 +12929,13 @@
13205
12929
  selector: 'ccd-write-case-link-field',
13206
12930
  templateUrl: 'write-case-link-field.html'
13207
12931
  }]
13208
- }], function () { return [{ type: LinkedCasesService }]; }, { caseFields: [{
13209
- type: i0.Input
13210
- }], formGroup: [{
13211
- type: i0.Input
13212
- }], writeComplexFieldComponent: [{
12932
+ }], null, { writeComplexFieldComponent: [{
13213
12933
  type: i0.ViewChild,
13214
- args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
12934
+ args: ['writeComplexFieldComponent']
13215
12935
  }] });
13216
12936
  })();
13217
12937
 
13218
- var _c0$P = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
12938
+ var _c0$N = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
13219
12939
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
13220
12940
  if (rf & 1) {
13221
12941
  i0__namespace.ɵɵelementStart(0, "tbody");
@@ -13230,10 +12950,10 @@
13230
12950
  if (rf & 2) {
13231
12951
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
13232
12952
  i0__namespace.ɵɵadvance(4);
13233
- i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$P, 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);
12953
+ i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$N, 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);
13234
12954
  }
13235
12955
  }
13236
- var _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12956
+ var _c1$j = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
13237
12957
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
13238
12958
  if (rf & 1) {
13239
12959
  i0__namespace.ɵɵelementStart(0, "tr");
@@ -13247,7 +12967,7 @@
13247
12967
  var i_r5 = ctx.index;
13248
12968
  var ctx_r3 = i0__namespace.ɵɵnextContext(3);
13249
12969
  i0__namespace.ɵɵadvance(2);
13250
- 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));
12970
+ 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));
13251
12971
  }
13252
12972
  }
13253
12973
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -13381,7 +13101,7 @@
13381
13101
  }], function () { return [{ type: i1__namespace$3.MatDialogRef }]; }, null);
13382
13102
  })();
13383
13103
 
13384
- var _c0$O = ["collectionItem"];
13104
+ var _c0$M = ["collectionItem"];
13385
13105
  function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) {
13386
13106
  if (rf & 1) {
13387
13107
  i0__namespace.ɵɵelementStart(0, "span", 9);
@@ -13805,7 +13525,7 @@
13805
13525
  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)); };
13806
13526
  WriteCollectionFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) {
13807
13527
  if (rf & 1) {
13808
- i0__namespace.ɵɵviewQuery(_c0$O, 1);
13528
+ i0__namespace.ɵɵviewQuery(_c0$M, 1);
13809
13529
  }
13810
13530
  if (rf & 2) {
13811
13531
  var _t = void 0;
@@ -14393,7 +14113,7 @@
14393
14113
  }], null, null);
14394
14114
  })();
14395
14115
 
14396
- var _c0$N = ["fileInput"];
14116
+ var _c0$L = ["fileInput"];
14397
14117
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) {
14398
14118
  if (rf & 1) {
14399
14119
  i0__namespace.ɵɵelementStart(0, "span", 12);
@@ -14427,7 +14147,7 @@
14427
14147
  i0__namespace.ɵɵproperty("caseField", ctx_r2.caseField);
14428
14148
  }
14429
14149
  }
14430
- var _c1$j = function (a0) { return { "form-group-error bottom-30": a0 }; };
14150
+ var _c1$i = function (a0) { return { "form-group-error bottom-30": a0 }; };
14431
14151
  var WriteDocumentFieldComponent = /** @class */ (function (_super) {
14432
14152
  __extends(WriteDocumentFieldComponent, _super);
14433
14153
  function WriteDocumentFieldComponent(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
@@ -14687,7 +14407,7 @@
14687
14407
  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)); };
14688
14408
  WriteDocumentFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
14689
14409
  if (rf & 1) {
14690
- i0__namespace.ɵɵviewQuery(_c0$N, 1);
14410
+ i0__namespace.ɵɵviewQuery(_c0$L, 1);
14691
14411
  }
14692
14412
  if (rf & 2) {
14693
14413
  var _t = void 0;
@@ -14729,7 +14449,7 @@
14729
14449
  i0__namespace.ɵɵelementEnd();
14730
14450
  }
14731
14451
  if (rf & 2) {
14732
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$j, !ctx.valid));
14452
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$i, !ctx.valid));
14733
14453
  i0__namespace.ɵɵadvance(1);
14734
14454
  i0__namespace.ɵɵproperty("for", ctx.id());
14735
14455
  i0__namespace.ɵɵadvance(1);
@@ -14887,7 +14607,7 @@
14887
14607
  i0__namespace.ɵɵtextInterpolate(type_r5.label);
14888
14608
  }
14889
14609
  }
14890
- var _c0$M = function (a0) { return { "form-group-error": a0 }; };
14610
+ var _c0$K = function (a0) { return { "form-group-error": a0 }; };
14891
14611
  var WriteDynamicListFieldComponent = /** @class */ (function (_super) {
14892
14612
  __extends(WriteDynamicListFieldComponent, _super);
14893
14613
  function WriteDynamicListFieldComponent() {
@@ -14936,7 +14656,7 @@
14936
14656
  i0__namespace.ɵɵelementEnd();
14937
14657
  }
14938
14658
  if (rf & 2) {
14939
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$M, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14659
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$K, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14940
14660
  i0__namespace.ɵɵadvance(1);
14941
14661
  i0__namespace.ɵɵproperty("for", ctx.id());
14942
14662
  i0__namespace.ɵɵadvance(1);
@@ -15086,7 +14806,7 @@
15086
14806
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
15087
14807
  }
15088
14808
  }
15089
- var _c0$L = function (a0) { return { selected: a0 }; };
14809
+ var _c0$J = function (a0) { return { selected: a0 }; };
15090
14810
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
15091
14811
  if (rf & 1) {
15092
14812
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -15099,7 +14819,7 @@
15099
14819
  if (rf & 2) {
15100
14820
  var radioButton_r5 = ctx.$implicit;
15101
14821
  var ctx_r4 = i0__namespace.ɵɵnextContext();
15102
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$L, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14822
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$J, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
15103
14823
  i0__namespace.ɵɵadvance(1);
15104
14824
  i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
15105
14825
  i0__namespace.ɵɵadvance(1);
@@ -15108,7 +14828,7 @@
15108
14828
  i0__namespace.ɵɵtextInterpolate(radioButton_r5.label);
15109
14829
  }
15110
14830
  }
15111
- var _c1$i = function (a0) { return { "form-group-error": a0 }; };
14831
+ var _c1$h = function (a0) { return { "form-group-error": a0 }; };
15112
14832
  var WriteDynamicRadioListFieldComponent = /** @class */ (function (_super) {
15113
14833
  __extends(WriteDynamicRadioListFieldComponent, _super);
15114
14834
  function WriteDynamicRadioListFieldComponent() {
@@ -15156,7 +14876,7 @@
15156
14876
  i0__namespace.ɵɵelementEnd();
15157
14877
  }
15158
14878
  if (rf & 2) {
15159
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$i, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14879
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$h, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15160
14880
  i0__namespace.ɵɵadvance(3);
15161
14881
  i0__namespace.ɵɵproperty("for", ctx.id());
15162
14882
  i0__namespace.ɵɵadvance(1);
@@ -15263,8 +14983,8 @@
15263
14983
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
15264
14984
  }
15265
14985
  }
15266
- var _c0$K = function (a0) { return { "form-group-error": a0 }; };
15267
- var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14986
+ var _c0$I = function (a0) { return { "form-group-error": a0 }; };
14987
+ var _c1$g = function (a0) { return { "govuk-input--error": a0 }; };
15268
14988
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
15269
14989
  __extends(WriteEmailFieldComponent, _super);
15270
14990
  function WriteEmailFieldComponent() {
@@ -15288,7 +15008,7 @@
15288
15008
  i0__namespace.ɵɵelementEnd();
15289
15009
  }
15290
15010
  if (rf & 2) {
15291
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$K, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
15011
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$I, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
15292
15012
  i0__namespace.ɵɵadvance(1);
15293
15013
  i0__namespace.ɵɵproperty("for", ctx.id());
15294
15014
  i0__namespace.ɵɵadvance(1);
@@ -15298,7 +15018,7 @@
15298
15018
  i0__namespace.ɵɵadvance(1);
15299
15019
  i0__namespace.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15300
15020
  i0__namespace.ɵɵadvance(1);
15301
- 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);
15021
+ 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);
15302
15022
  }
15303
15023
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15304
15024
  var ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
@@ -15420,7 +15140,7 @@
15420
15140
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
15421
15141
  }
15422
15142
  }
15423
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
15143
+ var _c0$H = function (a0) { return { "form-group-error": a0 }; };
15424
15144
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
15425
15145
  __extends(WriteFixedListFieldComponent, _super);
15426
15146
  function WriteFixedListFieldComponent() {
@@ -15469,7 +15189,7 @@
15469
15189
  i0__namespace.ɵɵelementEnd();
15470
15190
  }
15471
15191
  if (rf & 2) {
15472
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$J, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15192
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$H, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15473
15193
  i0__namespace.ɵɵadvance(1);
15474
15194
  i0__namespace.ɵɵproperty("for", ctx.id());
15475
15195
  i0__namespace.ɵɵadvance(1);
@@ -15587,7 +15307,7 @@
15587
15307
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
15588
15308
  }
15589
15309
  }
15590
- var _c0$I = function (a0) { return { selected: a0 }; };
15310
+ var _c0$G = function (a0) { return { selected: a0 }; };
15591
15311
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15592
15312
  if (rf & 1) {
15593
15313
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -15600,7 +15320,7 @@
15600
15320
  if (rf & 2) {
15601
15321
  var radioButton_r4 = ctx.$implicit;
15602
15322
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15603
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15323
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$G, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15604
15324
  i0__namespace.ɵɵadvance(1);
15605
15325
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
15606
15326
  i0__namespace.ɵɵadvance(1);
@@ -15609,7 +15329,7 @@
15609
15329
  i0__namespace.ɵɵtextInterpolate(radioButton_r4.label);
15610
15330
  }
15611
15331
  }
15612
- var _c1$g = function (a0) { return { "form-group-error": a0 }; };
15332
+ var _c1$f = function (a0) { return { "form-group-error": a0 }; };
15613
15333
  var WriteFixedRadioListFieldComponent = /** @class */ (function (_super) {
15614
15334
  __extends(WriteFixedRadioListFieldComponent, _super);
15615
15335
  function WriteFixedRadioListFieldComponent() {
@@ -15640,7 +15360,7 @@
15640
15360
  i0__namespace.ɵɵelementEnd();
15641
15361
  }
15642
15362
  if (rf & 2) {
15643
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$g, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15363
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$f, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15644
15364
  i0__namespace.ɵɵadvance(3);
15645
15365
  i0__namespace.ɵɵproperty("for", ctx.id());
15646
15366
  i0__namespace.ɵɵadvance(1);
@@ -15770,7 +15490,7 @@
15770
15490
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15771
15491
  }
15772
15492
  }
15773
- var _c0$H = function (a0) { return { "hide-autocomplete": a0 }; };
15493
+ var _c0$F = function (a0) { return { "hide-autocomplete": a0 }; };
15774
15494
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15775
15495
  if (rf & 1) {
15776
15496
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15782,7 +15502,7 @@
15782
15502
  if (rf & 2) {
15783
15503
  var judicialUser_r5 = ctx.$implicit;
15784
15504
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15785
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$H, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15505
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$F, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15786
15506
  i0__namespace.ɵɵadvance(1);
15787
15507
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15788
15508
  }
@@ -16129,7 +15849,7 @@
16129
15849
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
16130
15850
  }
16131
15851
  }
16132
- var _c0$G = function (a0) { return { "form-group-error": a0 }; };
15852
+ var _c0$E = function (a0) { return { "form-group-error": a0 }; };
16133
15853
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
16134
15854
  __extends(WriteMoneyGbpFieldComponent, _super);
16135
15855
  function WriteMoneyGbpFieldComponent() {
@@ -16159,7 +15879,7 @@
16159
15879
  i0__namespace.ɵɵelementEnd();
16160
15880
  }
16161
15881
  if (rf & 2) {
16162
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$G, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15882
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$E, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
16163
15883
  i0__namespace.ɵɵadvance(1);
16164
15884
  i0__namespace.ɵɵproperty("for", ctx.id());
16165
15885
  i0__namespace.ɵɵadvance(1);
@@ -16307,7 +16027,7 @@
16307
16027
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
16308
16028
  }
16309
16029
  }
16310
- var _c0$F = function (a0) { return { "error": a0 }; };
16030
+ var _c0$D = function (a0) { return { "error": a0 }; };
16311
16031
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
16312
16032
  __extends(WriteMultiSelectListFieldComponent, _super);
16313
16033
  function WriteMultiSelectListFieldComponent() {
@@ -16371,7 +16091,7 @@
16371
16091
  i0__namespace.ɵɵelementEnd();
16372
16092
  }
16373
16093
  if (rf & 2) {
16374
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$F, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16094
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$D, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16375
16095
  i0__namespace.ɵɵadvance(3);
16376
16096
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
16377
16097
  i0__namespace.ɵɵadvance(1);
@@ -16462,8 +16182,8 @@
16462
16182
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
16463
16183
  }
16464
16184
  }
16465
- var _c0$E = function (a0) { return { "form-group-error": a0 }; };
16466
- var _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
16185
+ var _c0$C = function (a0) { return { "form-group-error": a0 }; };
16186
+ var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16467
16187
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
16468
16188
  __extends(WriteNumberFieldComponent, _super);
16469
16189
  function WriteNumberFieldComponent() {
@@ -16487,7 +16207,7 @@
16487
16207
  i0__namespace.ɵɵelementEnd();
16488
16208
  }
16489
16209
  if (rf & 2) {
16490
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$E, !ctx.numberControl.valid && ctx.numberControl.dirty));
16210
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$C, !ctx.numberControl.valid && ctx.numberControl.dirty));
16491
16211
  i0__namespace.ɵɵadvance(1);
16492
16212
  i0__namespace.ɵɵproperty("for", ctx.id());
16493
16213
  i0__namespace.ɵɵadvance(1);
@@ -16497,7 +16217,7 @@
16497
16217
  i0__namespace.ɵɵadvance(1);
16498
16218
  i0__namespace.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
16499
16219
  i0__namespace.ɵɵadvance(1);
16500
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16220
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16501
16221
  }
16502
16222
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.NumberValueAccessor, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
16503
16223
  var ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
@@ -16788,7 +16508,7 @@
16788
16508
  i0__namespace.ɵɵelementEnd();
16789
16509
  }
16790
16510
  }
16791
- var _c0$D = function (a0) { return { "scroll-container ": a0 }; };
16511
+ var _c0$B = function (a0) { return { "scroll-container ": a0 }; };
16792
16512
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
16793
16513
  if (rf & 1) {
16794
16514
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -16804,7 +16524,7 @@
16804
16524
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
16805
16525
  var tmp_0_0 = null;
16806
16526
  var tmp_2_0 = null;
16807
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16527
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$B, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16808
16528
  i0__namespace.ɵɵadvance(2);
16809
16529
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
16810
16530
  i0__namespace.ɵɵadvance(2);
@@ -17328,7 +17048,7 @@
17328
17048
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
17329
17049
  }
17330
17050
  }
17331
- var _c0$C = function (a0) { return { "error": a0 }; };
17051
+ var _c0$A = function (a0) { return { "error": a0 }; };
17332
17052
  var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
17333
17053
  __extends(WriteDynamicMultiSelectListFieldComponent, _super);
17334
17054
  function WriteDynamicMultiSelectListFieldComponent() {
@@ -17411,7 +17131,7 @@
17411
17131
  i0__namespace.ɵɵelementEnd();
17412
17132
  }
17413
17133
  if (rf & 2) {
17414
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
17134
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$A, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
17415
17135
  i0__namespace.ɵɵadvance(3);
17416
17136
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
17417
17137
  i0__namespace.ɵɵadvance(1);
@@ -17501,8 +17221,8 @@
17501
17221
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label));
17502
17222
  }
17503
17223
  }
17504
- var _c0$B = function (a0) { return { "form-group-error": a0 }; };
17505
- var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
17224
+ var _c0$z = function (a0) { return { "form-group-error": a0 }; };
17225
+ var _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
17506
17226
  var WritePhoneUKFieldComponent = /** @class */ (function (_super) {
17507
17227
  __extends(WritePhoneUKFieldComponent, _super);
17508
17228
  function WritePhoneUKFieldComponent() {
@@ -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$B, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
17249
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.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.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
17538
17258
  i0__namespace.ɵɵadvance(1);
17539
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
17259
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
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 ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
@@ -17618,8 +17338,8 @@
17618
17338
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label));
17619
17339
  }
17620
17340
  }
17621
- var _c0$A = function (a0) { return { "form-group-error": a0 }; };
17622
- var _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
17341
+ var _c0$y = function (a0) { return { "form-group-error": a0 }; };
17342
+ var _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
17623
17343
  var WriteTextAreaFieldComponent = /** @class */ (function (_super) {
17624
17344
  __extends(WriteTextAreaFieldComponent, _super);
17625
17345
  function WriteTextAreaFieldComponent(browserService) {
@@ -17654,7 +17374,7 @@
17654
17374
  i0__namespace.ɵɵelementEnd();
17655
17375
  }
17656
17376
  if (rf & 2) {
17657
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$A, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17377
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17658
17378
  i0__namespace.ɵɵadvance(1);
17659
17379
  i0__namespace.ɵɵproperty("for", ctx.id());
17660
17380
  i0__namespace.ɵɵadvance(1);
@@ -17664,7 +17384,7 @@
17664
17384
  i0__namespace.ɵɵadvance(1);
17665
17385
  i0__namespace.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
17666
17386
  i0__namespace.ɵɵadvance(1);
17667
- 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);
17387
+ 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);
17668
17388
  }
17669
17389
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17670
17390
  (function () {
@@ -17746,8 +17466,8 @@
17746
17466
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label));
17747
17467
  }
17748
17468
  }
17749
- var _c0$z = function (a0) { return { "form-group-error": a0 }; };
17750
- var _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
17469
+ var _c0$x = function (a0) { return { "form-group-error": a0 }; };
17470
+ var _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
17751
17471
  var WriteTextFieldComponent = /** @class */ (function (_super) {
17752
17472
  __extends(WriteTextFieldComponent, _super);
17753
17473
  function WriteTextFieldComponent() {
@@ -17776,7 +17496,7 @@
17776
17496
  i0__namespace.ɵɵelementEnd();
17777
17497
  }
17778
17498
  if (rf & 2) {
17779
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17499
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$x, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17780
17500
  i0__namespace.ɵɵadvance(1);
17781
17501
  i0__namespace.ɵɵproperty("for", ctx.id());
17782
17502
  i0__namespace.ɵɵadvance(1);
@@ -17786,7 +17506,7 @@
17786
17506
  i0__namespace.ɵɵadvance(1);
17787
17507
  i0__namespace.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
17788
17508
  i0__namespace.ɵɵadvance(1);
17789
- 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);
17509
+ 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);
17790
17510
  }
17791
17511
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17792
17512
  var ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteTextFieldComponent);
@@ -17984,7 +17704,7 @@
17984
17704
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label));
17985
17705
  }
17986
17706
  }
17987
- var _c0$y = function (a0) { return { selected: a0 }; };
17707
+ var _c0$w = function (a0) { return { selected: a0 }; };
17988
17708
  function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
17989
17709
  if (rf & 1) {
17990
17710
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -17997,7 +17717,7 @@
17997
17717
  if (rf & 2) {
17998
17718
  var value_r4 = ctx.$implicit;
17999
17719
  var ctx_r3 = i0__namespace.ɵɵnextContext();
18000
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, ctx_r3.yesNoControl.value === value_r4));
17720
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$w, ctx_r3.yesNoControl.value === value_r4));
18001
17721
  i0__namespace.ɵɵadvance(1);
18002
17722
  i0__namespace.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
18003
17723
  i0__namespace.ɵɵattribute("name", ctx_r3.id());
@@ -18007,7 +17727,7 @@
18007
17727
  i0__namespace.ɵɵtextInterpolate(value_r4);
18008
17728
  }
18009
17729
  }
18010
- var _c1$b = function (a0) { return { "form-group-error": a0 }; };
17730
+ var _c1$a = function (a0) { return { "form-group-error": a0 }; };
18011
17731
  var WriteYesNoFieldComponent = /** @class */ (function (_super) {
18012
17732
  __extends(WriteYesNoFieldComponent, _super);
18013
17733
  function WriteYesNoFieldComponent(yesNoService) {
@@ -18038,7 +17758,7 @@
18038
17758
  i0__namespace.ɵɵelementEnd();
18039
17759
  }
18040
17760
  if (rf & 2) {
18041
- i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
17761
+ i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
18042
17762
  i0__namespace.ɵɵadvance(3);
18043
17763
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
18044
17764
  i0__namespace.ɵɵadvance(1);
@@ -18104,25 +17824,17 @@
18104
17824
  return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
18105
17825
  case 'OrderSummary':
18106
17826
  return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
17827
+ case 'CaseLink':
17828
+ return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
18107
17829
  case 'Organisation':
18108
17830
  return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
18109
17831
  case 'JudicialUser':
18110
17832
  return write ? WriteJudicialUserFieldComponent : ReadJudicialUserFieldComponent;
18111
- case 'CaseLink':
18112
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
18113
17833
  default:
18114
17834
  return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
18115
17835
  }
18116
17836
  case 'Collection':
18117
- switch (caseField.field_type.collection_field_type.id) {
18118
- case 'CaseLink':
18119
- if (caseField.id === 'caseLinks') {
18120
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
18121
- }
18122
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
18123
- default:
18124
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
18125
- }
17837
+ return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
18126
17838
  case 'MultiSelectList':
18127
17839
  return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
18128
17840
  case 'Document':
@@ -18162,7 +17874,7 @@
18162
17874
  }], null, null);
18163
17875
  })();
18164
17876
 
18165
- var _c0$x = ["fieldContainer"];
17877
+ var _c0$v = ["fieldContainer"];
18166
17878
  var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList', 'DynamicMultiSelectList'];
18167
17879
  var FieldReadComponent = /** @class */ (function (_super) {
18168
17880
  __extends(FieldReadComponent, _super);
@@ -18211,7 +17923,7 @@
18211
17923
  FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
18212
17924
  FieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) {
18213
17925
  if (rf & 1) {
18214
- i0__namespace.ɵɵviewQuery(_c0$x, 1, i0.ViewContainerRef);
17926
+ i0__namespace.ɵɵviewQuery(_c0$v, 1, i0.ViewContainerRef);
18215
17927
  }
18216
17928
  if (rf & 2) {
18217
17929
  var _t = void 0;
@@ -18252,7 +17964,7 @@
18252
17964
  }] });
18253
17965
  })();
18254
17966
 
18255
- var _c0$w = ["fieldContainer"];
17967
+ var _c0$u = ["fieldContainer"];
18256
17968
  var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList', 'DynamicMultiSelectList'];
18257
17969
  var FieldWriteComponent = /** @class */ (function (_super) {
18258
17970
  __extends(FieldWriteComponent, _super);
@@ -18300,7 +18012,7 @@
18300
18012
  FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
18301
18013
  FieldWriteComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) {
18302
18014
  if (rf & 1) {
18303
- i0__namespace.ɵɵviewQuery(_c0$w, 3, i0.ViewContainerRef);
18015
+ i0__namespace.ɵɵviewQuery(_c0$u, 3, i0.ViewContainerRef);
18304
18016
  }
18305
18017
  if (rf & 2) {
18306
18018
  var _t = void 0;
@@ -18363,7 +18075,7 @@
18363
18075
  i0__namespace.ɵɵprojection(0);
18364
18076
  }
18365
18077
  }
18366
- var _c0$v = ["*"];
18078
+ var _c0$t = ["*"];
18367
18079
  var FieldReadLabelComponent = /** @class */ (function (_super) {
18368
18080
  __extends(FieldReadLabelComponent, _super);
18369
18081
  function FieldReadLabelComponent() {
@@ -18401,7 +18113,7 @@
18401
18113
  return FieldReadLabelComponent;
18402
18114
  }(AbstractFieldReadComponent));
18403
18115
  FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
18404
- 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) {
18116
+ 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) {
18405
18117
  if (rf & 1) {
18406
18118
  i0__namespace.ɵɵprojectionDef();
18407
18119
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -18440,7 +18152,7 @@
18440
18152
  i0__namespace.ɵɵelementContainer(0);
18441
18153
  }
18442
18154
  }
18443
- var _c0$u = function (a0) { return { cat: a0, level: 1 }; };
18155
+ var _c0$s = function (a0) { return { cat: a0, level: 1 }; };
18444
18156
  function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
18445
18157
  if (rf & 1) {
18446
18158
  i0__namespace.ɵɵelementContainerStart(0);
@@ -18452,7 +18164,7 @@
18452
18164
  i0__namespace.ɵɵnextContext();
18453
18165
  var _r1 = i0__namespace.ɵɵreference(13);
18454
18166
  i0__namespace.ɵɵadvance(1);
18455
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$u, cat_r3));
18167
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$s, cat_r3));
18456
18168
  }
18457
18169
  }
18458
18170
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) {
@@ -18460,7 +18172,7 @@
18460
18172
  i0__namespace.ɵɵelementContainer(0);
18461
18173
  }
18462
18174
  }
18463
- var _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
18175
+ var _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
18464
18176
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
18465
18177
  if (rf & 1) {
18466
18178
  i0__namespace.ɵɵelementContainerStart(0);
@@ -18473,7 +18185,7 @@
18473
18185
  i0__namespace.ɵɵnextContext();
18474
18186
  var _r1 = i0__namespace.ɵɵreference(13);
18475
18187
  i0__namespace.ɵɵadvance(1);
18476
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
18188
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
18477
18189
  }
18478
18190
  }
18479
18191
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -18694,8 +18406,8 @@
18694
18406
  i0__namespace.ɵɵproperty("ngForOf", ctx_r1.menuItems);
18695
18407
  }
18696
18408
  }
18697
- var _c0$t = [[["", "trigger", ""]]];
18698
- var _c1$9 = ["[trigger]"];
18409
+ var _c0$r = [[["", "trigger", ""]]];
18410
+ var _c1$8 = ["[trigger]"];
18699
18411
  var CaseFileViewOverlayMenuComponent = /** @class */ (function () {
18700
18412
  function CaseFileViewOverlayMenuComponent() {
18701
18413
  this.title = '';
@@ -18710,9 +18422,9 @@
18710
18422
  return CaseFileViewOverlayMenuComponent;
18711
18423
  }());
18712
18424
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
18713
- 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) {
18425
+ 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) {
18714
18426
  if (rf & 1) {
18715
- i0__namespace.ɵɵprojectionDef(_c0$t);
18427
+ i0__namespace.ɵɵprojectionDef(_c0$r);
18716
18428
  i0__namespace.ɵɵelementStart(0, "div");
18717
18429
  i0__namespace.ɵɵelementStart(1, "button", 0, 1);
18718
18430
  i0__namespace.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -19559,8 +19271,8 @@
19559
19271
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
19560
19272
  }
19561
19273
  }
19562
- var _c0$s = function (a0) { return { "form-group-error": a0 }; };
19563
- var _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
19274
+ var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19275
+ var _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
19564
19276
  function SelectFlagTypeComponent_div_9_Template(rf, ctx) {
19565
19277
  if (rf & 1) {
19566
19278
  i0__namespace.ɵɵelementStart(0, "div", 15);
@@ -19576,11 +19288,11 @@
19576
19288
  if (rf & 2) {
19577
19289
  var ctx_r2 = i0__namespace.ɵɵnextContext();
19578
19290
  i0__namespace.ɵɵadvance(1);
19579
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$s, ctx_r2.flagTypeErrorMessage.length > 0));
19291
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$q, ctx_r2.flagTypeErrorMessage.length > 0));
19580
19292
  i0__namespace.ɵɵadvance(3);
19581
19293
  i0__namespace.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
19582
19294
  i0__namespace.ɵɵadvance(1);
19583
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$8, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19295
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$7, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19584
19296
  }
19585
19297
  }
19586
19298
  function SelectFlagTypeComponent_div_10_Template(rf, ctx) {
@@ -19738,7 +19450,7 @@
19738
19450
  if (rf & 2) {
19739
19451
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
19740
19452
  i0__namespace.ɵɵadvance(1);
19741
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$s, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19453
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$q, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19742
19454
  i0__namespace.ɵɵadvance(4);
19743
19455
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
19744
19456
  i0__namespace.ɵɵadvance(1);
@@ -19850,7 +19562,7 @@
19850
19562
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
19851
19563
  }
19852
19564
  }
19853
- var _c0$r = function (a0) { return { "form-group-error": a0 }; };
19565
+ var _c0$p = function (a0) { return { "form-group-error": a0 }; };
19854
19566
  function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) {
19855
19567
  if (rf & 1) {
19856
19568
  i0__namespace.ɵɵelementStart(0, "div", 25);
@@ -19867,7 +19579,7 @@
19867
19579
  if (rf & 2) {
19868
19580
  var ctx_r5 = i0__namespace.ɵɵnextContext();
19869
19581
  i0__namespace.ɵɵadvance(1);
19870
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$r, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19582
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$p, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19871
19583
  i0__namespace.ɵɵadvance(2);
19872
19584
  i0__namespace.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
19873
19585
  i0__namespace.ɵɵadvance(1);
@@ -20042,7 +19754,7 @@
20042
19754
  var _r2 = i0__namespace.ɵɵreference(12);
20043
19755
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20044
19756
  i0__namespace.ɵɵadvance(1);
20045
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$r, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
19757
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$p, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
20046
19758
  i0__namespace.ɵɵadvance(2);
20047
19759
  i0__namespace.ɵɵproperty("for", ctx.languageSearchTermControlName);
20048
19760
  i0__namespace.ɵɵadvance(1);
@@ -20176,7 +19888,7 @@
20176
19888
  i0__namespace.ɵɵelementEnd();
20177
19889
  }
20178
19890
  }
20179
- var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19891
+ var _c0$o = function (a0) { return { "form-group-error": a0 }; };
20180
19892
  var SelectFlagLocationComponent = /** @class */ (function () {
20181
19893
  function SelectFlagLocationComponent() {
20182
19894
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20265,7 +19977,7 @@
20265
19977
  if (rf & 2) {
20266
19978
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20267
19979
  i0__namespace.ɵɵadvance(1);
20268
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$q, ctx.errorMessages.length > 0));
19980
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20269
19981
  i0__namespace.ɵɵadvance(4);
20270
19982
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
20271
19983
  i0__namespace.ɵɵadvance(1);
@@ -20329,7 +20041,7 @@
20329
20041
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
20330
20042
  }
20331
20043
  }
20332
- var _c0$p = function (a0) { return { "form-group-error": a0 }; };
20044
+ var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20333
20045
  var AddCommentsComponent = /** @class */ (function () {
20334
20046
  function AddCommentsComponent() {
20335
20047
  this.optional = false;
@@ -20410,7 +20122,7 @@
20410
20122
  if (rf & 2) {
20411
20123
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20412
20124
  i0__namespace.ɵɵadvance(2);
20413
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$p, ctx.errorMessages.length > 0));
20125
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$n, ctx.errorMessages.length > 0));
20414
20126
  i0__namespace.ɵɵadvance(2);
20415
20127
  i0__namespace.ɵɵproperty("for", ctx.flagCommentsControlName);
20416
20128
  i0__namespace.ɵɵadvance(1);
@@ -20490,7 +20202,7 @@
20490
20202
  i0__namespace.ɵɵelementEnd();
20491
20203
  }
20492
20204
  }
20493
- var _c0$o = function (a0) { return { "form-group-error": a0 }; };
20205
+ var _c0$m = function (a0) { return { "form-group-error": a0 }; };
20494
20206
  var ManageCaseFlagsComponent = /** @class */ (function () {
20495
20207
  function ManageCaseFlagsComponent() {
20496
20208
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20650,7 +20362,7 @@
20650
20362
  if (rf & 2) {
20651
20363
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20652
20364
  i0__namespace.ɵɵadvance(1);
20653
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20365
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$m, ctx.errorMessages.length > 0));
20654
20366
  i0__namespace.ɵɵadvance(4);
20655
20367
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
20656
20368
  i0__namespace.ɵɵadvance(1);
@@ -20720,8 +20432,8 @@
20720
20432
  i0__namespace.ɵɵelementEnd();
20721
20433
  }
20722
20434
  }
20723
- var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20724
- var _c1$7 = function (a0) { return { "govuk-tag--grey": a0 }; };
20435
+ var _c0$l = function (a0) { return { "form-group-error": a0 }; };
20436
+ var _c1$6 = function (a0) { return { "govuk-tag--grey": a0 }; };
20725
20437
  var UpdateFlagComponent = /** @class */ (function () {
20726
20438
  function UpdateFlagComponent() {
20727
20439
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20842,7 +20554,7 @@
20842
20554
  if (rf & 2) {
20843
20555
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20844
20556
  i0__namespace.ɵɵadvance(2);
20845
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$n, ctx.errorMessages.length > 0));
20557
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$l, ctx.errorMessages.length > 0));
20846
20558
  i0__namespace.ɵɵadvance(2);
20847
20559
  i0__namespace.ɵɵproperty("for", ctx.updateFlagControlName);
20848
20560
  i0__namespace.ɵɵadvance(1);
@@ -20858,7 +20570,7 @@
20858
20570
  i0__namespace.ɵɵadvance(3);
20859
20571
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
20860
20572
  i0__namespace.ɵɵadvance(6);
20861
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$7, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20573
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$6, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20862
20574
  i0__namespace.ɵɵadvance(1);
20863
20575
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
20864
20576
  i0__namespace.ɵɵadvance(2);
@@ -20986,2309 +20698,6 @@
20986
20698
  }] });
20987
20699
  })();
20988
20700
 
20989
- exports.LinkedCasesPages = void 0;
20990
- (function (LinkedCasesPages) {
20991
- LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
20992
- LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
20993
- LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
20994
- LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
20995
- LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
20996
- })(exports.LinkedCasesPages || (exports.LinkedCasesPages = {}));
20997
- exports.LinkedCasesErrorMessages = void 0;
20998
- (function (LinkedCasesErrorMessages) {
20999
- LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
21000
- LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
21001
- LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
21002
- LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
21003
- LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
21004
- LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
21005
- LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
21006
- LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
21007
- LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
21008
- LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
21009
- LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
21010
- LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
21011
- })(exports.LinkedCasesErrorMessages || (exports.LinkedCasesErrorMessages = {}));
21012
- exports.LinkedCasesEventTriggers = void 0;
21013
- (function (LinkedCasesEventTriggers) {
21014
- LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
21015
- LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
21016
- })(exports.LinkedCasesEventTriggers || (exports.LinkedCasesEventTriggers = {}));
21017
- exports.Patterns = void 0;
21018
- (function (Patterns) {
21019
- Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
21020
- })(exports.Patterns || (exports.Patterns = {}));
21021
-
21022
- function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) {
21023
- if (rf & 1) {
21024
- i0__namespace.ɵɵelementStart(0, "p", 5);
21025
- i0__namespace.ɵɵelementStart(1, "span", 6);
21026
- i0__namespace.ɵɵtext(2, "Error:");
21027
- i0__namespace.ɵɵelementEnd();
21028
- i0__namespace.ɵɵtext(3);
21029
- i0__namespace.ɵɵelementEnd();
21030
- }
21031
- if (rf & 2) {
21032
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
21033
- i0__namespace.ɵɵadvance(3);
21034
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
21035
- }
21036
- }
21037
- function BeforeYouStartComponent_div_1_Template(rf, ctx) {
21038
- if (rf & 1) {
21039
- var _r4_1 = i0__namespace.ɵɵgetCurrentView();
21040
- i0__namespace.ɵɵelementStart(0, "div");
21041
- i0__namespace.ɵɵelementStart(1, "h1", 1);
21042
- i0__namespace.ɵɵtext(2, "There is a problem");
21043
- i0__namespace.ɵɵelementEnd();
21044
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
21045
- i0__namespace.ɵɵelementStart(4, "p", 3);
21046
- i0__namespace.ɵɵelementStart(5, "a", 4);
21047
- 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(); });
21048
- i0__namespace.ɵɵtext(6, "Go back to the Linked cases tab");
21049
- i0__namespace.ɵɵelementEnd();
21050
- i0__namespace.ɵɵelementEnd();
21051
- i0__namespace.ɵɵelementEnd();
21052
- }
21053
- if (rf & 2) {
21054
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21055
- i0__namespace.ɵɵadvance(3);
21056
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
21057
- }
21058
- }
21059
- function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) {
21060
- if (rf & 1) {
21061
- i0__namespace.ɵɵelementStart(0, "div", 11);
21062
- i0__namespace.ɵɵelementStart(1, "p", 3);
21063
- i0__namespace.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
21064
- i0__namespace.ɵɵelementEnd();
21065
- i0__namespace.ɵɵelementStart(3, "p", 3);
21066
- i0__namespace.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
21067
- i0__namespace.ɵɵelementEnd();
21068
- i0__namespace.ɵɵelementEnd();
21069
- }
21070
- }
21071
- function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) {
21072
- if (rf & 1) {
21073
- i0__namespace.ɵɵelementStart(0, "div", 12);
21074
- i0__namespace.ɵɵelementStart(1, "p", 3);
21075
- i0__namespace.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
21076
- i0__namespace.ɵɵelementEnd();
21077
- i0__namespace.ɵɵelementEnd();
21078
- }
21079
- }
21080
- function BeforeYouStartComponent_div_2_Template(rf, ctx) {
21081
- if (rf & 1) {
21082
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
21083
- i0__namespace.ɵɵelementStart(0, "div");
21084
- i0__namespace.ɵɵelementStart(1, "h1", 1);
21085
- i0__namespace.ɵɵtext(2, "Before you start");
21086
- i0__namespace.ɵɵelementEnd();
21087
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
21088
- i0__namespace.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
21089
- i0__namespace.ɵɵelementStart(5, "div", 9);
21090
- i0__namespace.ɵɵelementStart(6, "button", 10);
21091
- 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(); });
21092
- i0__namespace.ɵɵtext(7, "Next");
21093
- i0__namespace.ɵɵelementEnd();
21094
- i0__namespace.ɵɵelementEnd();
21095
- i0__namespace.ɵɵelementEnd();
21096
- }
21097
- if (rf & 2) {
21098
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21099
- i0__namespace.ɵɵadvance(3);
21100
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
21101
- i0__namespace.ɵɵadvance(1);
21102
- i0__namespace.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
21103
- }
21104
- }
21105
- var BeforeYouStartComponent = /** @class */ (function () {
21106
- function BeforeYouStartComponent(router, linkedCasesService) {
21107
- this.router = router;
21108
- this.linkedCasesService = linkedCasesService;
21109
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21110
- this.isLinkCasesJourney = false;
21111
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
21112
- // re-initiate the state based on the casefield value
21113
- var linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(function (item) { return item; }).map(function (item) { return item.id; });
21114
- this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(function (item) { return linkedCaseRefereneIds.indexOf(item.caseReference) !== -1; });
21115
- this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
21116
- }
21117
- BeforeYouStartComponent.prototype.onNext = function () {
21118
- this.linkedCasesStateEmitter.emit({
21119
- currentLinkedCasesPage: exports.LinkedCasesPages.BEFORE_YOU_START,
21120
- errorMessages: this.errorMessages,
21121
- navigateToNextPage: true
21122
- });
21123
- };
21124
- BeforeYouStartComponent.prototype.onBack = function () {
21125
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
21126
- window.location.hash = 'Linked cases';
21127
- });
21128
- };
21129
- return BeforeYouStartComponent;
21130
- }());
21131
- BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21132
- 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) {
21133
- if (rf & 1) {
21134
- i0__namespace.ɵɵelementStart(0, "div");
21135
- i0__namespace.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
21136
- i0__namespace.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
21137
- i0__namespace.ɵɵelementEnd();
21138
- }
21139
- if (rf & 2) {
21140
- i0__namespace.ɵɵadvance(1);
21141
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
21142
- i0__namespace.ɵɵadvance(1);
21143
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
21144
- }
21145
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
21146
- (function () {
21147
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BeforeYouStartComponent, [{
21148
- type: i0.Component,
21149
- args: [{
21150
- selector: 'ccd-linked-cases-before-you-start',
21151
- templateUrl: './before-you-start.component.html'
21152
- }]
21153
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21154
- type: i0.Output
21155
- }] });
21156
- })();
21157
-
21158
- function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) {
21159
- if (rf & 1) {
21160
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
21161
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21162
- i0__namespace.ɵɵelementStart(1, "td", 14);
21163
- i0__namespace.ɵɵtext(2);
21164
- i0__namespace.ɵɵelement(3, "br");
21165
- i0__namespace.ɵɵtext(4);
21166
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
21167
- i0__namespace.ɵɵelementEnd();
21168
- i0__namespace.ɵɵelementStart(6, "td", 14);
21169
- i0__namespace.ɵɵelementStart(7, "a", 15);
21170
- 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(); });
21171
- i0__namespace.ɵɵtext(8, "Change");
21172
- i0__namespace.ɵɵelementEnd();
21173
- i0__namespace.ɵɵelementEnd();
21174
- i0__namespace.ɵɵelementEnd();
21175
- }
21176
- if (rf & 2) {
21177
- var case_r6 = ctx.$implicit;
21178
- i0__namespace.ɵɵadvance(2);
21179
- i0__namespace.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
21180
- i0__namespace.ɵɵadvance(2);
21181
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
21182
- }
21183
- }
21184
- function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) {
21185
- if (rf & 1) {
21186
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21187
- i0__namespace.ɵɵelementStart(1, "td", 16);
21188
- i0__namespace.ɵɵtext(2, " None ");
21189
- i0__namespace.ɵɵelementEnd();
21190
- i0__namespace.ɵɵelementEnd();
21191
- }
21192
- }
21193
- function CheckYourAnswersComponent_table_4_Template(rf, ctx) {
21194
- if (rf & 1) {
21195
- i0__namespace.ɵɵelementStart(0, "table", 13);
21196
- i0__namespace.ɵɵelementStart(1, "caption", 5);
21197
- i0__namespace.ɵɵtext(2, "Cases to unlink");
21198
- i0__namespace.ɵɵelementEnd();
21199
- i0__namespace.ɵɵelementStart(3, "thead", 6);
21200
- i0__namespace.ɵɵelementStart(4, "tr", 7);
21201
- i0__namespace.ɵɵelementStart(5, "th", 8);
21202
- i0__namespace.ɵɵtext(6, "Case name and number");
21203
- i0__namespace.ɵɵelementEnd();
21204
- i0__namespace.ɵɵelement(7, "th", 8);
21205
- i0__namespace.ɵɵelementEnd();
21206
- i0__namespace.ɵɵelementEnd();
21207
- i0__namespace.ɵɵelementStart(8, "tbody", 10);
21208
- i0__namespace.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
21209
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
21210
- i0__namespace.ɵɵelementEnd();
21211
- i0__namespace.ɵɵelementEnd();
21212
- }
21213
- if (rf & 2) {
21214
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21215
- i0__namespace.ɵɵadvance(9);
21216
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
21217
- i0__namespace.ɵɵadvance(1);
21218
- i0__namespace.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
21219
- }
21220
- }
21221
- function CheckYourAnswersComponent_th_15_Template(rf, ctx) {
21222
- if (rf & 1) {
21223
- i0__namespace.ɵɵelement(0, "th", 8);
21224
- }
21225
- }
21226
- function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) {
21227
- if (rf & 1) {
21228
- i0__namespace.ɵɵelement(0, "br");
21229
- }
21230
- }
21231
- function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) {
21232
- if (rf & 1) {
21233
- i0__namespace.ɵɵelementStart(0, "span");
21234
- i0__namespace.ɵɵtext(1);
21235
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21236
- i0__namespace.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
21237
- i0__namespace.ɵɵelementEnd();
21238
- }
21239
- if (rf & 2) {
21240
- var reason_r12 = ctx.$implicit;
21241
- var isLast_r13 = ctx.last;
21242
- i0__namespace.ɵɵadvance(1);
21243
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
21244
- i0__namespace.ɵɵadvance(2);
21245
- i0__namespace.ɵɵproperty("ngIf", !isLast_r13);
21246
- }
21247
- }
21248
- function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) {
21249
- if (rf & 1) {
21250
- var _r16_1 = i0__namespace.ɵɵgetCurrentView();
21251
- i0__namespace.ɵɵelementStart(0, "td", 14);
21252
- i0__namespace.ɵɵelementStart(1, "a", 15);
21253
- 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(); });
21254
- i0__namespace.ɵɵtext(2, "Change");
21255
- i0__namespace.ɵɵelementEnd();
21256
- i0__namespace.ɵɵelementEnd();
21257
- }
21258
- }
21259
- function CheckYourAnswersComponent_tr_17_Template(rf, ctx) {
21260
- if (rf & 1) {
21261
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21262
- i0__namespace.ɵɵelementStart(1, "td", 14);
21263
- i0__namespace.ɵɵelementStart(2, "span");
21264
- i0__namespace.ɵɵtext(3);
21265
- i0__namespace.ɵɵelement(4, "br");
21266
- i0__namespace.ɵɵtext(5);
21267
- i0__namespace.ɵɵpipe(6, "ccdCaseReference");
21268
- i0__namespace.ɵɵelementEnd();
21269
- i0__namespace.ɵɵelementEnd();
21270
- i0__namespace.ɵɵelementStart(7, "td", 14);
21271
- i0__namespace.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
21272
- i0__namespace.ɵɵelementEnd();
21273
- i0__namespace.ɵɵelement(9, "td", 14);
21274
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
21275
- i0__namespace.ɵɵelementEnd();
21276
- }
21277
- if (rf & 2) {
21278
- var case_r9 = ctx.$implicit;
21279
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21280
- i0__namespace.ɵɵadvance(3);
21281
- i0__namespace.ɵɵtextInterpolate1("", case_r9.caseName, " ");
21282
- i0__namespace.ɵɵadvance(2);
21283
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
21284
- i0__namespace.ɵɵadvance(3);
21285
- i0__namespace.ɵɵproperty("ngForOf", case_r9.reasons);
21286
- i0__namespace.ɵɵadvance(2);
21287
- i0__namespace.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
21288
- }
21289
- }
21290
- function CheckYourAnswersComponent_tr_18_Template(rf, ctx) {
21291
- if (rf & 1) {
21292
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21293
- i0__namespace.ɵɵelementStart(1, "td", 20);
21294
- i0__namespace.ɵɵtext(2, " None ");
21295
- i0__namespace.ɵɵelementEnd();
21296
- i0__namespace.ɵɵelementEnd();
21297
- }
21298
- }
21299
- var CheckYourAnswersComponent = /** @class */ (function () {
21300
- function CheckYourAnswersComponent(linkedCasesService) {
21301
- this.linkedCasesService = linkedCasesService;
21302
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21303
- }
21304
- CheckYourAnswersComponent.prototype.ngOnInit = function () {
21305
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
21306
- this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
21307
- this.linkedCases = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return !linkedCase.unlink; });
21308
- this.casesToUnlink = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
21309
- };
21310
- CheckYourAnswersComponent.prototype.onChange = function () {
21311
- this.linkedCasesService.editMode = true;
21312
- this.linkedCasesStateEmitter.emit({
21313
- currentLinkedCasesPage: exports.LinkedCasesPages.CHECK_YOUR_ANSWERS,
21314
- navigateToPreviousPage: true,
21315
- navigateToNextPage: true
21316
- });
21317
- };
21318
- return CheckYourAnswersComponent;
21319
- }());
21320
- CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21321
- 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) {
21322
- if (rf & 1) {
21323
- i0__namespace.ɵɵelementStart(0, "div", 0);
21324
- i0__namespace.ɵɵelementStart(1, "div", 1);
21325
- i0__namespace.ɵɵelementStart(2, "h1", 2);
21326
- i0__namespace.ɵɵtext(3, "Check your answers");
21327
- i0__namespace.ɵɵelementEnd();
21328
- i0__namespace.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
21329
- i0__namespace.ɵɵelementStart(5, "table", 4);
21330
- i0__namespace.ɵɵelementStart(6, "caption", 5);
21331
- i0__namespace.ɵɵtext(7);
21332
- i0__namespace.ɵɵelementEnd();
21333
- i0__namespace.ɵɵelementStart(8, "thead", 6);
21334
- i0__namespace.ɵɵelementStart(9, "tr", 7);
21335
- i0__namespace.ɵɵelementStart(10, "th", 8);
21336
- i0__namespace.ɵɵtext(11, "Case name and number");
21337
- i0__namespace.ɵɵelementEnd();
21338
- i0__namespace.ɵɵelementStart(12, "th", 8);
21339
- i0__namespace.ɵɵtext(13, "Reasons for case link");
21340
- i0__namespace.ɵɵelementEnd();
21341
- i0__namespace.ɵɵelement(14, "th", 8);
21342
- i0__namespace.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
21343
- i0__namespace.ɵɵelementEnd();
21344
- i0__namespace.ɵɵelementEnd();
21345
- i0__namespace.ɵɵelementStart(16, "tbody", 10);
21346
- i0__namespace.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
21347
- i0__namespace.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
21348
- i0__namespace.ɵɵelementEnd();
21349
- i0__namespace.ɵɵelementEnd();
21350
- i0__namespace.ɵɵelementEnd();
21351
- i0__namespace.ɵɵelementEnd();
21352
- }
21353
- if (rf & 2) {
21354
- i0__namespace.ɵɵadvance(4);
21355
- i0__namespace.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
21356
- i0__namespace.ɵɵadvance(3);
21357
- i0__namespace.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
21358
- i0__namespace.ɵɵadvance(8);
21359
- i0__namespace.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
21360
- i0__namespace.ɵɵadvance(2);
21361
- i0__namespace.ɵɵproperty("ngForOf", ctx.linkedCases);
21362
- i0__namespace.ɵɵadvance(1);
21363
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCases.length);
21364
- }
21365
- }, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
21366
- (function () {
21367
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CheckYourAnswersComponent, [{
21368
- type: i0.Component,
21369
- args: [{
21370
- selector: 'ccd-linked-cases-check-your-answers',
21371
- templateUrl: './check-your-answers.component.html',
21372
- styleUrls: ['./check-your-answers.component.scss']
21373
- }]
21374
- }], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21375
- type: i0.Output
21376
- }] });
21377
- })();
21378
-
21379
- var ValidatorsUtils = /** @class */ (function () {
21380
- function ValidatorsUtils() {
21381
- }
21382
- ValidatorsUtils.prototype.numberLengthValidator = function (inputLength) {
21383
- return function (control) {
21384
- return control.value.length !== inputLength ? { isValid: false } : null;
21385
- };
21386
- };
21387
- ValidatorsUtils.prototype.formArraySelectedValidator = function () {
21388
- return function (control) {
21389
- return control.value.every(function (option) { return !option.selected; }) ? { isValid: false } : null;
21390
- };
21391
- };
21392
- ValidatorsUtils.prototype.regexPattern = function (regexPattern) {
21393
- return function (control) {
21394
- var regex = new RegExp(regexPattern);
21395
- return regex.test(control.value) ? null : { isValid: false };
21396
- };
21397
- };
21398
- return ValidatorsUtils;
21399
- }());
21400
- ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
21401
- ValidatorsUtils.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
21402
- (function () {
21403
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ValidatorsUtils, [{
21404
- type: i0.Injectable,
21405
- args: [{ providedIn: 'root' }]
21406
- }], null, null);
21407
- })();
21408
-
21409
- function LinkCasesComponent_div_8_span_4_Template(rf, ctx) {
21410
- if (rf & 1) {
21411
- i0__namespace.ɵɵelementStart(0, "span", 28);
21412
- i0__namespace.ɵɵelementStart(1, "span", 29);
21413
- i0__namespace.ɵɵtext(2, "Error:");
21414
- i0__namespace.ɵɵelementEnd();
21415
- i0__namespace.ɵɵtext(3);
21416
- i0__namespace.ɵɵelementEnd();
21417
- }
21418
- if (rf & 2) {
21419
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
21420
- i0__namespace.ɵɵadvance(3);
21421
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
21422
- }
21423
- }
21424
- function LinkCasesComponent_div_8_span_10_Template(rf, ctx) {
21425
- if (rf & 1) {
21426
- i0__namespace.ɵɵelementStart(0, "span", 28);
21427
- i0__namespace.ɵɵelementStart(1, "span", 29);
21428
- i0__namespace.ɵɵtext(2, "Error:");
21429
- i0__namespace.ɵɵelementEnd();
21430
- i0__namespace.ɵɵtext(3);
21431
- i0__namespace.ɵɵelementEnd();
21432
- }
21433
- if (rf & 2) {
21434
- var ctx_r5 = i0__namespace.ɵɵnextContext(2);
21435
- i0__namespace.ɵɵadvance(3);
21436
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
21437
- }
21438
- }
21439
- function LinkCasesComponent_div_8_div_12_Template(rf, ctx) {
21440
- if (rf & 1) {
21441
- i0__namespace.ɵɵelementStart(0, "div", 30);
21442
- i0__namespace.ɵɵelement(1, "input", 31);
21443
- i0__namespace.ɵɵelementStart(2, "label", 32);
21444
- i0__namespace.ɵɵtext(3);
21445
- i0__namespace.ɵɵelementEnd();
21446
- i0__namespace.ɵɵelementEnd();
21447
- }
21448
- if (rf & 2) {
21449
- var reason_r8 = ctx.$implicit;
21450
- var pos_r9 = ctx.index;
21451
- i0__namespace.ɵɵproperty("formGroupName", pos_r9);
21452
- i0__namespace.ɵɵadvance(1);
21453
- i0__namespace.ɵɵpropertyInterpolate("id", reason_r8.key);
21454
- i0__namespace.ɵɵproperty("value", reason_r8.value_en);
21455
- i0__namespace.ɵɵadvance(1);
21456
- i0__namespace.ɵɵpropertyInterpolate("for", reason_r8.key);
21457
- i0__namespace.ɵɵadvance(1);
21458
- i0__namespace.ɵɵtextInterpolate(reason_r8.value_en);
21459
- }
21460
- }
21461
- function LinkCasesComponent_div_8_span_15_Template(rf, ctx) {
21462
- if (rf & 1) {
21463
- i0__namespace.ɵɵelementStart(0, "span", 28);
21464
- i0__namespace.ɵɵelementStart(1, "span", 29);
21465
- i0__namespace.ɵɵtext(2, "Error:");
21466
- i0__namespace.ɵɵelementEnd();
21467
- i0__namespace.ɵɵtext(3);
21468
- i0__namespace.ɵɵelementEnd();
21469
- }
21470
- if (rf & 2) {
21471
- var ctx_r7 = i0__namespace.ɵɵnextContext(2);
21472
- i0__namespace.ɵɵadvance(3);
21473
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
21474
- }
21475
- }
21476
- var _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
21477
- function LinkCasesComponent_div_8_Template(rf, ctx) {
21478
- if (rf & 1) {
21479
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
21480
- i0__namespace.ɵɵelementStart(0, "div", 21);
21481
- i0__namespace.ɵɵelementStart(1, "h3", 22);
21482
- i0__namespace.ɵɵtext(2, "Enter case reference");
21483
- i0__namespace.ɵɵelementEnd();
21484
- i0__namespace.ɵɵelementStart(3, "div", 5);
21485
- i0__namespace.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
21486
- i0__namespace.ɵɵelement(5, "input", 23);
21487
- i0__namespace.ɵɵelementEnd();
21488
- i0__namespace.ɵɵelementStart(6, "h3", 22);
21489
- i0__namespace.ɵɵtext(7, "Why should these cases be linked?");
21490
- i0__namespace.ɵɵelementEnd();
21491
- i0__namespace.ɵɵelementStart(8, "div", 24);
21492
- i0__namespace.ɵɵtext(9, " Select all that apply. ");
21493
- i0__namespace.ɵɵelementEnd();
21494
- i0__namespace.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
21495
- i0__namespace.ɵɵelementStart(11, "div", 25);
21496
- i0__namespace.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
21497
- i0__namespace.ɵɵelementEnd();
21498
- i0__namespace.ɵɵelement(13, "br");
21499
- i0__namespace.ɵɵelement(14, "br");
21500
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
21501
- i0__namespace.ɵɵelementStart(16, "button", 27);
21502
- 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(); });
21503
- i0__namespace.ɵɵtext(17, "Propose case link");
21504
- i0__namespace.ɵɵelementEnd();
21505
- i0__namespace.ɵɵelementEnd();
21506
- }
21507
- if (rf & 2) {
21508
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21509
- i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
21510
- i0__namespace.ɵɵadvance(3);
21511
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
21512
- i0__namespace.ɵɵadvance(1);
21513
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
21514
- i0__namespace.ɵɵadvance(6);
21515
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
21516
- i0__namespace.ɵɵadvance(1);
21517
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
21518
- i0__namespace.ɵɵadvance(1);
21519
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
21520
- i0__namespace.ɵɵadvance(3);
21521
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
21522
- }
21523
- }
21524
- function LinkCasesComponent_span_13_Template(rf, ctx) {
21525
- if (rf & 1) {
21526
- i0__namespace.ɵɵelementStart(0, "span", 28);
21527
- i0__namespace.ɵɵelementStart(1, "span", 29);
21528
- i0__namespace.ɵɵtext(2, "Error:");
21529
- i0__namespace.ɵɵelementEnd();
21530
- i0__namespace.ɵɵtext(3);
21531
- i0__namespace.ɵɵelementEnd();
21532
- }
21533
- if (rf & 2) {
21534
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21535
- i0__namespace.ɵɵadvance(3);
21536
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
21537
- }
21538
- }
21539
- function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
21540
- if (rf & 1) {
21541
- i0__namespace.ɵɵelementStart(0, "span");
21542
- i0__namespace.ɵɵtext(1);
21543
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21544
- i0__namespace.ɵɵelement(3, "br");
21545
- i0__namespace.ɵɵelementEnd();
21546
- }
21547
- if (rf & 2) {
21548
- var reason_r15 = ctx.$implicit;
21549
- i0__namespace.ɵɵadvance(1);
21550
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
21551
- }
21552
- }
21553
- var _c1$6 = function (a0) { return { "table-group-error": a0 }; };
21554
- function LinkCasesComponent_tr_31_Template(rf, ctx) {
21555
- if (rf & 1) {
21556
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
21557
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21558
- i0__namespace.ɵɵelementStart(1, "td", 33);
21559
- i0__namespace.ɵɵelement(2, "div", 34);
21560
- i0__namespace.ɵɵelementStart(3, "span");
21561
- i0__namespace.ɵɵtext(4);
21562
- i0__namespace.ɵɵelement(5, "br");
21563
- i0__namespace.ɵɵtext(6);
21564
- i0__namespace.ɵɵpipe(7, "ccdCaseReference");
21565
- i0__namespace.ɵɵelementEnd();
21566
- i0__namespace.ɵɵelementEnd();
21567
- i0__namespace.ɵɵelementStart(8, "td", 35);
21568
- i0__namespace.ɵɵtext(9);
21569
- i0__namespace.ɵɵelementEnd();
21570
- i0__namespace.ɵɵelementStart(10, "td", 33);
21571
- i0__namespace.ɵɵtext(11);
21572
- i0__namespace.ɵɵelementEnd();
21573
- i0__namespace.ɵɵelementStart(12, "td", 35);
21574
- i0__namespace.ɵɵtext(13);
21575
- i0__namespace.ɵɵelementEnd();
21576
- i0__namespace.ɵɵelementStart(14, "td", 33);
21577
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
21578
- i0__namespace.ɵɵelementEnd();
21579
- i0__namespace.ɵɵelementStart(16, "td", 33);
21580
- i0__namespace.ɵɵelementStart(17, "a", 37);
21581
- 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); });
21582
- i0__namespace.ɵɵtext(18, "Remove");
21583
- i0__namespace.ɵɵelementEnd();
21584
- i0__namespace.ɵɵelementEnd();
21585
- i0__namespace.ɵɵelementEnd();
21586
- }
21587
- if (rf & 2) {
21588
- var case_r12 = ctx.$implicit;
21589
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21590
- i0__namespace.ɵɵadvance(2);
21591
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
21592
- i0__namespace.ɵɵadvance(2);
21593
- i0__namespace.ɵɵtextInterpolate1("", case_r12.caseName, " ");
21594
- i0__namespace.ɵɵadvance(2);
21595
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
21596
- i0__namespace.ɵɵadvance(2);
21597
- i0__namespace.ɵɵproperty("title", case_r12.caseTypeDescription);
21598
- i0__namespace.ɵɵadvance(1);
21599
- i0__namespace.ɵɵtextInterpolate(case_r12.caseType);
21600
- i0__namespace.ɵɵadvance(2);
21601
- i0__namespace.ɵɵtextInterpolate(case_r12.caseService);
21602
- i0__namespace.ɵɵadvance(1);
21603
- i0__namespace.ɵɵproperty("title", case_r12.caseStateDescription);
21604
- i0__namespace.ɵɵadvance(1);
21605
- i0__namespace.ɵɵtextInterpolate(case_r12.caseState);
21606
- i0__namespace.ɵɵadvance(2);
21607
- i0__namespace.ɵɵproperty("ngForOf", case_r12.reasons);
21608
- i0__namespace.ɵɵadvance(2);
21609
- i0__namespace.ɵɵattribute("id", case_r12.caseReference);
21610
- }
21611
- }
21612
- function LinkCasesComponent_tr_32_Template(rf, ctx) {
21613
- if (rf & 1) {
21614
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21615
- i0__namespace.ɵɵelementStart(1, "td", 38);
21616
- i0__namespace.ɵɵtext(2, " None ");
21617
- i0__namespace.ɵɵelementEnd();
21618
- i0__namespace.ɵɵelementEnd();
21619
- }
21620
- }
21621
- var LinkCasesComponent = /** @class */ (function () {
21622
- function LinkCasesComponent(casesService, fb, validatorsUtils, linkedCasesService) {
21623
- this.casesService = casesService;
21624
- this.fb = fb;
21625
- this.validatorsUtils = validatorsUtils;
21626
- this.linkedCasesService = linkedCasesService;
21627
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21628
- this.errorMessages = [];
21629
- this.selectedCases = [];
21630
- this.linkCaseReasons = [];
21631
- this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
21632
- }
21633
- LinkCasesComponent.prototype.ngOnInit = function () {
21634
- this.caseId = this.linkedCasesService.caseId;
21635
- this.caseName = this.linkedCasesService.caseName;
21636
- this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
21637
- this.initForm();
21638
- if (this.linkedCasesService.editMode) {
21639
- // this may have includes the currently added one but yet to be submitted.
21640
- this.selectedCases = this.linkedCasesService.linkedCases;
21641
- }
21642
- else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
21643
- this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
21644
- }
21645
- };
21646
- LinkCasesComponent.prototype.initForm = function () {
21647
- this.linkCaseForm = this.fb.group({
21648
- caseNumber: ['', [i2.Validators.minLength(16), this.validatorsUtils.regexPattern(exports.Patterns.CASE_REF)]],
21649
- reasonType: this.getReasonTypeFormArray,
21650
- });
21651
- };
21652
- Object.defineProperty(LinkCasesComponent.prototype, "getReasonTypeFormArray", {
21653
- get: function () {
21654
- var _this = this;
21655
- return this.fb.array(this.linkCaseReasons.map(function (val) { return _this.fb.group({
21656
- key: [val.key],
21657
- value_en: [val.value_en],
21658
- value_cy: [val.value_cy],
21659
- hint_text_en: [val.hint_text_en],
21660
- hint_text_cy: [val.hint_text_cy],
21661
- lov_order: [val.lov_order],
21662
- parent_key: [val.parent_key],
21663
- selected: [!!val.selected],
21664
- }); }), this.validatorsUtils.formArraySelectedValidator());
21665
- },
21666
- enumerable: false,
21667
- configurable: true
21668
- });
21669
- LinkCasesComponent.prototype.submitCaseInfo = function () {
21670
- this.errorMessages = [];
21671
- this.caseReasonError = null;
21672
- this.caseNumberError = null;
21673
- this.caseSelectionError = null;
21674
- this.noSelectedCaseError = null;
21675
- if (this.linkCaseForm.valid &&
21676
- !this.isCaseSelected(this.selectedCases) &&
21677
- !this.isCaseSelected(this.linkedCasesService.linkedCases) &&
21678
- !this.isCaseSelectedSameAsCurrentCase()) {
21679
- this.getCaseInfo();
21680
- }
21681
- else {
21682
- this.showErrorInfo();
21683
- }
21684
- };
21685
- LinkCasesComponent.prototype.isCaseSelected = function (linkedCases) {
21686
- if (linkedCases.length === 0) {
21687
- return false;
21688
- }
21689
- var caseNumber = this.linkCaseForm.value.caseNumber;
21690
- return !!linkedCases.find(function (caseLink) { return caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''); });
21691
- };
21692
- LinkCasesComponent.prototype.isCaseSelectedSameAsCurrentCase = function () {
21693
- return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
21694
- };
21695
- LinkCasesComponent.prototype.showErrorInfo = function () {
21696
- if (this.linkCaseForm.controls.caseNumber.invalid) {
21697
- this.caseNumberError = exports.LinkedCasesErrorMessages.CaseNumberError;
21698
- this.errorMessages.push({
21699
- title: 'dummy-case-number',
21700
- description: exports.LinkedCasesErrorMessages.CaseNumberError,
21701
- fieldId: 'caseNumber',
21702
- });
21703
- }
21704
- if (this.linkCaseForm.controls.reasonType.invalid) {
21705
- this.caseReasonError = exports.LinkedCasesErrorMessages.ReasonSelectionError;
21706
- this.errorMessages.push({
21707
- title: 'dummy-case-reason',
21708
- description: exports.LinkedCasesErrorMessages.ReasonSelectionError,
21709
- fieldId: 'caseReason',
21710
- });
21711
- }
21712
- if (this.isCaseSelected(this.selectedCases)) {
21713
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CaseProposedError;
21714
- this.errorMessages.push({
21715
- title: 'dummy-case-number',
21716
- description: exports.LinkedCasesErrorMessages.CaseProposedError,
21717
- fieldId: 'caseNumber',
21718
- });
21719
- }
21720
- if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
21721
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CasesLinkedError;
21722
- this.errorMessages.push({
21723
- title: 'dummy-case-number',
21724
- description: exports.LinkedCasesErrorMessages.CasesLinkedError,
21725
- fieldId: 'caseNumber',
21726
- });
21727
- }
21728
- if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
21729
- this.errorMessages.push({
21730
- title: 'dummy-case-number',
21731
- description: exports.LinkedCasesErrorMessages.ProposedCaseWithIn,
21732
- fieldId: 'caseNumber',
21733
- });
21734
- }
21735
- window.scrollTo(0, 0);
21736
- this.emitLinkedCasesState(false);
21737
- };
21738
- LinkCasesComponent.prototype.getCaseInfo = function () {
21739
- var _this = this;
21740
- var caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
21741
- this.casesService
21742
- .getCaseViewV2(caseNumberData)
21743
- .subscribe(function (caseView) {
21744
- _this.linkedCasesService.caseDetails = caseView;
21745
- var caseLink = {
21746
- caseReference: caseView.case_id,
21747
- reasons: _this.getSelectedCaseReasons(),
21748
- createdDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21749
- caseType: caseView.case_type.name || '',
21750
- caseTypeDescription: caseView.case_type.description || '',
21751
- caseState: caseView.state.name || '',
21752
- caseStateDescription: caseView.state.description || '',
21753
- caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
21754
- caseName: _this.linkedCasesService.getCaseName(caseView),
21755
- };
21756
- var ccdApiCaseLinkData = {
21757
- CaseReference: caseView.case_id,
21758
- CaseType: caseView.case_type.id,
21759
- CreatedDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21760
- ReasonForLink: _this.getSelectedCCDTypeCaseReason()
21761
- };
21762
- if (!_this.linkedCasesService.caseFieldValue) {
21763
- _this.linkedCasesService.caseFieldValue = [];
21764
- }
21765
- _this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
21766
- _this.selectedCases.push(caseLink);
21767
- _this.initForm();
21768
- _this.emitLinkedCasesState(false);
21769
- }, function (error) {
21770
- _this.caseNumberError = exports.LinkedCasesErrorMessages.CaseCheckAgainError;
21771
- _this.errorMessages.push({
21772
- title: 'dummy-case-number',
21773
- description: exports.LinkedCasesErrorMessages.CaseCheckAgainError,
21774
- fieldId: 'caseNumber',
21775
- });
21776
- _this.emitLinkedCasesState(false);
21777
- window.scrollTo(0, 0);
21778
- return rxjs.throwError(error);
21779
- });
21780
- };
21781
- // Return linked cases state and error messages to the parent
21782
- LinkCasesComponent.prototype.emitLinkedCasesState = function (isNavigateToNextPage) {
21783
- this.linkedCasesStateEmitter.emit({
21784
- currentLinkedCasesPage: exports.LinkedCasesPages.LINK_CASE,
21785
- errorMessages: this.errorMessages,
21786
- navigateToNextPage: isNavigateToNextPage,
21787
- });
21788
- };
21789
- LinkCasesComponent.prototype.getSelectedCaseReasons = function () {
21790
- var selectedReasons = [];
21791
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21792
- if (selectedReason.selected) {
21793
- selectedReasons.push({
21794
- reasonCode: selectedReason.key
21795
- });
21796
- }
21797
- });
21798
- return selectedReasons;
21799
- };
21800
- LinkCasesComponent.prototype.getSelectedCCDTypeCaseReason = function () {
21801
- var selectedReasons = [];
21802
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21803
- if (selectedReason.selected) {
21804
- selectedReasons.push({
21805
- value: {
21806
- Reason: selectedReason.key,
21807
- }
21808
- });
21809
- }
21810
- });
21811
- return selectedReasons;
21812
- };
21813
- LinkCasesComponent.prototype.onSelectedLinkedCaseRemove = function (pos, selectedCaseReference) {
21814
- var caseFieldValue = this.linkedCasesService.caseFieldValue || [];
21815
- var updatedItems = caseFieldValue.filter(function (item) { return item.value && item.value.CaseReference !== selectedCaseReference; });
21816
- if (updatedItems) {
21817
- this.linkedCasesService.caseFieldValue = updatedItems;
21818
- }
21819
- this.selectedCases.splice(pos, 1);
21820
- };
21821
- LinkCasesComponent.prototype.onNext = function () {
21822
- this.errorMessages = [];
21823
- this.caseReasonError = null;
21824
- this.caseNumberError = null;
21825
- this.caseSelectionError = null;
21826
- this.noSelectedCaseError = null;
21827
- var navigateToNextPage = true;
21828
- if (this.selectedCases.length) {
21829
- this.linkedCasesService.linkedCases = this.selectedCases;
21830
- }
21831
- else {
21832
- this.noSelectedCaseError = exports.LinkedCasesErrorMessages.CaseSelectionError;
21833
- this.errorMessages.push({
21834
- title: 'dummy-case-selection',
21835
- description: exports.LinkedCasesErrorMessages.CaseSelectionError,
21836
- fieldId: 'caseReason',
21837
- });
21838
- navigateToNextPage = false;
21839
- }
21840
- this.emitLinkedCasesState(navigateToNextPage);
21841
- };
21842
- return LinkCasesComponent;
21843
- }());
21844
- 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)); };
21845
- 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) {
21846
- if (rf & 1) {
21847
- i0__namespace.ɵɵelementStart(0, "div", 0);
21848
- i0__namespace.ɵɵelementStart(1, "div", 1);
21849
- i0__namespace.ɵɵelementStart(2, "div");
21850
- i0__namespace.ɵɵelementStart(3, "span", 2);
21851
- i0__namespace.ɵɵtext(4);
21852
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
21853
- i0__namespace.ɵɵelementEnd();
21854
- i0__namespace.ɵɵelementStart(6, "h1", 3);
21855
- i0__namespace.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
21856
- i0__namespace.ɵɵelementEnd();
21857
- i0__namespace.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
21858
- i0__namespace.ɵɵelement(9, "hr");
21859
- i0__namespace.ɵɵelement(10, "br");
21860
- i0__namespace.ɵɵelement(11, "br");
21861
- i0__namespace.ɵɵelementStart(12, "div", 5);
21862
- i0__namespace.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
21863
- i0__namespace.ɵɵelementStart(14, "table", 7);
21864
- i0__namespace.ɵɵelementStart(15, "caption", 8);
21865
- i0__namespace.ɵɵtext(16, "Proposed case links ");
21866
- i0__namespace.ɵɵelementEnd();
21867
- i0__namespace.ɵɵelementStart(17, "thead", 9);
21868
- i0__namespace.ɵɵelementStart(18, "tr", 10);
21869
- i0__namespace.ɵɵelementStart(19, "th", 11);
21870
- i0__namespace.ɵɵtext(20, "Case name and number");
21871
- i0__namespace.ɵɵelementEnd();
21872
- i0__namespace.ɵɵelementStart(21, "th", 12);
21873
- i0__namespace.ɵɵtext(22, "Case type ");
21874
- i0__namespace.ɵɵelementEnd();
21875
- i0__namespace.ɵɵelementStart(23, "th", 13);
21876
- i0__namespace.ɵɵtext(24, "Service");
21877
- i0__namespace.ɵɵelementEnd();
21878
- i0__namespace.ɵɵelementStart(25, "th", 13);
21879
- i0__namespace.ɵɵtext(26, "State");
21880
- i0__namespace.ɵɵelementEnd();
21881
- i0__namespace.ɵɵelementStart(27, "th", 14);
21882
- i0__namespace.ɵɵtext(28, "Reasons for case link");
21883
- i0__namespace.ɵɵelementEnd();
21884
- i0__namespace.ɵɵelement(29, "th", 15);
21885
- i0__namespace.ɵɵelementEnd();
21886
- i0__namespace.ɵɵelementEnd();
21887
- i0__namespace.ɵɵelementStart(30, "tbody", 16);
21888
- i0__namespace.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
21889
- i0__namespace.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
21890
- i0__namespace.ɵɵelementEnd();
21891
- i0__namespace.ɵɵelementEnd();
21892
- i0__namespace.ɵɵelementEnd();
21893
- i0__namespace.ɵɵelementStart(33, "div", 19);
21894
- i0__namespace.ɵɵelementStart(34, "button", 20);
21895
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
21896
- i0__namespace.ɵɵtext(35, "Next");
21897
- i0__namespace.ɵɵelementEnd();
21898
- i0__namespace.ɵɵelementEnd();
21899
- i0__namespace.ɵɵelementEnd();
21900
- i0__namespace.ɵɵelementEnd();
21901
- i0__namespace.ɵɵelementEnd();
21902
- }
21903
- if (rf & 2) {
21904
- i0__namespace.ɵɵadvance(4);
21905
- i0__namespace.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0__namespace.ɵɵpipeBind1(5, 7, ctx.caseId), "");
21906
- i0__namespace.ɵɵadvance(4);
21907
- i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
21908
- i0__namespace.ɵɵadvance(4);
21909
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
21910
- i0__namespace.ɵɵadvance(1);
21911
- i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
21912
- i0__namespace.ɵɵadvance(18);
21913
- i0__namespace.ɵɵproperty("ngForOf", ctx.selectedCases);
21914
- i0__namespace.ɵɵadvance(1);
21915
- i0__namespace.ɵɵproperty("ngIf", !ctx.selectedCases.length);
21916
- }
21917
- }, 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}"] });
21918
- (function () {
21919
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesComponent, [{
21920
- type: i0.Component,
21921
- args: [{
21922
- selector: 'ccd-link-cases',
21923
- styleUrls: ['./link-cases.component.scss'],
21924
- templateUrl: './link-cases.component.html',
21925
- }]
21926
- }], function () { return [{ type: CasesService }, { type: i2__namespace.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21927
- type: i0.Output
21928
- }] });
21929
- })();
21930
-
21931
- function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) {
21932
- if (rf & 1) {
21933
- var _r3_1 = i0__namespace.ɵɵgetCurrentView();
21934
- i0__namespace.ɵɵelementStart(0, "a", 2);
21935
- 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(); });
21936
- i0__namespace.ɵɵtext(1);
21937
- i0__namespace.ɵɵelementEnd();
21938
- }
21939
- if (rf & 2) {
21940
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21941
- i0__namespace.ɵɵadvance(1);
21942
- i0__namespace.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
21943
- }
21944
- }
21945
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) {
21946
- if (rf & 1) {
21947
- i0__namespace.ɵɵelementStart(0, "span");
21948
- i0__namespace.ɵɵtext(1);
21949
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21950
- i0__namespace.ɵɵelement(3, "br");
21951
- i0__namespace.ɵɵelementEnd();
21952
- }
21953
- if (rf & 2) {
21954
- var reason_r11 = ctx.$implicit;
21955
- i0__namespace.ɵɵadvance(1);
21956
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
21957
- }
21958
- }
21959
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) {
21960
- if (rf & 1) {
21961
- i0__namespace.ɵɵelementStart(0, "td", 14);
21962
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
21963
- i0__namespace.ɵɵelementEnd();
21964
- }
21965
- if (rf & 2) {
21966
- var details_r9 = ctx.$implicit;
21967
- i0__namespace.ɵɵadvance(1);
21968
- i0__namespace.ɵɵproperty("ngForOf", details_r9.reasons);
21969
- }
21970
- }
21971
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) {
21972
- if (rf & 1) {
21973
- i0__namespace.ɵɵelementStart(0, "tr", 5);
21974
- i0__namespace.ɵɵelementStart(1, "td", 11);
21975
- i0__namespace.ɵɵelementStart(2, "p", 12);
21976
- i0__namespace.ɵɵelementStart(3, "a", 13);
21977
- i0__namespace.ɵɵelementStart(4, "span");
21978
- i0__namespace.ɵɵtext(5);
21979
- i0__namespace.ɵɵelement(6, "br");
21980
- i0__namespace.ɵɵtext(7);
21981
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
21982
- i0__namespace.ɵɵelementEnd();
21983
- i0__namespace.ɵɵelementEnd();
21984
- i0__namespace.ɵɵelementEnd();
21985
- i0__namespace.ɵɵelementEnd();
21986
- i0__namespace.ɵɵelementStart(9, "td", 14);
21987
- i0__namespace.ɵɵelementStart(10, "span", 15);
21988
- i0__namespace.ɵɵtext(11);
21989
- i0__namespace.ɵɵelementEnd();
21990
- i0__namespace.ɵɵelementEnd();
21991
- i0__namespace.ɵɵelementStart(12, "td", 14);
21992
- i0__namespace.ɵɵelementStart(13, "span");
21993
- i0__namespace.ɵɵtext(14);
21994
- i0__namespace.ɵɵelementEnd();
21995
- i0__namespace.ɵɵelementEnd();
21996
- i0__namespace.ɵɵelementStart(15, "td", 14);
21997
- i0__namespace.ɵɵelementStart(16, "span", 15);
21998
- i0__namespace.ɵɵtext(17);
21999
- i0__namespace.ɵɵelementEnd();
22000
- i0__namespace.ɵɵelementEnd();
22001
- i0__namespace.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
22002
- i0__namespace.ɵɵelementEnd();
22003
- }
22004
- if (rf & 2) {
22005
- var case_r7 = ctx.$implicit;
22006
- i0__namespace.ɵɵadvance(3);
22007
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
22008
- i0__namespace.ɵɵadvance(2);
22009
- i0__namespace.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
22010
- i0__namespace.ɵɵadvance(2);
22011
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
22012
- i0__namespace.ɵɵadvance(3);
22013
- i0__namespace.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
22014
- i0__namespace.ɵɵadvance(1);
22015
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdCaseType);
22016
- i0__namespace.ɵɵadvance(3);
22017
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
22018
- i0__namespace.ɵɵadvance(2);
22019
- i0__namespace.ɵɵproperty("title", case_r7.stateDescription);
22020
- i0__namespace.ɵɵadvance(1);
22021
- i0__namespace.ɵɵtextInterpolate(case_r7.state);
22022
- i0__namespace.ɵɵadvance(1);
22023
- i0__namespace.ɵɵproperty("ngForOf", case_r7.linkDetails);
22024
- }
22025
- }
22026
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) {
22027
- if (rf & 1) {
22028
- i0__namespace.ɵɵelementStart(0, "tr", 5);
22029
- i0__namespace.ɵɵelementStart(1, "td", 18);
22030
- i0__namespace.ɵɵtext(2, " None ");
22031
- i0__namespace.ɵɵelementEnd();
22032
- i0__namespace.ɵɵelementEnd();
22033
- }
22034
- }
22035
- function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) {
22036
- if (rf & 1) {
22037
- i0__namespace.ɵɵelementStart(0, "tbody", 8);
22038
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
22039
- i0__namespace.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
22040
- i0__namespace.ɵɵelementEnd();
22041
- }
22042
- if (rf & 2) {
22043
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
22044
- i0__namespace.ɵɵadvance(1);
22045
- i0__namespace.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
22046
- i0__namespace.ɵɵadvance(1);
22047
- i0__namespace.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
22048
- }
22049
- }
22050
- function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) {
22051
- if (rf & 1) {
22052
- i0__namespace.ɵɵelementStart(0, "table", 3);
22053
- i0__namespace.ɵɵelementStart(1, "thead", 4);
22054
- i0__namespace.ɵɵelementStart(2, "tr", 5);
22055
- i0__namespace.ɵɵelementStart(3, "th", 6);
22056
- i0__namespace.ɵɵtext(4, "Case name and number");
22057
- i0__namespace.ɵɵelementEnd();
22058
- i0__namespace.ɵɵelementStart(5, "th", 6);
22059
- i0__namespace.ɵɵtext(6, "Case type ");
22060
- i0__namespace.ɵɵelementEnd();
22061
- i0__namespace.ɵɵelementStart(7, "th", 6);
22062
- i0__namespace.ɵɵtext(8, "Service");
22063
- i0__namespace.ɵɵelementEnd();
22064
- i0__namespace.ɵɵelementStart(9, "th", 6);
22065
- i0__namespace.ɵɵtext(10, "State");
22066
- i0__namespace.ɵɵelementEnd();
22067
- i0__namespace.ɵɵelementStart(11, "th", 6);
22068
- i0__namespace.ɵɵtext(12, "Reasons for case link");
22069
- i0__namespace.ɵɵelementEnd();
22070
- i0__namespace.ɵɵelementEnd();
22071
- i0__namespace.ɵɵelementEnd();
22072
- i0__namespace.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
22073
- i0__namespace.ɵɵelementEnd();
22074
- }
22075
- if (rf & 2) {
22076
- var ctx_r1 = i0__namespace.ɵɵnextContext();
22077
- i0__namespace.ɵɵadvance(13);
22078
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
22079
- }
22080
- }
22081
- exports.PageType = void 0;
22082
- (function (PageType) {
22083
- PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
22084
- PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
22085
- })(exports.PageType || (exports.PageType = {}));
22086
- var LinkedCasesFromTableComponent = /** @class */ (function () {
22087
- function LinkedCasesFromTableComponent(route, casesService, linkedCasesService) {
22088
- this.route = route;
22089
- this.casesService = casesService;
22090
- this.linkedCasesService = linkedCasesService;
22091
- this.notifyAPIFailure = new i0.EventEmitter(false);
22092
- this.pageType = exports.PageType;
22093
- this.getLinkedCasesResponse = [];
22094
- this.showHideLinkText = 'Show';
22095
- this.noLinkedCases = true;
22096
- this.isServerError = false;
22097
- }
22098
- LinkedCasesFromTableComponent.prototype.ngAfterViewInit = function () {
22099
- var labelField = document.getElementsByClassName('case-viewer-label');
22100
- if (labelField && labelField.length) {
22101
- labelField[0].replaceWith('');
22102
- }
22103
- };
22104
- LinkedCasesFromTableComponent.prototype.ngOnInit = function () {
22105
- this.fetchPageData();
22106
- if (this.route.snapshot.data.case) {
22107
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
22108
- }
22109
- };
22110
- LinkedCasesFromTableComponent.prototype.fetchPageData = function () {
22111
- var _this = this;
22112
- this.caseId = this.route.snapshot.data.case.case_id;
22113
- this.getLinkedCases().subscribe(function (response) {
22114
- _this.isServerError = false;
22115
- _this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(function (item) {
22116
- var mappedCasetype = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
22117
- var mappedCasetypeDescription = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
22118
- var mappedCaseState = _this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
22119
- var mappedCaseStateDescription = _this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
22120
- var mappedCaseService = _this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
22121
- return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
22122
- });
22123
- _this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
22124
- }, function (err) {
22125
- _this.isServerError = true;
22126
- _this.notifyAPIFailure.emit(true);
22127
- });
22128
- };
22129
- LinkedCasesFromTableComponent.prototype.getLinkedCases = function () {
22130
- return this.casesService.getLinkedCases(this.caseId);
22131
- };
22132
- LinkedCasesFromTableComponent.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
22133
- return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
22134
- };
22135
- LinkedCasesFromTableComponent.prototype.onClick = function () {
22136
- this.showHideLinkText = this.showHideLinkText === 'Show'
22137
- ? 'Hide'
22138
- : 'Show';
22139
- };
22140
- return LinkedCasesFromTableComponent;
22141
- }());
22142
- LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
22143
- 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)); };
22144
- 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) {
22145
- if (rf & 1) {
22146
- i0__namespace.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
22147
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
22148
- }
22149
- if (rf & 2) {
22150
- i0__namespace.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
22151
- i0__namespace.ɵɵadvance(1);
22152
- i0__namespace.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
22153
- }
22154
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
22155
- (function () {
22156
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
22157
- type: i0.Component,
22158
- args: [{
22159
- selector: 'ccd-linked-cases-from-table',
22160
- templateUrl: './linked-cases-from-table.component.html',
22161
- styleUrls: ['./linked-cases-from-table.component.scss']
22162
- }]
22163
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
22164
- type: i0.Input
22165
- }], notifyAPIFailure: [{
22166
- type: i0.Output
22167
- }] });
22168
- })();
22169
-
22170
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) {
22171
- if (rf & 1) {
22172
- i0__namespace.ɵɵelementStart(0, "a", 16);
22173
- i0__namespace.ɵɵtext(1);
22174
- i0__namespace.ɵɵelementEnd();
22175
- }
22176
- if (rf & 2) {
22177
- var case_r3 = i0__namespace.ɵɵnextContext(3).$implicit;
22178
- var ctx_r9 = i0__namespace.ɵɵnextContext(2);
22179
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
22180
- i0__namespace.ɵɵadvance(1);
22181
- i0__namespace.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
22182
- }
22183
- }
22184
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) {
22185
- if (rf & 1) {
22186
- i0__namespace.ɵɵelement(0, "br");
22187
- }
22188
- }
22189
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) {
22190
- if (rf & 1) {
22191
- i0__namespace.ɵɵelementStart(0, "span");
22192
- i0__namespace.ɵɵtext(1);
22193
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
22194
- i0__namespace.ɵɵelementStart(3, "span");
22195
- i0__namespace.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
22196
- i0__namespace.ɵɵelementEnd();
22197
- i0__namespace.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
22198
- i0__namespace.ɵɵelementEnd();
22199
- }
22200
- if (rf & 2) {
22201
- var reason_r6 = ctx.$implicit;
22202
- var isLast_r8 = ctx.last;
22203
- var ctx_r5 = i0__namespace.ɵɵnextContext(4);
22204
- i0__namespace.ɵɵadvance(1);
22205
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 3, reason_r6), "");
22206
- i0__namespace.ɵɵadvance(3);
22207
- i0__namespace.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
22208
- i0__namespace.ɵɵadvance(1);
22209
- i0__namespace.ɵɵproperty("ngIf", !isLast_r8);
22210
- }
22211
- }
22212
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) {
22213
- if (rf & 1) {
22214
- i0__namespace.ɵɵelementStart(0, "td");
22215
- i0__namespace.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
22216
- i0__namespace.ɵɵelementEnd();
22217
- }
22218
- if (rf & 2) {
22219
- var case_r3 = i0__namespace.ɵɵnextContext().$implicit;
22220
- i0__namespace.ɵɵadvance(1);
22221
- i0__namespace.ɵɵproperty("ngForOf", case_r3.reasons);
22222
- }
22223
- }
22224
- function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) {
22225
- if (rf & 1) {
22226
- i0__namespace.ɵɵelementStart(0, "tr", 4);
22227
- i0__namespace.ɵɵelementStart(1, "td");
22228
- i0__namespace.ɵɵelementStart(2, "p", 9);
22229
- i0__namespace.ɵɵelementStart(3, "a", 10);
22230
- i0__namespace.ɵɵelementStart(4, "span", 11);
22231
- i0__namespace.ɵɵtext(5);
22232
- i0__namespace.ɵɵelement(6, "br");
22233
- i0__namespace.ɵɵtext(7);
22234
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
22235
- i0__namespace.ɵɵelementEnd();
22236
- i0__namespace.ɵɵelementEnd();
22237
- i0__namespace.ɵɵelementEnd();
22238
- i0__namespace.ɵɵelementEnd();
22239
- i0__namespace.ɵɵelementStart(9, "td");
22240
- i0__namespace.ɵɵelementStart(10, "span", 12);
22241
- i0__namespace.ɵɵtext(11);
22242
- i0__namespace.ɵɵelementEnd();
22243
- i0__namespace.ɵɵelementEnd();
22244
- i0__namespace.ɵɵelementStart(12, "td");
22245
- i0__namespace.ɵɵelementStart(13, "span");
22246
- i0__namespace.ɵɵtext(14);
22247
- i0__namespace.ɵɵelementEnd();
22248
- i0__namespace.ɵɵelementEnd();
22249
- i0__namespace.ɵɵelementStart(15, "td");
22250
- i0__namespace.ɵɵelementStart(16, "span", 12);
22251
- i0__namespace.ɵɵtext(17);
22252
- i0__namespace.ɵɵelementEnd();
22253
- i0__namespace.ɵɵelementEnd();
22254
- i0__namespace.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
22255
- i0__namespace.ɵɵelementEnd();
22256
- }
22257
- if (rf & 2) {
22258
- var case_r3 = ctx.$implicit;
22259
- i0__namespace.ɵɵadvance(3);
22260
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
22261
- i0__namespace.ɵɵadvance(2);
22262
- i0__namespace.ɵɵtextInterpolate1("", case_r3.caseName, " ");
22263
- i0__namespace.ɵɵadvance(2);
22264
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
22265
- i0__namespace.ɵɵadvance(3);
22266
- i0__namespace.ɵɵproperty("title", case_r3.caseTypeDescription);
22267
- i0__namespace.ɵɵadvance(1);
22268
- i0__namespace.ɵɵtextInterpolate(case_r3.caseType);
22269
- i0__namespace.ɵɵadvance(3);
22270
- i0__namespace.ɵɵtextInterpolate(case_r3.service);
22271
- i0__namespace.ɵɵadvance(2);
22272
- i0__namespace.ɵɵproperty("title", case_r3.stateDescription);
22273
- i0__namespace.ɵɵadvance(1);
22274
- i0__namespace.ɵɵtextInterpolate(case_r3.state);
22275
- i0__namespace.ɵɵadvance(1);
22276
- i0__namespace.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
22277
- }
22278
- }
22279
- function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) {
22280
- if (rf & 1) {
22281
- i0__namespace.ɵɵelementStart(0, "tr", 4);
22282
- i0__namespace.ɵɵelementStart(1, "td", 17);
22283
- i0__namespace.ɵɵtext(2, " None ");
22284
- i0__namespace.ɵɵelementEnd();
22285
- i0__namespace.ɵɵelementEnd();
22286
- }
22287
- }
22288
- function LinkedCasesToTableComponent_table_2_Template(rf, ctx) {
22289
- if (rf & 1) {
22290
- i0__namespace.ɵɵelementStart(0, "table", 3);
22291
- i0__namespace.ɵɵelementStart(1, "thead");
22292
- i0__namespace.ɵɵelementStart(2, "tr", 4);
22293
- i0__namespace.ɵɵelementStart(3, "th", 5);
22294
- i0__namespace.ɵɵtext(4, "Case name and number");
22295
- i0__namespace.ɵɵelementEnd();
22296
- i0__namespace.ɵɵelementStart(5, "th", 5);
22297
- i0__namespace.ɵɵtext(6, "Case type ");
22298
- i0__namespace.ɵɵelementEnd();
22299
- i0__namespace.ɵɵelementStart(7, "th", 5);
22300
- i0__namespace.ɵɵtext(8, "Service");
22301
- i0__namespace.ɵɵelementEnd();
22302
- i0__namespace.ɵɵelementStart(9, "th", 5);
22303
- i0__namespace.ɵɵtext(10, "State");
22304
- i0__namespace.ɵɵelementEnd();
22305
- i0__namespace.ɵɵelementStart(11, "th", 5);
22306
- i0__namespace.ɵɵtext(12, "Reasons for case link");
22307
- i0__namespace.ɵɵelementEnd();
22308
- i0__namespace.ɵɵelementEnd();
22309
- i0__namespace.ɵɵelementEnd();
22310
- i0__namespace.ɵɵelementStart(13, "tbody", 6);
22311
- i0__namespace.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
22312
- i0__namespace.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
22313
- i0__namespace.ɵɵelementEnd();
22314
- i0__namespace.ɵɵelementEnd();
22315
- }
22316
- if (rf & 2) {
22317
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22318
- i0__namespace.ɵɵadvance(14);
22319
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
22320
- i0__namespace.ɵɵadvance(1);
22321
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
22322
- }
22323
- }
22324
- var LinkedCasesToTableComponent = /** @class */ (function () {
22325
- function LinkedCasesToTableComponent(route, linkedCasesService, casesService) {
22326
- this.route = route;
22327
- this.linkedCasesService = linkedCasesService;
22328
- this.casesService = casesService;
22329
- this.notifyAPIFailure = new i0.EventEmitter(false);
22330
- this.linkedCasesFromResponse = [];
22331
- this.isServerError = false;
22332
- this.jurisdictionsResponse = [];
22333
- }
22334
- LinkedCasesToTableComponent.prototype.ngAfterViewInit = function () {
22335
- var labelField = document.getElementsByClassName('govuk-heading-l');
22336
- if (labelField && labelField.length) {
22337
- labelField[0].replaceWith('');
22338
- }
22339
- labelField = document.getElementsByClassName('heading-h2');
22340
- if (labelField && labelField.length) {
22341
- labelField[0].replaceWith('');
22342
- }
22343
- };
22344
- LinkedCasesToTableComponent.prototype.ngOnInit = function () {
22345
- this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
22346
- this.getAllLinkedCaseInformation();
22347
- if (this.route.snapshot.data.case) {
22348
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
22349
- }
22350
- };
22351
- LinkedCasesToTableComponent.prototype.getCaseRefereneLink = function (caseRef) {
22352
- return caseRef.slice(this.caseId.length - 4);
22353
- };
22354
- LinkedCasesToTableComponent.prototype.sortLinkedCasesByReasonCode = function (searchCasesResponse) {
22355
- var topLevelresultArray = [];
22356
- var secondLevelresultArray = [];
22357
- searchCasesResponse.forEach(function (item) {
22358
- var reasons = item && item.reasons || [];
22359
- var consolidatedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE; });
22360
- var progressedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE; });
22361
- var arrayItem;
22362
- if (progressedStateReason) {
22363
- arrayItem = Object.assign({}, item);
22364
- topLevelresultArray.push(arrayItem);
22365
- }
22366
- else if (consolidatedStateReason) {
22367
- arrayItem = Object.assign({}, item);
22368
- secondLevelresultArray = __spread([Object.assign({}, item)], secondLevelresultArray);
22369
- }
22370
- else {
22371
- arrayItem = Object.assign({}, item);
22372
- secondLevelresultArray.push(Object.assign({}, item));
22373
- }
22374
- });
22375
- return topLevelresultArray.concat(secondLevelresultArray);
22376
- };
22377
- LinkedCasesToTableComponent.prototype.getAllLinkedCaseInformation = function () {
22378
- var _this = this;
22379
- var searchCasesResponse = [];
22380
- var caseFieldValue = this.caseField ? this.caseField.value : [];
22381
- // Generate the list of observables
22382
- caseFieldValue.forEach(function (fieldValue) {
22383
- if (fieldValue && fieldValue.id) {
22384
- searchCasesResponse.push(_this.casesService.getCaseViewV2(fieldValue.id));
22385
- }
22386
- });
22387
- if (searchCasesResponse.length) {
22388
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22389
- var casesResponse = [];
22390
- searchCases.forEach(function (response) {
22391
- casesResponse.push(_this.mapResponse(response));
22392
- });
22393
- _this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
22394
- _this.isLoaded = true;
22395
- var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
22396
- return {
22397
- caseReference: item.caseReference,
22398
- caseName: item.caseName,
22399
- caseService: item.service,
22400
- caseType: item.caseType,
22401
- unlink: false,
22402
- reasons: item.reasons && item.reasons.map(function (reason) {
22403
- return {
22404
- reasonCode: reason
22405
- };
22406
- }),
22407
- };
22408
- });
22409
- _this.linkedCasesService.initialCaseLinks = caseLinks;
22410
- _this.linkedCasesService.linkedCases = caseLinks;
22411
- _this.isServerError = false;
22412
- }, function (err) {
22413
- _this.isServerError = true;
22414
- _this.notifyAPIFailure.emit(true);
22415
- });
22416
- }
22417
- };
22418
- LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22419
- return rxjs.forkJoin(searchCasesResponse);
22420
- };
22421
- LinkedCasesToTableComponent.prototype.hasLeadCaseOrConsolidated = function (reasonCode) {
22422
- return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
22423
- reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
22424
- };
22425
- LinkedCasesToTableComponent.prototype.mapResponse = function (esSearchCasesResponse) {
22426
- var caseInfo = this.caseField.value.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
22427
- return caseInfo && {
22428
- caseReference: esSearchCasesResponse.case_id,
22429
- caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
22430
- caseType: esSearchCasesResponse.case_type.name || '',
22431
- caseTypeDescription: esSearchCasesResponse.case_type.description || '',
22432
- service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
22433
- state: esSearchCasesResponse.state.name || '',
22434
- stateDescription: esSearchCasesResponse.state.description || '',
22435
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
22436
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
22437
- };
22438
- };
22439
- return LinkedCasesToTableComponent;
22440
- }());
22441
- LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
22442
- LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
22443
- 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)); };
22444
- 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) {
22445
- if (rf & 1) {
22446
- i0__namespace.ɵɵelementStart(0, "div", 0);
22447
- i0__namespace.ɵɵelementStart(1, "div", 1);
22448
- i0__namespace.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
22449
- i0__namespace.ɵɵelementEnd();
22450
- i0__namespace.ɵɵelementEnd();
22451
- }
22452
- if (rf & 2) {
22453
- i0__namespace.ɵɵadvance(2);
22454
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
22455
- }
22456
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
22457
- (function () {
22458
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
22459
- type: i0.Component,
22460
- args: [{
22461
- selector: 'ccd-linked-cases-to-table',
22462
- templateUrl: './linked-cases-to-table.component.html',
22463
- styleUrls: ['./linked-cases-to-table.component.scss']
22464
- }]
22465
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
22466
- type: i0.Input
22467
- }], notifyAPIFailure: [{
22468
- type: i0.Output
22469
- }] });
22470
- })();
22471
-
22472
- function NoLinkedCasesComponent_h1_2_Template(rf, ctx) {
22473
- if (rf & 1) {
22474
- i0__namespace.ɵɵelementStart(0, "h1", 9);
22475
- i0__namespace.ɵɵtext(1, "There is a problem");
22476
- i0__namespace.ɵɵelementEnd();
22477
- }
22478
- }
22479
- function NoLinkedCasesComponent_p_3_Template(rf, ctx) {
22480
- if (rf & 1) {
22481
- i0__namespace.ɵɵelementStart(0, "p", 10);
22482
- i0__namespace.ɵɵelementStart(1, "span", 11);
22483
- i0__namespace.ɵɵtext(2, "Error:");
22484
- i0__namespace.ɵɵelementEnd();
22485
- i0__namespace.ɵɵtext(3);
22486
- i0__namespace.ɵɵelementEnd();
22487
- }
22488
- if (rf & 2) {
22489
- var ctx_r1 = i0__namespace.ɵɵnextContext();
22490
- i0__namespace.ɵɵadvance(3);
22491
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
22492
- }
22493
- }
22494
- function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) {
22495
- if (rf & 1) {
22496
- i0__namespace.ɵɵelementStart(0, "p", 5);
22497
- i0__namespace.ɵɵtext(1, "There are no cases linked to this one.");
22498
- i0__namespace.ɵɵelementEnd();
22499
- }
22500
- }
22501
- var NoLinkedCasesComponent = /** @class */ (function () {
22502
- function NoLinkedCasesComponent(router, linkedCasesService) {
22503
- this.router = router;
22504
- this.linkedCasesService = linkedCasesService;
22505
- }
22506
- NoLinkedCasesComponent.prototype.onBack = function () {
22507
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
22508
- window.location.hash = 'Linked cases';
22509
- });
22510
- };
22511
- return NoLinkedCasesComponent;
22512
- }());
22513
- NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
22514
- 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) {
22515
- if (rf & 1) {
22516
- i0__namespace.ɵɵelementStart(0, "div", 0);
22517
- i0__namespace.ɵɵelementStart(1, "div", 1);
22518
- i0__namespace.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
22519
- i0__namespace.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
22520
- i0__namespace.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0__namespace.ɵɵtemplateRefExtractor);
22521
- i0__namespace.ɵɵelementStart(6, "p", 5);
22522
- i0__namespace.ɵɵelementStart(7, "a", 6);
22523
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
22524
- i0__namespace.ɵɵtext(8, "Go back to the Linked cases tab");
22525
- i0__namespace.ɵɵelementEnd();
22526
- i0__namespace.ɵɵelementEnd();
22527
- i0__namespace.ɵɵelementStart(9, "div", 7);
22528
- i0__namespace.ɵɵelementStart(10, "button", 8);
22529
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
22530
- i0__namespace.ɵɵtext(11, "Back");
22531
- i0__namespace.ɵɵelementEnd();
22532
- i0__namespace.ɵɵelementEnd();
22533
- i0__namespace.ɵɵelementEnd();
22534
- i0__namespace.ɵɵelementEnd();
22535
- }
22536
- if (rf & 2) {
22537
- var _r2 = i0__namespace.ɵɵreference(5);
22538
- i0__namespace.ɵɵadvance(2);
22539
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
22540
- i0__namespace.ɵɵadvance(1);
22541
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
22542
- }
22543
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
22544
- (function () {
22545
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NoLinkedCasesComponent, [{
22546
- type: i0.Component,
22547
- args: [{
22548
- selector: 'ccd-no-linked-cases',
22549
- templateUrl: './no-linked-cases.component.html'
22550
- }]
22551
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, null);
22552
- })();
22553
-
22554
- function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) {
22555
- if (rf & 1) {
22556
- i0__namespace.ɵɵelementStart(0, "p", 11);
22557
- i0__namespace.ɵɵelementStart(1, "span", 12);
22558
- i0__namespace.ɵɵtext(2, "Error:");
22559
- i0__namespace.ɵɵelementEnd();
22560
- i0__namespace.ɵɵtext(3);
22561
- i0__namespace.ɵɵelementEnd();
22562
- }
22563
- if (rf & 2) {
22564
- var ctx_r2 = i0__namespace.ɵɵnextContext(3);
22565
- i0__namespace.ɵɵadvance(3);
22566
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
22567
- }
22568
- }
22569
- function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) {
22570
- if (rf & 1) {
22571
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
22572
- i0__namespace.ɵɵelementStart(0, "div", 13);
22573
- i0__namespace.ɵɵelementStart(1, "input", 14);
22574
- 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); });
22575
- i0__namespace.ɵɵelementEnd();
22576
- i0__namespace.ɵɵelementStart(2, "label", 15);
22577
- i0__namespace.ɵɵtext(3);
22578
- i0__namespace.ɵɵpipe(4, "ccdCaseReference");
22579
- i0__namespace.ɵɵelementEnd();
22580
- i0__namespace.ɵɵelementEnd();
22581
- }
22582
- if (rf & 2) {
22583
- var case_r4 = ctx.$implicit;
22584
- i0__namespace.ɵɵadvance(1);
22585
- i0__namespace.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
22586
- i0__namespace.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
22587
- i0__namespace.ɵɵadvance(1);
22588
- i0__namespace.ɵɵpropertyInterpolate("for", case_r4.caseReference);
22589
- i0__namespace.ɵɵadvance(1);
22590
- i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
22591
- }
22592
- }
22593
- var _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
22594
- function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
22595
- if (rf & 1) {
22596
- i0__namespace.ɵɵelementStart(0, "div", 7);
22597
- i0__namespace.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
22598
- i0__namespace.ɵɵelementStart(2, "div", 9);
22599
- i0__namespace.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
22600
- i0__namespace.ɵɵelementEnd();
22601
- i0__namespace.ɵɵelementEnd();
22602
- }
22603
- if (rf & 2) {
22604
- var ctx_r1 = i0__namespace.ɵɵnextContext(2);
22605
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
22606
- i0__namespace.ɵɵadvance(1);
22607
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
22608
- i0__namespace.ɵɵadvance(2);
22609
- i0__namespace.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
22610
- }
22611
- }
22612
- function UnLinkCasesComponent_div_0_Template(rf, ctx) {
22613
- if (rf & 1) {
22614
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
22615
- i0__namespace.ɵɵelementStart(0, "div", 1);
22616
- i0__namespace.ɵɵelementStart(1, "div", 2);
22617
- i0__namespace.ɵɵelementStart(2, "h1", 3);
22618
- i0__namespace.ɵɵtext(3, "Select the cases you want to unlink from this case");
22619
- i0__namespace.ɵɵelementEnd();
22620
- i0__namespace.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
22621
- i0__namespace.ɵɵelementStart(5, "div", 5);
22622
- i0__namespace.ɵɵelementStart(6, "button", 6);
22623
- 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(); });
22624
- i0__namespace.ɵɵtext(7, "Next");
22625
- i0__namespace.ɵɵelementEnd();
22626
- i0__namespace.ɵɵelementEnd();
22627
- i0__namespace.ɵɵelementEnd();
22628
- i0__namespace.ɵɵelementEnd();
22629
- }
22630
- if (rf & 2) {
22631
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22632
- i0__namespace.ɵɵadvance(4);
22633
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
22634
- }
22635
- }
22636
- var UnLinkCasesComponent = /** @class */ (function () {
22637
- function UnLinkCasesComponent(caseEdit, fb, casesService, linkedCasesService) {
22638
- this.caseEdit = caseEdit;
22639
- this.fb = fb;
22640
- this.casesService = casesService;
22641
- this.linkedCasesService = linkedCasesService;
22642
- this.linkedCasesStateEmitter = new i0.EventEmitter();
22643
- this.notifyAPIFailure = new i0.EventEmitter(false);
22644
- this.linkedCases = [];
22645
- this.errorMessages = [];
22646
- this.isServerError = false;
22647
- }
22648
- UnLinkCasesComponent.prototype.ngOnInit = function () {
22649
- this.getLinkedCases();
22650
- };
22651
- UnLinkCasesComponent.prototype.getLinkedCases = function () {
22652
- var _this = this;
22653
- this.caseId = this.linkedCasesService.caseId;
22654
- if (this.linkedCasesService.linkedCases.length > 0) {
22655
- this.linkedCases = this.linkedCasesService.linkedCases;
22656
- this.getAllLinkedCaseInformation();
22657
- }
22658
- else {
22659
- this.casesService.getCaseViewV2(this.caseId).subscribe(function (caseView) {
22660
- var linkedCasesTab = caseView.tabs.find(function (tab) { return tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID; });
22661
- if (linkedCasesTab) {
22662
- var linkedCases = linkedCasesTab.fields[0].value;
22663
- _this.linkedCases = linkedCases;
22664
- _this.linkedCasesService.linkedCases = linkedCases;
22665
- _this.getAllLinkedCaseInformation();
22666
- }
22667
- });
22668
- }
22669
- };
22670
- UnLinkCasesComponent.prototype.getAllLinkedCaseInformation = function () {
22671
- var _this = this;
22672
- var searchCasesResponse = [];
22673
- this.linkedCases.forEach(function (linkedCase) {
22674
- searchCasesResponse.push(_this.casesService.getCaseViewV2(linkedCase.caseReference));
22675
- });
22676
- if (searchCasesResponse.length) {
22677
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22678
- searchCases.forEach(function (response) {
22679
- var linkedCaseFromList = _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; });
22680
- if (linkedCaseFromList) {
22681
- var caseName = _this.linkedCasesService.getCaseName(response);
22682
- _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; }).caseName = caseName;
22683
- }
22684
- });
22685
- _this.initForm();
22686
- _this.linkedCasesService.linkedCases = _this.linkedCases;
22687
- _this.isServerError = false;
22688
- }, function (err) {
22689
- _this.isServerError = true;
22690
- _this.notifyAPIFailure.emit(true);
22691
- });
22692
- }
22693
- };
22694
- UnLinkCasesComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22695
- return rxjs.forkJoin(searchCasesResponse);
22696
- };
22697
- UnLinkCasesComponent.prototype.initForm = function () {
22698
- this.unlinkCaseForm = this.fb.group({
22699
- linkedCases: this.getLinkedCasesFormArray
22700
- });
22701
- };
22702
- Object.defineProperty(UnLinkCasesComponent.prototype, "getLinkedCasesFormArray", {
22703
- get: function () {
22704
- var _this = this;
22705
- var formFieldArray = this.linkedCases.map(function (val) { return _this.fb.group({
22706
- caseReference: val.caseReference,
22707
- reasons: val.reasons,
22708
- createdDateTime: val.createdDateTime,
22709
- caseType: val.caseType,
22710
- caseState: val.caseState,
22711
- caseService: val.caseService,
22712
- caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
22713
- unlink: val.unlink
22714
- }); });
22715
- return this.fb.array(formFieldArray);
22716
- },
22717
- enumerable: false,
22718
- configurable: true
22719
- });
22720
- UnLinkCasesComponent.prototype.onChange = function (caseSelected) {
22721
- this.resetErrorMessages();
22722
- var selectedCase = this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === caseSelected.value; });
22723
- if (selectedCase) {
22724
- selectedCase.unlink = caseSelected.checked ? true : false;
22725
- }
22726
- };
22727
- UnLinkCasesComponent.prototype.onNext = function () {
22728
- this.resetErrorMessages();
22729
- var navigateToNextPage = true;
22730
- var casesMarkedToUnlink = this.linkedCases.find(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
22731
- if (!casesMarkedToUnlink) {
22732
- this.errorMessages.push({
22733
- title: 'case-selection',
22734
- description: exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError,
22735
- fieldId: "case-reference-" + this.linkedCases[0].caseReference
22736
- });
22737
- this.unlinkErrorMessage = exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError;
22738
- navigateToNextPage = false;
22739
- }
22740
- var unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
22741
- var updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(function (item) { return unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1; });
22742
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(updatedLinkedCases || []) });
22743
- // Return linked cases state and error messages to the parent
22744
- this.linkedCasesStateEmitter.emit({
22745
- currentLinkedCasesPage: exports.LinkedCasesPages.UNLINK_CASE,
22746
- errorMessages: this.errorMessages,
22747
- navigateToNextPage: navigateToNextPage
22748
- });
22749
- };
22750
- UnLinkCasesComponent.prototype.resetErrorMessages = function () {
22751
- this.errorMessages = [];
22752
- this.unlinkErrorMessage = null;
22753
- };
22754
- return UnLinkCasesComponent;
22755
- }());
22756
- UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
22757
- UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
22758
- 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)); };
22759
- 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) {
22760
- if (rf & 1) {
22761
- i0__namespace.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
22762
- }
22763
- if (rf & 2) {
22764
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
22765
- }
22766
- }, directives: [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgForOf, i2__namespace.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
22767
- (function () {
22768
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(UnLinkCasesComponent, [{
22769
- type: i0.Component,
22770
- args: [{
22771
- selector: 'ccd-unlink-cases',
22772
- templateUrl: './unlink-cases.component.html'
22773
- }]
22774
- }], function () { return [{ type: CaseEditComponent }, { type: i2__namespace.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
22775
- type: i0.Output
22776
- }], notifyAPIFailure: [{
22777
- type: i0.Output
22778
- }] });
22779
- })();
22780
-
22781
- function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) {
22782
- if (rf & 1) {
22783
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
22784
- i0__namespace.ɵɵelementStart(0, "div", 7);
22785
- i0__namespace.ɵɵelementStart(1, "ul", 8);
22786
- i0__namespace.ɵɵelementStart(2, "li");
22787
- i0__namespace.ɵɵelementStart(3, "a", 9);
22788
- 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); });
22789
- i0__namespace.ɵɵtext(4);
22790
- i0__namespace.ɵɵelementEnd();
22791
- i0__namespace.ɵɵelementEnd();
22792
- i0__namespace.ɵɵelementEnd();
22793
- i0__namespace.ɵɵelementEnd();
22794
- }
22795
- if (rf & 2) {
22796
- var errorMessage_r7 = ctx.$implicit;
22797
- i0__namespace.ɵɵadvance(4);
22798
- i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
22799
- }
22800
- }
22801
- function WriteLinkedCasesComponent_div_0_Template(rf, ctx) {
22802
- if (rf & 1) {
22803
- i0__namespace.ɵɵelementStart(0, "div", 4);
22804
- i0__namespace.ɵɵelementStart(1, "h2", 5);
22805
- i0__namespace.ɵɵtext(2, " There is a problem ");
22806
- i0__namespace.ɵɵelementEnd();
22807
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
22808
- i0__namespace.ɵɵelementEnd();
22809
- }
22810
- if (rf & 2) {
22811
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22812
- i0__namespace.ɵɵadvance(3);
22813
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
22814
- }
22815
- }
22816
- function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) {
22817
- if (rf & 1) {
22818
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
22819
- i0__namespace.ɵɵelementContainerStart(0);
22820
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
22821
- 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); });
22822
- i0__namespace.ɵɵelementEnd();
22823
- i0__namespace.ɵɵelementContainerEnd();
22824
- }
22825
- }
22826
- function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) {
22827
- if (rf & 1) {
22828
- var _r13_1 = i0__namespace.ɵɵgetCurrentView();
22829
- i0__namespace.ɵɵelementContainerStart(0);
22830
- i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
22831
- 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); });
22832
- i0__namespace.ɵɵelementEnd();
22833
- i0__namespace.ɵɵelementContainerEnd();
22834
- }
22835
- }
22836
- function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) {
22837
- if (rf & 1) {
22838
- var _r15_1 = i0__namespace.ɵɵgetCurrentView();
22839
- i0__namespace.ɵɵelementContainerStart(0);
22840
- i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 10);
22841
- 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); });
22842
- i0__namespace.ɵɵelementEnd();
22843
- i0__namespace.ɵɵelementContainerEnd();
22844
- }
22845
- }
22846
- function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) {
22847
- if (rf & 1) {
22848
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
22849
- i0__namespace.ɵɵelementContainerStart(0);
22850
- i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
22851
- 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); });
22852
- i0__namespace.ɵɵelementEnd();
22853
- i0__namespace.ɵɵelementContainerEnd();
22854
- }
22855
- }
22856
- function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
22857
- if (rf & 1) {
22858
- var _r19_1 = i0__namespace.ɵɵgetCurrentView();
22859
- i0__namespace.ɵɵelementContainerStart(0);
22860
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
22861
- 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); });
22862
- i0__namespace.ɵɵelementEnd();
22863
- i0__namespace.ɵɵelementContainerEnd();
22864
- }
22865
- }
22866
- var WriteLinkedCasesComponent = /** @class */ (function (_super) {
22867
- __extends(WriteLinkedCasesComponent, _super);
22868
- function WriteLinkedCasesComponent(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
22869
- var _this = _super.call(this) || this;
22870
- _this.caseEdit = caseEdit;
22871
- _this.appConfig = appConfig;
22872
- _this.commonDataService = commonDataService;
22873
- _this.casesService = casesService;
22874
- _this.linkedCasesService = linkedCasesService;
22875
- _this.caseEditDataService = caseEditDataService;
22876
- _this.onLinkedCasesSelected = new i0.EventEmitter();
22877
- _this.isLinkedCasesJourney = false;
22878
- _this.linkedCasesPages = exports.LinkedCasesPages;
22879
- _this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
22880
- _this.linkedCases = [];
22881
- _this.errorMessages = [];
22882
- return _this;
22883
- }
22884
- WriteLinkedCasesComponent.prototype.ngOnInit = function () {
22885
- var _this = this;
22886
- this.caseEditDataService.clearFormValidationErrors();
22887
- this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
22888
- this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
22889
- this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
22890
- this.linkedCasesService.editMode = false;
22891
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
22892
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
22893
- next: function (reasons) {
22894
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
22895
- }
22896
- });
22897
- this.getLinkedCases();
22898
- this.caseEditDataService.caseEventTriggerName$.subscribe({
22899
- next: function (name) {
22900
- _this.linkedCasesService.isLinkedCasesEventTrigger
22901
- = (name === exports.LinkedCasesEventTriggers.LINK_CASES);
22902
- }
22903
- });
22904
- };
22905
- WriteLinkedCasesComponent.prototype.ngAfterViewInit = function () {
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
- };
22915
- WriteLinkedCasesComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
22916
- var _this = this;
22917
- this.errorMessages = [];
22918
- this.caseEditDataService.clearFormValidationErrors();
22919
- if (linkedCasesState.navigateToNextPage) {
22920
- this.linkedCasesPage = this.getNextPage(linkedCasesState);
22921
- this.setContinueButtonValidationErrorMessage();
22922
- this.proceedToNextPage();
22923
- }
22924
- else {
22925
- if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
22926
- linkedCasesState.errorMessages.forEach(function (errorMessage, index) {
22927
- _this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
22928
- });
22929
- }
22930
- }
22931
- };
22932
- WriteLinkedCasesComponent.prototype.isAtFinalState = function () {
22933
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22934
- };
22935
- WriteLinkedCasesComponent.prototype.setContinueButtonValidationErrorMessage = function () {
22936
- var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
22937
- ? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
22938
- : exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
22939
- var buttonId = this.linkedCasesService.linkedCases.length === 0
22940
- ? 'back-button'
22941
- : 'next-button';
22942
- this.caseEditDataService.setCaseLinkError({
22943
- componentId: buttonId,
22944
- errorMessage: errorMessage
22945
- });
22946
- };
22947
- WriteLinkedCasesComponent.prototype.proceedToNextPage = function () {
22948
- if (this.isAtFinalPage()) {
22949
- // Continue button event must be allowed in final page
22950
- this.caseEditDataService.clearCaseLinkError();
22951
- // Trigger validation to clear the "notAtFinalPage" error if now at the final state
22952
- this.formGroup.updateValueAndValidity();
22953
- // update form value
22954
- this.onLinkedCasesSelected.emit();
22955
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(this.linkedCasesService.caseFieldValue) });
22956
- }
22957
- };
22958
- WriteLinkedCasesComponent.prototype.isAtFinalPage = function () {
22959
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22960
- };
22961
- WriteLinkedCasesComponent.prototype.getNextPage = function (linkedCasesState) {
22962
- if ((this.linkedCasesPage === exports.LinkedCasesPages.BEFORE_YOU_START) ||
22963
- (linkedCasesState.currentLinkedCasesPage === exports.LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
22964
- return this.isLinkedCasesJourney
22965
- ? exports.LinkedCasesPages.LINK_CASE
22966
- : exports.LinkedCasesPages.UNLINK_CASE;
22967
- }
22968
- return exports.LinkedCasesPages.CHECK_YOUR_ANSWERS;
22969
- };
22970
- WriteLinkedCasesComponent.prototype.getLinkedCases = function () {
22971
- var _this = this;
22972
- this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
22973
- var caseViewFiltered = caseView.tabs.filter(function (tab) {
22974
- var linkField = tab.fields.some(function (_a) {
22975
- var field_type = _a.field_type;
22976
- return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
22977
- });
22978
- return linkField;
22979
- });
22980
- if (caseViewFiltered) {
22981
- var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { return filtered.fields.length && filtered.fields[0].value; });
22982
- _this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
22983
- _this.linkedCasesService.getAllLinkedCaseInformation();
22984
- }
22985
- // Initialise the first page to display
22986
- _this.linkedCasesPage = _this.linkedCasesService.isLinkedCasesEventTrigger ||
22987
- (_this.linkedCasesService.caseFieldValue && _this.linkedCasesService.caseFieldValue.length > 0
22988
- && !_this.linkedCasesService.serverLinkedApiError)
22989
- ? exports.LinkedCasesPages.BEFORE_YOU_START
22990
- : exports.LinkedCasesPages.NO_LINKED_CASES;
22991
- // Initialise the error to be displayed when clicked on Continue button
22992
- _this.setContinueButtonValidationErrorMessage();
22993
- });
22994
- };
22995
- WriteLinkedCasesComponent.prototype.navigateToErrorElement = function (elementId) {
22996
- if (elementId) {
22997
- var htmlElement = document.getElementById(elementId);
22998
- if (htmlElement) {
22999
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
23000
- htmlElement.focus();
23001
- }
23002
- }
23003
- };
23004
- return WriteLinkedCasesComponent;
23005
- }(AbstractFieldWriteComponent));
23006
- 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)); };
23007
- 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) {
23008
- if (rf & 1) {
23009
- i0__namespace.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
23010
- i0__namespace.ɵɵelementStart(1, "div", 1);
23011
- i0__namespace.ɵɵelementStart(2, "div", 2);
23012
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
23013
- i0__namespace.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
23014
- i0__namespace.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
23015
- i0__namespace.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
23016
- i0__namespace.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
23017
- i0__namespace.ɵɵelementEnd();
23018
- i0__namespace.ɵɵelementEnd();
23019
- }
23020
- if (rf & 2) {
23021
- i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
23022
- i0__namespace.ɵɵadvance(1);
23023
- i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
23024
- i0__namespace.ɵɵadvance(1);
23025
- i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
23026
- i0__namespace.ɵɵadvance(1);
23027
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
23028
- i0__namespace.ɵɵadvance(1);
23029
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
23030
- i0__namespace.ɵɵadvance(1);
23031
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
23032
- i0__namespace.ɵɵadvance(1);
23033
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
23034
- i0__namespace.ɵɵadvance(1);
23035
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
23036
- }
23037
- }, encapsulation: 2 });
23038
- (function () {
23039
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
23040
- type: i0.Component,
23041
- args: [{
23042
- selector: 'ccd-write-linked-cases',
23043
- templateUrl: './write-linked-cases.component.html'
23044
- }]
23045
- }], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
23046
- type: i0.Input
23047
- }], caseField: [{
23048
- type: i0.Input
23049
- }], onLinkedCasesSelected: [{
23050
- type: i0.Output
23051
- }], isLinkedCasesJourney: [{
23052
- type: i0.Input
23053
- }], formGroup: [{
23054
- type: i0.Input
23055
- }] });
23056
- })();
23057
-
23058
- function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
23059
- if (rf & 1) {
23060
- i0__namespace.ɵɵelementContainer(0);
23061
- }
23062
- }
23063
- function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) {
23064
- if (rf & 1) {
23065
- i0__namespace.ɵɵelementContainer(0);
23066
- }
23067
- }
23068
- function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) {
23069
- if (rf & 1) {
23070
- i0__namespace.ɵɵelementContainer(0);
23071
- }
23072
- }
23073
- function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) {
23074
- if (rf & 1) {
23075
- i0__namespace.ɵɵelementContainer(0);
23076
- }
23077
- }
23078
- function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) {
23079
- if (rf & 1) {
23080
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
23081
- i0__namespace.ɵɵelementStart(0, "div", 8);
23082
- i0__namespace.ɵɵelementStart(1, "p", 9);
23083
- i0__namespace.ɵɵtext(2);
23084
- i0__namespace.ɵɵelementEnd();
23085
- i0__namespace.ɵɵelementStart(3, "span", 10);
23086
- i0__namespace.ɵɵelementStart(4, "a", 11);
23087
- 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(); });
23088
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
23089
- i0__namespace.ɵɵelementEnd();
23090
- i0__namespace.ɵɵelementEnd();
23091
- i0__namespace.ɵɵelementEnd();
23092
- }
23093
- if (rf & 2) {
23094
- var ctx_r5 = i0__namespace.ɵɵnextContext();
23095
- i0__namespace.ɵɵadvance(2);
23096
- i0__namespace.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
23097
- }
23098
- }
23099
- function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) {
23100
- if (rf & 1) {
23101
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
23102
- i0__namespace.ɵɵelementStart(0, "div", 8);
23103
- i0__namespace.ɵɵelementStart(1, "p", 9);
23104
- i0__namespace.ɵɵtext(2);
23105
- i0__namespace.ɵɵelementEnd();
23106
- i0__namespace.ɵɵelementStart(3, "span", 10);
23107
- i0__namespace.ɵɵelementStart(4, "a", 11);
23108
- 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(); });
23109
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
23110
- i0__namespace.ɵɵelementEnd();
23111
- i0__namespace.ɵɵelementEnd();
23112
- i0__namespace.ɵɵelementEnd();
23113
- }
23114
- if (rf & 2) {
23115
- var ctx_r7 = i0__namespace.ɵɵnextContext();
23116
- i0__namespace.ɵɵadvance(2);
23117
- i0__namespace.ɵɵtextInterpolate(ctx_r7.serverError.message);
23118
- }
23119
- }
23120
- var ReadLinkedCasesComponent = /** @class */ (function () {
23121
- function ReadLinkedCasesComponent(router, linkedCasesService, appConfig, commonDataService) {
23122
- this.router = router;
23123
- this.linkedCasesService = linkedCasesService;
23124
- this.appConfig = appConfig;
23125
- this.commonDataService = commonDataService;
23126
- this.reasonListLoaded = false;
23127
- this.reload = false;
23128
- this.serverError = null;
23129
- this.serverLinkedApiError = null;
23130
- this.isServerReasonCodeError = false;
23131
- this.isServerJurisdictionError = false;
23132
- this.isServerLinkedFromError = false;
23133
- this.isServerLinkedToError = false;
23134
- }
23135
- ReadLinkedCasesComponent.prototype.ngOnInit = function () {
23136
- var _this = this;
23137
- this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
23138
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
23139
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
23140
- next: function (reasons) {
23141
- _this.reasonListLoaded = true;
23142
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
23143
- },
23144
- error: function (error) {
23145
- _this.isServerReasonCodeError = true;
23146
- _this.linkedCasesService.isServerReasonCodeError = true;
23147
- }
23148
- });
23149
- this.serverLinkedApiError = {
23150
- id: 'backendError', message: 'Some case information is not available at the moment'
23151
- };
23152
- this.serverError = {
23153
- id: 'backendError', message: 'There has been a system error and your request could not be processed.'
23154
- };
23155
- };
23156
- ReadLinkedCasesComponent.prototype.ngAfterViewInit = function () {
23157
- this.linkedCasesService.caseFieldValue = this.caseField.value || [];
23158
- var labelField = document.getElementsByClassName('govuk-heading-l');
23159
- if (labelField && labelField.length) {
23160
- labelField[0].replaceWith('');
23161
- }
23162
- labelField = document.getElementsByClassName('heading-h2');
23163
- if (labelField && labelField.length) {
23164
- labelField[0].replaceWith('');
23165
- }
23166
- labelField = document.getElementsByClassName('case-viewer-label');
23167
- if (labelField && labelField.length) {
23168
- labelField[0].replaceWith('');
23169
- }
23170
- };
23171
- ReadLinkedCasesComponent.prototype.reloadCurrentRoute = function () {
23172
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(function () {
23173
- window.location.hash = 'Linked cases';
23174
- });
23175
- };
23176
- ReadLinkedCasesComponent.prototype.getFailureLinkedToNotification = function (evt) {
23177
- this.isServerLinkedToError = true;
23178
- };
23179
- ReadLinkedCasesComponent.prototype.getFailureLinkedFromNotification = function (evt) {
23180
- this.isServerLinkedFromError = true;
23181
- };
23182
- return ReadLinkedCasesComponent;
23183
- }());
23184
- 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)); };
23185
- 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) {
23186
- if (rf & 1) {
23187
- i0__namespace.ɵɵelementStart(0, "div");
23188
- i0__namespace.ɵɵelementStart(1, "div", 0);
23189
- i0__namespace.ɵɵelementStart(2, "h1", 1);
23190
- i0__namespace.ɵɵtext(3, "Linked cases");
23191
- i0__namespace.ɵɵelementEnd();
23192
- i0__namespace.ɵɵelementStart(4, "label", 2);
23193
- i0__namespace.ɵɵtext(5, "This case is linked to");
23194
- i0__namespace.ɵɵelementEnd();
23195
- i0__namespace.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
23196
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
23197
- i0__namespace.ɵɵelementEnd();
23198
- i0__namespace.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
23199
- i0__namespace.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
23200
- i0__namespace.ɵɵelementEnd();
23201
- i0__namespace.ɵɵelementStart(9, "div", 5);
23202
- i0__namespace.ɵɵelementStart(10, "label", 2);
23203
- i0__namespace.ɵɵtext(11, "This case is linked from");
23204
- i0__namespace.ɵɵelementEnd();
23205
- i0__namespace.ɵɵelement(12, "br");
23206
- i0__namespace.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
23207
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
23208
- i0__namespace.ɵɵelementEnd();
23209
- i0__namespace.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
23210
- i0__namespace.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
23211
- i0__namespace.ɵɵelementEnd();
23212
- i0__namespace.ɵɵelementEnd();
23213
- i0__namespace.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0__namespace.ɵɵtemplateRefExtractor);
23214
- i0__namespace.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0__namespace.ɵɵtemplateRefExtractor);
23215
- }
23216
- if (rf & 2) {
23217
- var _r4 = i0__namespace.ɵɵreference(17);
23218
- var _r6 = i0__namespace.ɵɵreference(19);
23219
- i0__namespace.ɵɵadvance(6);
23220
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
23221
- i0__namespace.ɵɵadvance(1);
23222
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
23223
- i0__namespace.ɵɵadvance(1);
23224
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
23225
- i0__namespace.ɵɵadvance(5);
23226
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
23227
- i0__namespace.ɵɵadvance(1);
23228
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
23229
- i0__namespace.ɵɵadvance(1);
23230
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
23231
- }
23232
- }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
23233
- (function () {
23234
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
23235
- type: i0.Component,
23236
- args: [{
23237
- selector: 'ccd-read-linked-cases',
23238
- templateUrl: './read-linked-cases.component.html',
23239
- styleUrls: ['./read-linked-cases.component.scss']
23240
- }]
23241
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
23242
- type: i0.Input
23243
- }] });
23244
- })();
23245
-
23246
- var LinkCaseReason = /** @class */ (function () {
23247
- function LinkCaseReason() {
23248
- }
23249
- return LinkCaseReason;
23250
- }());
23251
- var CCDCaseLinkType = /** @class */ (function () {
23252
- function CCDCaseLinkType() {
23253
- }
23254
- return CCDCaseLinkType;
23255
- }());
23256
- var CaseLink = /** @class */ (function () {
23257
- function CaseLink() {
23258
- }
23259
- return CaseLink;
23260
- }());
23261
- var LinkReason = /** @class */ (function () {
23262
- function LinkReason() {
23263
- }
23264
- return LinkReason;
23265
- }());
23266
- var LinkedCasesResponse = /** @class */ (function () {
23267
- function LinkedCasesResponse() {
23268
- }
23269
- return LinkedCasesResponse;
23270
- }());
23271
- var CaseLinkResponse = /** @class */ (function () {
23272
- function CaseLinkResponse() {
23273
- }
23274
- return CaseLinkResponse;
23275
- }());
23276
- var LinkDetails = /** @class */ (function () {
23277
- function LinkDetails() {
23278
- }
23279
- return LinkDetails;
23280
- }());
23281
- var Terms = /** @class */ (function () {
23282
- function Terms() {
23283
- }
23284
- return Terms;
23285
- }());
23286
- var ESQueryType = /** @class */ (function () {
23287
- function ESQueryType() {
23288
- }
23289
- return ESQueryType;
23290
- }());
23291
-
23292
20701
  var CollectionCreateCheckerService = /** @class */ (function () {
23293
20702
  function CollectionCreateCheckerService() {
23294
20703
  }
@@ -25333,7 +22742,6 @@
25333
22742
  ReadComplexFieldTableComponent,
25334
22743
  ReadComplexFieldCollectionTableComponent,
25335
22744
  ReadCaseFlagFieldComponent,
25336
- ReadLinkedCasesComponent,
25337
22745
  // Write
25338
22746
  WriteJudicialUserFieldComponent,
25339
22747
  WriteAddressFieldComponent,
@@ -25373,14 +22781,6 @@
25373
22781
  CaseFileViewOverlayMenuComponent,
25374
22782
  CaseFileViewFolderDocumentActionsComponent,
25375
22783
  CaseFileViewFolderSelectorComponent,
25376
- LinkedCasesToTableComponent,
25377
- LinkedCasesFromTableComponent,
25378
- BeforeYouStartComponent,
25379
- LinkCasesComponent,
25380
- CheckYourAnswersComponent,
25381
- WriteLinkedCasesComponent,
25382
- UnLinkCasesComponent,
25383
- NoLinkedCasesComponent,
25384
22784
  // component for dynamic list
25385
22785
  WriteDynamicMultiSelectListFieldComponent,
25386
22786
  WriteDynamicRadioListFieldComponent,
@@ -25406,7 +22806,6 @@
25406
22806
  FileUploadStateService,
25407
22807
  FileUploadProgressGuard,
25408
22808
  WindowService,
25409
- LinkedCasesService,
25410
22809
  CommonDataService,
25411
22810
  JurisdictionService,
25412
22811
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25438,7 +22837,7 @@
25438
22837
  i3.PaymentLibModule,
25439
22838
  i2$1.ScrollToModule.forRoot(),
25440
22839
  i1$3.MatDialogModule,
25441
- i12.MediaViewerModule,
22840
+ i11.MediaViewerModule,
25442
22841
  LoadingModule
25443
22842
  ], i4.NgxMatDatetimePickerModule,
25444
22843
  i4.NgxMatNativeDateModule,
@@ -25502,7 +22901,6 @@
25502
22901
  ReadComplexFieldTableComponent,
25503
22902
  ReadComplexFieldCollectionTableComponent,
25504
22903
  ReadCaseFlagFieldComponent,
25505
- ReadLinkedCasesComponent,
25506
22904
  // Write
25507
22905
  WriteJudicialUserFieldComponent,
25508
22906
  WriteAddressFieldComponent,
@@ -25542,14 +22940,6 @@
25542
22940
  CaseFileViewOverlayMenuComponent,
25543
22941
  CaseFileViewFolderDocumentActionsComponent,
25544
22942
  CaseFileViewFolderSelectorComponent,
25545
- LinkedCasesToTableComponent,
25546
- LinkedCasesFromTableComponent,
25547
- BeforeYouStartComponent,
25548
- LinkCasesComponent,
25549
- CheckYourAnswersComponent,
25550
- WriteLinkedCasesComponent,
25551
- UnLinkCasesComponent,
25552
- NoLinkedCasesComponent,
25553
22943
  // component for dynamic list
25554
22944
  WriteDynamicMultiSelectListFieldComponent,
25555
22945
  WriteDynamicRadioListFieldComponent,
@@ -25581,7 +22971,7 @@
25581
22971
  i7.CdkTreeModule,
25582
22972
  i1$4.OverlayModule,
25583
22973
  i3.PaymentLibModule, i2__namespace$1.ScrollToModule, i1$3.MatDialogModule,
25584
- i12.MediaViewerModule,
22974
+ i11.MediaViewerModule,
25585
22975
  LoadingModule], exports: [i4.NgxMatDatetimePickerModule,
25586
22976
  i4.NgxMatNativeDateModule,
25587
22977
  i4.NgxMatTimepickerModule,
@@ -25630,7 +23020,6 @@
25630
23020
  ReadComplexFieldTableComponent,
25631
23021
  ReadComplexFieldCollectionTableComponent,
25632
23022
  ReadCaseFlagFieldComponent,
25633
- ReadLinkedCasesComponent,
25634
23023
  // Write
25635
23024
  WriteJudicialUserFieldComponent,
25636
23025
  WriteAddressFieldComponent,
@@ -25670,14 +23059,6 @@
25670
23059
  CaseFileViewOverlayMenuComponent,
25671
23060
  CaseFileViewFolderDocumentActionsComponent,
25672
23061
  CaseFileViewFolderSelectorComponent,
25673
- LinkedCasesToTableComponent,
25674
- LinkedCasesFromTableComponent,
25675
- BeforeYouStartComponent,
25676
- LinkCasesComponent,
25677
- CheckYourAnswersComponent,
25678
- WriteLinkedCasesComponent,
25679
- UnLinkCasesComponent,
25680
- NoLinkedCasesComponent,
25681
23062
  // component for dynamic list
25682
23063
  WriteDynamicMultiSelectListFieldComponent,
25683
23064
  WriteDynamicRadioListFieldComponent,
@@ -25718,7 +23099,7 @@
25718
23099
  i3.PaymentLibModule,
25719
23100
  i2$1.ScrollToModule.forRoot(),
25720
23101
  i1$3.MatDialogModule,
25721
- i12.MediaViewerModule,
23102
+ i11.MediaViewerModule,
25722
23103
  LoadingModule
25723
23104
  ],
25724
23105
  declarations: __spread([
@@ -25754,7 +23135,6 @@
25754
23135
  FileUploadStateService,
25755
23136
  FileUploadProgressGuard,
25756
23137
  WindowService,
25757
- LinkedCasesService,
25758
23138
  CommonDataService,
25759
23139
  JurisdictionService,
25760
23140
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25773,7 +23153,6 @@
25773
23153
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i1__namespace.NgForOf, ReadOrderSummaryRowComponent,
25774
23154
  ReadMoneyGbpFieldComponent], []);
25775
23155
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], []);
25776
- i0__namespace.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i1__namespace.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
25777
23156
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, ReadComplexFieldRawComponent,
25778
23157
  ReadComplexFieldCollectionTableComponent, i1__namespace.NgSwitchDefault, ReadComplexFieldTableComponent], []);
25779
23158
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i1__namespace.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe]);
@@ -25781,7 +23160,6 @@
25781
23160
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i1__namespace.NgForOf, i1__namespace.NgIf, FieldReadComponent,
25782
23161
  ReadCaseLinkFieldComponent], [ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i1__namespace.KeyValuePipe, IsCompoundPipe]);
25783
23162
  i0__namespace.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, CaseFlagSummaryListComponent, i1__namespace.NgSwitchDefault, i1__namespace.NgForOf, i1__namespace.NgIf, CaseFlagTableComponent], []);
25784
- i0__namespace.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i1__namespace.NgIf, LinkedCasesFromTableComponent], []);
25785
23163
  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]);
25786
23164
  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]);
25787
23165
  i0__namespace.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i1__namespace.NgClass, i1__namespace.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe]);
@@ -25796,21 +23174,11 @@
25796
23174
  WriteOrganisationComplexFieldComponent], [i1__namespace.AsyncPipe]);
25797
23175
  i0__namespace.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
25798
23176
  i0__namespace.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i1__namespace.NgIf, DatetimePickerComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, WriteDateFieldComponent], []);
25799
- i0__namespace.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, WriteLinkedCasesComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
25800
23177
  i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
25801
23178
  i0__namespace.ɵɵsetComponentScope(
25802
23179
  // ComponentLauncher web components
25803
- CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25804
- i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25805
- i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25806
- i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25807
- 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]);
25808
- i0__namespace.ɵɵsetComponentScope(CheckYourAnswersComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25809
- i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
25810
- NoLinkedCasesComponent,
25811
- LinkCasesComponent,
25812
- UnLinkCasesComponent,
25813
- CheckYourAnswersComponent], []);
23180
+ CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
23181
+ i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
25814
23182
 
25815
23183
  var Confirmation = /** @class */ (function () {
25816
23184
  function Confirmation(caseId, status, header, body) {
@@ -35508,10 +32876,8 @@
35508
32876
  exports.AuthService = AuthService;
35509
32877
  exports.Banner = Banner;
35510
32878
  exports.BannersService = BannersService;
35511
- exports.BeforeYouStartComponent = BeforeYouStartComponent;
35512
32879
  exports.BodyComponent = BodyComponent;
35513
32880
  exports.BrowserService = BrowserService;
35514
- exports.CCDCaseLinkType = CCDCaseLinkType;
35515
32881
  exports.CallbackErrorsComponent = CallbackErrorsComponent;
35516
32882
  exports.CallbackErrorsContext = CallbackErrorsContext;
35517
32883
  exports.CaseAccessUtils = CaseAccessUtils;
@@ -35551,8 +32917,6 @@
35551
32917
  exports.CaseHeaderComponent = CaseHeaderComponent;
35552
32918
  exports.CaseHeaderModule = CaseHeaderModule;
35553
32919
  exports.CaseHistoryViewerFieldComponent = CaseHistoryViewerFieldComponent;
35554
- exports.CaseLink = CaseLink;
35555
- exports.CaseLinkResponse = CaseLinkResponse;
35556
32920
  exports.CaseListComponent = CaseListComponent;
35557
32921
  exports.CaseListFiltersComponent = CaseListFiltersComponent;
35558
32922
  exports.CaseListFiltersModule = CaseListFiltersModule;
@@ -35585,7 +32949,6 @@
35585
32949
  exports.CcdCollectionTableCaseFieldsFilterPipe = CcdCollectionTableCaseFieldsFilterPipe;
35586
32950
  exports.CcdPageFieldsPipe = CcdPageFieldsPipe;
35587
32951
  exports.CcdTabFieldsPipe = CcdTabFieldsPipe;
35588
- exports.CheckYourAnswersComponent = CheckYourAnswersComponent;
35589
32952
  exports.ConditionalShowFormDirective = ConditionalShowFormDirective;
35590
32953
  exports.ConditionalShowModule = ConditionalShowModule;
35591
32954
  exports.ConditionalShowRegistrarService = ConditionalShowRegistrarService;
@@ -35615,7 +32978,6 @@
35615
32978
  exports.DraftService = DraftService;
35616
32979
  exports.DynamicListPipe = DynamicListPipe;
35617
32980
  exports.DynamicRadioListPipe = DynamicRadioListPipe;
35618
- exports.ESQueryType = ESQueryType;
35619
32981
  exports.Embedded = Embedded;
35620
32982
  exports.ErrorMessageComponent = ErrorMessageComponent;
35621
32983
  exports.ErrorNotifierService = ErrorNotifierService;
@@ -35673,14 +33035,6 @@
35673
33035
  exports.LabelFieldComponent = LabelFieldComponent;
35674
33036
  exports.LabelSubstitutorDirective = LabelSubstitutorDirective;
35675
33037
  exports.LabelSubstitutorModule = LabelSubstitutorModule;
35676
- exports.LinkCaseReason = LinkCaseReason;
35677
- exports.LinkCasesComponent = LinkCasesComponent;
35678
- exports.LinkCasesReasonValuePipe = LinkCasesReasonValuePipe;
35679
- exports.LinkDetails = LinkDetails;
35680
- exports.LinkReason = LinkReason;
35681
- exports.LinkedCasesFromTableComponent = LinkedCasesFromTableComponent;
35682
- exports.LinkedCasesResponse = LinkedCasesResponse;
35683
- exports.LinkedCasesToTableComponent = LinkedCasesToTableComponent;
35684
33038
  exports.LoadingModule = LoadingModule;
35685
33039
  exports.LoadingService = LoadingService;
35686
33040
  exports.LoadingSpinnerComponent = LoadingSpinnerComponent;
@@ -35694,7 +33048,6 @@
35694
33048
  exports.NavigationComponent = NavigationComponent;
35695
33049
  exports.NavigationItemComponent = NavigationItemComponent;
35696
33050
  exports.NavigationNotifierService = NavigationNotifierService;
35697
- exports.NoLinkedCasesComponent = NoLinkedCasesComponent;
35698
33051
  exports.NoTasksAvailableComponent = NoTasksAvailableComponent;
35699
33052
  exports.NotificationBannerComponent = NotificationBannerComponent;
35700
33053
  exports.OrderService = OrderService;
@@ -35732,7 +33085,6 @@
35732
33085
  exports.ReadFixedListFieldComponent = ReadFixedListFieldComponent;
35733
33086
  exports.ReadFixedRadioListFieldComponent = ReadFixedRadioListFieldComponent;
35734
33087
  exports.ReadJudicialUserFieldComponent = ReadJudicialUserFieldComponent;
35735
- exports.ReadLinkedCasesComponent = ReadLinkedCasesComponent;
35736
33088
  exports.ReadMoneyGbpFieldComponent = ReadMoneyGbpFieldComponent;
35737
33089
  exports.ReadMultiSelectListFieldComponent = ReadMultiSelectListFieldComponent;
35738
33090
  exports.ReadNumberFieldComponent = ReadNumberFieldComponent;
@@ -35776,9 +33128,7 @@
35776
33128
  exports.TaskCancelledComponent = TaskCancelledComponent;
35777
33129
  exports.TaskConflictComponent = TaskConflictComponent;
35778
33130
  exports.TaskUnassignedComponent = TaskUnassignedComponent;
35779
- exports.Terms = Terms;
35780
33131
  exports.TestRouteSnapshotBuilder = TestRouteSnapshotBuilder;
35781
- exports.UnLinkCasesComponent = UnLinkCasesComponent;
35782
33132
  exports.UnsupportedFieldComponent = UnsupportedFieldComponent;
35783
33133
  exports.UpdateFlagComponent = UpdateFlagComponent;
35784
33134
  exports.WaysToPayFieldComponent = WaysToPayFieldComponent;
@@ -35808,7 +33158,6 @@
35808
33158
  exports.WriteFixedListFieldComponent = WriteFixedListFieldComponent;
35809
33159
  exports.WriteFixedRadioListFieldComponent = WriteFixedRadioListFieldComponent;
35810
33160
  exports.WriteJudicialUserFieldComponent = WriteJudicialUserFieldComponent;
35811
- exports.WriteLinkedCasesComponent = WriteLinkedCasesComponent;
35812
33161
  exports.WriteMoneyGbpFieldComponent = WriteMoneyGbpFieldComponent;
35813
33162
  exports.WriteMultiSelectListFieldComponent = WriteMultiSelectListFieldComponent;
35814
33163
  exports.WriteNumberFieldComponent = WriteNumberFieldComponent;