@hmcts/ccd-case-ui-toolkit 5.0.53-prevent-clear-page-from-cya → 5.0.54-rollback-case-link

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +211 -2875
  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-edit/case-edit.component.js +1 -1
  7. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +9 -39
  8. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +1 -28
  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-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +1 -1
  12. package/esm2015/lib/shared/components/palette/case-link/index.js +1 -4
  13. package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +8 -28
  14. package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +66 -77
  15. package/esm2015/lib/shared/components/palette/dynamic-list/write-dynamic-list-field.component.js +1 -1
  16. package/esm2015/lib/shared/components/palette/palette.module.js +22 -68
  17. package/esm2015/lib/shared/components/palette/palette.service.js +4 -12
  18. package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +1 -10
  19. package/esm2015/lib/shared/domain/definition/field-type-enum.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 +1 -7
  24. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +204 -2576
  25. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  26. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +0 -5
  27. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
  28. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +4 -4
  29. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  30. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +0 -4
  31. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  32. package/lib/shared/components/case-editor/services/cases.service.d.ts +0 -7
  33. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  34. package/lib/shared/components/case-editor/services/page-validation.service.d.ts +0 -1
  35. package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
  36. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  37. package/lib/shared/components/palette/case-link/index.d.ts +0 -3
  38. package/lib/shared/components/palette/case-link/index.d.ts.map +1 -1
  39. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts +0 -3
  40. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
  41. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +4 -13
  42. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
  43. package/lib/shared/components/palette/palette.module.d.ts +58 -67
  44. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  45. package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
  46. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +0 -1
  47. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
  48. package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
  49. package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
  50. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  51. package/lib/shared/pipes/index.d.ts +0 -1
  52. package/lib/shared/pipes/index.d.ts.map +1 -1
  53. package/lib/shared/pipes/pipes.module.d.ts +2 -3
  54. package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
  55. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  56. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  57. package/package.json +1 -1
  58. package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +0 -125
  59. package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +0 -198
  60. package/esm2015/lib/shared/components/palette/case-link/components/index.js +0 -10
  61. package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +0 -497
  62. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +0 -221
  63. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +0 -286
  64. package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +0 -76
  65. package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +0 -178
  66. package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +0 -216
  67. package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +0 -265
  68. package/esm2015/lib/shared/components/palette/case-link/domain/index.js +0 -3
  69. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +0 -2
  70. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +0 -19
  71. package/esm2015/lib/shared/components/palette/case-link/enums/index.js +0 -2
  72. package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +0 -33
  73. package/esm2015/lib/shared/components/palette/case-link/services/index.js +0 -2
  74. package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +0 -134
  75. package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +0 -27
  76. package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +0 -23
  77. package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +0 -2
  78. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts +0 -19
  79. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +0 -1
  80. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +0 -18
  81. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +0 -1
  82. package/lib/shared/components/palette/case-link/components/index.d.ts +0 -10
  83. package/lib/shared/components/palette/case-link/components/index.d.ts.map +0 -1
  84. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +0 -45
  85. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +0 -1
  86. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +0 -42
  87. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +0 -1
  88. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +0 -45
  89. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +0 -1
  90. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +0 -12
  91. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +0 -1
  92. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +0 -37
  93. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +0 -1
  94. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +0 -38
  95. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +0 -1
  96. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +0 -45
  97. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +0 -1
  98. package/lib/shared/components/palette/case-link/domain/index.d.ts +0 -3
  99. package/lib/shared/components/palette/case-link/domain/index.d.ts.map +0 -1
  100. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +0 -12
  101. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +0 -1
  102. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +0 -65
  103. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +0 -1
  104. package/lib/shared/components/palette/case-link/enums/index.d.ts +0 -2
  105. package/lib/shared/components/palette/case-link/enums/index.d.ts.map +0 -1
  106. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +0 -29
  107. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +0 -1
  108. package/lib/shared/components/palette/case-link/services/index.d.ts +0 -2
  109. package/lib/shared/components/palette/case-link/services/index.d.ts.map +0 -1
  110. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +0 -50
  111. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +0 -1
  112. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +0 -10
  113. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +0 -1
  114. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +0 -11
  115. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +0 -1
  116. package/lib/shared/pipes/link-cases-reason-code/index.d.ts +0 -2
  117. package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rx-polling'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('class-transformer'), require('underscore'), require('moment'), require('util'), require('@edium/fsm'), require('@angular/material/dialog'), require('@angular-material-components/datetime-picker'), require('@angular/cdk/overlay'), require('@angular/cdk/tree'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@hmcts/ccpay-web-component'), require('@hmcts/media-viewer'), require('@nicky-lenaers/ngx-scroll-to'), require('ngx-md'), require('@angular-material-components/moment-adapter'), require('@angular/cdk/portal'), require('ngx-pagination'), require('@angular/material/tabs')) :
3
3
  typeof define === 'function' && define.amd ? define('@hmcts/ccd-case-ui-toolkit', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rx-polling', 'rxjs', '@angular/common/http', 'rxjs/operators', 'class-transformer', 'underscore', 'moment', 'util', '@edium/fsm', '@angular/material/dialog', '@angular-material-components/datetime-picker', '@angular/cdk/overlay', '@angular/cdk/tree', '@angular/material/autocomplete', '@angular/material/core', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@hmcts/ccpay-web-component', '@hmcts/media-viewer', '@nicky-lenaers/ngx-scroll-to', 'ngx-md', '@angular-material-components/moment-adapter', '@angular/cdk/portal', 'ngx-pagination', '@angular/material/tabs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.i12, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global["@angular-material-components/moment-adapter"], global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
5
- })(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3, i12, i2$1, i1$5, momentAdapter, i6$2, i1$6, i9) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.i11, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global["@angular-material-components/moment-adapter"], global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
5
+ })(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3, i11, i2$1, i1$5, momentAdapter, i6$2, i1$6, i9) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -42,7 +42,7 @@
42
42
  var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
43
43
  var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
44
44
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
45
- var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
45
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
46
46
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
47
47
  var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
48
48
  var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
@@ -118,7 +118,7 @@
118
118
  i0__namespace.ɵɵtextInterpolate(ctx_r1.workhours);
119
119
  }
120
120
  }
121
- var _c0$_ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
121
+ var _c0$Y = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
122
122
  var _c1$r = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
123
123
  var FooterComponent = /** @class */ (function () {
124
124
  function FooterComponent() {
@@ -128,7 +128,7 @@
128
128
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
129
129
  FooterComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$r, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) {
130
130
  if (rf & 1) {
131
- i0__namespace.ɵɵprojectionDef(_c0$_);
131
+ i0__namespace.ɵɵprojectionDef(_c0$Y);
132
132
  i0__namespace.ɵɵelementStart(0, "footer", 0);
133
133
  i0__namespace.ɵɵelementStart(1, "div", 1);
134
134
  i0__namespace.ɵɵtemplate(2, FooterComponent_div_2_Template, 15, 0, "div", 2);
@@ -207,7 +207,7 @@
207
207
  i0__namespace.ɵɵtextInterpolate(ctx_r2.title);
208
208
  }
209
209
  }
210
- var _c0$Z = [[["", "headerNavigation", ""]]];
210
+ var _c0$X = [[["", "headerNavigation", ""]]];
211
211
  var _c1$q = ["[headerNavigation]"];
212
212
  var HeaderBarComponent = /** @class */ (function () {
213
213
  function HeaderBarComponent() {
@@ -221,7 +221,7 @@
221
221
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
222
222
  HeaderBarComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$q, decls: 15, vars: 8, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) {
223
223
  if (rf & 1) {
224
- i0__namespace.ɵɵprojectionDef(_c0$Z);
224
+ i0__namespace.ɵɵprojectionDef(_c0$X);
225
225
  i0__namespace.ɵɵelementStart(0, "header", 0);
226
226
  i0__namespace.ɵɵelementStart(1, "div", 1);
227
227
  i0__namespace.ɵɵelementStart(2, "div", 2);
@@ -282,7 +282,7 @@
282
282
  }] });
283
283
  })();
284
284
 
285
- var _c0$Y = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
285
+ var _c0$W = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
286
286
  var _c1$p = ["[leftNavLinks]", "[rightNavLinks]"];
287
287
  var NavigationComponent = /** @class */ (function () {
288
288
  function NavigationComponent() {
@@ -292,7 +292,7 @@
292
292
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
293
293
  NavigationComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$p, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
294
294
  if (rf & 1) {
295
- i0__namespace.ɵɵprojectionDef(_c0$Y);
295
+ i0__namespace.ɵɵprojectionDef(_c0$W);
296
296
  i0__namespace.ɵɵelementStart(0, "div");
297
297
  i0__namespace.ɵɵelementStart(1, "nav", 0);
298
298
  i0__namespace.ɵɵprojection(2);
@@ -437,7 +437,7 @@
437
437
  }], null, null);
438
438
  })();
439
439
 
440
- var _c0$X = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
440
+ var _c0$V = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
441
441
  var _c1$o = ["[topBody]", "[leftBody]", "[rightBody]"];
442
442
  var BodyComponent = /** @class */ (function () {
443
443
  function BodyComponent() {
@@ -447,7 +447,7 @@
447
447
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
448
448
  BodyComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$o, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
449
449
  if (rf & 1) {
450
- i0__namespace.ɵɵprojectionDef(_c0$X);
450
+ i0__namespace.ɵɵprojectionDef(_c0$V);
451
451
  i0__namespace.ɵɵelementStart(0, "div", 0);
452
452
  i0__namespace.ɵɵprojection(1);
453
453
  i0__namespace.ɵɵprojection(2, 1);
@@ -794,7 +794,7 @@
794
794
  return typeof state === "function" ? receiver === state : state.has(receiver);
795
795
  }
796
796
 
797
- var _c0$W = function (a0) { return { "govuk-input--error": a0 }; };
797
+ var _c0$U = function (a0) { return { "govuk-input--error": a0 }; };
798
798
  function DateInputComponent_div_16_Template(rf, ctx) {
799
799
  if (rf & 1) {
800
800
  var _r8_1 = i0__namespace.ɵɵgetCurrentView();
@@ -812,7 +812,7 @@
812
812
  i0__namespace.ɵɵadvance(1);
813
813
  i0__namespace.ɵɵproperty("for", ctx_r3.hourId());
814
814
  i0__namespace.ɵɵadvance(2);
815
- i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r3.isInvalid));
815
+ i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r3.isInvalid));
816
816
  }
817
817
  }
818
818
  function DateInputComponent_div_17_Template(rf, ctx) {
@@ -832,7 +832,7 @@
832
832
  i0__namespace.ɵɵadvance(1);
833
833
  i0__namespace.ɵɵproperty("for", ctx_r4.minuteId());
834
834
  i0__namespace.ɵɵadvance(2);
835
- i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r4.isInvalid));
835
+ i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r4.isInvalid));
836
836
  }
837
837
  }
838
838
  function DateInputComponent_div_18_Template(rf, ctx) {
@@ -852,7 +852,7 @@
852
852
  i0__namespace.ɵɵadvance(1);
853
853
  i0__namespace.ɵɵproperty("for", ctx_r5.secondId());
854
854
  i0__namespace.ɵɵadvance(2);
855
- i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r5.isInvalid));
855
+ i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$U, ctx_r5.isInvalid));
856
856
  }
857
857
  }
858
858
  var DateInputComponent = /** @class */ (function () {
@@ -1086,15 +1086,15 @@
1086
1086
  i0__namespace.ɵɵadvance(2);
1087
1087
  i0__namespace.ɵɵproperty("for", ctx.dayId());
1088
1088
  i0__namespace.ɵɵadvance(2);
1089
- i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$W, ctx.isInvalid));
1089
+ i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$U, ctx.isInvalid));
1090
1090
  i0__namespace.ɵɵadvance(3);
1091
1091
  i0__namespace.ɵɵproperty("for", ctx.monthId());
1092
1092
  i0__namespace.ɵɵadvance(2);
1093
- i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$W, ctx.isInvalid));
1093
+ i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$U, ctx.isInvalid));
1094
1094
  i0__namespace.ɵɵadvance(3);
1095
1095
  i0__namespace.ɵɵproperty("for", ctx.yearId());
1096
1096
  i0__namespace.ɵɵadvance(2);
1097
- i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$W, ctx.isInvalid));
1097
+ i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$U, ctx.isInvalid));
1098
1098
  i0__namespace.ɵɵadvance(2);
1099
1099
  i0__namespace.ɵɵproperty("ngIf", ctx.isDateTime);
1100
1100
  i0__namespace.ɵɵadvance(1);
@@ -1175,7 +1175,7 @@
1175
1175
  i0__namespace.ɵɵelementContainerEnd();
1176
1176
  }
1177
1177
  }
1178
- var _c0$V = ["*"];
1178
+ var _c0$T = ["*"];
1179
1179
  exports.AlertMessageType = void 0;
1180
1180
  (function (AlertMessageType) {
1181
1181
  AlertMessageType["WARNING"] = "warning";
@@ -1196,7 +1196,7 @@
1196
1196
  AlertComponent.TYPE_ERROR = 'error';
1197
1197
  AlertComponent.TYPE_INFORMATION = 'information';
1198
1198
  AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
1199
- AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$V, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) {
1199
+ AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$T, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) {
1200
1200
  if (rf & 1) {
1201
1201
  i0__namespace.ɵɵprojectionDef();
1202
1202
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -1471,7 +1471,7 @@
1471
1471
  }] });
1472
1472
  })();
1473
1473
 
1474
- var _c0$U = function (a0) { return { "js-hidden": a0 }; };
1474
+ var _c0$S = function (a0) { return { "js-hidden": a0 }; };
1475
1475
  var _c1$n = ["*"];
1476
1476
  var TabComponent = /** @class */ (function () {
1477
1477
  function TabComponent() {
@@ -1487,7 +1487,7 @@
1487
1487
  i0__namespace.ɵɵelementEnd();
1488
1488
  }
1489
1489
  if (rf & 2) {
1490
- i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$U, !ctx.selected));
1490
+ i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$S, !ctx.selected));
1491
1491
  i0__namespace.ɵɵattribute("aria-hidden", !ctx.selected);
1492
1492
  }
1493
1493
  }, directives: [i1__namespace.NgClass], styles: [".tabs-toggle[_ngcontent-%COMP%]{display:block;padding:10px 15px 3px;margin-bottom:8px}.tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{color:#0b0c0c;text-decoration:none;border-bottom:none}.tabs-toggle[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#005ea5}@media (max-width:640px){.tabs-list[_ngcontent-%COMP%]{border-bottom:1px solid #bfc1c3;margin-left:-15px;margin-right:-15px}.tabs-toggle[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3}.tabs-toggle[_ngcontent-%COMP%]:focus{color:#0b0c0c;outline:none}}@media (min-width:641px){.tabs-panel[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3;clear:both;overflow:hidden}.tabs-list[_ngcontent-%COMP%]{float:left}.tabs-list-item[_ngcontent-%COMP%]{float:left;position:relative;bottom:-1px;padding-top:10px}.tabs-toggle[_ngcontent-%COMP%]{background-color:#dee0e2;border:1px solid transparent;float:left;margin:0 6px 0 0;text-decoration:none}.tabs-toggle[_ngcontent-%COMP%]:visited{color:#005ea5}.tabs-toggle-selected[_ngcontent-%COMP%], .tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{background-color:#fff;border-bottom:0;border-color:#bfc1c3;padding-bottom:11px;margin-bottom:0;color:#0b0c0c}}"] });
@@ -1510,7 +1510,7 @@
1510
1510
  }] });
1511
1511
  })();
1512
1512
 
1513
- var _c0$T = ["tab"];
1513
+ var _c0$R = ["tab"];
1514
1514
  var _c1$m = function () { return ["."]; };
1515
1515
  var _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1516
1516
  function TabsComponent_li_2_Template(rf, ctx) {
@@ -1564,7 +1564,7 @@
1564
1564
  }
1565
1565
  }, viewQuery: function TabsComponent_Query(rf, ctx) {
1566
1566
  if (rf & 1) {
1567
- i0__namespace.ɵɵviewQuery(_c0$T, 1);
1567
+ i0__namespace.ɵɵviewQuery(_c0$R, 1);
1568
1568
  }
1569
1569
  if (rf & 2) {
1570
1570
  var _t = void 0;
@@ -1643,7 +1643,7 @@
1643
1643
  }], null, null);
1644
1644
  })();
1645
1645
 
1646
- var _c0$S = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1646
+ var _c0$Q = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1647
1647
  var ActivityBannerComponent = /** @class */ (function () {
1648
1648
  function ActivityBannerComponent() {
1649
1649
  }
@@ -1664,7 +1664,7 @@
1664
1664
  i0__namespace.ɵɵelementEnd();
1665
1665
  }
1666
1666
  if (rf & 2) {
1667
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$S, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1667
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$Q, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1668
1668
  i0__namespace.ɵɵadvance(2);
1669
1669
  i0__namespace.ɵɵpropertyInterpolate("alt", ctx.description);
1670
1670
  i0__namespace.ɵɵpropertyInterpolate("src", ctx.imageLink, i0__namespace.ɵɵsanitizeUrl);
@@ -3036,14 +3036,6 @@
3036
3036
  if (!field || !field.field_type || !field.field_type.type) {
3037
3037
  return false;
3038
3038
  }
3039
- // Case link tab spacing alignment fix
3040
- // This Pipe needs to be re-visited
3041
- // to make it more generic to support and fix alignments issues for multiple tabs
3042
- if (field.field_type.collection_field_type &&
3043
- field.field_type.collection_field_type.id &&
3044
- field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
3045
- return true;
3046
- }
3047
3039
  if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
3048
3040
  if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
3049
3041
  return false;
@@ -3054,7 +3046,6 @@
3054
3046
  };
3055
3047
  return IsCompoundPipe;
3056
3048
  }());
3057
- IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
3058
3049
  IsCompoundPipe.COMPOUND_TYPES = [
3059
3050
  'Complex',
3060
3051
  'Label',
@@ -3919,12 +3910,6 @@
3919
3910
  FieldsUtils.isCollectionWithValue = function (pageFormFields) {
3920
3911
  return pageFormFields[0]['value'] !== undefined;
3921
3912
  };
3922
- FieldsUtils.isLinkedCasesCaseField = function (caseField) {
3923
- if (!caseField) {
3924
- return false;
3925
- }
3926
- return caseField.field_type.collection_field_type.id === 'CaseLink';
3927
- };
3928
3913
  FieldsUtils.cloneObject = function (obj) {
3929
3914
  return Object.assign({}, obj);
3930
3915
  };
@@ -4864,9 +4849,7 @@
4864
4849
  };
4865
4850
  AbstractFormFieldComponent.prototype.addControlToFormGroup = function (control, parent, replace) {
4866
4851
  if (replace) {
4867
- if (this.caseField.field_type && this.caseField.field_type.collection_field_type
4868
- && this.caseField.field_type.collection_field_type.id === 'CaseLink'
4869
- && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4852
+ if (this.caseField.field_type && this.caseField.field_type.id === 'CaseLink' && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4870
4853
  parent.setControl('CaseReference', control['controls']['CaseReference']);
4871
4854
  }
4872
4855
  else {
@@ -8449,34 +8432,6 @@
8449
8432
  return rxjs.throwError(error);
8450
8433
  }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8451
8434
  };
8452
- /**
8453
- * TODO: Gets case link responses
8454
- * @returns case link responses
8455
- */
8456
- CasesService.prototype.getCaseLinkResponses = function () {
8457
- var _this = this;
8458
- var headers = new i1$2.HttpHeaders()
8459
- .set('experimental', 'true')
8460
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
8461
- .set('Content-Type', 'application/json');
8462
- var loadingToken = this.loadingService.register();
8463
- return this.http
8464
- .get('assets/getCaseReasons.json', { headers: headers, observe: 'body' })
8465
- .pipe(operators.map(function (reasons) {
8466
- return reasons.sort(function (reasonA, reasonB) { return reasonA.value_en > reasonB.value_en ? 1 : -1; });
8467
- }), operators.catchError(function (error) {
8468
- _this.errorService.setError(error);
8469
- return rxjs.throwError(error);
8470
- }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
8471
- };
8472
- CasesService.prototype.getLinkedCases = function (caseId) {
8473
- var url = this.appConfig.getCaseDataStoreApiUrl() + "/" + caseId;
8474
- return this.http
8475
- .get(url)
8476
- .pipe(operators.catchError(function (error) {
8477
- return rxjs.throwError(error);
8478
- }));
8479
- };
8480
8435
  CasesService.prototype.getEventTrigger = function (caseTypeId, eventTriggerId, caseId, ignoreWarning) {
8481
8436
  var _this = this;
8482
8437
  ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
@@ -9300,8 +9255,7 @@
9300
9255
  .filter(function (caseField) { return !_this.isHidden(caseField, editForm); })
9301
9256
  .every(function (caseField) {
9302
9257
  var theControl = editForm.controls['data'].get(caseField.id);
9303
- return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl) &&
9304
- _this.checkCaseLinksCollectionField(caseField, theControl);
9258
+ return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl);
9305
9259
  });
9306
9260
  };
9307
9261
  PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
@@ -9329,13 +9283,6 @@
9329
9283
  PageValidationService.prototype.checkMandatoryField = function (caseField, theControl) {
9330
9284
  return this.caseFieldService.isMandatory(caseField) && theControl === null;
9331
9285
  };
9332
- PageValidationService.prototype.checkCaseLinksCollectionField = function (caseField, theControl) {
9333
- if (caseField && caseField.id === 'caseLinks') {
9334
- return theControl && theControl.value && Array.isArray(theControl.value) &&
9335
- theControl.value.length ? true : false;
9336
- }
9337
- return true;
9338
- };
9339
9286
  return PageValidationService;
9340
9287
  }());
9341
9288
  PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0__namespace.ɵɵinject(CaseFieldService)); };
@@ -9846,12 +9793,10 @@
9846
9793
  function CaseEditDataService() {
9847
9794
  this.title$ = new rxjs.BehaviorSubject(null);
9848
9795
  this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
9849
- this.linkError$ = new rxjs.BehaviorSubject(null);
9850
9796
  this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
9851
9797
  this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
9852
9798
  this.caseTitle$ = this.title$.asObservable();
9853
9799
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
9854
- this.caseLinkError$ = this.linkError$.asObservable();
9855
9800
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
9856
9801
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
9857
9802
  }
@@ -9861,18 +9806,12 @@
9861
9806
  CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
9862
9807
  this.eventTriggerName$.next(triggerName);
9863
9808
  };
9864
- CaseEditDataService.prototype.setCaseLinkError = function (error) {
9865
- this.linkError$.next(error);
9866
- };
9867
9809
  CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
9868
9810
  this.formValidationErrors$.next(validationErrors);
9869
9811
  };
9870
9812
  CaseEditDataService.prototype.clearFormValidationErrors = function () {
9871
9813
  this.formValidationErrors$.next([]);
9872
9814
  };
9873
- CaseEditDataService.prototype.clearCaseLinkError = function () {
9874
- this.linkError$.next(null);
9875
- };
9876
9815
  CaseEditDataService.prototype.addFormValidationError = function (validationError) {
9877
9816
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
9878
9817
  };
@@ -10294,27 +10233,18 @@
10294
10233
  _this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " exceeds the maximum length" });
10295
10234
  fieldElement.markAsDirty();
10296
10235
  }
10297
- else if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10298
- _this.validationErrors.push({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10299
- }
10300
10236
  else if (fieldElement.invalid) {
10301
10237
  if (casefield.isComplex()) {
10302
10238
  _this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id_1);
10303
10239
  }
10304
10240
  else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
10305
- if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
10306
- _this.caseEditDataService.addFormValidationError({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
10307
- // this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
10308
- }
10309
- else {
10310
- var fieldArray = fieldElement;
10311
- if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10312
- id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10313
- }
10314
- fieldArray.controls.forEach(function (c) {
10315
- _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10316
- });
10241
+ var fieldArray = fieldElement;
10242
+ if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
10243
+ id_1 = "" + fieldArray['component']['collItems'][0].prefix;
10317
10244
  }
10245
+ fieldArray.controls.forEach(function (c) {
10246
+ _this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
10247
+ });
10318
10248
  }
10319
10249
  else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
10320
10250
  // Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
@@ -10400,35 +10330,12 @@
10400
10330
  return this.wizard.findWizardPage(caseFieldId);
10401
10331
  };
10402
10332
  CaseEditPageComponent.prototype.updateEventTriggerCaseFields = function (caseFieldId, jsonData, eventTrigger) {
10403
- var _this = this;
10404
- if (eventTrigger === null || eventTrigger === void 0 ? void 0 : eventTrigger.case_fields) {
10333
+ if (eventTrigger.case_fields) {
10405
10334
  eventTrigger.case_fields
10406
10335
  .filter(function (element) { return element.id === caseFieldId; })
10407
- .forEach(function (element) {
10408
- if (_this.isAnObject(element.value)) {
10409
- var updatedJsonDataObject = _this.updateJsonDataObject(caseFieldId, jsonData, element);
10410
- element.value = Object.assign(Object.assign({}, element.value), updatedJsonDataObject);
10411
- }
10412
- else {
10413
- element.value = jsonData.data[caseFieldId];
10414
- }
10415
- });
10336
+ .forEach(function (element) { return element.value = jsonData.data[caseFieldId]; });
10416
10337
  }
10417
10338
  };
10418
- CaseEditPageComponent.prototype.updateJsonDataObject = function (caseFieldId, jsonData, element) {
10419
- var _this = this;
10420
- return Object.keys(jsonData.data[caseFieldId]).reduce(function (acc, key) {
10421
- var _a;
10422
- var elementValue = element.value[key];
10423
- var jsonDataValue = jsonData.data[caseFieldId][key];
10424
- var hasElementGotValueProperty = _this.isAnObject(elementValue) && elementValue.value !== undefined;
10425
- var jsonDataOrElementValue = (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== null && (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== undefined ? jsonDataValue : elementValue;
10426
- return Object.assign(Object.assign({}, acc), (_a = {}, _a["" + key] = hasElementGotValueProperty ? jsonDataOrElementValue : jsonDataValue, _a));
10427
- }, {});
10428
- };
10429
- CaseEditPageComponent.prototype.isAnObject = function (property) {
10430
- return typeof property === 'object' && !Array.isArray(property) && property !== null;
10431
- };
10432
10339
  CaseEditPageComponent.prototype.updateFormControlsValue = function (formGroup, caseFieldId, value) {
10433
10340
  var theControl = formGroup.controls['data'].get(caseFieldId);
10434
10341
  if (theControl && theControl['status'] !== 'DISABLED') {
@@ -10604,7 +10511,6 @@
10604
10511
  CaseEditPageComponent.prototype.syncCaseEditDataService = function () {
10605
10512
  var _this = this;
10606
10513
  this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
10607
- this.caseEditDataService.setCaseLinkError(this.caseLinkError);
10608
10514
  this.caseEditDataService.setCaseTitle(this.getCaseTitle());
10609
10515
  this.caseEditDataService.caseFormValidationErrors$.subscribe({
10610
10516
  next: function (validationErrors) { return _this.validationErrors = validationErrors; }
@@ -11132,10 +11038,6 @@
11132
11038
  };
11133
11039
  ReadFieldsFilterPipe.keepField = function (field, value, ignoreLabels) {
11134
11040
  if (ignoreLabels === void 0) { ignoreLabels = false; }
11135
- // We should always render the caselinks tables from and to regardless whether it has valid value or not
11136
- if (field.id === 'caseLinks') {
11137
- return true;
11138
- }
11139
11041
  // We shouldn't ditch labels.
11140
11042
  if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
11141
11043
  return true;
@@ -11423,163 +11325,6 @@
11423
11325
  }], null, null);
11424
11326
  })();
11425
11327
 
11426
- var LinkedCasesService = /** @class */ (function () {
11427
- function LinkedCasesService(jurisdictionService, searchService) {
11428
- var _this = this;
11429
- this.jurisdictionService = jurisdictionService;
11430
- this.searchService = searchService;
11431
- this.caseFieldValue = [];
11432
- this.isLinkedCasesEventTrigger = false;
11433
- this.linkCaseReasons = [];
11434
- this.linkedCases = [];
11435
- this.initialCaseLinks = [];
11436
- this.editMode = false;
11437
- this.jurisdictionsResponse = [];
11438
- this.serverError = null;
11439
- this.serverLinkedApiError = null;
11440
- this.isServerReasonCodeError = false;
11441
- this.caseJurisdictionID = null;
11442
- this.groupLinkedCasesByCaseType = function (arrObj, key) {
11443
- return arrObj.reduce(function (rv, x) {
11444
- (rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
11445
- return rv;
11446
- }, {});
11447
- };
11448
- this.jurisdictionService.getJurisdictions().subscribe(function (jurisdictions) {
11449
- _this.jurisdictionsResponse = jurisdictions;
11450
- }, function (error) {
11451
- _this.serverJurisdictionError = true;
11452
- });
11453
- }
11454
- LinkedCasesService.prototype.constructElasticSearchQuery = function (caseIds, size) {
11455
- return {
11456
- query: {
11457
- terms: {
11458
- reference: caseIds,
11459
- },
11460
- },
11461
- size: size,
11462
- };
11463
- };
11464
- LinkedCasesService.prototype.mapResponse = function (esSearchCasesResponse) {
11465
- var caseInfo = this.caseFieldValue.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
11466
- return caseInfo && {
11467
- caseReference: esSearchCasesResponse.case_id,
11468
- caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
11469
- caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
11470
- service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
11471
- state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
11472
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
11473
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
11474
- };
11475
- };
11476
- LinkedCasesService.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
11477
- return rxjs.forkJoin(searchCasesResponse);
11478
- };
11479
- LinkedCasesService.prototype.getAllLinkedCaseInformation = function () {
11480
- var _this = this;
11481
- var searchCasesResponse = [];
11482
- var linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
11483
- Object.keys(linkedCaseIds).forEach(function (key) {
11484
- var esQuery = _this.constructElasticSearchQuery(linkedCaseIds[key], 100);
11485
- var query = _this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
11486
- searchCasesResponse.push(query);
11487
- });
11488
- if (searchCasesResponse.length) {
11489
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
11490
- var casesResponse = [];
11491
- searchCases.forEach(function (response) {
11492
- response.results.forEach(function (result) {
11493
- casesResponse.push(_this.mapResponse(result));
11494
- });
11495
- });
11496
- var caseLinks = casesResponse.map(function (item) {
11497
- return {
11498
- caseReference: item.caseReference,
11499
- caseName: item.caseName,
11500
- caseService: item.service,
11501
- caseType: item.caseType,
11502
- unlink: false,
11503
- reasons: item.reasons && item.reasons.map(function (reason) {
11504
- return {
11505
- reasonCode: reason
11506
- };
11507
- }),
11508
- };
11509
- });
11510
- _this.linkedCases = caseLinks;
11511
- _this.serverLinkedApiError = null;
11512
- }, function (err) {
11513
- _this.serverLinkedApiError = {
11514
- id: 'backendError', message: 'Some case information is not available at the moment'
11515
- };
11516
- });
11517
- }
11518
- };
11519
- LinkedCasesService.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
11520
- var _this = this;
11521
- var selectedJurisdiction = this.jurisdictionsResponse &&
11522
- this.jurisdictionsResponse.find(function (item) { return item.id === _this.caseDetails.case_type.jurisdiction.id; });
11523
- var selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(function (item) { return item.id === _this.caseDetails.case_type.id; });
11524
- var state = selectedCaseType && selectedCaseType.states.find(function (item) { return item.id === fieldValue; });
11525
- switch (fieldName) {
11526
- case 'JURISDICTION':
11527
- return selectedJurisdiction && selectedJurisdiction.description;
11528
- case 'CASE_TYPE':
11529
- return selectedCaseType && selectedCaseType.name;
11530
- case 'CASE_TYPE_DESCRIPTION':
11531
- return selectedCaseType && selectedCaseType.description;
11532
- case 'STATE':
11533
- return state && state.name || fieldValue;
11534
- case 'STATE_DESCRIPTION':
11535
- return state && state.description || fieldValue;
11536
- default:
11537
- break;
11538
- }
11539
- };
11540
- LinkedCasesService.prototype.getCaseName = function (searchCasesResponse) {
11541
- var caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
11542
- var tabs = searchCasesResponse.tabs.filter(function (tab) {
11543
- var caseNameHmctsInternalField = tab.fields.find(function (field) { return field.id === 'caseNameHmctsInternal'; });
11544
- if (caseNameHmctsInternalField) {
11545
- caseName = caseNameHmctsInternalField.value;
11546
- }
11547
- });
11548
- return caseName;
11549
- };
11550
- return LinkedCasesService;
11551
- }());
11552
- LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
11553
- LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0__namespace.ɵɵinject(JurisdictionService), i0__namespace.ɵɵinject(SearchService)); };
11554
- LinkedCasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
11555
- (function () {
11556
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesService, [{
11557
- type: i0.Injectable
11558
- }], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null);
11559
- })();
11560
-
11561
- var LinkCasesReasonValuePipe = /** @class */ (function () {
11562
- function LinkCasesReasonValuePipe(linkedCasesService) {
11563
- this.linkedCasesService = linkedCasesService;
11564
- }
11565
- LinkCasesReasonValuePipe.prototype.transform = function (reasonCode) {
11566
- var reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
11567
- this.linkedCasesService.linkCaseReasons.find(function (reason) { return reason.key === reasonCode; });
11568
- return reasonCodeMapping && reasonCodeMapping.value_en;
11569
- };
11570
- return LinkCasesReasonValuePipe;
11571
- }());
11572
- LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
11573
- LinkCasesReasonValuePipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
11574
- (function () {
11575
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
11576
- type: i0.Pipe,
11577
- args: [{
11578
- name: 'ccdLinkCasesReasonValue'
11579
- }]
11580
- }], function () { return [{ type: LinkedCasesService }]; }, null);
11581
- })();
11582
-
11583
11328
  var SortOrder;
11584
11329
  (function (SortOrder) {
11585
11330
  SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
@@ -11620,8 +11365,7 @@
11620
11365
  CcdCYAPageLabelFilterPipe,
11621
11366
  ReadFieldsFilterPipe,
11622
11367
  CcdTabFieldsPipe,
11623
- CcdPageFieldsPipe,
11624
- LinkCasesReasonValuePipe
11368
+ CcdPageFieldsPipe
11625
11369
  ];
11626
11370
  var PipesModule = /** @class */ (function () {
11627
11371
  function PipesModule() {
@@ -11641,16 +11385,14 @@
11641
11385
  CcdCYAPageLabelFilterPipe,
11642
11386
  ReadFieldsFilterPipe,
11643
11387
  CcdTabFieldsPipe,
11644
- CcdPageFieldsPipe,
11645
- LinkCasesReasonValuePipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11388
+ CcdPageFieldsPipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
11646
11389
  SortSearchResultPipe,
11647
11390
  CcdCaseTitlePipe,
11648
11391
  CcdCollectionTableCaseFieldsFilterPipe,
11649
11392
  CcdCYAPageLabelFilterPipe,
11650
11393
  ReadFieldsFilterPipe,
11651
11394
  CcdTabFieldsPipe,
11652
- CcdPageFieldsPipe,
11653
- LinkCasesReasonValuePipe] });
11395
+ CcdPageFieldsPipe] });
11654
11396
  })();
11655
11397
  (function () {
11656
11398
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PipesModule, [{
@@ -11710,7 +11452,7 @@
11710
11452
  return AddressOption;
11711
11453
  }());
11712
11454
 
11713
- var _c0$R = ["writeComplexFieldComponent"];
11455
+ var _c0$P = ["writeComplexFieldComponent"];
11714
11456
  function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) {
11715
11457
  if (rf & 1) {
11716
11458
  i0__namespace.ɵɵelementStart(0, "span", 14);
@@ -11924,7 +11666,7 @@
11924
11666
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0__namespace.ɵɵdirectiveInject(AddressesService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe)); };
11925
11667
  WriteAddressFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
11926
11668
  if (rf & 1) {
11927
- i0__namespace.ɵɵviewQuery(_c0$R, 1);
11669
+ i0__namespace.ɵɵviewQuery(_c0$P, 1);
11928
11670
  i0__namespace.ɵɵviewQuery(FocusElementDirective, 1);
11929
11671
  }
11930
11672
  if (rf & 2) {
@@ -12584,7 +12326,7 @@
12584
12326
  i0__namespace.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
12585
12327
  }
12586
12328
  }
12587
- var _c0$Q = function (a0) { return { "form-group-error": a0 }; };
12329
+ var _c0$O = function (a0) { return { "form-group-error": a0 }; };
12588
12330
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) {
12589
12331
  if (rf & 1) {
12590
12332
  i0__namespace.ɵɵelementStart(0, "div", 8);
@@ -12605,7 +12347,7 @@
12605
12347
  i0__namespace.ɵɵadvance(1);
12606
12348
  i0__namespace.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
12607
12349
  i0__namespace.ɵɵadvance(1);
12608
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$Q, ctx_r1.errorMessages.length > 0));
12350
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$O, ctx_r1.errorMessages.length > 0));
12609
12351
  i0__namespace.ɵɵadvance(1);
12610
12352
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
12611
12353
  i0__namespace.ɵɵadvance(1);
@@ -12991,8 +12733,8 @@
12991
12733
 
12992
12734
  function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) {
12993
12735
  if (rf & 1) {
12994
- i0__namespace.ɵɵelementStart(0, "a", 2);
12995
- i0__namespace.ɵɵelementStart(1, "span", 3);
12736
+ i0__namespace.ɵɵelementStart(0, "a", 1);
12737
+ i0__namespace.ɵɵelementStart(1, "span", 2);
12996
12738
  i0__namespace.ɵɵtext(2);
12997
12739
  i0__namespace.ɵɵpipe(3, "ccdCaseReference");
12998
12740
  i0__namespace.ɵɵelementEnd();
@@ -13005,60 +12747,38 @@
13005
12747
  i0__namespace.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0__namespace.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
13006
12748
  }
13007
12749
  }
13008
- function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) {
13009
- if (rf & 1) {
13010
- i0__namespace.ɵɵelementContainerStart(0);
13011
- i0__namespace.ɵɵelement(1, "ccd-read-linked-cases", 4);
13012
- i0__namespace.ɵɵelementContainerEnd();
13013
- }
13014
- if (rf & 2) {
13015
- var ctx_r1 = i0__namespace.ɵɵnextContext();
13016
- i0__namespace.ɵɵadvance(1);
13017
- i0__namespace.ɵɵproperty("caseField", ctx_r1.caseField);
13018
- }
13019
- }
13020
12750
  var ReadCaseLinkFieldComponent = /** @class */ (function (_super) {
13021
12751
  __extends(ReadCaseLinkFieldComponent, _super);
13022
12752
  function ReadCaseLinkFieldComponent() {
13023
- var _this = _super.apply(this, __spread(arguments)) || this;
13024
- _this.paletteContext = exports.PaletteContext;
13025
- return _this;
12753
+ return _super !== null && _super.apply(this, arguments) || this;
13026
12754
  }
13027
12755
  ReadCaseLinkFieldComponent.prototype.hasReference = function () {
13028
12756
  return this.caseField.value && this.caseField.value.CaseReference;
13029
12757
  };
13030
- ReadCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
13031
- return (this.caseField.field_type &&
13032
- this.caseField.field_type.type === 'Collection' &&
13033
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13034
- };
13035
12758
  return ReadCaseLinkFieldComponent;
13036
12759
  }(AbstractFieldReadComponent));
13037
12760
  ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
13038
- 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) {
12761
+ 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) {
13039
12762
  if (rf & 1) {
13040
12763
  i0__namespace.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
13041
- i0__namespace.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
13042
12764
  }
13043
12765
  if (rf & 2) {
13044
12766
  i0__namespace.ɵɵproperty("ngIf", ctx.hasReference());
13045
- i0__namespace.ɵɵadvance(1);
13046
- i0__namespace.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
13047
12767
  }
13048
- }, encapsulation: 2 });
12768
+ }, directives: [i1__namespace.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
13049
12769
  var ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
13050
12770
  (function () {
13051
12771
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
13052
12772
  type: i0.Component,
13053
12773
  args: [{
13054
12774
  selector: 'ccd-read-case-link-field',
13055
- templateUrl: 'read-case-link-field.html',
12775
+ templateUrl: 'read-case-link-field.html'
13056
12776
  }]
13057
12777
  }], null, null);
13058
12778
  })();
13059
12779
 
13060
- var _c0$P = ["writeComplexFieldComponent"];
13061
- function WriteCaseLinkFieldComponent_div_1_span_2_Template(rf, ctx) {
12780
+ var _c0$N = ["writeComplexFieldComponent"];
12781
+ function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) {
13062
12782
  if (rf & 1) {
13063
12783
  i0__namespace.ɵɵelementStart(0, "span", 6);
13064
12784
  i0__namespace.ɵɵtext(1);
@@ -13066,77 +12786,56 @@
13066
12786
  i0__namespace.ɵɵelementEnd();
13067
12787
  }
13068
12788
  if (rf & 2) {
13069
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
12789
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
13070
12790
  i0__namespace.ɵɵadvance(1);
13071
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.caseField));
12791
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
13072
12792
  }
13073
12793
  }
13074
- function WriteCaseLinkFieldComponent_div_1_span_3_Template(rf, ctx) {
12794
+ function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) {
13075
12795
  if (rf & 1) {
13076
12796
  i0__namespace.ɵɵelementStart(0, "span", 7);
13077
12797
  i0__namespace.ɵɵtext(1);
13078
12798
  i0__namespace.ɵɵelementEnd();
13079
12799
  }
13080
12800
  if (rf & 2) {
13081
- var ctx_r3 = i0__namespace.ɵɵnextContext(2);
13082
- i0__namespace.ɵɵadvance(1);
13083
- i0__namespace.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
13084
- }
13085
- }
13086
- function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) {
13087
- if (rf & 1) {
13088
- i0__namespace.ɵɵelementStart(0, "div", 1);
13089
- i0__namespace.ɵɵelementStart(1, "label", 2);
13090
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
13091
- i0__namespace.ɵɵelementEnd();
13092
- i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
13093
- i0__namespace.ɵɵelement(4, "input", 5);
13094
- i0__namespace.ɵɵelementEnd();
13095
- }
13096
- if (rf & 2) {
13097
- var ctx_r0 = i0__namespace.ɵɵnextContext();
13098
- i0__namespace.ɵɵadvance(1);
13099
- i0__namespace.ɵɵproperty("for", ctx_r0.id());
13100
- i0__namespace.ɵɵadvance(1);
13101
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.label);
13102
- i0__namespace.ɵɵadvance(1);
13103
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
12801
+ var ctx_r1 = i0__namespace.ɵɵnextContext();
13104
12802
  i0__namespace.ɵɵadvance(1);
13105
- i0__namespace.ɵɵproperty("id", ctx_r0.id())("formControl", ctx_r0.caseReferenceControl);
12803
+ i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
13106
12804
  }
13107
12805
  }
13108
- function WriteCaseLinkFieldComponent_div_2_Template(rf, ctx) {
12806
+ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) {
13109
12807
  if (rf & 1) {
13110
- var _r5_1 = i0__namespace.ɵɵgetCurrentView();
13111
- i0__namespace.ɵɵelementStart(0, "div", 1);
13112
- i0__namespace.ɵɵelementStart(1, "ccd-write-linked-cases", 8);
13113
- 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(); });
13114
- i0__namespace.ɵɵelementEnd();
12808
+ i0__namespace.ɵɵelementStart(0, "span", 8);
12809
+ i0__namespace.ɵɵtext(1);
12810
+ i0__namespace.ɵɵpipe(2, "ccdFirstError");
13115
12811
  i0__namespace.ɵɵelementEnd();
13116
12812
  }
13117
12813
  if (rf & 2) {
13118
- var ctx_r1 = i0__namespace.ɵɵnextContext();
12814
+ var ctx_r2 = i0__namespace.ɵɵnextContext();
13119
12815
  i0__namespace.ɵɵadvance(1);
13120
- i0__namespace.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
12816
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
13121
12817
  }
13122
12818
  }
12819
+ var _c1$k = function (a0) { return { "form-group-error": a0 }; };
13123
12820
  var WriteCaseLinkFieldComponent = /** @class */ (function (_super) {
13124
12821
  __extends(WriteCaseLinkFieldComponent, _super);
13125
- function WriteCaseLinkFieldComponent(linkedCasesService) {
13126
- var _this = _super.call(this) || this;
13127
- _this.linkedCasesService = linkedCasesService;
13128
- _this.caseFields = [];
13129
- return _this;
12822
+ function WriteCaseLinkFieldComponent() {
12823
+ return _super !== null && _super.apply(this, arguments) || this;
13130
12824
  }
13131
12825
  WriteCaseLinkFieldComponent.prototype.ngOnInit = function () {
13132
12826
  var e_1, _a;
13133
- this.formArray = this.registerControl(new i2.FormArray([]), true);
13134
- this.formArray['caseField'] = this.caseField;
13135
- if (!this.hasCaseLinkCollection()) {
12827
+ if (this.caseField.value) {
13136
12828
  this.caseLinkGroup = this.registerControl(new i2.FormGroup({
13137
12829
  CaseReference: new i2.FormControl(this.caseField.value.CaseReference, i2.Validators.required),
13138
12830
  }), true);
13139
12831
  }
12832
+ else {
12833
+ this.caseLinkGroup = this.registerControl(new i2.FormGroup({
12834
+ CaseReference: new i2.FormControl(null, i2.Validators.required),
12835
+ }), true);
12836
+ }
12837
+ this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
12838
+ this.caseReferenceControl.setValidators(this.caseReferenceValidator());
13140
12839
  // Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
13141
12840
  // field uses the Complex type, it is meant to be treated as one field
13142
12841
  if (this.caseField && this.caseField.field_type.type === 'Complex') {
@@ -13154,18 +12853,23 @@
13154
12853
  finally { if (e_1) throw e_1.error; }
13155
12854
  }
13156
12855
  }
13157
- this.containsCaseLinkCollection = this.hasCaseLinkCollection();
13158
12856
  };
13159
- WriteCaseLinkFieldComponent.prototype.submitLinkedCases = function () {
13160
- var formGroup = this.formGroup;
13161
- if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
13162
- var unlinkedCaseRefereneIds_1 = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
13163
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue
13164
- .filter(function (item) { return unlinkedCaseRefereneIds_1.indexOf(item.id) === -1; });
13165
- }
13166
- else if (formGroup.value && formGroup.value.caseLinks && this.linkedCasesService.linkedCases) {
13167
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
13168
- }
12857
+ WriteCaseLinkFieldComponent.prototype.caseReferenceValidator = function () {
12858
+ var _this = this;
12859
+ return function (control) {
12860
+ if (control.value) {
12861
+ if (_this.validCaseReference(control.value)) {
12862
+ return null;
12863
+ }
12864
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12865
+ }
12866
+ else {
12867
+ if (control.touched) {
12868
+ return { error: 'Please use a valid 16 Digit Case Reference' };
12869
+ }
12870
+ }
12871
+ return null;
12872
+ };
13169
12873
  };
13170
12874
  WriteCaseLinkFieldComponent.prototype.validCaseReference = function (valueString) {
13171
12875
  if (!valueString) {
@@ -13173,36 +12877,43 @@
13173
12877
  }
13174
12878
  return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
13175
12879
  };
13176
- WriteCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
13177
- return (this.caseField.field_type &&
13178
- this.caseField.field_type.type === 'Collection' &&
13179
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
13180
- };
13181
12880
  return WriteCaseLinkFieldComponent;
13182
12881
  }(AbstractFieldWriteComponent));
13183
- WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return new (t || WriteCaseLinkFieldComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
12882
+ WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
13184
12883
  WriteCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) {
13185
12884
  if (rf & 1) {
13186
- i0__namespace.ɵɵviewQuery(_c0$P, 1);
12885
+ i0__namespace.ɵɵviewQuery(_c0$N, 1);
13187
12886
  }
13188
12887
  if (rf & 2) {
13189
12888
  var _t = void 0;
13190
12889
  i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
13191
12890
  }
13192
- }, 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) {
12891
+ }, 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) {
13193
12892
  if (rf & 1) {
13194
- i0__namespace.ɵɵelementContainerStart(0);
13195
- i0__namespace.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
13196
- i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
13197
- i0__namespace.ɵɵelementContainerEnd();
12893
+ i0__namespace.ɵɵelementStart(0, "div", 0);
12894
+ i0__namespace.ɵɵelementStart(1, "label", 1);
12895
+ i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
12896
+ i0__namespace.ɵɵelementEnd();
12897
+ i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
12898
+ i0__namespace.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
12899
+ i0__namespace.ɵɵelement(5, "input", 5);
12900
+ i0__namespace.ɵɵelementEnd();
13198
12901
  }
13199
12902
  if (rf & 2) {
12903
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
12904
+ i0__namespace.ɵɵadvance(1);
12905
+ i0__namespace.ɵɵproperty("for", ctx.id());
12906
+ i0__namespace.ɵɵadvance(1);
12907
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
12908
+ i0__namespace.ɵɵadvance(1);
12909
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
13200
12910
  i0__namespace.ɵɵadvance(1);
13201
- i0__namespace.ɵɵproperty("ngIf", !ctx.containsCaseLinkCollection);
12911
+ i0__namespace.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
13202
12912
  i0__namespace.ɵɵadvance(1);
13203
- i0__namespace.ɵɵproperty("ngIf", ctx.containsCaseLinkCollection);
12913
+ i0__namespace.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
13204
12914
  }
13205
- }, encapsulation: 2 });
12915
+ }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
12916
+ var ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
13206
12917
  (function () {
13207
12918
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
13208
12919
  type: i0.Component,
@@ -13210,17 +12921,13 @@
13210
12921
  selector: 'ccd-write-case-link-field',
13211
12922
  templateUrl: 'write-case-link-field.html'
13212
12923
  }]
13213
- }], function () { return [{ type: LinkedCasesService }]; }, { caseFields: [{
13214
- type: i0.Input
13215
- }], formGroup: [{
13216
- type: i0.Input
13217
- }], writeComplexFieldComponent: [{
12924
+ }], null, { writeComplexFieldComponent: [{
13218
12925
  type: i0.ViewChild,
13219
- args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
12926
+ args: ['writeComplexFieldComponent']
13220
12927
  }] });
13221
12928
  })();
13222
12929
 
13223
- var _c0$O = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
12930
+ var _c0$M = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
13224
12931
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
13225
12932
  if (rf & 1) {
13226
12933
  i0__namespace.ɵɵelementStart(0, "tbody");
@@ -13235,10 +12942,10 @@
13235
12942
  if (rf & 2) {
13236
12943
  var ctx_r1 = i0__namespace.ɵɵnextContext(2);
13237
12944
  i0__namespace.ɵɵadvance(4);
13238
- i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$O, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
12945
+ i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$M, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
13239
12946
  }
13240
12947
  }
13241
- var _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
12948
+ var _c1$j = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
13242
12949
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
13243
12950
  if (rf & 1) {
13244
12951
  i0__namespace.ɵɵelementStart(0, "tr");
@@ -13252,7 +12959,7 @@
13252
12959
  var i_r5 = ctx.index;
13253
12960
  var ctx_r3 = i0__namespace.ɵɵnextContext(3);
13254
12961
  i0__namespace.ɵɵadvance(2);
13255
- 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));
12962
+ 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));
13256
12963
  }
13257
12964
  }
13258
12965
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
@@ -13386,7 +13093,7 @@
13386
13093
  }], function () { return [{ type: i1__namespace$3.MatDialogRef }]; }, null);
13387
13094
  })();
13388
13095
 
13389
- var _c0$N = ["collectionItem"];
13096
+ var _c0$L = ["collectionItem"];
13390
13097
  function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) {
13391
13098
  if (rf & 1) {
13392
13099
  i0__namespace.ɵɵelementStart(0, "span", 9);
@@ -13799,7 +13506,7 @@
13799
13506
  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)); };
13800
13507
  WriteCollectionFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) {
13801
13508
  if (rf & 1) {
13802
- i0__namespace.ɵɵviewQuery(_c0$N, 1);
13509
+ i0__namespace.ɵɵviewQuery(_c0$L, 1);
13803
13510
  }
13804
13511
  if (rf & 2) {
13805
13512
  var _t = void 0;
@@ -14387,7 +14094,7 @@
14387
14094
  }], null, null);
14388
14095
  })();
14389
14096
 
14390
- var _c0$M = ["fileInput"];
14097
+ var _c0$K = ["fileInput"];
14391
14098
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) {
14392
14099
  if (rf & 1) {
14393
14100
  i0__namespace.ɵɵelementStart(0, "span", 12);
@@ -14421,7 +14128,7 @@
14421
14128
  i0__namespace.ɵɵproperty("caseField", ctx_r2.caseField);
14422
14129
  }
14423
14130
  }
14424
- var _c1$j = function (a0) { return { "form-group-error bottom-30": a0 }; };
14131
+ var _c1$i = function (a0) { return { "form-group-error bottom-30": a0 }; };
14425
14132
  var WriteDocumentFieldComponent = /** @class */ (function (_super) {
14426
14133
  __extends(WriteDocumentFieldComponent, _super);
14427
14134
  function WriteDocumentFieldComponent(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
@@ -14681,7 +14388,7 @@
14681
14388
  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)); };
14682
14389
  WriteDocumentFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
14683
14390
  if (rf & 1) {
14684
- i0__namespace.ɵɵviewQuery(_c0$M, 1);
14391
+ i0__namespace.ɵɵviewQuery(_c0$K, 1);
14685
14392
  }
14686
14393
  if (rf & 2) {
14687
14394
  var _t = void 0;
@@ -14723,7 +14430,7 @@
14723
14430
  i0__namespace.ɵɵelementEnd();
14724
14431
  }
14725
14432
  if (rf & 2) {
14726
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$j, !ctx.valid));
14433
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$i, !ctx.valid));
14727
14434
  i0__namespace.ɵɵadvance(1);
14728
14435
  i0__namespace.ɵɵproperty("for", ctx.id());
14729
14436
  i0__namespace.ɵɵadvance(1);
@@ -14881,7 +14588,7 @@
14881
14588
  i0__namespace.ɵɵtextInterpolate(type_r5.label);
14882
14589
  }
14883
14590
  }
14884
- var _c0$L = function (a0) { return { "form-group-error": a0 }; };
14591
+ var _c0$J = function (a0) { return { "form-group-error": a0 }; };
14885
14592
  var WriteDynamicListFieldComponent = /** @class */ (function (_super) {
14886
14593
  __extends(WriteDynamicListFieldComponent, _super);
14887
14594
  function WriteDynamicListFieldComponent() {
@@ -14930,7 +14637,7 @@
14930
14637
  i0__namespace.ɵɵelementEnd();
14931
14638
  }
14932
14639
  if (rf & 2) {
14933
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$L, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14640
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$J, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
14934
14641
  i0__namespace.ɵɵadvance(1);
14935
14642
  i0__namespace.ɵɵproperty("for", ctx.id());
14936
14643
  i0__namespace.ɵɵadvance(1);
@@ -15080,7 +14787,7 @@
15080
14787
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
15081
14788
  }
15082
14789
  }
15083
- var _c0$K = function (a0) { return { selected: a0 }; };
14790
+ var _c0$I = function (a0) { return { selected: a0 }; };
15084
14791
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
15085
14792
  if (rf & 1) {
15086
14793
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -15093,7 +14800,7 @@
15093
14800
  if (rf & 2) {
15094
14801
  var radioButton_r5 = ctx.$implicit;
15095
14802
  var ctx_r4 = i0__namespace.ɵɵnextContext();
15096
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
14803
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$I, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
15097
14804
  i0__namespace.ɵɵadvance(1);
15098
14805
  i0__namespace.ɵɵpropertyInterpolate("name", ctx_r4.id());
15099
14806
  i0__namespace.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
@@ -15103,7 +14810,7 @@
15103
14810
  i0__namespace.ɵɵtextInterpolate(radioButton_r5.label);
15104
14811
  }
15105
14812
  }
15106
- var _c1$i = function (a0) { return { "form-group-error": a0 }; };
14813
+ var _c1$h = function (a0) { return { "form-group-error": a0 }; };
15107
14814
  var WriteDynamicRadioListFieldComponent = /** @class */ (function (_super) {
15108
14815
  __extends(WriteDynamicRadioListFieldComponent, _super);
15109
14816
  function WriteDynamicRadioListFieldComponent() {
@@ -15151,7 +14858,7 @@
15151
14858
  i0__namespace.ɵɵelementEnd();
15152
14859
  }
15153
14860
  if (rf & 2) {
15154
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$i, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
14861
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$h, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
15155
14862
  i0__namespace.ɵɵadvance(3);
15156
14863
  i0__namespace.ɵɵproperty("for", ctx.id());
15157
14864
  i0__namespace.ɵɵadvance(1);
@@ -15258,8 +14965,8 @@
15258
14965
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
15259
14966
  }
15260
14967
  }
15261
- var _c0$J = function (a0) { return { "form-group-error": a0 }; };
15262
- var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
14968
+ var _c0$H = function (a0) { return { "form-group-error": a0 }; };
14969
+ var _c1$g = function (a0) { return { "govuk-input--error": a0 }; };
15263
14970
  var WriteEmailFieldComponent = /** @class */ (function (_super) {
15264
14971
  __extends(WriteEmailFieldComponent, _super);
15265
14972
  function WriteEmailFieldComponent() {
@@ -15283,7 +14990,7 @@
15283
14990
  i0__namespace.ɵɵelementEnd();
15284
14991
  }
15285
14992
  if (rf & 2) {
15286
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
14993
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$H, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
15287
14994
  i0__namespace.ɵɵadvance(1);
15288
14995
  i0__namespace.ɵɵproperty("for", ctx.id());
15289
14996
  i0__namespace.ɵɵadvance(1);
@@ -15293,7 +15000,7 @@
15293
15000
  i0__namespace.ɵɵadvance(1);
15294
15001
  i0__namespace.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15295
15002
  i0__namespace.ɵɵadvance(1);
15296
- 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);
15003
+ 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);
15297
15004
  }
15298
15005
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15299
15006
  var ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
@@ -15415,7 +15122,7 @@
15415
15122
  i0__namespace.ɵɵtextInterpolate(type_r4.label);
15416
15123
  }
15417
15124
  }
15418
- var _c0$I = function (a0) { return { "form-group-error": a0 }; };
15125
+ var _c0$G = function (a0) { return { "form-group-error": a0 }; };
15419
15126
  var WriteFixedListFieldComponent = /** @class */ (function (_super) {
15420
15127
  __extends(WriteFixedListFieldComponent, _super);
15421
15128
  function WriteFixedListFieldComponent() {
@@ -15464,7 +15171,7 @@
15464
15171
  i0__namespace.ɵɵelementEnd();
15465
15172
  }
15466
15173
  if (rf & 2) {
15467
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15174
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$G, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
15468
15175
  i0__namespace.ɵɵadvance(1);
15469
15176
  i0__namespace.ɵɵproperty("for", ctx.id());
15470
15177
  i0__namespace.ɵɵadvance(1);
@@ -15582,7 +15289,7 @@
15582
15289
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
15583
15290
  }
15584
15291
  }
15585
- var _c0$H = function (a0) { return { selected: a0 }; };
15292
+ var _c0$F = function (a0) { return { selected: a0 }; };
15586
15293
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
15587
15294
  if (rf & 1) {
15588
15295
  i0__namespace.ɵɵelementStart(0, "div", 9);
@@ -15595,7 +15302,7 @@
15595
15302
  if (rf & 2) {
15596
15303
  var radioButton_r4 = ctx.$implicit;
15597
15304
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15598
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15305
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$F, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
15599
15306
  i0__namespace.ɵɵadvance(1);
15600
15307
  i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
15601
15308
  i0__namespace.ɵɵadvance(1);
@@ -15604,7 +15311,7 @@
15604
15311
  i0__namespace.ɵɵtextInterpolate(radioButton_r4.label);
15605
15312
  }
15606
15313
  }
15607
- var _c1$g = function (a0) { return { "form-group-error": a0 }; };
15314
+ var _c1$f = function (a0) { return { "form-group-error": a0 }; };
15608
15315
  var WriteFixedRadioListFieldComponent = /** @class */ (function (_super) {
15609
15316
  __extends(WriteFixedRadioListFieldComponent, _super);
15610
15317
  function WriteFixedRadioListFieldComponent() {
@@ -15635,7 +15342,7 @@
15635
15342
  i0__namespace.ɵɵelementEnd();
15636
15343
  }
15637
15344
  if (rf & 2) {
15638
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$g, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15345
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$f, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
15639
15346
  i0__namespace.ɵɵadvance(3);
15640
15347
  i0__namespace.ɵɵproperty("for", ctx.id());
15641
15348
  i0__namespace.ɵɵadvance(1);
@@ -15765,7 +15472,7 @@
15765
15472
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
15766
15473
  }
15767
15474
  }
15768
- var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
15475
+ var _c0$E = function (a0) { return { "hide-autocomplete": a0 }; };
15769
15476
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
15770
15477
  if (rf & 1) {
15771
15478
  var _r7_1 = i0__namespace.ɵɵgetCurrentView();
@@ -15777,7 +15484,7 @@
15777
15484
  if (rf & 2) {
15778
15485
  var judicialUser_r5 = ctx.$implicit;
15779
15486
  var ctx_r3 = i0__namespace.ɵɵnextContext();
15780
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15487
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$E, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
15781
15488
  i0__namespace.ɵɵadvance(1);
15782
15489
  i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
15783
15490
  }
@@ -16124,7 +15831,7 @@
16124
15831
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
16125
15832
  }
16126
15833
  }
16127
- var _c0$F = function (a0) { return { "form-group-error": a0 }; };
15834
+ var _c0$D = function (a0) { return { "form-group-error": a0 }; };
16128
15835
  var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
16129
15836
  __extends(WriteMoneyGbpFieldComponent, _super);
16130
15837
  function WriteMoneyGbpFieldComponent() {
@@ -16154,7 +15861,7 @@
16154
15861
  i0__namespace.ɵɵelementEnd();
16155
15862
  }
16156
15863
  if (rf & 2) {
16157
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$F, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
15864
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
16158
15865
  i0__namespace.ɵɵadvance(1);
16159
15866
  i0__namespace.ɵɵproperty("for", ctx.id());
16160
15867
  i0__namespace.ɵɵadvance(1);
@@ -16302,7 +16009,7 @@
16302
16009
  i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
16303
16010
  }
16304
16011
  }
16305
- var _c0$E = function (a0) { return { "error": a0 }; };
16012
+ var _c0$C = function (a0) { return { "error": a0 }; };
16306
16013
  var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
16307
16014
  __extends(WriteMultiSelectListFieldComponent, _super);
16308
16015
  function WriteMultiSelectListFieldComponent() {
@@ -16366,7 +16073,7 @@
16366
16073
  i0__namespace.ɵɵelementEnd();
16367
16074
  }
16368
16075
  if (rf & 2) {
16369
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$E, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16076
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
16370
16077
  i0__namespace.ɵɵadvance(3);
16371
16078
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
16372
16079
  i0__namespace.ɵɵadvance(1);
@@ -16457,8 +16164,8 @@
16457
16164
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
16458
16165
  }
16459
16166
  }
16460
- var _c0$D = function (a0) { return { "form-group-error": a0 }; };
16461
- var _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
16167
+ var _c0$B = function (a0) { return { "form-group-error": a0 }; };
16168
+ var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16462
16169
  var WriteNumberFieldComponent = /** @class */ (function (_super) {
16463
16170
  __extends(WriteNumberFieldComponent, _super);
16464
16171
  function WriteNumberFieldComponent() {
@@ -16482,7 +16189,7 @@
16482
16189
  i0__namespace.ɵɵelementEnd();
16483
16190
  }
16484
16191
  if (rf & 2) {
16485
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$D, !ctx.numberControl.valid && ctx.numberControl.dirty));
16192
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
16486
16193
  i0__namespace.ɵɵadvance(1);
16487
16194
  i0__namespace.ɵɵproperty("for", ctx.id());
16488
16195
  i0__namespace.ɵɵadvance(1);
@@ -16492,7 +16199,7 @@
16492
16199
  i0__namespace.ɵɵadvance(1);
16493
16200
  i0__namespace.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
16494
16201
  i0__namespace.ɵɵadvance(1);
16495
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16202
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
16496
16203
  }
16497
16204
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.NumberValueAccessor, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
16498
16205
  var ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
@@ -16783,7 +16490,7 @@
16783
16490
  i0__namespace.ɵɵelementEnd();
16784
16491
  }
16785
16492
  }
16786
- var _c0$C = function (a0) { return { "scroll-container ": a0 }; };
16493
+ var _c0$A = function (a0) { return { "scroll-container ": a0 }; };
16787
16494
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
16788
16495
  if (rf & 1) {
16789
16496
  i0__namespace.ɵɵelementStart(0, "div", 26);
@@ -16799,7 +16506,7 @@
16799
16506
  var ctx_r2 = i0__namespace.ɵɵnextContext(2);
16800
16507
  var tmp_0_0 = null;
16801
16508
  var tmp_2_0 = null;
16802
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$C, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16509
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
16803
16510
  i0__namespace.ɵɵadvance(2);
16804
16511
  i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
16805
16512
  i0__namespace.ɵɵadvance(2);
@@ -17271,8 +16978,8 @@
17271
16978
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label));
17272
16979
  }
17273
16980
  }
17274
- var _c0$B = function (a0) { return { "form-group-error": a0 }; };
17275
- var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
16981
+ var _c0$z = function (a0) { return { "form-group-error": a0 }; };
16982
+ var _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
17276
16983
  var WritePhoneUKFieldComponent = /** @class */ (function (_super) {
17277
16984
  __extends(WritePhoneUKFieldComponent, _super);
17278
16985
  function WritePhoneUKFieldComponent() {
@@ -17296,7 +17003,7 @@
17296
17003
  i0__namespace.ɵɵelementEnd();
17297
17004
  }
17298
17005
  if (rf & 2) {
17299
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
17006
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
17300
17007
  i0__namespace.ɵɵadvance(1);
17301
17008
  i0__namespace.ɵɵproperty("for", ctx.id());
17302
17009
  i0__namespace.ɵɵadvance(1);
@@ -17306,7 +17013,7 @@
17306
17013
  i0__namespace.ɵɵadvance(1);
17307
17014
  i0__namespace.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
17308
17015
  i0__namespace.ɵɵadvance(1);
17309
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
17016
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
17310
17017
  }
17311
17018
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17312
17019
  var ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
@@ -17388,8 +17095,8 @@
17388
17095
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label));
17389
17096
  }
17390
17097
  }
17391
- var _c0$A = function (a0) { return { "form-group-error": a0 }; };
17392
- var _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
17098
+ var _c0$y = function (a0) { return { "form-group-error": a0 }; };
17099
+ var _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
17393
17100
  var WriteTextAreaFieldComponent = /** @class */ (function (_super) {
17394
17101
  __extends(WriteTextAreaFieldComponent, _super);
17395
17102
  function WriteTextAreaFieldComponent(browserService) {
@@ -17424,7 +17131,7 @@
17424
17131
  i0__namespace.ɵɵelementEnd();
17425
17132
  }
17426
17133
  if (rf & 2) {
17427
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$A, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17134
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
17428
17135
  i0__namespace.ɵɵadvance(1);
17429
17136
  i0__namespace.ɵɵproperty("for", ctx.id());
17430
17137
  i0__namespace.ɵɵadvance(1);
@@ -17434,7 +17141,7 @@
17434
17141
  i0__namespace.ɵɵadvance(1);
17435
17142
  i0__namespace.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
17436
17143
  i0__namespace.ɵɵadvance(1);
17437
- 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);
17144
+ 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);
17438
17145
  }
17439
17146
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17440
17147
  (function () {
@@ -17516,8 +17223,8 @@
17516
17223
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label));
17517
17224
  }
17518
17225
  }
17519
- var _c0$z = function (a0) { return { "form-group-error": a0 }; };
17520
- var _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
17226
+ var _c0$x = function (a0) { return { "form-group-error": a0 }; };
17227
+ var _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
17521
17228
  var WriteTextFieldComponent = /** @class */ (function (_super) {
17522
17229
  __extends(WriteTextFieldComponent, _super);
17523
17230
  function WriteTextFieldComponent() {
@@ -17546,7 +17253,7 @@
17546
17253
  i0__namespace.ɵɵelementEnd();
17547
17254
  }
17548
17255
  if (rf & 2) {
17549
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17256
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$x, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
17550
17257
  i0__namespace.ɵɵadvance(1);
17551
17258
  i0__namespace.ɵɵproperty("for", ctx.id());
17552
17259
  i0__namespace.ɵɵadvance(1);
@@ -17556,7 +17263,7 @@
17556
17263
  i0__namespace.ɵɵadvance(1);
17557
17264
  i0__namespace.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
17558
17265
  i0__namespace.ɵɵadvance(1);
17559
- 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);
17266
+ 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);
17560
17267
  }
17561
17268
  }, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
17562
17269
  var ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteTextFieldComponent);
@@ -17754,7 +17461,7 @@
17754
17461
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label));
17755
17462
  }
17756
17463
  }
17757
- var _c0$y = function (a0) { return { selected: a0 }; };
17464
+ var _c0$w = function (a0) { return { selected: a0 }; };
17758
17465
  function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
17759
17466
  if (rf & 1) {
17760
17467
  i0__namespace.ɵɵelementStart(0, "div", 10);
@@ -17767,7 +17474,7 @@
17767
17474
  if (rf & 2) {
17768
17475
  var value_r4 = ctx.$implicit;
17769
17476
  var ctx_r3 = i0__namespace.ɵɵnextContext();
17770
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, ctx_r3.yesNoControl.value === value_r4));
17477
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$w, ctx_r3.yesNoControl.value === value_r4));
17771
17478
  i0__namespace.ɵɵadvance(1);
17772
17479
  i0__namespace.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
17773
17480
  i0__namespace.ɵɵattribute("name", ctx_r3.id());
@@ -17777,7 +17484,7 @@
17777
17484
  i0__namespace.ɵɵtextInterpolate(value_r4);
17778
17485
  }
17779
17486
  }
17780
- var _c1$b = function (a0) { return { "form-group-error": a0 }; };
17487
+ var _c1$a = function (a0) { return { "form-group-error": a0 }; };
17781
17488
  var WriteYesNoFieldComponent = /** @class */ (function (_super) {
17782
17489
  __extends(WriteYesNoFieldComponent, _super);
17783
17490
  function WriteYesNoFieldComponent(yesNoService) {
@@ -17808,7 +17515,7 @@
17808
17515
  i0__namespace.ɵɵelementEnd();
17809
17516
  }
17810
17517
  if (rf & 2) {
17811
- i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
17518
+ i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
17812
17519
  i0__namespace.ɵɵadvance(3);
17813
17520
  i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
17814
17521
  i0__namespace.ɵɵadvance(1);
@@ -17872,25 +17579,17 @@
17872
17579
  return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
17873
17580
  case 'OrderSummary':
17874
17581
  return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
17582
+ case 'CaseLink':
17583
+ return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17875
17584
  case 'Organisation':
17876
17585
  return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
17877
17586
  case 'JudicialUser':
17878
17587
  return write ? WriteJudicialUserFieldComponent : ReadJudicialUserFieldComponent;
17879
- case 'CaseLink':
17880
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17881
17588
  default:
17882
17589
  return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
17883
17590
  }
17884
17591
  case 'Collection':
17885
- switch (caseField.field_type.collection_field_type.id) {
17886
- case 'CaseLink':
17887
- if (caseField.id === 'caseLinks') {
17888
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
17889
- }
17890
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17891
- default:
17892
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17893
- }
17592
+ return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
17894
17593
  case 'MultiSelectList':
17895
17594
  return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
17896
17595
  case 'Document':
@@ -17930,7 +17629,7 @@
17930
17629
  }], null, null);
17931
17630
  })();
17932
17631
 
17933
- var _c0$x = ["fieldContainer"];
17632
+ var _c0$v = ["fieldContainer"];
17934
17633
  var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
17935
17634
  var FieldReadComponent = /** @class */ (function (_super) {
17936
17635
  __extends(FieldReadComponent, _super);
@@ -17979,7 +17678,7 @@
17979
17678
  FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
17980
17679
  FieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) {
17981
17680
  if (rf & 1) {
17982
- i0__namespace.ɵɵviewQuery(_c0$x, 1, i0.ViewContainerRef);
17681
+ i0__namespace.ɵɵviewQuery(_c0$v, 1, i0.ViewContainerRef);
17983
17682
  }
17984
17683
  if (rf & 2) {
17985
17684
  var _t = void 0;
@@ -18020,7 +17719,7 @@
18020
17719
  }] });
18021
17720
  })();
18022
17721
 
18023
- var _c0$w = ["fieldContainer"];
17722
+ var _c0$u = ["fieldContainer"];
18024
17723
  var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
18025
17724
  var FieldWriteComponent = /** @class */ (function (_super) {
18026
17725
  __extends(FieldWriteComponent, _super);
@@ -18068,7 +17767,7 @@
18068
17767
  FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
18069
17768
  FieldWriteComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) {
18070
17769
  if (rf & 1) {
18071
- i0__namespace.ɵɵviewQuery(_c0$w, 3, i0.ViewContainerRef);
17770
+ i0__namespace.ɵɵviewQuery(_c0$u, 3, i0.ViewContainerRef);
18072
17771
  }
18073
17772
  if (rf & 2) {
18074
17773
  var _t = void 0;
@@ -18131,7 +17830,7 @@
18131
17830
  i0__namespace.ɵɵprojection(0);
18132
17831
  }
18133
17832
  }
18134
- var _c0$v = ["*"];
17833
+ var _c0$t = ["*"];
18135
17834
  var FieldReadLabelComponent = /** @class */ (function (_super) {
18136
17835
  __extends(FieldReadLabelComponent, _super);
18137
17836
  function FieldReadLabelComponent() {
@@ -18169,7 +17868,7 @@
18169
17868
  return FieldReadLabelComponent;
18170
17869
  }(AbstractFieldReadComponent));
18171
17870
  FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
18172
- 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) {
17871
+ 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) {
18173
17872
  if (rf & 1) {
18174
17873
  i0__namespace.ɵɵprojectionDef();
18175
17874
  i0__namespace.ɵɵelementStart(0, "div", 0);
@@ -18208,7 +17907,7 @@
18208
17907
  i0__namespace.ɵɵelementContainer(0);
18209
17908
  }
18210
17909
  }
18211
- var _c0$u = function (a0) { return { cat: a0, level: 1 }; };
17910
+ var _c0$s = function (a0) { return { cat: a0, level: 1 }; };
18212
17911
  function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
18213
17912
  if (rf & 1) {
18214
17913
  i0__namespace.ɵɵelementContainerStart(0);
@@ -18220,7 +17919,7 @@
18220
17919
  i0__namespace.ɵɵnextContext();
18221
17920
  var _r1 = i0__namespace.ɵɵreference(13);
18222
17921
  i0__namespace.ɵɵadvance(1);
18223
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$u, cat_r3));
17922
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$s, cat_r3));
18224
17923
  }
18225
17924
  }
18226
17925
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) {
@@ -18228,7 +17927,7 @@
18228
17927
  i0__namespace.ɵɵelementContainer(0);
18229
17928
  }
18230
17929
  }
18231
- var _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
17930
+ var _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
18232
17931
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
18233
17932
  if (rf & 1) {
18234
17933
  i0__namespace.ɵɵelementContainerStart(0);
@@ -18241,7 +17940,7 @@
18241
17940
  i0__namespace.ɵɵnextContext();
18242
17941
  var _r1 = i0__namespace.ɵɵreference(13);
18243
17942
  i0__namespace.ɵɵadvance(1);
18244
- i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
17943
+ i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
18245
17944
  }
18246
17945
  }
18247
17946
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
@@ -18383,7 +18082,7 @@
18383
18082
  i0__namespace.ɵɵadvance(2);
18384
18083
  i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
18385
18084
  }
18386
- }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder,.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
18085
+ }, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
18387
18086
  (function () {
18388
18087
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
18389
18088
  type: i0.Component,
@@ -18462,8 +18161,8 @@
18462
18161
  i0__namespace.ɵɵproperty("ngForOf", ctx_r1.menuItems);
18463
18162
  }
18464
18163
  }
18465
- var _c0$t = [[["", "trigger", ""]]];
18466
- var _c1$9 = ["[trigger]"];
18164
+ var _c0$r = [[["", "trigger", ""]]];
18165
+ var _c1$8 = ["[trigger]"];
18467
18166
  var CaseFileViewOverlayMenuComponent = /** @class */ (function () {
18468
18167
  function CaseFileViewOverlayMenuComponent() {
18469
18168
  this.title = '';
@@ -18478,9 +18177,9 @@
18478
18177
  return CaseFileViewOverlayMenuComponent;
18479
18178
  }());
18480
18179
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
18481
- 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) {
18180
+ 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) {
18482
18181
  if (rf & 1) {
18483
- i0__namespace.ɵɵprojectionDef(_c0$t);
18182
+ i0__namespace.ɵɵprojectionDef(_c0$r);
18484
18183
  i0__namespace.ɵɵelementStart(0, "div");
18485
18184
  i0__namespace.ɵɵelementStart(1, "button", 0, 1);
18486
18185
  i0__namespace.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -19327,8 +19026,8 @@
19327
19026
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
19328
19027
  }
19329
19028
  }
19330
- var _c0$s = function (a0) { return { "form-group-error": a0 }; };
19331
- var _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
19029
+ var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19030
+ var _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
19332
19031
  function SelectFlagTypeComponent_div_9_Template(rf, ctx) {
19333
19032
  if (rf & 1) {
19334
19033
  i0__namespace.ɵɵelementStart(0, "div", 15);
@@ -19344,11 +19043,11 @@
19344
19043
  if (rf & 2) {
19345
19044
  var ctx_r2 = i0__namespace.ɵɵnextContext();
19346
19045
  i0__namespace.ɵɵadvance(1);
19347
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$s, ctx_r2.flagTypeErrorMessage.length > 0));
19046
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$q, ctx_r2.flagTypeErrorMessage.length > 0));
19348
19047
  i0__namespace.ɵɵadvance(3);
19349
19048
  i0__namespace.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
19350
19049
  i0__namespace.ɵɵadvance(1);
19351
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$8, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19050
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$7, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
19352
19051
  }
19353
19052
  }
19354
19053
  function SelectFlagTypeComponent_div_10_Template(rf, ctx) {
@@ -19506,7 +19205,7 @@
19506
19205
  if (rf & 2) {
19507
19206
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
19508
19207
  i0__namespace.ɵɵadvance(1);
19509
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$s, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19208
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$q, ctx.flagTypeNotSelectedErrorMessage.length > 0));
19510
19209
  i0__namespace.ɵɵadvance(4);
19511
19210
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
19512
19211
  i0__namespace.ɵɵadvance(1);
@@ -19618,7 +19317,7 @@
19618
19317
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
19619
19318
  }
19620
19319
  }
19621
- var _c0$r = function (a0) { return { "form-group-error": a0 }; };
19320
+ var _c0$p = function (a0) { return { "form-group-error": a0 }; };
19622
19321
  function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) {
19623
19322
  if (rf & 1) {
19624
19323
  i0__namespace.ɵɵelementStart(0, "div", 25);
@@ -19635,7 +19334,7 @@
19635
19334
  if (rf & 2) {
19636
19335
  var ctx_r5 = i0__namespace.ɵɵnextContext();
19637
19336
  i0__namespace.ɵɵadvance(1);
19638
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$r, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19337
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$p, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
19639
19338
  i0__namespace.ɵɵadvance(2);
19640
19339
  i0__namespace.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
19641
19340
  i0__namespace.ɵɵadvance(1);
@@ -19810,7 +19509,7 @@
19810
19509
  var _r2 = i0__namespace.ɵɵreference(12);
19811
19510
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
19812
19511
  i0__namespace.ɵɵadvance(1);
19813
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$r, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
19512
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$p, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
19814
19513
  i0__namespace.ɵɵadvance(2);
19815
19514
  i0__namespace.ɵɵproperty("for", ctx.languageSearchTermControlName);
19816
19515
  i0__namespace.ɵɵadvance(1);
@@ -19944,7 +19643,7 @@
19944
19643
  i0__namespace.ɵɵelementEnd();
19945
19644
  }
19946
19645
  }
19947
- var _c0$q = function (a0) { return { "form-group-error": a0 }; };
19646
+ var _c0$o = function (a0) { return { "form-group-error": a0 }; };
19948
19647
  var SelectFlagLocationComponent = /** @class */ (function () {
19949
19648
  function SelectFlagLocationComponent() {
19950
19649
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20033,7 +19732,7 @@
20033
19732
  if (rf & 2) {
20034
19733
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20035
19734
  i0__namespace.ɵɵadvance(1);
20036
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$q, ctx.errorMessages.length > 0));
19735
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20037
19736
  i0__namespace.ɵɵadvance(4);
20038
19737
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
20039
19738
  i0__namespace.ɵɵadvance(1);
@@ -20097,7 +19796,7 @@
20097
19796
  i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
20098
19797
  }
20099
19798
  }
20100
- var _c0$p = function (a0) { return { "form-group-error": a0 }; };
19799
+ var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20101
19800
  var AddCommentsComponent = /** @class */ (function () {
20102
19801
  function AddCommentsComponent() {
20103
19802
  this.optional = false;
@@ -20178,7 +19877,7 @@
20178
19877
  if (rf & 2) {
20179
19878
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20180
19879
  i0__namespace.ɵɵadvance(2);
20181
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$p, ctx.errorMessages.length > 0));
19880
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$n, ctx.errorMessages.length > 0));
20182
19881
  i0__namespace.ɵɵadvance(2);
20183
19882
  i0__namespace.ɵɵproperty("for", ctx.flagCommentsControlName);
20184
19883
  i0__namespace.ɵɵadvance(1);
@@ -20258,7 +19957,7 @@
20258
19957
  i0__namespace.ɵɵelementEnd();
20259
19958
  }
20260
19959
  }
20261
- var _c0$o = function (a0) { return { "form-group-error": a0 }; };
19960
+ var _c0$m = function (a0) { return { "form-group-error": a0 }; };
20262
19961
  var ManageCaseFlagsComponent = /** @class */ (function () {
20263
19962
  function ManageCaseFlagsComponent() {
20264
19963
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20418,7 +20117,7 @@
20418
20117
  if (rf & 2) {
20419
20118
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20420
20119
  i0__namespace.ɵɵadvance(1);
20421
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
20120
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$m, ctx.errorMessages.length > 0));
20422
20121
  i0__namespace.ɵɵadvance(4);
20423
20122
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
20424
20123
  i0__namespace.ɵɵadvance(1);
@@ -20488,8 +20187,8 @@
20488
20187
  i0__namespace.ɵɵelementEnd();
20489
20188
  }
20490
20189
  }
20491
- var _c0$n = function (a0) { return { "form-group-error": a0 }; };
20492
- var _c1$7 = function (a0) { return { "govuk-tag--grey": a0 }; };
20190
+ var _c0$l = function (a0) { return { "form-group-error": a0 }; };
20191
+ var _c1$6 = function (a0) { return { "govuk-tag--grey": a0 }; };
20493
20192
  var UpdateFlagComponent = /** @class */ (function () {
20494
20193
  function UpdateFlagComponent() {
20495
20194
  this.caseFlagStateEmitter = new i0.EventEmitter();
@@ -20610,7 +20309,7 @@
20610
20309
  if (rf & 2) {
20611
20310
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
20612
20311
  i0__namespace.ɵɵadvance(2);
20613
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$n, ctx.errorMessages.length > 0));
20312
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$l, ctx.errorMessages.length > 0));
20614
20313
  i0__namespace.ɵɵadvance(2);
20615
20314
  i0__namespace.ɵɵproperty("for", ctx.updateFlagControlName);
20616
20315
  i0__namespace.ɵɵadvance(1);
@@ -20626,7 +20325,7 @@
20626
20325
  i0__namespace.ɵɵadvance(3);
20627
20326
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
20628
20327
  i0__namespace.ɵɵadvance(6);
20629
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$7, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20328
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$6, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
20630
20329
  i0__namespace.ɵɵadvance(1);
20631
20330
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
20632
20331
  i0__namespace.ɵɵadvance(2);
@@ -20754,2309 +20453,6 @@
20754
20453
  }] });
20755
20454
  })();
20756
20455
 
20757
- exports.LinkedCasesPages = void 0;
20758
- (function (LinkedCasesPages) {
20759
- LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
20760
- LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
20761
- LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
20762
- LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
20763
- LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
20764
- })(exports.LinkedCasesPages || (exports.LinkedCasesPages = {}));
20765
- exports.LinkedCasesErrorMessages = void 0;
20766
- (function (LinkedCasesErrorMessages) {
20767
- LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
20768
- LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
20769
- LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
20770
- LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
20771
- LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
20772
- LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
20773
- LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
20774
- LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
20775
- LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
20776
- LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
20777
- LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
20778
- LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
20779
- })(exports.LinkedCasesErrorMessages || (exports.LinkedCasesErrorMessages = {}));
20780
- exports.LinkedCasesEventTriggers = void 0;
20781
- (function (LinkedCasesEventTriggers) {
20782
- LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
20783
- LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
20784
- })(exports.LinkedCasesEventTriggers || (exports.LinkedCasesEventTriggers = {}));
20785
- exports.Patterns = void 0;
20786
- (function (Patterns) {
20787
- Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
20788
- })(exports.Patterns || (exports.Patterns = {}));
20789
-
20790
- function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) {
20791
- if (rf & 1) {
20792
- i0__namespace.ɵɵelementStart(0, "p", 5);
20793
- i0__namespace.ɵɵelementStart(1, "span", 6);
20794
- i0__namespace.ɵɵtext(2, "Error:");
20795
- i0__namespace.ɵɵelementEnd();
20796
- i0__namespace.ɵɵtext(3);
20797
- i0__namespace.ɵɵelementEnd();
20798
- }
20799
- if (rf & 2) {
20800
- var ctx_r2 = i0__namespace.ɵɵnextContext(2);
20801
- i0__namespace.ɵɵadvance(3);
20802
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
20803
- }
20804
- }
20805
- function BeforeYouStartComponent_div_1_Template(rf, ctx) {
20806
- if (rf & 1) {
20807
- var _r4_1 = i0__namespace.ɵɵgetCurrentView();
20808
- i0__namespace.ɵɵelementStart(0, "div");
20809
- i0__namespace.ɵɵelementStart(1, "h1", 1);
20810
- i0__namespace.ɵɵtext(2, "There is a problem");
20811
- i0__namespace.ɵɵelementEnd();
20812
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
20813
- i0__namespace.ɵɵelementStart(4, "p", 3);
20814
- i0__namespace.ɵɵelementStart(5, "a", 4);
20815
- 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(); });
20816
- i0__namespace.ɵɵtext(6, "Go back to the Linked cases tab");
20817
- i0__namespace.ɵɵelementEnd();
20818
- i0__namespace.ɵɵelementEnd();
20819
- i0__namespace.ɵɵelementEnd();
20820
- }
20821
- if (rf & 2) {
20822
- var ctx_r0 = i0__namespace.ɵɵnextContext();
20823
- i0__namespace.ɵɵadvance(3);
20824
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
20825
- }
20826
- }
20827
- function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) {
20828
- if (rf & 1) {
20829
- i0__namespace.ɵɵelementStart(0, "div", 11);
20830
- i0__namespace.ɵɵelementStart(1, "p", 3);
20831
- i0__namespace.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
20832
- i0__namespace.ɵɵelementEnd();
20833
- i0__namespace.ɵɵelementStart(3, "p", 3);
20834
- i0__namespace.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
20835
- i0__namespace.ɵɵelementEnd();
20836
- i0__namespace.ɵɵelementEnd();
20837
- }
20838
- }
20839
- function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) {
20840
- if (rf & 1) {
20841
- i0__namespace.ɵɵelementStart(0, "div", 12);
20842
- i0__namespace.ɵɵelementStart(1, "p", 3);
20843
- i0__namespace.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
20844
- i0__namespace.ɵɵelementEnd();
20845
- i0__namespace.ɵɵelementEnd();
20846
- }
20847
- }
20848
- function BeforeYouStartComponent_div_2_Template(rf, ctx) {
20849
- if (rf & 1) {
20850
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
20851
- i0__namespace.ɵɵelementStart(0, "div");
20852
- i0__namespace.ɵɵelementStart(1, "h1", 1);
20853
- i0__namespace.ɵɵtext(2, "Before you start");
20854
- i0__namespace.ɵɵelementEnd();
20855
- i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
20856
- i0__namespace.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
20857
- i0__namespace.ɵɵelementStart(5, "div", 9);
20858
- i0__namespace.ɵɵelementStart(6, "button", 10);
20859
- 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(); });
20860
- i0__namespace.ɵɵtext(7, "Next");
20861
- i0__namespace.ɵɵelementEnd();
20862
- i0__namespace.ɵɵelementEnd();
20863
- i0__namespace.ɵɵelementEnd();
20864
- }
20865
- if (rf & 2) {
20866
- var ctx_r1 = i0__namespace.ɵɵnextContext();
20867
- i0__namespace.ɵɵadvance(3);
20868
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
20869
- i0__namespace.ɵɵadvance(1);
20870
- i0__namespace.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
20871
- }
20872
- }
20873
- var BeforeYouStartComponent = /** @class */ (function () {
20874
- function BeforeYouStartComponent(router, linkedCasesService) {
20875
- this.router = router;
20876
- this.linkedCasesService = linkedCasesService;
20877
- this.linkedCasesStateEmitter = new i0.EventEmitter();
20878
- this.isLinkCasesJourney = false;
20879
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
20880
- // re-initiate the state based on the casefield value
20881
- var linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(function (item) { return item; }).map(function (item) { return item.id; });
20882
- this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(function (item) { return linkedCaseRefereneIds.indexOf(item.caseReference) !== -1; });
20883
- this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
20884
- }
20885
- BeforeYouStartComponent.prototype.onNext = function () {
20886
- this.linkedCasesStateEmitter.emit({
20887
- currentLinkedCasesPage: exports.LinkedCasesPages.BEFORE_YOU_START,
20888
- errorMessages: this.errorMessages,
20889
- navigateToNextPage: true
20890
- });
20891
- };
20892
- BeforeYouStartComponent.prototype.onBack = function () {
20893
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
20894
- window.location.hash = 'Linked cases';
20895
- });
20896
- };
20897
- return BeforeYouStartComponent;
20898
- }());
20899
- BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
20900
- 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) {
20901
- if (rf & 1) {
20902
- i0__namespace.ɵɵelementStart(0, "div");
20903
- i0__namespace.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
20904
- i0__namespace.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
20905
- i0__namespace.ɵɵelementEnd();
20906
- }
20907
- if (rf & 2) {
20908
- i0__namespace.ɵɵadvance(1);
20909
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
20910
- i0__namespace.ɵɵadvance(1);
20911
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
20912
- }
20913
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
20914
- (function () {
20915
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BeforeYouStartComponent, [{
20916
- type: i0.Component,
20917
- args: [{
20918
- selector: 'ccd-linked-cases-before-you-start',
20919
- templateUrl: './before-you-start.component.html'
20920
- }]
20921
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
20922
- type: i0.Output
20923
- }] });
20924
- })();
20925
-
20926
- function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) {
20927
- if (rf & 1) {
20928
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
20929
- i0__namespace.ɵɵelementStart(0, "tr", 7);
20930
- i0__namespace.ɵɵelementStart(1, "td", 14);
20931
- i0__namespace.ɵɵtext(2);
20932
- i0__namespace.ɵɵelement(3, "br");
20933
- i0__namespace.ɵɵtext(4);
20934
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
20935
- i0__namespace.ɵɵelementEnd();
20936
- i0__namespace.ɵɵelementStart(6, "td", 14);
20937
- i0__namespace.ɵɵelementStart(7, "a", 15);
20938
- 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(); });
20939
- i0__namespace.ɵɵtext(8, "Change");
20940
- i0__namespace.ɵɵelementEnd();
20941
- i0__namespace.ɵɵelementEnd();
20942
- i0__namespace.ɵɵelementEnd();
20943
- }
20944
- if (rf & 2) {
20945
- var case_r6 = ctx.$implicit;
20946
- i0__namespace.ɵɵadvance(2);
20947
- i0__namespace.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
20948
- i0__namespace.ɵɵadvance(2);
20949
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
20950
- }
20951
- }
20952
- function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) {
20953
- if (rf & 1) {
20954
- i0__namespace.ɵɵelementStart(0, "tr", 7);
20955
- i0__namespace.ɵɵelementStart(1, "td", 16);
20956
- i0__namespace.ɵɵtext(2, " None ");
20957
- i0__namespace.ɵɵelementEnd();
20958
- i0__namespace.ɵɵelementEnd();
20959
- }
20960
- }
20961
- function CheckYourAnswersComponent_table_4_Template(rf, ctx) {
20962
- if (rf & 1) {
20963
- i0__namespace.ɵɵelementStart(0, "table", 13);
20964
- i0__namespace.ɵɵelementStart(1, "caption", 5);
20965
- i0__namespace.ɵɵtext(2, "Cases to unlink");
20966
- i0__namespace.ɵɵelementEnd();
20967
- i0__namespace.ɵɵelementStart(3, "thead", 6);
20968
- i0__namespace.ɵɵelementStart(4, "tr", 7);
20969
- i0__namespace.ɵɵelementStart(5, "th", 8);
20970
- i0__namespace.ɵɵtext(6, "Case name and number");
20971
- i0__namespace.ɵɵelementEnd();
20972
- i0__namespace.ɵɵelement(7, "th", 8);
20973
- i0__namespace.ɵɵelementEnd();
20974
- i0__namespace.ɵɵelementEnd();
20975
- i0__namespace.ɵɵelementStart(8, "tbody", 10);
20976
- i0__namespace.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
20977
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
20978
- i0__namespace.ɵɵelementEnd();
20979
- i0__namespace.ɵɵelementEnd();
20980
- }
20981
- if (rf & 2) {
20982
- var ctx_r0 = i0__namespace.ɵɵnextContext();
20983
- i0__namespace.ɵɵadvance(9);
20984
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
20985
- i0__namespace.ɵɵadvance(1);
20986
- i0__namespace.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
20987
- }
20988
- }
20989
- function CheckYourAnswersComponent_th_15_Template(rf, ctx) {
20990
- if (rf & 1) {
20991
- i0__namespace.ɵɵelement(0, "th", 8);
20992
- }
20993
- }
20994
- function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) {
20995
- if (rf & 1) {
20996
- i0__namespace.ɵɵelement(0, "br");
20997
- }
20998
- }
20999
- function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) {
21000
- if (rf & 1) {
21001
- i0__namespace.ɵɵelementStart(0, "span");
21002
- i0__namespace.ɵɵtext(1);
21003
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21004
- i0__namespace.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
21005
- i0__namespace.ɵɵelementEnd();
21006
- }
21007
- if (rf & 2) {
21008
- var reason_r12 = ctx.$implicit;
21009
- var isLast_r13 = ctx.last;
21010
- i0__namespace.ɵɵadvance(1);
21011
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
21012
- i0__namespace.ɵɵadvance(2);
21013
- i0__namespace.ɵɵproperty("ngIf", !isLast_r13);
21014
- }
21015
- }
21016
- function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) {
21017
- if (rf & 1) {
21018
- var _r16_1 = i0__namespace.ɵɵgetCurrentView();
21019
- i0__namespace.ɵɵelementStart(0, "td", 14);
21020
- i0__namespace.ɵɵelementStart(1, "a", 15);
21021
- 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(); });
21022
- i0__namespace.ɵɵtext(2, "Change");
21023
- i0__namespace.ɵɵelementEnd();
21024
- i0__namespace.ɵɵelementEnd();
21025
- }
21026
- }
21027
- function CheckYourAnswersComponent_tr_17_Template(rf, ctx) {
21028
- if (rf & 1) {
21029
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21030
- i0__namespace.ɵɵelementStart(1, "td", 14);
21031
- i0__namespace.ɵɵelementStart(2, "span");
21032
- i0__namespace.ɵɵtext(3);
21033
- i0__namespace.ɵɵelement(4, "br");
21034
- i0__namespace.ɵɵtext(5);
21035
- i0__namespace.ɵɵpipe(6, "ccdCaseReference");
21036
- i0__namespace.ɵɵelementEnd();
21037
- i0__namespace.ɵɵelementEnd();
21038
- i0__namespace.ɵɵelementStart(7, "td", 14);
21039
- i0__namespace.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
21040
- i0__namespace.ɵɵelementEnd();
21041
- i0__namespace.ɵɵelement(9, "td", 14);
21042
- i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
21043
- i0__namespace.ɵɵelementEnd();
21044
- }
21045
- if (rf & 2) {
21046
- var case_r9 = ctx.$implicit;
21047
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21048
- i0__namespace.ɵɵadvance(3);
21049
- i0__namespace.ɵɵtextInterpolate1("", case_r9.caseName, " ");
21050
- i0__namespace.ɵɵadvance(2);
21051
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
21052
- i0__namespace.ɵɵadvance(3);
21053
- i0__namespace.ɵɵproperty("ngForOf", case_r9.reasons);
21054
- i0__namespace.ɵɵadvance(2);
21055
- i0__namespace.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
21056
- }
21057
- }
21058
- function CheckYourAnswersComponent_tr_18_Template(rf, ctx) {
21059
- if (rf & 1) {
21060
- i0__namespace.ɵɵelementStart(0, "tr", 7);
21061
- i0__namespace.ɵɵelementStart(1, "td", 20);
21062
- i0__namespace.ɵɵtext(2, " None ");
21063
- i0__namespace.ɵɵelementEnd();
21064
- i0__namespace.ɵɵelementEnd();
21065
- }
21066
- }
21067
- var CheckYourAnswersComponent = /** @class */ (function () {
21068
- function CheckYourAnswersComponent(linkedCasesService) {
21069
- this.linkedCasesService = linkedCasesService;
21070
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21071
- }
21072
- CheckYourAnswersComponent.prototype.ngOnInit = function () {
21073
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
21074
- this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
21075
- this.linkedCases = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return !linkedCase.unlink; });
21076
- this.casesToUnlink = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
21077
- };
21078
- CheckYourAnswersComponent.prototype.onChange = function () {
21079
- this.linkedCasesService.editMode = true;
21080
- this.linkedCasesStateEmitter.emit({
21081
- currentLinkedCasesPage: exports.LinkedCasesPages.CHECK_YOUR_ANSWERS,
21082
- navigateToPreviousPage: true,
21083
- navigateToNextPage: true
21084
- });
21085
- };
21086
- return CheckYourAnswersComponent;
21087
- }());
21088
- CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
21089
- 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) {
21090
- if (rf & 1) {
21091
- i0__namespace.ɵɵelementStart(0, "div", 0);
21092
- i0__namespace.ɵɵelementStart(1, "div", 1);
21093
- i0__namespace.ɵɵelementStart(2, "h1", 2);
21094
- i0__namespace.ɵɵtext(3, "Check your answers");
21095
- i0__namespace.ɵɵelementEnd();
21096
- i0__namespace.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
21097
- i0__namespace.ɵɵelementStart(5, "table", 4);
21098
- i0__namespace.ɵɵelementStart(6, "caption", 5);
21099
- i0__namespace.ɵɵtext(7);
21100
- i0__namespace.ɵɵelementEnd();
21101
- i0__namespace.ɵɵelementStart(8, "thead", 6);
21102
- i0__namespace.ɵɵelementStart(9, "tr", 7);
21103
- i0__namespace.ɵɵelementStart(10, "th", 8);
21104
- i0__namespace.ɵɵtext(11, "Case name and number");
21105
- i0__namespace.ɵɵelementEnd();
21106
- i0__namespace.ɵɵelementStart(12, "th", 8);
21107
- i0__namespace.ɵɵtext(13, "Reasons for case link");
21108
- i0__namespace.ɵɵelementEnd();
21109
- i0__namespace.ɵɵelement(14, "th", 8);
21110
- i0__namespace.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
21111
- i0__namespace.ɵɵelementEnd();
21112
- i0__namespace.ɵɵelementEnd();
21113
- i0__namespace.ɵɵelementStart(16, "tbody", 10);
21114
- i0__namespace.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
21115
- i0__namespace.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
21116
- i0__namespace.ɵɵelementEnd();
21117
- i0__namespace.ɵɵelementEnd();
21118
- i0__namespace.ɵɵelementEnd();
21119
- i0__namespace.ɵɵelementEnd();
21120
- }
21121
- if (rf & 2) {
21122
- i0__namespace.ɵɵadvance(4);
21123
- i0__namespace.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
21124
- i0__namespace.ɵɵadvance(3);
21125
- i0__namespace.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
21126
- i0__namespace.ɵɵadvance(8);
21127
- i0__namespace.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
21128
- i0__namespace.ɵɵadvance(2);
21129
- i0__namespace.ɵɵproperty("ngForOf", ctx.linkedCases);
21130
- i0__namespace.ɵɵadvance(1);
21131
- i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCases.length);
21132
- }
21133
- }, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
21134
- (function () {
21135
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CheckYourAnswersComponent, [{
21136
- type: i0.Component,
21137
- args: [{
21138
- selector: 'ccd-linked-cases-check-your-answers',
21139
- templateUrl: './check-your-answers.component.html',
21140
- styleUrls: ['./check-your-answers.component.scss']
21141
- }]
21142
- }], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21143
- type: i0.Output
21144
- }] });
21145
- })();
21146
-
21147
- var ValidatorsUtils = /** @class */ (function () {
21148
- function ValidatorsUtils() {
21149
- }
21150
- ValidatorsUtils.prototype.numberLengthValidator = function (inputLength) {
21151
- return function (control) {
21152
- return control.value.length !== inputLength ? { isValid: false } : null;
21153
- };
21154
- };
21155
- ValidatorsUtils.prototype.formArraySelectedValidator = function () {
21156
- return function (control) {
21157
- return control.value.every(function (option) { return !option.selected; }) ? { isValid: false } : null;
21158
- };
21159
- };
21160
- ValidatorsUtils.prototype.regexPattern = function (regexPattern) {
21161
- return function (control) {
21162
- var regex = new RegExp(regexPattern);
21163
- return regex.test(control.value) ? null : { isValid: false };
21164
- };
21165
- };
21166
- return ValidatorsUtils;
21167
- }());
21168
- ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
21169
- ValidatorsUtils.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
21170
- (function () {
21171
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ValidatorsUtils, [{
21172
- type: i0.Injectable,
21173
- args: [{ providedIn: 'root' }]
21174
- }], null, null);
21175
- })();
21176
-
21177
- function LinkCasesComponent_div_8_span_4_Template(rf, ctx) {
21178
- if (rf & 1) {
21179
- i0__namespace.ɵɵelementStart(0, "span", 28);
21180
- i0__namespace.ɵɵelementStart(1, "span", 29);
21181
- i0__namespace.ɵɵtext(2, "Error:");
21182
- i0__namespace.ɵɵelementEnd();
21183
- i0__namespace.ɵɵtext(3);
21184
- i0__namespace.ɵɵelementEnd();
21185
- }
21186
- if (rf & 2) {
21187
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
21188
- i0__namespace.ɵɵadvance(3);
21189
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
21190
- }
21191
- }
21192
- function LinkCasesComponent_div_8_span_10_Template(rf, ctx) {
21193
- if (rf & 1) {
21194
- i0__namespace.ɵɵelementStart(0, "span", 28);
21195
- i0__namespace.ɵɵelementStart(1, "span", 29);
21196
- i0__namespace.ɵɵtext(2, "Error:");
21197
- i0__namespace.ɵɵelementEnd();
21198
- i0__namespace.ɵɵtext(3);
21199
- i0__namespace.ɵɵelementEnd();
21200
- }
21201
- if (rf & 2) {
21202
- var ctx_r5 = i0__namespace.ɵɵnextContext(2);
21203
- i0__namespace.ɵɵadvance(3);
21204
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
21205
- }
21206
- }
21207
- function LinkCasesComponent_div_8_div_12_Template(rf, ctx) {
21208
- if (rf & 1) {
21209
- i0__namespace.ɵɵelementStart(0, "div", 30);
21210
- i0__namespace.ɵɵelement(1, "input", 31);
21211
- i0__namespace.ɵɵelementStart(2, "label", 32);
21212
- i0__namespace.ɵɵtext(3);
21213
- i0__namespace.ɵɵelementEnd();
21214
- i0__namespace.ɵɵelementEnd();
21215
- }
21216
- if (rf & 2) {
21217
- var reason_r8 = ctx.$implicit;
21218
- var pos_r9 = ctx.index;
21219
- i0__namespace.ɵɵproperty("formGroupName", pos_r9);
21220
- i0__namespace.ɵɵadvance(1);
21221
- i0__namespace.ɵɵpropertyInterpolate("id", reason_r8.key);
21222
- i0__namespace.ɵɵproperty("value", reason_r8.value_en);
21223
- i0__namespace.ɵɵadvance(1);
21224
- i0__namespace.ɵɵpropertyInterpolate("for", reason_r8.key);
21225
- i0__namespace.ɵɵadvance(1);
21226
- i0__namespace.ɵɵtextInterpolate(reason_r8.value_en);
21227
- }
21228
- }
21229
- function LinkCasesComponent_div_8_span_15_Template(rf, ctx) {
21230
- if (rf & 1) {
21231
- i0__namespace.ɵɵelementStart(0, "span", 28);
21232
- i0__namespace.ɵɵelementStart(1, "span", 29);
21233
- i0__namespace.ɵɵtext(2, "Error:");
21234
- i0__namespace.ɵɵelementEnd();
21235
- i0__namespace.ɵɵtext(3);
21236
- i0__namespace.ɵɵelementEnd();
21237
- }
21238
- if (rf & 2) {
21239
- var ctx_r7 = i0__namespace.ɵɵnextContext(2);
21240
- i0__namespace.ɵɵadvance(3);
21241
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
21242
- }
21243
- }
21244
- var _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
21245
- function LinkCasesComponent_div_8_Template(rf, ctx) {
21246
- if (rf & 1) {
21247
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
21248
- i0__namespace.ɵɵelementStart(0, "div", 21);
21249
- i0__namespace.ɵɵelementStart(1, "h3", 22);
21250
- i0__namespace.ɵɵtext(2, "Enter case reference");
21251
- i0__namespace.ɵɵelementEnd();
21252
- i0__namespace.ɵɵelementStart(3, "div", 5);
21253
- i0__namespace.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
21254
- i0__namespace.ɵɵelement(5, "input", 23);
21255
- i0__namespace.ɵɵelementEnd();
21256
- i0__namespace.ɵɵelementStart(6, "h3", 22);
21257
- i0__namespace.ɵɵtext(7, "Why should these cases be linked?");
21258
- i0__namespace.ɵɵelementEnd();
21259
- i0__namespace.ɵɵelementStart(8, "div", 24);
21260
- i0__namespace.ɵɵtext(9, " Select all that apply. ");
21261
- i0__namespace.ɵɵelementEnd();
21262
- i0__namespace.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
21263
- i0__namespace.ɵɵelementStart(11, "div", 25);
21264
- i0__namespace.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
21265
- i0__namespace.ɵɵelementEnd();
21266
- i0__namespace.ɵɵelement(13, "br");
21267
- i0__namespace.ɵɵelement(14, "br");
21268
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
21269
- i0__namespace.ɵɵelementStart(16, "button", 27);
21270
- 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(); });
21271
- i0__namespace.ɵɵtext(17, "Propose case link");
21272
- i0__namespace.ɵɵelementEnd();
21273
- i0__namespace.ɵɵelementEnd();
21274
- }
21275
- if (rf & 2) {
21276
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21277
- i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
21278
- i0__namespace.ɵɵadvance(3);
21279
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
21280
- i0__namespace.ɵɵadvance(1);
21281
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
21282
- i0__namespace.ɵɵadvance(6);
21283
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
21284
- i0__namespace.ɵɵadvance(1);
21285
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
21286
- i0__namespace.ɵɵadvance(1);
21287
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
21288
- i0__namespace.ɵɵadvance(3);
21289
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
21290
- }
21291
- }
21292
- function LinkCasesComponent_span_13_Template(rf, ctx) {
21293
- if (rf & 1) {
21294
- i0__namespace.ɵɵelementStart(0, "span", 28);
21295
- i0__namespace.ɵɵelementStart(1, "span", 29);
21296
- i0__namespace.ɵɵtext(2, "Error:");
21297
- i0__namespace.ɵɵelementEnd();
21298
- i0__namespace.ɵɵtext(3);
21299
- i0__namespace.ɵɵelementEnd();
21300
- }
21301
- if (rf & 2) {
21302
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21303
- i0__namespace.ɵɵadvance(3);
21304
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
21305
- }
21306
- }
21307
- function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
21308
- if (rf & 1) {
21309
- i0__namespace.ɵɵelementStart(0, "span");
21310
- i0__namespace.ɵɵtext(1);
21311
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21312
- i0__namespace.ɵɵelement(3, "br");
21313
- i0__namespace.ɵɵelementEnd();
21314
- }
21315
- if (rf & 2) {
21316
- var reason_r15 = ctx.$implicit;
21317
- i0__namespace.ɵɵadvance(1);
21318
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
21319
- }
21320
- }
21321
- var _c1$6 = function (a0) { return { "table-group-error": a0 }; };
21322
- function LinkCasesComponent_tr_31_Template(rf, ctx) {
21323
- if (rf & 1) {
21324
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
21325
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21326
- i0__namespace.ɵɵelementStart(1, "td", 33);
21327
- i0__namespace.ɵɵelement(2, "div", 34);
21328
- i0__namespace.ɵɵelementStart(3, "span");
21329
- i0__namespace.ɵɵtext(4);
21330
- i0__namespace.ɵɵelement(5, "br");
21331
- i0__namespace.ɵɵtext(6);
21332
- i0__namespace.ɵɵpipe(7, "ccdCaseReference");
21333
- i0__namespace.ɵɵelementEnd();
21334
- i0__namespace.ɵɵelementEnd();
21335
- i0__namespace.ɵɵelementStart(8, "td", 35);
21336
- i0__namespace.ɵɵtext(9);
21337
- i0__namespace.ɵɵelementEnd();
21338
- i0__namespace.ɵɵelementStart(10, "td", 33);
21339
- i0__namespace.ɵɵtext(11);
21340
- i0__namespace.ɵɵelementEnd();
21341
- i0__namespace.ɵɵelementStart(12, "td", 35);
21342
- i0__namespace.ɵɵtext(13);
21343
- i0__namespace.ɵɵelementEnd();
21344
- i0__namespace.ɵɵelementStart(14, "td", 33);
21345
- i0__namespace.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
21346
- i0__namespace.ɵɵelementEnd();
21347
- i0__namespace.ɵɵelementStart(16, "td", 33);
21348
- i0__namespace.ɵɵelementStart(17, "a", 37);
21349
- 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); });
21350
- i0__namespace.ɵɵtext(18, "Remove");
21351
- i0__namespace.ɵɵelementEnd();
21352
- i0__namespace.ɵɵelementEnd();
21353
- i0__namespace.ɵɵelementEnd();
21354
- }
21355
- if (rf & 2) {
21356
- var case_r12 = ctx.$implicit;
21357
- var ctx_r2 = i0__namespace.ɵɵnextContext();
21358
- i0__namespace.ɵɵadvance(2);
21359
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
21360
- i0__namespace.ɵɵadvance(2);
21361
- i0__namespace.ɵɵtextInterpolate1("", case_r12.caseName, " ");
21362
- i0__namespace.ɵɵadvance(2);
21363
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
21364
- i0__namespace.ɵɵadvance(2);
21365
- i0__namespace.ɵɵproperty("title", case_r12.caseTypeDescription);
21366
- i0__namespace.ɵɵadvance(1);
21367
- i0__namespace.ɵɵtextInterpolate(case_r12.caseType);
21368
- i0__namespace.ɵɵadvance(2);
21369
- i0__namespace.ɵɵtextInterpolate(case_r12.caseService);
21370
- i0__namespace.ɵɵadvance(1);
21371
- i0__namespace.ɵɵproperty("title", case_r12.caseStateDescription);
21372
- i0__namespace.ɵɵadvance(1);
21373
- i0__namespace.ɵɵtextInterpolate(case_r12.caseState);
21374
- i0__namespace.ɵɵadvance(2);
21375
- i0__namespace.ɵɵproperty("ngForOf", case_r12.reasons);
21376
- i0__namespace.ɵɵadvance(2);
21377
- i0__namespace.ɵɵattribute("id", case_r12.caseReference);
21378
- }
21379
- }
21380
- function LinkCasesComponent_tr_32_Template(rf, ctx) {
21381
- if (rf & 1) {
21382
- i0__namespace.ɵɵelementStart(0, "tr", 10);
21383
- i0__namespace.ɵɵelementStart(1, "td", 38);
21384
- i0__namespace.ɵɵtext(2, " None ");
21385
- i0__namespace.ɵɵelementEnd();
21386
- i0__namespace.ɵɵelementEnd();
21387
- }
21388
- }
21389
- var LinkCasesComponent = /** @class */ (function () {
21390
- function LinkCasesComponent(casesService, fb, validatorsUtils, linkedCasesService) {
21391
- this.casesService = casesService;
21392
- this.fb = fb;
21393
- this.validatorsUtils = validatorsUtils;
21394
- this.linkedCasesService = linkedCasesService;
21395
- this.linkedCasesStateEmitter = new i0.EventEmitter();
21396
- this.errorMessages = [];
21397
- this.selectedCases = [];
21398
- this.linkCaseReasons = [];
21399
- this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
21400
- }
21401
- LinkCasesComponent.prototype.ngOnInit = function () {
21402
- this.caseId = this.linkedCasesService.caseId;
21403
- this.caseName = this.linkedCasesService.caseName;
21404
- this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
21405
- this.initForm();
21406
- if (this.linkedCasesService.editMode) {
21407
- // this may have includes the currently added one but yet to be submitted.
21408
- this.selectedCases = this.linkedCasesService.linkedCases;
21409
- }
21410
- else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
21411
- this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
21412
- }
21413
- };
21414
- LinkCasesComponent.prototype.initForm = function () {
21415
- this.linkCaseForm = this.fb.group({
21416
- caseNumber: ['', [i2.Validators.minLength(16), this.validatorsUtils.regexPattern(exports.Patterns.CASE_REF)]],
21417
- reasonType: this.getReasonTypeFormArray,
21418
- });
21419
- };
21420
- Object.defineProperty(LinkCasesComponent.prototype, "getReasonTypeFormArray", {
21421
- get: function () {
21422
- var _this = this;
21423
- return this.fb.array(this.linkCaseReasons.map(function (val) { return _this.fb.group({
21424
- key: [val.key],
21425
- value_en: [val.value_en],
21426
- value_cy: [val.value_cy],
21427
- hint_text_en: [val.hint_text_en],
21428
- hint_text_cy: [val.hint_text_cy],
21429
- lov_order: [val.lov_order],
21430
- parent_key: [val.parent_key],
21431
- selected: [!!val.selected],
21432
- }); }), this.validatorsUtils.formArraySelectedValidator());
21433
- },
21434
- enumerable: false,
21435
- configurable: true
21436
- });
21437
- LinkCasesComponent.prototype.submitCaseInfo = function () {
21438
- this.errorMessages = [];
21439
- this.caseReasonError = null;
21440
- this.caseNumberError = null;
21441
- this.caseSelectionError = null;
21442
- this.noSelectedCaseError = null;
21443
- if (this.linkCaseForm.valid &&
21444
- !this.isCaseSelected(this.selectedCases) &&
21445
- !this.isCaseSelected(this.linkedCasesService.linkedCases) &&
21446
- !this.isCaseSelectedSameAsCurrentCase()) {
21447
- this.getCaseInfo();
21448
- }
21449
- else {
21450
- this.showErrorInfo();
21451
- }
21452
- };
21453
- LinkCasesComponent.prototype.isCaseSelected = function (linkedCases) {
21454
- if (linkedCases.length === 0) {
21455
- return false;
21456
- }
21457
- var caseNumber = this.linkCaseForm.value.caseNumber;
21458
- return !!linkedCases.find(function (caseLink) { return caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''); });
21459
- };
21460
- LinkCasesComponent.prototype.isCaseSelectedSameAsCurrentCase = function () {
21461
- return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
21462
- };
21463
- LinkCasesComponent.prototype.showErrorInfo = function () {
21464
- if (this.linkCaseForm.controls.caseNumber.invalid) {
21465
- this.caseNumberError = exports.LinkedCasesErrorMessages.CaseNumberError;
21466
- this.errorMessages.push({
21467
- title: 'dummy-case-number',
21468
- description: exports.LinkedCasesErrorMessages.CaseNumberError,
21469
- fieldId: 'caseNumber',
21470
- });
21471
- }
21472
- if (this.linkCaseForm.controls.reasonType.invalid) {
21473
- this.caseReasonError = exports.LinkedCasesErrorMessages.ReasonSelectionError;
21474
- this.errorMessages.push({
21475
- title: 'dummy-case-reason',
21476
- description: exports.LinkedCasesErrorMessages.ReasonSelectionError,
21477
- fieldId: 'caseReason',
21478
- });
21479
- }
21480
- if (this.isCaseSelected(this.selectedCases)) {
21481
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CaseProposedError;
21482
- this.errorMessages.push({
21483
- title: 'dummy-case-number',
21484
- description: exports.LinkedCasesErrorMessages.CaseProposedError,
21485
- fieldId: 'caseNumber',
21486
- });
21487
- }
21488
- if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
21489
- this.caseSelectionError = exports.LinkedCasesErrorMessages.CasesLinkedError;
21490
- this.errorMessages.push({
21491
- title: 'dummy-case-number',
21492
- description: exports.LinkedCasesErrorMessages.CasesLinkedError,
21493
- fieldId: 'caseNumber',
21494
- });
21495
- }
21496
- if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
21497
- this.errorMessages.push({
21498
- title: 'dummy-case-number',
21499
- description: exports.LinkedCasesErrorMessages.ProposedCaseWithIn,
21500
- fieldId: 'caseNumber',
21501
- });
21502
- }
21503
- window.scrollTo(0, 0);
21504
- this.emitLinkedCasesState(false);
21505
- };
21506
- LinkCasesComponent.prototype.getCaseInfo = function () {
21507
- var _this = this;
21508
- var caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
21509
- this.casesService
21510
- .getCaseViewV2(caseNumberData)
21511
- .subscribe(function (caseView) {
21512
- _this.linkedCasesService.caseDetails = caseView;
21513
- var caseLink = {
21514
- caseReference: caseView.case_id,
21515
- reasons: _this.getSelectedCaseReasons(),
21516
- createdDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21517
- caseType: caseView.case_type.name || '',
21518
- caseTypeDescription: caseView.case_type.description || '',
21519
- caseState: caseView.state.name || '',
21520
- caseStateDescription: caseView.state.description || '',
21521
- caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
21522
- caseName: _this.linkedCasesService.getCaseName(caseView),
21523
- };
21524
- var ccdApiCaseLinkData = {
21525
- CaseReference: caseView.case_id,
21526
- CaseType: caseView.case_type.id,
21527
- CreatedDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
21528
- ReasonForLink: _this.getSelectedCCDTypeCaseReason()
21529
- };
21530
- if (!_this.linkedCasesService.caseFieldValue) {
21531
- _this.linkedCasesService.caseFieldValue = [];
21532
- }
21533
- _this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
21534
- _this.selectedCases.push(caseLink);
21535
- _this.initForm();
21536
- _this.emitLinkedCasesState(false);
21537
- }, function (error) {
21538
- _this.caseNumberError = exports.LinkedCasesErrorMessages.CaseCheckAgainError;
21539
- _this.errorMessages.push({
21540
- title: 'dummy-case-number',
21541
- description: exports.LinkedCasesErrorMessages.CaseCheckAgainError,
21542
- fieldId: 'caseNumber',
21543
- });
21544
- _this.emitLinkedCasesState(false);
21545
- window.scrollTo(0, 0);
21546
- return rxjs.throwError(error);
21547
- });
21548
- };
21549
- // Return linked cases state and error messages to the parent
21550
- LinkCasesComponent.prototype.emitLinkedCasesState = function (isNavigateToNextPage) {
21551
- this.linkedCasesStateEmitter.emit({
21552
- currentLinkedCasesPage: exports.LinkedCasesPages.LINK_CASE,
21553
- errorMessages: this.errorMessages,
21554
- navigateToNextPage: isNavigateToNextPage,
21555
- });
21556
- };
21557
- LinkCasesComponent.prototype.getSelectedCaseReasons = function () {
21558
- var selectedReasons = [];
21559
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21560
- if (selectedReason.selected) {
21561
- selectedReasons.push({
21562
- reasonCode: selectedReason.key
21563
- });
21564
- }
21565
- });
21566
- return selectedReasons;
21567
- };
21568
- LinkCasesComponent.prototype.getSelectedCCDTypeCaseReason = function () {
21569
- var selectedReasons = [];
21570
- this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
21571
- if (selectedReason.selected) {
21572
- selectedReasons.push({
21573
- value: {
21574
- Reason: selectedReason.key,
21575
- }
21576
- });
21577
- }
21578
- });
21579
- return selectedReasons;
21580
- };
21581
- LinkCasesComponent.prototype.onSelectedLinkedCaseRemove = function (pos, selectedCaseReference) {
21582
- var caseFieldValue = this.linkedCasesService.caseFieldValue || [];
21583
- var updatedItems = caseFieldValue.filter(function (item) { return item.value && item.value.CaseReference !== selectedCaseReference; });
21584
- if (updatedItems) {
21585
- this.linkedCasesService.caseFieldValue = updatedItems;
21586
- }
21587
- this.selectedCases.splice(pos, 1);
21588
- };
21589
- LinkCasesComponent.prototype.onNext = function () {
21590
- this.errorMessages = [];
21591
- this.caseReasonError = null;
21592
- this.caseNumberError = null;
21593
- this.caseSelectionError = null;
21594
- this.noSelectedCaseError = null;
21595
- var navigateToNextPage = true;
21596
- if (this.selectedCases.length) {
21597
- this.linkedCasesService.linkedCases = this.selectedCases;
21598
- }
21599
- else {
21600
- this.noSelectedCaseError = exports.LinkedCasesErrorMessages.CaseSelectionError;
21601
- this.errorMessages.push({
21602
- title: 'dummy-case-selection',
21603
- description: exports.LinkedCasesErrorMessages.CaseSelectionError,
21604
- fieldId: 'caseReason',
21605
- });
21606
- navigateToNextPage = false;
21607
- }
21608
- this.emitLinkedCasesState(navigateToNextPage);
21609
- };
21610
- return LinkCasesComponent;
21611
- }());
21612
- 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)); };
21613
- 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) {
21614
- if (rf & 1) {
21615
- i0__namespace.ɵɵelementStart(0, "div", 0);
21616
- i0__namespace.ɵɵelementStart(1, "div", 1);
21617
- i0__namespace.ɵɵelementStart(2, "div");
21618
- i0__namespace.ɵɵelementStart(3, "span", 2);
21619
- i0__namespace.ɵɵtext(4);
21620
- i0__namespace.ɵɵpipe(5, "ccdCaseReference");
21621
- i0__namespace.ɵɵelementEnd();
21622
- i0__namespace.ɵɵelementStart(6, "h1", 3);
21623
- i0__namespace.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
21624
- i0__namespace.ɵɵelementEnd();
21625
- i0__namespace.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
21626
- i0__namespace.ɵɵelement(9, "hr");
21627
- i0__namespace.ɵɵelement(10, "br");
21628
- i0__namespace.ɵɵelement(11, "br");
21629
- i0__namespace.ɵɵelementStart(12, "div", 5);
21630
- i0__namespace.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
21631
- i0__namespace.ɵɵelementStart(14, "table", 7);
21632
- i0__namespace.ɵɵelementStart(15, "caption", 8);
21633
- i0__namespace.ɵɵtext(16, "Proposed case links ");
21634
- i0__namespace.ɵɵelementEnd();
21635
- i0__namespace.ɵɵelementStart(17, "thead", 9);
21636
- i0__namespace.ɵɵelementStart(18, "tr", 10);
21637
- i0__namespace.ɵɵelementStart(19, "th", 11);
21638
- i0__namespace.ɵɵtext(20, "Case name and number");
21639
- i0__namespace.ɵɵelementEnd();
21640
- i0__namespace.ɵɵelementStart(21, "th", 12);
21641
- i0__namespace.ɵɵtext(22, "Case type ");
21642
- i0__namespace.ɵɵelementEnd();
21643
- i0__namespace.ɵɵelementStart(23, "th", 13);
21644
- i0__namespace.ɵɵtext(24, "Service");
21645
- i0__namespace.ɵɵelementEnd();
21646
- i0__namespace.ɵɵelementStart(25, "th", 13);
21647
- i0__namespace.ɵɵtext(26, "State");
21648
- i0__namespace.ɵɵelementEnd();
21649
- i0__namespace.ɵɵelementStart(27, "th", 14);
21650
- i0__namespace.ɵɵtext(28, "Reasons for case link");
21651
- i0__namespace.ɵɵelementEnd();
21652
- i0__namespace.ɵɵelement(29, "th", 15);
21653
- i0__namespace.ɵɵelementEnd();
21654
- i0__namespace.ɵɵelementEnd();
21655
- i0__namespace.ɵɵelementStart(30, "tbody", 16);
21656
- i0__namespace.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
21657
- i0__namespace.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
21658
- i0__namespace.ɵɵelementEnd();
21659
- i0__namespace.ɵɵelementEnd();
21660
- i0__namespace.ɵɵelementEnd();
21661
- i0__namespace.ɵɵelementStart(33, "div", 19);
21662
- i0__namespace.ɵɵelementStart(34, "button", 20);
21663
- i0__namespace.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
21664
- i0__namespace.ɵɵtext(35, "Next");
21665
- i0__namespace.ɵɵelementEnd();
21666
- i0__namespace.ɵɵelementEnd();
21667
- i0__namespace.ɵɵelementEnd();
21668
- i0__namespace.ɵɵelementEnd();
21669
- i0__namespace.ɵɵelementEnd();
21670
- }
21671
- if (rf & 2) {
21672
- i0__namespace.ɵɵadvance(4);
21673
- i0__namespace.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0__namespace.ɵɵpipeBind1(5, 7, ctx.caseId), "");
21674
- i0__namespace.ɵɵadvance(4);
21675
- i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
21676
- i0__namespace.ɵɵadvance(4);
21677
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
21678
- i0__namespace.ɵɵadvance(1);
21679
- i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
21680
- i0__namespace.ɵɵadvance(18);
21681
- i0__namespace.ɵɵproperty("ngForOf", ctx.selectedCases);
21682
- i0__namespace.ɵɵadvance(1);
21683
- i0__namespace.ɵɵproperty("ngIf", !ctx.selectedCases.length);
21684
- }
21685
- }, 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}"] });
21686
- (function () {
21687
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesComponent, [{
21688
- type: i0.Component,
21689
- args: [{
21690
- selector: 'ccd-link-cases',
21691
- styleUrls: ['./link-cases.component.scss'],
21692
- templateUrl: './link-cases.component.html',
21693
- }]
21694
- }], function () { return [{ type: CasesService }, { type: i2__namespace.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
21695
- type: i0.Output
21696
- }] });
21697
- })();
21698
-
21699
- function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) {
21700
- if (rf & 1) {
21701
- var _r3_1 = i0__namespace.ɵɵgetCurrentView();
21702
- i0__namespace.ɵɵelementStart(0, "a", 2);
21703
- 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(); });
21704
- i0__namespace.ɵɵtext(1);
21705
- i0__namespace.ɵɵelementEnd();
21706
- }
21707
- if (rf & 2) {
21708
- var ctx_r0 = i0__namespace.ɵɵnextContext();
21709
- i0__namespace.ɵɵadvance(1);
21710
- i0__namespace.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
21711
- }
21712
- }
21713
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) {
21714
- if (rf & 1) {
21715
- i0__namespace.ɵɵelementStart(0, "span");
21716
- i0__namespace.ɵɵtext(1);
21717
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21718
- i0__namespace.ɵɵelement(3, "br");
21719
- i0__namespace.ɵɵelementEnd();
21720
- }
21721
- if (rf & 2) {
21722
- var reason_r11 = ctx.$implicit;
21723
- i0__namespace.ɵɵadvance(1);
21724
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
21725
- }
21726
- }
21727
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) {
21728
- if (rf & 1) {
21729
- i0__namespace.ɵɵelementStart(0, "td", 14);
21730
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
21731
- i0__namespace.ɵɵelementEnd();
21732
- }
21733
- if (rf & 2) {
21734
- var details_r9 = ctx.$implicit;
21735
- i0__namespace.ɵɵadvance(1);
21736
- i0__namespace.ɵɵproperty("ngForOf", details_r9.reasons);
21737
- }
21738
- }
21739
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) {
21740
- if (rf & 1) {
21741
- i0__namespace.ɵɵelementStart(0, "tr", 5);
21742
- i0__namespace.ɵɵelementStart(1, "td", 11);
21743
- i0__namespace.ɵɵelementStart(2, "p", 12);
21744
- i0__namespace.ɵɵelementStart(3, "a", 13);
21745
- i0__namespace.ɵɵelementStart(4, "span");
21746
- i0__namespace.ɵɵtext(5);
21747
- i0__namespace.ɵɵelement(6, "br");
21748
- i0__namespace.ɵɵtext(7);
21749
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
21750
- i0__namespace.ɵɵelementEnd();
21751
- i0__namespace.ɵɵelementEnd();
21752
- i0__namespace.ɵɵelementEnd();
21753
- i0__namespace.ɵɵelementEnd();
21754
- i0__namespace.ɵɵelementStart(9, "td", 14);
21755
- i0__namespace.ɵɵelementStart(10, "span", 15);
21756
- i0__namespace.ɵɵtext(11);
21757
- i0__namespace.ɵɵelementEnd();
21758
- i0__namespace.ɵɵelementEnd();
21759
- i0__namespace.ɵɵelementStart(12, "td", 14);
21760
- i0__namespace.ɵɵelementStart(13, "span");
21761
- i0__namespace.ɵɵtext(14);
21762
- i0__namespace.ɵɵelementEnd();
21763
- i0__namespace.ɵɵelementEnd();
21764
- i0__namespace.ɵɵelementStart(15, "td", 14);
21765
- i0__namespace.ɵɵelementStart(16, "span", 15);
21766
- i0__namespace.ɵɵtext(17);
21767
- i0__namespace.ɵɵelementEnd();
21768
- i0__namespace.ɵɵelementEnd();
21769
- i0__namespace.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
21770
- i0__namespace.ɵɵelementEnd();
21771
- }
21772
- if (rf & 2) {
21773
- var case_r7 = ctx.$implicit;
21774
- i0__namespace.ɵɵadvance(3);
21775
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
21776
- i0__namespace.ɵɵadvance(2);
21777
- i0__namespace.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
21778
- i0__namespace.ɵɵadvance(2);
21779
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
21780
- i0__namespace.ɵɵadvance(3);
21781
- i0__namespace.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
21782
- i0__namespace.ɵɵadvance(1);
21783
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdCaseType);
21784
- i0__namespace.ɵɵadvance(3);
21785
- i0__namespace.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
21786
- i0__namespace.ɵɵadvance(2);
21787
- i0__namespace.ɵɵproperty("title", case_r7.stateDescription);
21788
- i0__namespace.ɵɵadvance(1);
21789
- i0__namespace.ɵɵtextInterpolate(case_r7.state);
21790
- i0__namespace.ɵɵadvance(1);
21791
- i0__namespace.ɵɵproperty("ngForOf", case_r7.linkDetails);
21792
- }
21793
- }
21794
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) {
21795
- if (rf & 1) {
21796
- i0__namespace.ɵɵelementStart(0, "tr", 5);
21797
- i0__namespace.ɵɵelementStart(1, "td", 18);
21798
- i0__namespace.ɵɵtext(2, " None ");
21799
- i0__namespace.ɵɵelementEnd();
21800
- i0__namespace.ɵɵelementEnd();
21801
- }
21802
- }
21803
- function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) {
21804
- if (rf & 1) {
21805
- i0__namespace.ɵɵelementStart(0, "tbody", 8);
21806
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
21807
- i0__namespace.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
21808
- i0__namespace.ɵɵelementEnd();
21809
- }
21810
- if (rf & 2) {
21811
- var ctx_r4 = i0__namespace.ɵɵnextContext(2);
21812
- i0__namespace.ɵɵadvance(1);
21813
- i0__namespace.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
21814
- i0__namespace.ɵɵadvance(1);
21815
- i0__namespace.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
21816
- }
21817
- }
21818
- function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) {
21819
- if (rf & 1) {
21820
- i0__namespace.ɵɵelementStart(0, "table", 3);
21821
- i0__namespace.ɵɵelementStart(1, "thead", 4);
21822
- i0__namespace.ɵɵelementStart(2, "tr", 5);
21823
- i0__namespace.ɵɵelementStart(3, "th", 6);
21824
- i0__namespace.ɵɵtext(4, "Case name and number");
21825
- i0__namespace.ɵɵelementEnd();
21826
- i0__namespace.ɵɵelementStart(5, "th", 6);
21827
- i0__namespace.ɵɵtext(6, "Case type ");
21828
- i0__namespace.ɵɵelementEnd();
21829
- i0__namespace.ɵɵelementStart(7, "th", 6);
21830
- i0__namespace.ɵɵtext(8, "Service");
21831
- i0__namespace.ɵɵelementEnd();
21832
- i0__namespace.ɵɵelementStart(9, "th", 6);
21833
- i0__namespace.ɵɵtext(10, "State");
21834
- i0__namespace.ɵɵelementEnd();
21835
- i0__namespace.ɵɵelementStart(11, "th", 6);
21836
- i0__namespace.ɵɵtext(12, "Reasons for case link");
21837
- i0__namespace.ɵɵelementEnd();
21838
- i0__namespace.ɵɵelementEnd();
21839
- i0__namespace.ɵɵelementEnd();
21840
- i0__namespace.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
21841
- i0__namespace.ɵɵelementEnd();
21842
- }
21843
- if (rf & 2) {
21844
- var ctx_r1 = i0__namespace.ɵɵnextContext();
21845
- i0__namespace.ɵɵadvance(13);
21846
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
21847
- }
21848
- }
21849
- exports.PageType = void 0;
21850
- (function (PageType) {
21851
- PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
21852
- PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
21853
- })(exports.PageType || (exports.PageType = {}));
21854
- var LinkedCasesFromTableComponent = /** @class */ (function () {
21855
- function LinkedCasesFromTableComponent(route, casesService, linkedCasesService) {
21856
- this.route = route;
21857
- this.casesService = casesService;
21858
- this.linkedCasesService = linkedCasesService;
21859
- this.notifyAPIFailure = new i0.EventEmitter(false);
21860
- this.pageType = exports.PageType;
21861
- this.getLinkedCasesResponse = [];
21862
- this.showHideLinkText = 'Show';
21863
- this.noLinkedCases = true;
21864
- this.isServerError = false;
21865
- }
21866
- LinkedCasesFromTableComponent.prototype.ngAfterViewInit = function () {
21867
- var labelField = document.getElementsByClassName('case-viewer-label');
21868
- if (labelField && labelField.length) {
21869
- labelField[0].replaceWith('');
21870
- }
21871
- };
21872
- LinkedCasesFromTableComponent.prototype.ngOnInit = function () {
21873
- this.fetchPageData();
21874
- if (this.route.snapshot.data.case) {
21875
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
21876
- }
21877
- };
21878
- LinkedCasesFromTableComponent.prototype.fetchPageData = function () {
21879
- var _this = this;
21880
- this.caseId = this.route.snapshot.data.case.case_id;
21881
- this.getLinkedCases().subscribe(function (response) {
21882
- _this.isServerError = false;
21883
- _this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(function (item) {
21884
- var mappedCasetype = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
21885
- var mappedCasetypeDescription = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
21886
- var mappedCaseState = _this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
21887
- var mappedCaseStateDescription = _this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
21888
- var mappedCaseService = _this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
21889
- return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
21890
- });
21891
- _this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
21892
- }, function (err) {
21893
- _this.isServerError = true;
21894
- _this.notifyAPIFailure.emit(true);
21895
- });
21896
- };
21897
- LinkedCasesFromTableComponent.prototype.getLinkedCases = function () {
21898
- return this.casesService.getLinkedCases(this.caseId);
21899
- };
21900
- LinkedCasesFromTableComponent.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
21901
- return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
21902
- };
21903
- LinkedCasesFromTableComponent.prototype.onClick = function () {
21904
- this.showHideLinkText = this.showHideLinkText === 'Show'
21905
- ? 'Hide'
21906
- : 'Show';
21907
- };
21908
- return LinkedCasesFromTableComponent;
21909
- }());
21910
- LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
21911
- 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)); };
21912
- 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) {
21913
- if (rf & 1) {
21914
- i0__namespace.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
21915
- i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
21916
- }
21917
- if (rf & 2) {
21918
- i0__namespace.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
21919
- i0__namespace.ɵɵadvance(1);
21920
- i0__namespace.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
21921
- }
21922
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
21923
- (function () {
21924
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
21925
- type: i0.Component,
21926
- args: [{
21927
- selector: 'ccd-linked-cases-from-table',
21928
- templateUrl: './linked-cases-from-table.component.html',
21929
- styleUrls: ['./linked-cases-from-table.component.scss']
21930
- }]
21931
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
21932
- type: i0.Input
21933
- }], notifyAPIFailure: [{
21934
- type: i0.Output
21935
- }] });
21936
- })();
21937
-
21938
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) {
21939
- if (rf & 1) {
21940
- i0__namespace.ɵɵelementStart(0, "a", 16);
21941
- i0__namespace.ɵɵtext(1);
21942
- i0__namespace.ɵɵelementEnd();
21943
- }
21944
- if (rf & 2) {
21945
- var case_r3 = i0__namespace.ɵɵnextContext(3).$implicit;
21946
- var ctx_r9 = i0__namespace.ɵɵnextContext(2);
21947
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
21948
- i0__namespace.ɵɵadvance(1);
21949
- i0__namespace.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
21950
- }
21951
- }
21952
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) {
21953
- if (rf & 1) {
21954
- i0__namespace.ɵɵelement(0, "br");
21955
- }
21956
- }
21957
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) {
21958
- if (rf & 1) {
21959
- i0__namespace.ɵɵelementStart(0, "span");
21960
- i0__namespace.ɵɵtext(1);
21961
- i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
21962
- i0__namespace.ɵɵelementStart(3, "span");
21963
- i0__namespace.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
21964
- i0__namespace.ɵɵelementEnd();
21965
- i0__namespace.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
21966
- i0__namespace.ɵɵelementEnd();
21967
- }
21968
- if (rf & 2) {
21969
- var reason_r6 = ctx.$implicit;
21970
- var isLast_r8 = ctx.last;
21971
- var ctx_r5 = i0__namespace.ɵɵnextContext(4);
21972
- i0__namespace.ɵɵadvance(1);
21973
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 3, reason_r6), "");
21974
- i0__namespace.ɵɵadvance(3);
21975
- i0__namespace.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
21976
- i0__namespace.ɵɵadvance(1);
21977
- i0__namespace.ɵɵproperty("ngIf", !isLast_r8);
21978
- }
21979
- }
21980
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) {
21981
- if (rf & 1) {
21982
- i0__namespace.ɵɵelementStart(0, "td");
21983
- i0__namespace.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
21984
- i0__namespace.ɵɵelementEnd();
21985
- }
21986
- if (rf & 2) {
21987
- var case_r3 = i0__namespace.ɵɵnextContext().$implicit;
21988
- i0__namespace.ɵɵadvance(1);
21989
- i0__namespace.ɵɵproperty("ngForOf", case_r3.reasons);
21990
- }
21991
- }
21992
- function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) {
21993
- if (rf & 1) {
21994
- i0__namespace.ɵɵelementStart(0, "tr", 4);
21995
- i0__namespace.ɵɵelementStart(1, "td");
21996
- i0__namespace.ɵɵelementStart(2, "p", 9);
21997
- i0__namespace.ɵɵelementStart(3, "a", 10);
21998
- i0__namespace.ɵɵelementStart(4, "span", 11);
21999
- i0__namespace.ɵɵtext(5);
22000
- i0__namespace.ɵɵelement(6, "br");
22001
- i0__namespace.ɵɵtext(7);
22002
- i0__namespace.ɵɵpipe(8, "ccdCaseReference");
22003
- i0__namespace.ɵɵelementEnd();
22004
- i0__namespace.ɵɵelementEnd();
22005
- i0__namespace.ɵɵelementEnd();
22006
- i0__namespace.ɵɵelementEnd();
22007
- i0__namespace.ɵɵelementStart(9, "td");
22008
- i0__namespace.ɵɵelementStart(10, "span", 12);
22009
- i0__namespace.ɵɵtext(11);
22010
- i0__namespace.ɵɵelementEnd();
22011
- i0__namespace.ɵɵelementEnd();
22012
- i0__namespace.ɵɵelementStart(12, "td");
22013
- i0__namespace.ɵɵelementStart(13, "span");
22014
- i0__namespace.ɵɵtext(14);
22015
- i0__namespace.ɵɵelementEnd();
22016
- i0__namespace.ɵɵelementEnd();
22017
- i0__namespace.ɵɵelementStart(15, "td");
22018
- i0__namespace.ɵɵelementStart(16, "span", 12);
22019
- i0__namespace.ɵɵtext(17);
22020
- i0__namespace.ɵɵelementEnd();
22021
- i0__namespace.ɵɵelementEnd();
22022
- i0__namespace.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
22023
- i0__namespace.ɵɵelementEnd();
22024
- }
22025
- if (rf & 2) {
22026
- var case_r3 = ctx.$implicit;
22027
- i0__namespace.ɵɵadvance(3);
22028
- i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
22029
- i0__namespace.ɵɵadvance(2);
22030
- i0__namespace.ɵɵtextInterpolate1("", case_r3.caseName, " ");
22031
- i0__namespace.ɵɵadvance(2);
22032
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
22033
- i0__namespace.ɵɵadvance(3);
22034
- i0__namespace.ɵɵproperty("title", case_r3.caseTypeDescription);
22035
- i0__namespace.ɵɵadvance(1);
22036
- i0__namespace.ɵɵtextInterpolate(case_r3.caseType);
22037
- i0__namespace.ɵɵadvance(3);
22038
- i0__namespace.ɵɵtextInterpolate(case_r3.service);
22039
- i0__namespace.ɵɵadvance(2);
22040
- i0__namespace.ɵɵproperty("title", case_r3.stateDescription);
22041
- i0__namespace.ɵɵadvance(1);
22042
- i0__namespace.ɵɵtextInterpolate(case_r3.state);
22043
- i0__namespace.ɵɵadvance(1);
22044
- i0__namespace.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
22045
- }
22046
- }
22047
- function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) {
22048
- if (rf & 1) {
22049
- i0__namespace.ɵɵelementStart(0, "tr", 4);
22050
- i0__namespace.ɵɵelementStart(1, "td", 17);
22051
- i0__namespace.ɵɵtext(2, " None ");
22052
- i0__namespace.ɵɵelementEnd();
22053
- i0__namespace.ɵɵelementEnd();
22054
- }
22055
- }
22056
- function LinkedCasesToTableComponent_table_2_Template(rf, ctx) {
22057
- if (rf & 1) {
22058
- i0__namespace.ɵɵelementStart(0, "table", 3);
22059
- i0__namespace.ɵɵelementStart(1, "thead");
22060
- i0__namespace.ɵɵelementStart(2, "tr", 4);
22061
- i0__namespace.ɵɵelementStart(3, "th", 5);
22062
- i0__namespace.ɵɵtext(4, "Case name and number");
22063
- i0__namespace.ɵɵelementEnd();
22064
- i0__namespace.ɵɵelementStart(5, "th", 5);
22065
- i0__namespace.ɵɵtext(6, "Case type ");
22066
- i0__namespace.ɵɵelementEnd();
22067
- i0__namespace.ɵɵelementStart(7, "th", 5);
22068
- i0__namespace.ɵɵtext(8, "Service");
22069
- i0__namespace.ɵɵelementEnd();
22070
- i0__namespace.ɵɵelementStart(9, "th", 5);
22071
- i0__namespace.ɵɵtext(10, "State");
22072
- i0__namespace.ɵɵelementEnd();
22073
- i0__namespace.ɵɵelementStart(11, "th", 5);
22074
- i0__namespace.ɵɵtext(12, "Reasons for case link");
22075
- i0__namespace.ɵɵelementEnd();
22076
- i0__namespace.ɵɵelementEnd();
22077
- i0__namespace.ɵɵelementEnd();
22078
- i0__namespace.ɵɵelementStart(13, "tbody", 6);
22079
- i0__namespace.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
22080
- i0__namespace.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
22081
- i0__namespace.ɵɵelementEnd();
22082
- i0__namespace.ɵɵelementEnd();
22083
- }
22084
- if (rf & 2) {
22085
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22086
- i0__namespace.ɵɵadvance(14);
22087
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
22088
- i0__namespace.ɵɵadvance(1);
22089
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
22090
- }
22091
- }
22092
- var LinkedCasesToTableComponent = /** @class */ (function () {
22093
- function LinkedCasesToTableComponent(route, linkedCasesService, casesService) {
22094
- this.route = route;
22095
- this.linkedCasesService = linkedCasesService;
22096
- this.casesService = casesService;
22097
- this.notifyAPIFailure = new i0.EventEmitter(false);
22098
- this.linkedCasesFromResponse = [];
22099
- this.isServerError = false;
22100
- this.jurisdictionsResponse = [];
22101
- }
22102
- LinkedCasesToTableComponent.prototype.ngAfterViewInit = function () {
22103
- var labelField = document.getElementsByClassName('govuk-heading-l');
22104
- if (labelField && labelField.length) {
22105
- labelField[0].replaceWith('');
22106
- }
22107
- labelField = document.getElementsByClassName('heading-h2');
22108
- if (labelField && labelField.length) {
22109
- labelField[0].replaceWith('');
22110
- }
22111
- };
22112
- LinkedCasesToTableComponent.prototype.ngOnInit = function () {
22113
- this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
22114
- this.getAllLinkedCaseInformation();
22115
- if (this.route.snapshot.data.case) {
22116
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
22117
- }
22118
- };
22119
- LinkedCasesToTableComponent.prototype.getCaseRefereneLink = function (caseRef) {
22120
- return caseRef.slice(this.caseId.length - 4);
22121
- };
22122
- LinkedCasesToTableComponent.prototype.sortLinkedCasesByReasonCode = function (searchCasesResponse) {
22123
- var topLevelresultArray = [];
22124
- var secondLevelresultArray = [];
22125
- searchCasesResponse.forEach(function (item) {
22126
- var reasons = item && item.reasons || [];
22127
- var consolidatedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE; });
22128
- var progressedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE; });
22129
- var arrayItem;
22130
- if (progressedStateReason) {
22131
- arrayItem = Object.assign({}, item);
22132
- topLevelresultArray.push(arrayItem);
22133
- }
22134
- else if (consolidatedStateReason) {
22135
- arrayItem = Object.assign({}, item);
22136
- secondLevelresultArray = __spread([Object.assign({}, item)], secondLevelresultArray);
22137
- }
22138
- else {
22139
- arrayItem = Object.assign({}, item);
22140
- secondLevelresultArray.push(Object.assign({}, item));
22141
- }
22142
- });
22143
- return topLevelresultArray.concat(secondLevelresultArray);
22144
- };
22145
- LinkedCasesToTableComponent.prototype.getAllLinkedCaseInformation = function () {
22146
- var _this = this;
22147
- var searchCasesResponse = [];
22148
- var caseFieldValue = this.caseField ? this.caseField.value : [];
22149
- // Generate the list of observables
22150
- caseFieldValue.forEach(function (fieldValue) {
22151
- if (fieldValue && fieldValue.id) {
22152
- searchCasesResponse.push(_this.casesService.getCaseViewV2(fieldValue.id));
22153
- }
22154
- });
22155
- if (searchCasesResponse.length) {
22156
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22157
- var casesResponse = [];
22158
- searchCases.forEach(function (response) {
22159
- casesResponse.push(_this.mapResponse(response));
22160
- });
22161
- _this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
22162
- _this.isLoaded = true;
22163
- var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
22164
- return {
22165
- caseReference: item.caseReference,
22166
- caseName: item.caseName,
22167
- caseService: item.service,
22168
- caseType: item.caseType,
22169
- unlink: false,
22170
- reasons: item.reasons && item.reasons.map(function (reason) {
22171
- return {
22172
- reasonCode: reason
22173
- };
22174
- }),
22175
- };
22176
- });
22177
- _this.linkedCasesService.initialCaseLinks = caseLinks;
22178
- _this.linkedCasesService.linkedCases = caseLinks;
22179
- _this.isServerError = false;
22180
- }, function (err) {
22181
- _this.isServerError = true;
22182
- _this.notifyAPIFailure.emit(true);
22183
- });
22184
- }
22185
- };
22186
- LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22187
- return rxjs.forkJoin(searchCasesResponse);
22188
- };
22189
- LinkedCasesToTableComponent.prototype.hasLeadCaseOrConsolidated = function (reasonCode) {
22190
- return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
22191
- reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
22192
- };
22193
- LinkedCasesToTableComponent.prototype.mapResponse = function (esSearchCasesResponse) {
22194
- var caseInfo = this.caseField.value.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
22195
- return caseInfo && {
22196
- caseReference: esSearchCasesResponse.case_id,
22197
- caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
22198
- caseType: esSearchCasesResponse.case_type.name || '',
22199
- caseTypeDescription: esSearchCasesResponse.case_type.description || '',
22200
- service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
22201
- state: esSearchCasesResponse.state.name || '',
22202
- stateDescription: esSearchCasesResponse.state.description || '',
22203
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
22204
- caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
22205
- };
22206
- };
22207
- return LinkedCasesToTableComponent;
22208
- }());
22209
- LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
22210
- LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
22211
- 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)); };
22212
- 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) {
22213
- if (rf & 1) {
22214
- i0__namespace.ɵɵelementStart(0, "div", 0);
22215
- i0__namespace.ɵɵelementStart(1, "div", 1);
22216
- i0__namespace.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
22217
- i0__namespace.ɵɵelementEnd();
22218
- i0__namespace.ɵɵelementEnd();
22219
- }
22220
- if (rf & 2) {
22221
- i0__namespace.ɵɵadvance(2);
22222
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
22223
- }
22224
- }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
22225
- (function () {
22226
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
22227
- type: i0.Component,
22228
- args: [{
22229
- selector: 'ccd-linked-cases-to-table',
22230
- templateUrl: './linked-cases-to-table.component.html',
22231
- styleUrls: ['./linked-cases-to-table.component.scss']
22232
- }]
22233
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
22234
- type: i0.Input
22235
- }], notifyAPIFailure: [{
22236
- type: i0.Output
22237
- }] });
22238
- })();
22239
-
22240
- function NoLinkedCasesComponent_h1_2_Template(rf, ctx) {
22241
- if (rf & 1) {
22242
- i0__namespace.ɵɵelementStart(0, "h1", 9);
22243
- i0__namespace.ɵɵtext(1, "There is a problem");
22244
- i0__namespace.ɵɵelementEnd();
22245
- }
22246
- }
22247
- function NoLinkedCasesComponent_p_3_Template(rf, ctx) {
22248
- if (rf & 1) {
22249
- i0__namespace.ɵɵelementStart(0, "p", 10);
22250
- i0__namespace.ɵɵelementStart(1, "span", 11);
22251
- i0__namespace.ɵɵtext(2, "Error:");
22252
- i0__namespace.ɵɵelementEnd();
22253
- i0__namespace.ɵɵtext(3);
22254
- i0__namespace.ɵɵelementEnd();
22255
- }
22256
- if (rf & 2) {
22257
- var ctx_r1 = i0__namespace.ɵɵnextContext();
22258
- i0__namespace.ɵɵadvance(3);
22259
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
22260
- }
22261
- }
22262
- function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) {
22263
- if (rf & 1) {
22264
- i0__namespace.ɵɵelementStart(0, "p", 5);
22265
- i0__namespace.ɵɵtext(1, "There are no cases linked to this one.");
22266
- i0__namespace.ɵɵelementEnd();
22267
- }
22268
- }
22269
- var NoLinkedCasesComponent = /** @class */ (function () {
22270
- function NoLinkedCasesComponent(router, linkedCasesService) {
22271
- this.router = router;
22272
- this.linkedCasesService = linkedCasesService;
22273
- }
22274
- NoLinkedCasesComponent.prototype.onBack = function () {
22275
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
22276
- window.location.hash = 'Linked cases';
22277
- });
22278
- };
22279
- return NoLinkedCasesComponent;
22280
- }());
22281
- NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
22282
- 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) {
22283
- if (rf & 1) {
22284
- i0__namespace.ɵɵelementStart(0, "div", 0);
22285
- i0__namespace.ɵɵelementStart(1, "div", 1);
22286
- i0__namespace.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
22287
- i0__namespace.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
22288
- i0__namespace.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0__namespace.ɵɵtemplateRefExtractor);
22289
- i0__namespace.ɵɵelementStart(6, "p", 5);
22290
- i0__namespace.ɵɵelementStart(7, "a", 6);
22291
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
22292
- i0__namespace.ɵɵtext(8, "Go back to the Linked cases tab");
22293
- i0__namespace.ɵɵelementEnd();
22294
- i0__namespace.ɵɵelementEnd();
22295
- i0__namespace.ɵɵelementStart(9, "div", 7);
22296
- i0__namespace.ɵɵelementStart(10, "button", 8);
22297
- i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
22298
- i0__namespace.ɵɵtext(11, "Back");
22299
- i0__namespace.ɵɵelementEnd();
22300
- i0__namespace.ɵɵelementEnd();
22301
- i0__namespace.ɵɵelementEnd();
22302
- i0__namespace.ɵɵelementEnd();
22303
- }
22304
- if (rf & 2) {
22305
- var _r2 = i0__namespace.ɵɵreference(5);
22306
- i0__namespace.ɵɵadvance(2);
22307
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
22308
- i0__namespace.ɵɵadvance(1);
22309
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
22310
- }
22311
- }, directives: [i1__namespace.NgIf], encapsulation: 2 });
22312
- (function () {
22313
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NoLinkedCasesComponent, [{
22314
- type: i0.Component,
22315
- args: [{
22316
- selector: 'ccd-no-linked-cases',
22317
- templateUrl: './no-linked-cases.component.html'
22318
- }]
22319
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, null);
22320
- })();
22321
-
22322
- function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) {
22323
- if (rf & 1) {
22324
- i0__namespace.ɵɵelementStart(0, "p", 11);
22325
- i0__namespace.ɵɵelementStart(1, "span", 12);
22326
- i0__namespace.ɵɵtext(2, "Error:");
22327
- i0__namespace.ɵɵelementEnd();
22328
- i0__namespace.ɵɵtext(3);
22329
- i0__namespace.ɵɵelementEnd();
22330
- }
22331
- if (rf & 2) {
22332
- var ctx_r2 = i0__namespace.ɵɵnextContext(3);
22333
- i0__namespace.ɵɵadvance(3);
22334
- i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
22335
- }
22336
- }
22337
- function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) {
22338
- if (rf & 1) {
22339
- var _r6_1 = i0__namespace.ɵɵgetCurrentView();
22340
- i0__namespace.ɵɵelementStart(0, "div", 13);
22341
- i0__namespace.ɵɵelementStart(1, "input", 14);
22342
- 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); });
22343
- i0__namespace.ɵɵelementEnd();
22344
- i0__namespace.ɵɵelementStart(2, "label", 15);
22345
- i0__namespace.ɵɵtext(3);
22346
- i0__namespace.ɵɵpipe(4, "ccdCaseReference");
22347
- i0__namespace.ɵɵelementEnd();
22348
- i0__namespace.ɵɵelementEnd();
22349
- }
22350
- if (rf & 2) {
22351
- var case_r4 = ctx.$implicit;
22352
- i0__namespace.ɵɵadvance(1);
22353
- i0__namespace.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
22354
- i0__namespace.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
22355
- i0__namespace.ɵɵadvance(1);
22356
- i0__namespace.ɵɵpropertyInterpolate("for", case_r4.caseReference);
22357
- i0__namespace.ɵɵadvance(1);
22358
- i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
22359
- }
22360
- }
22361
- var _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
22362
- function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
22363
- if (rf & 1) {
22364
- i0__namespace.ɵɵelementStart(0, "div", 7);
22365
- i0__namespace.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
22366
- i0__namespace.ɵɵelementStart(2, "div", 9);
22367
- i0__namespace.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
22368
- i0__namespace.ɵɵelementEnd();
22369
- i0__namespace.ɵɵelementEnd();
22370
- }
22371
- if (rf & 2) {
22372
- var ctx_r1 = i0__namespace.ɵɵnextContext(2);
22373
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
22374
- i0__namespace.ɵɵadvance(1);
22375
- i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
22376
- i0__namespace.ɵɵadvance(2);
22377
- i0__namespace.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
22378
- }
22379
- }
22380
- function UnLinkCasesComponent_div_0_Template(rf, ctx) {
22381
- if (rf & 1) {
22382
- var _r8_1 = i0__namespace.ɵɵgetCurrentView();
22383
- i0__namespace.ɵɵelementStart(0, "div", 1);
22384
- i0__namespace.ɵɵelementStart(1, "div", 2);
22385
- i0__namespace.ɵɵelementStart(2, "h1", 3);
22386
- i0__namespace.ɵɵtext(3, "Select the cases you want to unlink from this case");
22387
- i0__namespace.ɵɵelementEnd();
22388
- i0__namespace.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
22389
- i0__namespace.ɵɵelementStart(5, "div", 5);
22390
- i0__namespace.ɵɵelementStart(6, "button", 6);
22391
- 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(); });
22392
- i0__namespace.ɵɵtext(7, "Next");
22393
- i0__namespace.ɵɵelementEnd();
22394
- i0__namespace.ɵɵelementEnd();
22395
- i0__namespace.ɵɵelementEnd();
22396
- i0__namespace.ɵɵelementEnd();
22397
- }
22398
- if (rf & 2) {
22399
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22400
- i0__namespace.ɵɵadvance(4);
22401
- i0__namespace.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
22402
- }
22403
- }
22404
- var UnLinkCasesComponent = /** @class */ (function () {
22405
- function UnLinkCasesComponent(caseEdit, fb, casesService, linkedCasesService) {
22406
- this.caseEdit = caseEdit;
22407
- this.fb = fb;
22408
- this.casesService = casesService;
22409
- this.linkedCasesService = linkedCasesService;
22410
- this.linkedCasesStateEmitter = new i0.EventEmitter();
22411
- this.notifyAPIFailure = new i0.EventEmitter(false);
22412
- this.linkedCases = [];
22413
- this.errorMessages = [];
22414
- this.isServerError = false;
22415
- }
22416
- UnLinkCasesComponent.prototype.ngOnInit = function () {
22417
- this.getLinkedCases();
22418
- };
22419
- UnLinkCasesComponent.prototype.getLinkedCases = function () {
22420
- var _this = this;
22421
- this.caseId = this.linkedCasesService.caseId;
22422
- if (this.linkedCasesService.linkedCases.length > 0) {
22423
- this.linkedCases = this.linkedCasesService.linkedCases;
22424
- this.getAllLinkedCaseInformation();
22425
- }
22426
- else {
22427
- this.casesService.getCaseViewV2(this.caseId).subscribe(function (caseView) {
22428
- var linkedCasesTab = caseView.tabs.find(function (tab) { return tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID; });
22429
- if (linkedCasesTab) {
22430
- var linkedCases = linkedCasesTab.fields[0].value;
22431
- _this.linkedCases = linkedCases;
22432
- _this.linkedCasesService.linkedCases = linkedCases;
22433
- _this.getAllLinkedCaseInformation();
22434
- }
22435
- });
22436
- }
22437
- };
22438
- UnLinkCasesComponent.prototype.getAllLinkedCaseInformation = function () {
22439
- var _this = this;
22440
- var searchCasesResponse = [];
22441
- this.linkedCases.forEach(function (linkedCase) {
22442
- searchCasesResponse.push(_this.casesService.getCaseViewV2(linkedCase.caseReference));
22443
- });
22444
- if (searchCasesResponse.length) {
22445
- this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
22446
- searchCases.forEach(function (response) {
22447
- var linkedCaseFromList = _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; });
22448
- if (linkedCaseFromList) {
22449
- var caseName = _this.linkedCasesService.getCaseName(response);
22450
- _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; }).caseName = caseName;
22451
- }
22452
- });
22453
- _this.initForm();
22454
- _this.linkedCasesService.linkedCases = _this.linkedCases;
22455
- _this.isServerError = false;
22456
- }, function (err) {
22457
- _this.isServerError = true;
22458
- _this.notifyAPIFailure.emit(true);
22459
- });
22460
- }
22461
- };
22462
- UnLinkCasesComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
22463
- return rxjs.forkJoin(searchCasesResponse);
22464
- };
22465
- UnLinkCasesComponent.prototype.initForm = function () {
22466
- this.unlinkCaseForm = this.fb.group({
22467
- linkedCases: this.getLinkedCasesFormArray
22468
- });
22469
- };
22470
- Object.defineProperty(UnLinkCasesComponent.prototype, "getLinkedCasesFormArray", {
22471
- get: function () {
22472
- var _this = this;
22473
- var formFieldArray = this.linkedCases.map(function (val) { return _this.fb.group({
22474
- caseReference: val.caseReference,
22475
- reasons: val.reasons,
22476
- createdDateTime: val.createdDateTime,
22477
- caseType: val.caseType,
22478
- caseState: val.caseState,
22479
- caseService: val.caseService,
22480
- caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
22481
- unlink: val.unlink
22482
- }); });
22483
- return this.fb.array(formFieldArray);
22484
- },
22485
- enumerable: false,
22486
- configurable: true
22487
- });
22488
- UnLinkCasesComponent.prototype.onChange = function (caseSelected) {
22489
- this.resetErrorMessages();
22490
- var selectedCase = this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === caseSelected.value; });
22491
- if (selectedCase) {
22492
- selectedCase.unlink = caseSelected.checked ? true : false;
22493
- }
22494
- };
22495
- UnLinkCasesComponent.prototype.onNext = function () {
22496
- this.resetErrorMessages();
22497
- var navigateToNextPage = true;
22498
- var casesMarkedToUnlink = this.linkedCases.find(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
22499
- if (!casesMarkedToUnlink) {
22500
- this.errorMessages.push({
22501
- title: 'case-selection',
22502
- description: exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError,
22503
- fieldId: "case-reference-" + this.linkedCases[0].caseReference
22504
- });
22505
- this.unlinkErrorMessage = exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError;
22506
- navigateToNextPage = false;
22507
- }
22508
- var unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
22509
- var updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(function (item) { return unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1; });
22510
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(updatedLinkedCases || []) });
22511
- // Return linked cases state and error messages to the parent
22512
- this.linkedCasesStateEmitter.emit({
22513
- currentLinkedCasesPage: exports.LinkedCasesPages.UNLINK_CASE,
22514
- errorMessages: this.errorMessages,
22515
- navigateToNextPage: navigateToNextPage
22516
- });
22517
- };
22518
- UnLinkCasesComponent.prototype.resetErrorMessages = function () {
22519
- this.errorMessages = [];
22520
- this.unlinkErrorMessage = null;
22521
- };
22522
- return UnLinkCasesComponent;
22523
- }());
22524
- UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
22525
- UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
22526
- 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)); };
22527
- 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) {
22528
- if (rf & 1) {
22529
- i0__namespace.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
22530
- }
22531
- if (rf & 2) {
22532
- i0__namespace.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
22533
- }
22534
- }, directives: [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgForOf, i2__namespace.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
22535
- (function () {
22536
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(UnLinkCasesComponent, [{
22537
- type: i0.Component,
22538
- args: [{
22539
- selector: 'ccd-unlink-cases',
22540
- templateUrl: './unlink-cases.component.html'
22541
- }]
22542
- }], function () { return [{ type: CaseEditComponent }, { type: i2__namespace.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
22543
- type: i0.Output
22544
- }], notifyAPIFailure: [{
22545
- type: i0.Output
22546
- }] });
22547
- })();
22548
-
22549
- function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) {
22550
- if (rf & 1) {
22551
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
22552
- i0__namespace.ɵɵelementStart(0, "div", 7);
22553
- i0__namespace.ɵɵelementStart(1, "ul", 8);
22554
- i0__namespace.ɵɵelementStart(2, "li");
22555
- i0__namespace.ɵɵelementStart(3, "a", 9);
22556
- 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); });
22557
- i0__namespace.ɵɵtext(4);
22558
- i0__namespace.ɵɵelementEnd();
22559
- i0__namespace.ɵɵelementEnd();
22560
- i0__namespace.ɵɵelementEnd();
22561
- i0__namespace.ɵɵelementEnd();
22562
- }
22563
- if (rf & 2) {
22564
- var errorMessage_r7 = ctx.$implicit;
22565
- i0__namespace.ɵɵadvance(4);
22566
- i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
22567
- }
22568
- }
22569
- function WriteLinkedCasesComponent_div_0_Template(rf, ctx) {
22570
- if (rf & 1) {
22571
- i0__namespace.ɵɵelementStart(0, "div", 4);
22572
- i0__namespace.ɵɵelementStart(1, "h2", 5);
22573
- i0__namespace.ɵɵtext(2, " There is a problem ");
22574
- i0__namespace.ɵɵelementEnd();
22575
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
22576
- i0__namespace.ɵɵelementEnd();
22577
- }
22578
- if (rf & 2) {
22579
- var ctx_r0 = i0__namespace.ɵɵnextContext();
22580
- i0__namespace.ɵɵadvance(3);
22581
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
22582
- }
22583
- }
22584
- function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) {
22585
- if (rf & 1) {
22586
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
22587
- i0__namespace.ɵɵelementContainerStart(0);
22588
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
22589
- 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); });
22590
- i0__namespace.ɵɵelementEnd();
22591
- i0__namespace.ɵɵelementContainerEnd();
22592
- }
22593
- }
22594
- function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) {
22595
- if (rf & 1) {
22596
- var _r13_1 = i0__namespace.ɵɵgetCurrentView();
22597
- i0__namespace.ɵɵelementContainerStart(0);
22598
- i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
22599
- 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); });
22600
- i0__namespace.ɵɵelementEnd();
22601
- i0__namespace.ɵɵelementContainerEnd();
22602
- }
22603
- }
22604
- function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) {
22605
- if (rf & 1) {
22606
- var _r15_1 = i0__namespace.ɵɵgetCurrentView();
22607
- i0__namespace.ɵɵelementContainerStart(0);
22608
- i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 10);
22609
- 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); });
22610
- i0__namespace.ɵɵelementEnd();
22611
- i0__namespace.ɵɵelementContainerEnd();
22612
- }
22613
- }
22614
- function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) {
22615
- if (rf & 1) {
22616
- var _r17_1 = i0__namespace.ɵɵgetCurrentView();
22617
- i0__namespace.ɵɵelementContainerStart(0);
22618
- i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
22619
- 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); });
22620
- i0__namespace.ɵɵelementEnd();
22621
- i0__namespace.ɵɵelementContainerEnd();
22622
- }
22623
- }
22624
- function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
22625
- if (rf & 1) {
22626
- var _r19_1 = i0__namespace.ɵɵgetCurrentView();
22627
- i0__namespace.ɵɵelementContainerStart(0);
22628
- i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
22629
- 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); });
22630
- i0__namespace.ɵɵelementEnd();
22631
- i0__namespace.ɵɵelementContainerEnd();
22632
- }
22633
- }
22634
- var WriteLinkedCasesComponent = /** @class */ (function (_super) {
22635
- __extends(WriteLinkedCasesComponent, _super);
22636
- function WriteLinkedCasesComponent(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
22637
- var _this = _super.call(this) || this;
22638
- _this.caseEdit = caseEdit;
22639
- _this.appConfig = appConfig;
22640
- _this.commonDataService = commonDataService;
22641
- _this.casesService = casesService;
22642
- _this.linkedCasesService = linkedCasesService;
22643
- _this.caseEditDataService = caseEditDataService;
22644
- _this.onLinkedCasesSelected = new i0.EventEmitter();
22645
- _this.isLinkedCasesJourney = false;
22646
- _this.linkedCasesPages = exports.LinkedCasesPages;
22647
- _this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
22648
- _this.linkedCases = [];
22649
- _this.errorMessages = [];
22650
- return _this;
22651
- }
22652
- WriteLinkedCasesComponent.prototype.ngOnInit = function () {
22653
- var _this = this;
22654
- this.caseEditDataService.clearFormValidationErrors();
22655
- this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
22656
- this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
22657
- this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
22658
- this.linkedCasesService.editMode = false;
22659
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
22660
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
22661
- next: function (reasons) {
22662
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
22663
- }
22664
- });
22665
- this.getLinkedCases();
22666
- this.caseEditDataService.caseEventTriggerName$.subscribe({
22667
- next: function (name) {
22668
- _this.linkedCasesService.isLinkedCasesEventTrigger
22669
- = (name === exports.LinkedCasesEventTriggers.LINK_CASES);
22670
- }
22671
- });
22672
- };
22673
- WriteLinkedCasesComponent.prototype.ngAfterViewInit = function () {
22674
- var labelField = document.getElementsByClassName('govuk-heading-l');
22675
- if (labelField && labelField.length) {
22676
- labelField[0].replaceWith('');
22677
- }
22678
- labelField = document.getElementsByClassName('heading-h2');
22679
- if (labelField && labelField.length) {
22680
- labelField[0].replaceWith('');
22681
- }
22682
- };
22683
- WriteLinkedCasesComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
22684
- var _this = this;
22685
- this.errorMessages = [];
22686
- this.caseEditDataService.clearFormValidationErrors();
22687
- if (linkedCasesState.navigateToNextPage) {
22688
- this.linkedCasesPage = this.getNextPage(linkedCasesState);
22689
- this.setContinueButtonValidationErrorMessage();
22690
- this.proceedToNextPage();
22691
- }
22692
- else {
22693
- if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
22694
- linkedCasesState.errorMessages.forEach(function (errorMessage, index) {
22695
- _this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
22696
- });
22697
- }
22698
- }
22699
- };
22700
- WriteLinkedCasesComponent.prototype.isAtFinalState = function () {
22701
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22702
- };
22703
- WriteLinkedCasesComponent.prototype.setContinueButtonValidationErrorMessage = function () {
22704
- var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
22705
- ? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
22706
- : exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
22707
- var buttonId = this.linkedCasesService.linkedCases.length === 0
22708
- ? 'back-button'
22709
- : 'next-button';
22710
- this.caseEditDataService.setCaseLinkError({
22711
- componentId: buttonId,
22712
- errorMessage: errorMessage
22713
- });
22714
- };
22715
- WriteLinkedCasesComponent.prototype.proceedToNextPage = function () {
22716
- if (this.isAtFinalPage()) {
22717
- // Continue button event must be allowed in final page
22718
- this.caseEditDataService.clearCaseLinkError();
22719
- // Trigger validation to clear the "notAtFinalPage" error if now at the final state
22720
- this.formGroup.updateValueAndValidity();
22721
- // update form value
22722
- this.onLinkedCasesSelected.emit();
22723
- this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(this.linkedCasesService.caseFieldValue) });
22724
- }
22725
- };
22726
- WriteLinkedCasesComponent.prototype.isAtFinalPage = function () {
22727
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
22728
- };
22729
- WriteLinkedCasesComponent.prototype.getNextPage = function (linkedCasesState) {
22730
- if ((this.linkedCasesPage === exports.LinkedCasesPages.BEFORE_YOU_START) ||
22731
- (linkedCasesState.currentLinkedCasesPage === exports.LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
22732
- return this.isLinkedCasesJourney
22733
- ? exports.LinkedCasesPages.LINK_CASE
22734
- : exports.LinkedCasesPages.UNLINK_CASE;
22735
- }
22736
- return exports.LinkedCasesPages.CHECK_YOUR_ANSWERS;
22737
- };
22738
- WriteLinkedCasesComponent.prototype.getLinkedCases = function () {
22739
- var _this = this;
22740
- this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
22741
- var caseViewFiltered = caseView.tabs.filter(function (tab) {
22742
- var linkField = tab.fields.some(function (_a) {
22743
- var field_type = _a.field_type;
22744
- return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
22745
- });
22746
- return linkField;
22747
- });
22748
- if (caseViewFiltered) {
22749
- var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { return filtered.fields.length && filtered.fields[0].value; });
22750
- _this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
22751
- _this.linkedCasesService.getAllLinkedCaseInformation();
22752
- }
22753
- // Initialise the first page to display
22754
- _this.linkedCasesPage = _this.linkedCasesService.isLinkedCasesEventTrigger ||
22755
- (_this.linkedCasesService.caseFieldValue && _this.linkedCasesService.caseFieldValue.length > 0
22756
- && !_this.linkedCasesService.serverLinkedApiError)
22757
- ? exports.LinkedCasesPages.BEFORE_YOU_START
22758
- : exports.LinkedCasesPages.NO_LINKED_CASES;
22759
- // Initialise the error to be displayed when clicked on Continue button
22760
- _this.setContinueButtonValidationErrorMessage();
22761
- });
22762
- };
22763
- WriteLinkedCasesComponent.prototype.navigateToErrorElement = function (elementId) {
22764
- if (elementId) {
22765
- var htmlElement = document.getElementById(elementId);
22766
- if (htmlElement) {
22767
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
22768
- htmlElement.focus();
22769
- }
22770
- }
22771
- };
22772
- return WriteLinkedCasesComponent;
22773
- }(AbstractFieldWriteComponent));
22774
- 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)); };
22775
- 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) {
22776
- if (rf & 1) {
22777
- i0__namespace.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
22778
- i0__namespace.ɵɵelementStart(1, "div", 1);
22779
- i0__namespace.ɵɵelementStart(2, "div", 2);
22780
- i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
22781
- i0__namespace.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
22782
- i0__namespace.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
22783
- i0__namespace.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
22784
- i0__namespace.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
22785
- i0__namespace.ɵɵelementEnd();
22786
- i0__namespace.ɵɵelementEnd();
22787
- }
22788
- if (rf & 2) {
22789
- i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
22790
- i0__namespace.ɵɵadvance(1);
22791
- i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
22792
- i0__namespace.ɵɵadvance(1);
22793
- i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
22794
- i0__namespace.ɵɵadvance(1);
22795
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
22796
- i0__namespace.ɵɵadvance(1);
22797
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
22798
- i0__namespace.ɵɵadvance(1);
22799
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
22800
- i0__namespace.ɵɵadvance(1);
22801
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
22802
- i0__namespace.ɵɵadvance(1);
22803
- i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
22804
- }
22805
- }, encapsulation: 2 });
22806
- (function () {
22807
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
22808
- type: i0.Component,
22809
- args: [{
22810
- selector: 'ccd-write-linked-cases',
22811
- templateUrl: './write-linked-cases.component.html'
22812
- }]
22813
- }], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
22814
- type: i0.Input
22815
- }], caseField: [{
22816
- type: i0.Input
22817
- }], onLinkedCasesSelected: [{
22818
- type: i0.Output
22819
- }], isLinkedCasesJourney: [{
22820
- type: i0.Input
22821
- }], formGroup: [{
22822
- type: i0.Input
22823
- }] });
22824
- })();
22825
-
22826
- function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
22827
- if (rf & 1) {
22828
- i0__namespace.ɵɵelementContainer(0);
22829
- }
22830
- }
22831
- function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) {
22832
- if (rf & 1) {
22833
- i0__namespace.ɵɵelementContainer(0);
22834
- }
22835
- }
22836
- function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) {
22837
- if (rf & 1) {
22838
- i0__namespace.ɵɵelementContainer(0);
22839
- }
22840
- }
22841
- function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) {
22842
- if (rf & 1) {
22843
- i0__namespace.ɵɵelementContainer(0);
22844
- }
22845
- }
22846
- function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) {
22847
- if (rf & 1) {
22848
- var _r9_1 = i0__namespace.ɵɵgetCurrentView();
22849
- i0__namespace.ɵɵelementStart(0, "div", 8);
22850
- i0__namespace.ɵɵelementStart(1, "p", 9);
22851
- i0__namespace.ɵɵtext(2);
22852
- i0__namespace.ɵɵelementEnd();
22853
- i0__namespace.ɵɵelementStart(3, "span", 10);
22854
- i0__namespace.ɵɵelementStart(4, "a", 11);
22855
- 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(); });
22856
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
22857
- i0__namespace.ɵɵelementEnd();
22858
- i0__namespace.ɵɵelementEnd();
22859
- i0__namespace.ɵɵelementEnd();
22860
- }
22861
- if (rf & 2) {
22862
- var ctx_r5 = i0__namespace.ɵɵnextContext();
22863
- i0__namespace.ɵɵadvance(2);
22864
- i0__namespace.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
22865
- }
22866
- }
22867
- function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) {
22868
- if (rf & 1) {
22869
- var _r11_1 = i0__namespace.ɵɵgetCurrentView();
22870
- i0__namespace.ɵɵelementStart(0, "div", 8);
22871
- i0__namespace.ɵɵelementStart(1, "p", 9);
22872
- i0__namespace.ɵɵtext(2);
22873
- i0__namespace.ɵɵelementEnd();
22874
- i0__namespace.ɵɵelementStart(3, "span", 10);
22875
- i0__namespace.ɵɵelementStart(4, "a", 11);
22876
- 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(); });
22877
- i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
22878
- i0__namespace.ɵɵelementEnd();
22879
- i0__namespace.ɵɵelementEnd();
22880
- i0__namespace.ɵɵelementEnd();
22881
- }
22882
- if (rf & 2) {
22883
- var ctx_r7 = i0__namespace.ɵɵnextContext();
22884
- i0__namespace.ɵɵadvance(2);
22885
- i0__namespace.ɵɵtextInterpolate(ctx_r7.serverError.message);
22886
- }
22887
- }
22888
- var ReadLinkedCasesComponent = /** @class */ (function () {
22889
- function ReadLinkedCasesComponent(router, linkedCasesService, appConfig, commonDataService) {
22890
- this.router = router;
22891
- this.linkedCasesService = linkedCasesService;
22892
- this.appConfig = appConfig;
22893
- this.commonDataService = commonDataService;
22894
- this.reasonListLoaded = false;
22895
- this.reload = false;
22896
- this.serverError = null;
22897
- this.serverLinkedApiError = null;
22898
- this.isServerReasonCodeError = false;
22899
- this.isServerJurisdictionError = false;
22900
- this.isServerLinkedFromError = false;
22901
- this.isServerLinkedToError = false;
22902
- }
22903
- ReadLinkedCasesComponent.prototype.ngOnInit = function () {
22904
- var _this = this;
22905
- this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
22906
- var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
22907
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
22908
- next: function (reasons) {
22909
- _this.reasonListLoaded = true;
22910
- _this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
22911
- },
22912
- error: function (error) {
22913
- _this.isServerReasonCodeError = true;
22914
- _this.linkedCasesService.isServerReasonCodeError = true;
22915
- }
22916
- });
22917
- this.serverLinkedApiError = {
22918
- id: 'backendError', message: 'Some case information is not available at the moment'
22919
- };
22920
- this.serverError = {
22921
- id: 'backendError', message: 'There has been a system error and your request could not be processed.'
22922
- };
22923
- };
22924
- ReadLinkedCasesComponent.prototype.ngAfterViewInit = function () {
22925
- this.linkedCasesService.caseFieldValue = this.caseField.value || [];
22926
- var labelField = document.getElementsByClassName('govuk-heading-l');
22927
- if (labelField && labelField.length) {
22928
- labelField[0].replaceWith('');
22929
- }
22930
- labelField = document.getElementsByClassName('heading-h2');
22931
- if (labelField && labelField.length) {
22932
- labelField[0].replaceWith('');
22933
- }
22934
- labelField = document.getElementsByClassName('case-viewer-label');
22935
- if (labelField && labelField.length) {
22936
- labelField[0].replaceWith('');
22937
- }
22938
- };
22939
- ReadLinkedCasesComponent.prototype.reloadCurrentRoute = function () {
22940
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(function () {
22941
- window.location.hash = 'Linked cases';
22942
- });
22943
- };
22944
- ReadLinkedCasesComponent.prototype.getFailureLinkedToNotification = function (evt) {
22945
- this.isServerLinkedToError = true;
22946
- };
22947
- ReadLinkedCasesComponent.prototype.getFailureLinkedFromNotification = function (evt) {
22948
- this.isServerLinkedFromError = true;
22949
- };
22950
- return ReadLinkedCasesComponent;
22951
- }());
22952
- 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)); };
22953
- 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) {
22954
- if (rf & 1) {
22955
- i0__namespace.ɵɵelementStart(0, "div");
22956
- i0__namespace.ɵɵelementStart(1, "div", 0);
22957
- i0__namespace.ɵɵelementStart(2, "h1", 1);
22958
- i0__namespace.ɵɵtext(3, "Linked cases");
22959
- i0__namespace.ɵɵelementEnd();
22960
- i0__namespace.ɵɵelementStart(4, "label", 2);
22961
- i0__namespace.ɵɵtext(5, "This case is linked to");
22962
- i0__namespace.ɵɵelementEnd();
22963
- i0__namespace.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
22964
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
22965
- i0__namespace.ɵɵelementEnd();
22966
- i0__namespace.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
22967
- i0__namespace.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
22968
- i0__namespace.ɵɵelementEnd();
22969
- i0__namespace.ɵɵelementStart(9, "div", 5);
22970
- i0__namespace.ɵɵelementStart(10, "label", 2);
22971
- i0__namespace.ɵɵtext(11, "This case is linked from");
22972
- i0__namespace.ɵɵelementEnd();
22973
- i0__namespace.ɵɵelement(12, "br");
22974
- i0__namespace.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
22975
- i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
22976
- i0__namespace.ɵɵelementEnd();
22977
- i0__namespace.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
22978
- i0__namespace.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
22979
- i0__namespace.ɵɵelementEnd();
22980
- i0__namespace.ɵɵelementEnd();
22981
- i0__namespace.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0__namespace.ɵɵtemplateRefExtractor);
22982
- i0__namespace.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0__namespace.ɵɵtemplateRefExtractor);
22983
- }
22984
- if (rf & 2) {
22985
- var _r4 = i0__namespace.ɵɵreference(17);
22986
- var _r6 = i0__namespace.ɵɵreference(19);
22987
- i0__namespace.ɵɵadvance(6);
22988
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
22989
- i0__namespace.ɵɵadvance(1);
22990
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
22991
- i0__namespace.ɵɵadvance(1);
22992
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
22993
- i0__namespace.ɵɵadvance(5);
22994
- i0__namespace.ɵɵproperty("caseField", ctx.caseField);
22995
- i0__namespace.ɵɵadvance(1);
22996
- i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
22997
- i0__namespace.ɵɵadvance(1);
22998
- i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
22999
- }
23000
- }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
23001
- (function () {
23002
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
23003
- type: i0.Component,
23004
- args: [{
23005
- selector: 'ccd-read-linked-cases',
23006
- templateUrl: './read-linked-cases.component.html',
23007
- styleUrls: ['./read-linked-cases.component.scss']
23008
- }]
23009
- }], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
23010
- type: i0.Input
23011
- }] });
23012
- })();
23013
-
23014
- var LinkCaseReason = /** @class */ (function () {
23015
- function LinkCaseReason() {
23016
- }
23017
- return LinkCaseReason;
23018
- }());
23019
- var CCDCaseLinkType = /** @class */ (function () {
23020
- function CCDCaseLinkType() {
23021
- }
23022
- return CCDCaseLinkType;
23023
- }());
23024
- var CaseLink = /** @class */ (function () {
23025
- function CaseLink() {
23026
- }
23027
- return CaseLink;
23028
- }());
23029
- var LinkReason = /** @class */ (function () {
23030
- function LinkReason() {
23031
- }
23032
- return LinkReason;
23033
- }());
23034
- var LinkedCasesResponse = /** @class */ (function () {
23035
- function LinkedCasesResponse() {
23036
- }
23037
- return LinkedCasesResponse;
23038
- }());
23039
- var CaseLinkResponse = /** @class */ (function () {
23040
- function CaseLinkResponse() {
23041
- }
23042
- return CaseLinkResponse;
23043
- }());
23044
- var LinkDetails = /** @class */ (function () {
23045
- function LinkDetails() {
23046
- }
23047
- return LinkDetails;
23048
- }());
23049
- var Terms = /** @class */ (function () {
23050
- function Terms() {
23051
- }
23052
- return Terms;
23053
- }());
23054
- var ESQueryType = /** @class */ (function () {
23055
- function ESQueryType() {
23056
- }
23057
- return ESQueryType;
23058
- }());
23059
-
23060
20456
  var CollectionCreateCheckerService = /** @class */ (function () {
23061
20457
  function CollectionCreateCheckerService() {
23062
20458
  }
@@ -25101,7 +22497,6 @@
25101
22497
  ReadComplexFieldTableComponent,
25102
22498
  ReadComplexFieldCollectionTableComponent,
25103
22499
  ReadCaseFlagFieldComponent,
25104
- ReadLinkedCasesComponent,
25105
22500
  // Write
25106
22501
  WriteJudicialUserFieldComponent,
25107
22502
  WriteAddressFieldComponent,
@@ -25137,15 +22532,7 @@
25137
22532
  CaseFileViewFolderSortComponent,
25138
22533
  CaseFileViewOverlayMenuComponent,
25139
22534
  CaseFileViewFolderDocumentActionsComponent,
25140
- CaseFileViewFolderSelectorComponent,
25141
- LinkedCasesToTableComponent,
25142
- LinkedCasesFromTableComponent,
25143
- BeforeYouStartComponent,
25144
- LinkCasesComponent,
25145
- CheckYourAnswersComponent,
25146
- WriteLinkedCasesComponent,
25147
- UnLinkCasesComponent,
25148
- NoLinkedCasesComponent
22535
+ CaseFileViewFolderSelectorComponent
25149
22536
  ];
25150
22537
  var PaletteModule = /** @class */ (function () {
25151
22538
  function PaletteModule() {
@@ -25164,7 +22551,6 @@
25164
22551
  FileUploadStateService,
25165
22552
  FileUploadProgressGuard,
25166
22553
  WindowService,
25167
- LinkedCasesService,
25168
22554
  CommonDataService,
25169
22555
  JurisdictionService,
25170
22556
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25196,7 +22582,7 @@
25196
22582
  i3.PaymentLibModule,
25197
22583
  i2$1.ScrollToModule.forRoot(),
25198
22584
  i1$3.MatDialogModule,
25199
- i12.MediaViewerModule,
22585
+ i11.MediaViewerModule,
25200
22586
  LoadingModule
25201
22587
  ], i4.NgxMatDatetimePickerModule,
25202
22588
  i4.NgxMatNativeDateModule,
@@ -25260,7 +22646,6 @@
25260
22646
  ReadComplexFieldTableComponent,
25261
22647
  ReadComplexFieldCollectionTableComponent,
25262
22648
  ReadCaseFlagFieldComponent,
25263
- ReadLinkedCasesComponent,
25264
22649
  // Write
25265
22650
  WriteJudicialUserFieldComponent,
25266
22651
  WriteAddressFieldComponent,
@@ -25296,15 +22681,7 @@
25296
22681
  CaseFileViewFolderSortComponent,
25297
22682
  CaseFileViewOverlayMenuComponent,
25298
22683
  CaseFileViewFolderDocumentActionsComponent,
25299
- CaseFileViewFolderSelectorComponent,
25300
- LinkedCasesToTableComponent,
25301
- LinkedCasesFromTableComponent,
25302
- BeforeYouStartComponent,
25303
- LinkCasesComponent,
25304
- CheckYourAnswersComponent,
25305
- WriteLinkedCasesComponent,
25306
- UnLinkCasesComponent,
25307
- NoLinkedCasesComponent], imports: [i1.CommonModule,
22684
+ CaseFileViewFolderSelectorComponent], imports: [i1.CommonModule,
25308
22685
  i1$1.RouterModule,
25309
22686
  i2.FormsModule,
25310
22687
  i2.ReactiveFormsModule,
@@ -25329,7 +22706,7 @@
25329
22706
  i7.CdkTreeModule,
25330
22707
  i1$4.OverlayModule,
25331
22708
  i3.PaymentLibModule, i2__namespace$1.ScrollToModule, i1$3.MatDialogModule,
25332
- i12.MediaViewerModule,
22709
+ i11.MediaViewerModule,
25333
22710
  LoadingModule], exports: [i4.NgxMatDatetimePickerModule,
25334
22711
  i4.NgxMatNativeDateModule,
25335
22712
  i4.NgxMatTimepickerModule,
@@ -25378,7 +22755,6 @@
25378
22755
  ReadComplexFieldTableComponent,
25379
22756
  ReadComplexFieldCollectionTableComponent,
25380
22757
  ReadCaseFlagFieldComponent,
25381
- ReadLinkedCasesComponent,
25382
22758
  // Write
25383
22759
  WriteJudicialUserFieldComponent,
25384
22760
  WriteAddressFieldComponent,
@@ -25414,15 +22790,7 @@
25414
22790
  CaseFileViewFolderSortComponent,
25415
22791
  CaseFileViewOverlayMenuComponent,
25416
22792
  CaseFileViewFolderDocumentActionsComponent,
25417
- CaseFileViewFolderSelectorComponent,
25418
- LinkedCasesToTableComponent,
25419
- LinkedCasesFromTableComponent,
25420
- BeforeYouStartComponent,
25421
- LinkCasesComponent,
25422
- CheckYourAnswersComponent,
25423
- WriteLinkedCasesComponent,
25424
- UnLinkCasesComponent,
25425
- NoLinkedCasesComponent] });
22793
+ CaseFileViewFolderSelectorComponent] });
25426
22794
  })();
25427
22795
  (function () {
25428
22796
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PaletteModule, [{
@@ -25456,7 +22824,7 @@
25456
22824
  i3.PaymentLibModule,
25457
22825
  i2$1.ScrollToModule.forRoot(),
25458
22826
  i1$3.MatDialogModule,
25459
- i12.MediaViewerModule,
22827
+ i11.MediaViewerModule,
25460
22828
  LoadingModule
25461
22829
  ],
25462
22830
  declarations: __spread([
@@ -25492,7 +22860,6 @@
25492
22860
  FileUploadStateService,
25493
22861
  FileUploadProgressGuard,
25494
22862
  WindowService,
25495
- LinkedCasesService,
25496
22863
  CommonDataService,
25497
22864
  JurisdictionService,
25498
22865
  { provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -25511,7 +22878,6 @@
25511
22878
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i1__namespace.NgForOf, ReadOrderSummaryRowComponent,
25512
22879
  ReadMoneyGbpFieldComponent], []);
25513
22880
  i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], []);
25514
- i0__namespace.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i1__namespace.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
25515
22881
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, ReadComplexFieldRawComponent,
25516
22882
  ReadComplexFieldCollectionTableComponent, i1__namespace.NgSwitchDefault, ReadComplexFieldTableComponent], []);
25517
22883
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i1__namespace.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe]);
@@ -25519,7 +22885,6 @@
25519
22885
  i0__namespace.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i1__namespace.NgForOf, i1__namespace.NgIf, FieldReadComponent,
25520
22886
  ReadCaseLinkFieldComponent], [ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i1__namespace.KeyValuePipe, IsCompoundPipe]);
25521
22887
  i0__namespace.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, CaseFlagSummaryListComponent, i1__namespace.NgSwitchDefault, i1__namespace.NgForOf, i1__namespace.NgIf, CaseFlagTableComponent], []);
25522
- i0__namespace.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i1__namespace.NgIf, LinkedCasesFromTableComponent], []);
25523
22888
  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]);
25524
22889
  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]);
25525
22890
  i0__namespace.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i1__namespace.NgClass, i1__namespace.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe]);
@@ -25534,21 +22899,11 @@
25534
22899
  WriteOrganisationComplexFieldComponent], [i1__namespace.AsyncPipe]);
25535
22900
  i0__namespace.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
25536
22901
  i0__namespace.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i1__namespace.NgIf, DatetimePickerComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, WriteDateFieldComponent], []);
25537
- i0__namespace.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, WriteLinkedCasesComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
25538
22902
  i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
25539
22903
  i0__namespace.ɵɵsetComponentScope(
25540
22904
  // ComponentLauncher web components
25541
- CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25542
- i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
25543
- i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25544
- i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25545
- 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]);
25546
- i0__namespace.ɵɵsetComponentScope(CheckYourAnswersComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
25547
- i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
25548
- NoLinkedCasesComponent,
25549
- LinkCasesComponent,
25550
- UnLinkCasesComponent,
25551
- CheckYourAnswersComponent], []);
22905
+ CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
22906
+ i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
25552
22907
 
25553
22908
  var Confirmation = /** @class */ (function () {
25554
22909
  function Confirmation(caseId, status, header, body) {
@@ -35246,10 +32601,8 @@
35246
32601
  exports.AuthService = AuthService;
35247
32602
  exports.Banner = Banner;
35248
32603
  exports.BannersService = BannersService;
35249
- exports.BeforeYouStartComponent = BeforeYouStartComponent;
35250
32604
  exports.BodyComponent = BodyComponent;
35251
32605
  exports.BrowserService = BrowserService;
35252
- exports.CCDCaseLinkType = CCDCaseLinkType;
35253
32606
  exports.CallbackErrorsComponent = CallbackErrorsComponent;
35254
32607
  exports.CallbackErrorsContext = CallbackErrorsContext;
35255
32608
  exports.CaseAccessUtils = CaseAccessUtils;
@@ -35289,8 +32642,6 @@
35289
32642
  exports.CaseHeaderComponent = CaseHeaderComponent;
35290
32643
  exports.CaseHeaderModule = CaseHeaderModule;
35291
32644
  exports.CaseHistoryViewerFieldComponent = CaseHistoryViewerFieldComponent;
35292
- exports.CaseLink = CaseLink;
35293
- exports.CaseLinkResponse = CaseLinkResponse;
35294
32645
  exports.CaseListComponent = CaseListComponent;
35295
32646
  exports.CaseListFiltersComponent = CaseListFiltersComponent;
35296
32647
  exports.CaseListFiltersModule = CaseListFiltersModule;
@@ -35323,7 +32674,6 @@
35323
32674
  exports.CcdCollectionTableCaseFieldsFilterPipe = CcdCollectionTableCaseFieldsFilterPipe;
35324
32675
  exports.CcdPageFieldsPipe = CcdPageFieldsPipe;
35325
32676
  exports.CcdTabFieldsPipe = CcdTabFieldsPipe;
35326
- exports.CheckYourAnswersComponent = CheckYourAnswersComponent;
35327
32677
  exports.ConditionalShowFormDirective = ConditionalShowFormDirective;
35328
32678
  exports.ConditionalShowModule = ConditionalShowModule;
35329
32679
  exports.ConditionalShowRegistrarService = ConditionalShowRegistrarService;
@@ -35353,7 +32703,6 @@
35353
32703
  exports.DraftService = DraftService;
35354
32704
  exports.DynamicListPipe = DynamicListPipe;
35355
32705
  exports.DynamicRadioListPipe = DynamicRadioListPipe;
35356
- exports.ESQueryType = ESQueryType;
35357
32706
  exports.Embedded = Embedded;
35358
32707
  exports.ErrorMessageComponent = ErrorMessageComponent;
35359
32708
  exports.ErrorNotifierService = ErrorNotifierService;
@@ -35411,14 +32760,6 @@
35411
32760
  exports.LabelFieldComponent = LabelFieldComponent;
35412
32761
  exports.LabelSubstitutorDirective = LabelSubstitutorDirective;
35413
32762
  exports.LabelSubstitutorModule = LabelSubstitutorModule;
35414
- exports.LinkCaseReason = LinkCaseReason;
35415
- exports.LinkCasesComponent = LinkCasesComponent;
35416
- exports.LinkCasesReasonValuePipe = LinkCasesReasonValuePipe;
35417
- exports.LinkDetails = LinkDetails;
35418
- exports.LinkReason = LinkReason;
35419
- exports.LinkedCasesFromTableComponent = LinkedCasesFromTableComponent;
35420
- exports.LinkedCasesResponse = LinkedCasesResponse;
35421
- exports.LinkedCasesToTableComponent = LinkedCasesToTableComponent;
35422
32763
  exports.LoadingModule = LoadingModule;
35423
32764
  exports.LoadingService = LoadingService;
35424
32765
  exports.LoadingSpinnerComponent = LoadingSpinnerComponent;
@@ -35432,7 +32773,6 @@
35432
32773
  exports.NavigationComponent = NavigationComponent;
35433
32774
  exports.NavigationItemComponent = NavigationItemComponent;
35434
32775
  exports.NavigationNotifierService = NavigationNotifierService;
35435
- exports.NoLinkedCasesComponent = NoLinkedCasesComponent;
35436
32776
  exports.NoTasksAvailableComponent = NoTasksAvailableComponent;
35437
32777
  exports.NotificationBannerComponent = NotificationBannerComponent;
35438
32778
  exports.OrderService = OrderService;
@@ -35469,7 +32809,6 @@
35469
32809
  exports.ReadFixedListFieldComponent = ReadFixedListFieldComponent;
35470
32810
  exports.ReadFixedRadioListFieldComponent = ReadFixedRadioListFieldComponent;
35471
32811
  exports.ReadJudicialUserFieldComponent = ReadJudicialUserFieldComponent;
35472
- exports.ReadLinkedCasesComponent = ReadLinkedCasesComponent;
35473
32812
  exports.ReadMoneyGbpFieldComponent = ReadMoneyGbpFieldComponent;
35474
32813
  exports.ReadMultiSelectListFieldComponent = ReadMultiSelectListFieldComponent;
35475
32814
  exports.ReadNumberFieldComponent = ReadNumberFieldComponent;
@@ -35513,9 +32852,7 @@
35513
32852
  exports.TaskCancelledComponent = TaskCancelledComponent;
35514
32853
  exports.TaskConflictComponent = TaskConflictComponent;
35515
32854
  exports.TaskUnassignedComponent = TaskUnassignedComponent;
35516
- exports.Terms = Terms;
35517
32855
  exports.TestRouteSnapshotBuilder = TestRouteSnapshotBuilder;
35518
- exports.UnLinkCasesComponent = UnLinkCasesComponent;
35519
32856
  exports.UnsupportedFieldComponent = UnsupportedFieldComponent;
35520
32857
  exports.UpdateFlagComponent = UpdateFlagComponent;
35521
32858
  exports.WaysToPayFieldComponent = WaysToPayFieldComponent;
@@ -35544,7 +32881,6 @@
35544
32881
  exports.WriteFixedListFieldComponent = WriteFixedListFieldComponent;
35545
32882
  exports.WriteFixedRadioListFieldComponent = WriteFixedRadioListFieldComponent;
35546
32883
  exports.WriteJudicialUserFieldComponent = WriteJudicialUserFieldComponent;
35547
- exports.WriteLinkedCasesComponent = WriteLinkedCasesComponent;
35548
32884
  exports.WriteMoneyGbpFieldComponent = WriteMoneyGbpFieldComponent;
35549
32885
  exports.WriteMultiSelectListFieldComponent = WriteMultiSelectListFieldComponent;
35550
32886
  exports.WriteNumberFieldComponent = WriteNumberFieldComponent;