@hmcts/ccd-case-ui-toolkit 5.0.44-angular11-welsh-release-part1-5 → 5.0.44-angular11-welsh-release-part1-7

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 (131) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +324 -2914
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +1 -9
  6. package/esm2015/lib/shared/components/case-editor/case-access-utils/index.js +10 -1
  7. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +7 -17
  8. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +5 -52
  9. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -10
  10. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +2 -2
  11. package/esm2015/lib/shared/components/palette/base-field/abstract-form-field.component.js +2 -4
  12. package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.js +4 -4
  13. package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +4 -4
  14. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.js +3 -4
  15. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +26 -25
  16. package/esm2015/lib/shared/components/palette/case-link/index.js +1 -4
  17. package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +8 -28
  18. package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +68 -77
  19. package/esm2015/lib/shared/components/palette/palette.module.js +20 -66
  20. package/esm2015/lib/shared/components/palette/palette.service.js +4 -10
  21. package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +1 -10
  22. package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
  23. package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
  24. package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
  25. package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +1 -5
  26. package/esm2015/lib/shared/pipes/index.js +1 -2
  27. package/esm2015/lib/shared/pipes/pipes.module.js +4 -8
  28. package/esm2015/lib/shared/services/fields/fields.utils.js +2 -8
  29. package/esm2015/lib/shared/services/form/form-value.service.js +10 -9
  30. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +258 -2617
  31. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  32. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +0 -5
  33. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
  34. package/lib/shared/components/case-editor/case-access-utils/index.d.ts +3 -0
  35. package/lib/shared/components/case-editor/case-access-utils/index.d.ts.map +1 -1
  36. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +0 -2
  37. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  38. package/lib/shared/components/case-editor/services/cases.service.d.ts +0 -9
  39. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  40. package/lib/shared/components/case-editor/services/page-validation.service.d.ts +0 -1
  41. package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
  42. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  43. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
  44. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.d.ts.map +1 -1
  45. package/lib/shared/components/palette/case-link/index.d.ts +0 -3
  46. package/lib/shared/components/palette/case-link/index.d.ts.map +1 -1
  47. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts +0 -3
  48. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
  49. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +4 -13
  50. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
  51. package/lib/shared/components/palette/palette.module.d.ts +59 -68
  52. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  53. package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
  54. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +0 -1
  55. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
  56. package/lib/shared/domain/case-view/role-request.model.d.ts +1 -1
  57. package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
  58. package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
  59. package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
  60. package/lib/shared/domain/user/user-info.model.d.ts +2 -0
  61. package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
  62. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  63. package/lib/shared/pipes/index.d.ts +0 -1
  64. package/lib/shared/pipes/index.d.ts.map +1 -1
  65. package/lib/shared/pipes/pipes.module.d.ts +2 -3
  66. package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
  67. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  68. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  69. package/lib/shared/services/form/form-value.service.d.ts +0 -3
  70. package/lib/shared/services/form/form-value.service.d.ts.map +1 -1
  71. package/package.json +1 -1
  72. package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +0 -125
  73. package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +0 -198
  74. package/esm2015/lib/shared/components/palette/case-link/components/index.js +0 -10
  75. package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +0 -497
  76. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +0 -221
  77. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +0 -286
  78. package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +0 -76
  79. package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +0 -178
  80. package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +0 -216
  81. package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +0 -265
  82. package/esm2015/lib/shared/components/palette/case-link/domain/index.js +0 -3
  83. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +0 -2
  84. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +0 -19
  85. package/esm2015/lib/shared/components/palette/case-link/enums/index.js +0 -2
  86. package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +0 -33
  87. package/esm2015/lib/shared/components/palette/case-link/services/index.js +0 -2
  88. package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +0 -134
  89. package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +0 -27
  90. package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +0 -23
  91. package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +0 -2
  92. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts +0 -19
  93. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +0 -1
  94. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +0 -18
  95. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +0 -1
  96. package/lib/shared/components/palette/case-link/components/index.d.ts +0 -10
  97. package/lib/shared/components/palette/case-link/components/index.d.ts.map +0 -1
  98. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +0 -45
  99. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +0 -1
  100. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +0 -42
  101. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +0 -1
  102. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +0 -45
  103. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +0 -1
  104. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +0 -12
  105. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +0 -1
  106. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +0 -37
  107. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +0 -1
  108. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +0 -38
  109. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +0 -1
  110. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +0 -45
  111. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +0 -1
  112. package/lib/shared/components/palette/case-link/domain/index.d.ts +0 -3
  113. package/lib/shared/components/palette/case-link/domain/index.d.ts.map +0 -1
  114. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +0 -12
  115. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +0 -1
  116. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +0 -65
  117. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +0 -1
  118. package/lib/shared/components/palette/case-link/enums/index.d.ts +0 -2
  119. package/lib/shared/components/palette/case-link/enums/index.d.ts.map +0 -1
  120. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +0 -29
  121. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +0 -1
  122. package/lib/shared/components/palette/case-link/services/index.d.ts +0 -2
  123. package/lib/shared/components/palette/case-link/services/index.d.ts.map +0 -1
  124. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +0 -50
  125. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +0 -1
  126. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +0 -10
  127. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +0 -1
  128. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +0 -11
  129. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +0 -1
  130. package/lib/shared/pipes/link-cases-reason-code/index.d.ts +0 -2
  131. package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +0 -1
@@ -9,7 +9,7 @@ import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
9
9
  import * as i2$1 from '@angular/forms';
10
10
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
11
11
  import polling from 'rx-polling';
12
- import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, forkJoin, fromEvent } from 'rxjs';
12
+ import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, fromEvent } from 'rxjs';
13
13
  import * as i1$2 from '@angular/common/http';
14
14
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
15
15
  import { catchError, map, publish, refCount, debounceTime, delay, distinctUntilChanged, finalize, publishReplay, take, tap, first, switchMap, takeUntil, filter } from 'rxjs/operators';
@@ -39,7 +39,7 @@ import * as i3$1 from '@angular/material/input';
39
39
  import { MatInputModule } from '@angular/material/input';
40
40
  import * as i3 from '@hmcts/ccpay-web-component';
41
41
  import { PaymentLibModule } from '@hmcts/ccpay-web-component';
42
- import * as i13 from '@hmcts/media-viewer';
42
+ import * as i12 from '@hmcts/media-viewer';
43
43
  import { MediaViewerModule } from '@hmcts/media-viewer';
44
44
  import * as i2$2 from '@nicky-lenaers/ngx-scroll-to';
45
45
  import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
@@ -141,13 +141,13 @@ function FooterComponent_div_3_Template(rf, ctx) { if (rf & 1) {
141
141
  i0.ɵɵadvance(4);
142
142
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 13, ctx_r1.workhours));
143
143
  } }
144
- const _c0$_ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
144
+ const _c0$Y = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
145
145
  const _c1$r = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
146
146
  class FooterComponent {
147
147
  }
148
148
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
149
149
  FooterComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
150
- i0.ɵɵprojectionDef(_c0$_);
150
+ i0.ɵɵprojectionDef(_c0$Y);
151
151
  i0.ɵɵelementStart(0, "footer", 0);
152
152
  i0.ɵɵelementStart(1, "div", 1);
153
153
  i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2);
@@ -220,7 +220,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) { if (rf & 1) {
220
220
  i0.ɵɵadvance(3);
221
221
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, ctx_r2.title));
222
222
  } }
223
- const _c0$Z = [[["", "headerNavigation", ""]]];
223
+ const _c0$X = [[["", "headerNavigation", ""]]];
224
224
  const _c1$q = ["[headerNavigation]"];
225
225
  class HeaderBarComponent {
226
226
  constructor() {
@@ -232,7 +232,7 @@ class HeaderBarComponent {
232
232
  }
233
233
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
234
234
  HeaderBarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$q, decls: 17, vars: 14, 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) { if (rf & 1) {
235
- i0.ɵɵprojectionDef(_c0$Z);
235
+ i0.ɵɵprojectionDef(_c0$X);
236
236
  i0.ɵɵelementStart(0, "header", 0);
237
237
  i0.ɵɵelementStart(1, "div", 1);
238
238
  i0.ɵɵelementStart(2, "div", 2);
@@ -295,13 +295,13 @@ HeaderBarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderBarComponent, se
295
295
  type: Output
296
296
  }] }); })();
297
297
 
298
- const _c0$Y = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
298
+ const _c0$W = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
299
299
  const _c1$p = ["[leftNavLinks]", "[rightNavLinks]"];
300
300
  class NavigationComponent {
301
301
  }
302
302
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
303
303
  NavigationComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
304
- i0.ɵɵprojectionDef(_c0$Y);
304
+ i0.ɵɵprojectionDef(_c0$W);
305
305
  i0.ɵɵelementStart(0, "div");
306
306
  i0.ɵɵelementStart(1, "nav", 0);
307
307
  i0.ɵɵprojection(2);
@@ -429,13 +429,13 @@ HeadersModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[CommonModule, RouterMod
429
429
  }]
430
430
  }], null, null); })();
431
431
 
432
- const _c0$X = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
432
+ const _c0$V = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
433
433
  const _c1$o = ["[topBody]", "[leftBody]", "[rightBody]"];
434
434
  class BodyComponent {
435
435
  }
436
436
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
437
437
  BodyComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$o, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
438
- i0.ɵɵprojectionDef(_c0$X);
438
+ i0.ɵɵprojectionDef(_c0$V);
439
439
  i0.ɵɵelementStart(0, "div", 0);
440
440
  i0.ɵɵprojection(1);
441
441
  i0.ɵɵprojection(2, 1);
@@ -452,7 +452,7 @@ BodyComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [
452
452
  }]
453
453
  }], null, null); })();
454
454
 
455
- const _c0$W = function (a0) { return { "govuk-input--error": a0 }; };
455
+ const _c0$U = function (a0) { return { "govuk-input--error": a0 }; };
456
456
  function DateInputComponent_div_19_Template(rf, ctx) { if (rf & 1) {
457
457
  const _r8 = i0.ɵɵgetCurrentView();
458
458
  i0.ɵɵelementStart(0, "div", 12);
@@ -471,7 +471,7 @@ function DateInputComponent_div_19_Template(rf, ctx) { if (rf & 1) {
471
471
  i0.ɵɵadvance(1);
472
472
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "Hour"));
473
473
  i0.ɵɵadvance(2);
474
- i0.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0.ɵɵpureFunction1(8, _c0$W, ctx_r3.isInvalid));
474
+ i0.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0.ɵɵpureFunction1(8, _c0$U, ctx_r3.isInvalid));
475
475
  } }
476
476
  function DateInputComponent_div_20_Template(rf, ctx) { if (rf & 1) {
477
477
  const _r13 = i0.ɵɵgetCurrentView();
@@ -491,7 +491,7 @@ function DateInputComponent_div_20_Template(rf, ctx) { if (rf & 1) {
491
491
  i0.ɵɵadvance(1);
492
492
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "Minute"));
493
493
  i0.ɵɵadvance(2);
494
- i0.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0.ɵɵpureFunction1(8, _c0$W, ctx_r4.isInvalid));
494
+ i0.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0.ɵɵpureFunction1(8, _c0$U, ctx_r4.isInvalid));
495
495
  } }
496
496
  function DateInputComponent_div_21_Template(rf, ctx) { if (rf & 1) {
497
497
  const _r18 = i0.ɵɵgetCurrentView();
@@ -511,7 +511,7 @@ function DateInputComponent_div_21_Template(rf, ctx) { if (rf & 1) {
511
511
  i0.ɵɵadvance(1);
512
512
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "Second"));
513
513
  i0.ɵɵadvance(2);
514
- i0.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0.ɵɵpureFunction1(8, _c0$W, ctx_r5.isInvalid));
514
+ i0.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0.ɵɵpureFunction1(8, _c0$U, ctx_r5.isInvalid));
515
515
  } }
516
516
  class DateInputComponent {
517
517
  constructor() {
@@ -745,19 +745,19 @@ DateInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DateInputComponent, se
745
745
  i0.ɵɵadvance(1);
746
746
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 21, "Day"));
747
747
  i0.ɵɵadvance(2);
748
- i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(27, _c0$W, ctx.isInvalid));
748
+ i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(27, _c0$U, ctx.isInvalid));
749
749
  i0.ɵɵadvance(3);
750
750
  i0.ɵɵproperty("for", ctx.monthId());
751
751
  i0.ɵɵadvance(1);
752
752
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 23, "Month"));
753
753
  i0.ɵɵadvance(2);
754
- i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(29, _c0$W, ctx.isInvalid));
754
+ i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(29, _c0$U, ctx.isInvalid));
755
755
  i0.ɵɵadvance(3);
756
756
  i0.ɵɵproperty("for", ctx.yearId());
757
757
  i0.ɵɵadvance(1);
758
758
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 25, "Year"));
759
759
  i0.ɵɵadvance(2);
760
- i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(31, _c0$W, ctx.isInvalid));
760
+ i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(31, _c0$U, ctx.isInvalid));
761
761
  i0.ɵɵadvance(2);
762
762
  i0.ɵɵproperty("ngIf", ctx.isDateTime);
763
763
  i0.ɵɵadvance(1);
@@ -827,7 +827,7 @@ function AlertComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
827
827
  i0.ɵɵelementEnd();
828
828
  i0.ɵɵelementContainerEnd();
829
829
  } }
830
- const _c0$V = ["*"];
830
+ const _c0$T = ["*"];
831
831
  var AlertMessageType;
832
832
  (function (AlertMessageType) {
833
833
  AlertMessageType["WARNING"] = "warning";
@@ -847,7 +847,7 @@ AlertComponent.TYPE_SUCCESS = 'success';
847
847
  AlertComponent.TYPE_ERROR = 'error';
848
848
  AlertComponent.TYPE_INFORMATION = 'information';
849
849
  AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
850
- AlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$V, decls: 11, vars: 12, 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) { if (rf & 1) {
850
+ AlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$T, decls: 11, vars: 12, 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) { if (rf & 1) {
851
851
  i0.ɵɵprojectionDef();
852
852
  i0.ɵɵelementStart(0, "div", 0);
853
853
  i0.ɵɵelementContainerStart(1, 1);
@@ -1085,7 +1085,7 @@ NotificationBannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NotificationB
1085
1085
  type: Output
1086
1086
  }] }); })();
1087
1087
 
1088
- const _c0$U = function (a0) { return { "js-hidden": a0 }; };
1088
+ const _c0$S = function (a0) { return { "js-hidden": a0 }; };
1089
1089
  const _c1$n = ["*"];
1090
1090
  class TabComponent {
1091
1091
  }
@@ -1096,7 +1096,7 @@ TabComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["
1096
1096
  i0.ɵɵprojection(1);
1097
1097
  i0.ɵɵelementEnd();
1098
1098
  } if (rf & 2) {
1099
- i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c0$U, !ctx.selected));
1099
+ i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c0$S, !ctx.selected));
1100
1100
  i0.ɵɵattribute("aria-hidden", !ctx.selected);
1101
1101
  } }, directives: [i2.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}}"] });
1102
1102
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TabComponent, [{
@@ -1116,7 +1116,7 @@ TabComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["
1116
1116
  type: Input
1117
1117
  }] }); })();
1118
1118
 
1119
- const _c0$T = ["tab"];
1119
+ const _c0$R = ["tab"];
1120
1120
  const _c1$m = function () { return ["."]; };
1121
1121
  const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1122
1122
  function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
@@ -1163,7 +1163,7 @@ TabsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabsComponent, selectors: [
1163
1163
  let _t;
1164
1164
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.panels = _t);
1165
1165
  } }, viewQuery: function TabsComponent_Query(rf, ctx) { if (rf & 1) {
1166
- i0.ɵɵviewQuery(_c0$T, 1);
1166
+ i0.ɵɵviewQuery(_c0$R, 1);
1167
1167
  } if (rf & 2) {
1168
1168
  let _t;
1169
1169
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabs = _t);
@@ -1230,7 +1230,7 @@ TabsModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
1230
1230
  }]
1231
1231
  }], null, null); })();
1232
1232
 
1233
- const _c0$S = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1233
+ const _c0$Q = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1234
1234
  class ActivityBannerComponent {
1235
1235
  constructor() { }
1236
1236
  ngOnInit() {
@@ -1249,7 +1249,7 @@ ActivityBannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ActivityBannerCom
1249
1249
  i0.ɵɵelementEnd();
1250
1250
  i0.ɵɵelementEnd();
1251
1251
  } if (rf & 2) {
1252
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(8, _c0$S, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1252
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(8, _c0$Q, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1253
1253
  i0.ɵɵadvance(2);
1254
1254
  i0.ɵɵpropertyInterpolate("alt", i0.ɵɵpipeBind1(3, 4, ctx.description));
1255
1255
  i0.ɵɵpropertyInterpolate("src", ctx.imageLink, i0.ɵɵsanitizeUrl);
@@ -2698,14 +2698,6 @@ class IsCompoundPipe {
2698
2698
  if (!field || !field.field_type || !field.field_type.type) {
2699
2699
  return false;
2700
2700
  }
2701
- // Case link tab spacing alignment fix
2702
- // This Pipe needs to be re-visited
2703
- // to make it more generic to support and fix alignments issues for multiple tabs
2704
- if (field.field_type.collection_field_type &&
2705
- field.field_type.collection_field_type.id &&
2706
- field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
2707
- return true;
2708
- }
2709
2701
  if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
2710
2702
  if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
2711
2703
  return false;
@@ -2715,7 +2707,6 @@ class IsCompoundPipe {
2715
2707
  return false;
2716
2708
  }
2717
2709
  }
2718
- IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
2719
2710
  IsCompoundPipe.COMPOUND_TYPES = [
2720
2711
  'Complex',
2721
2712
  'Label',
@@ -3416,12 +3407,6 @@ class FieldsUtils {
3416
3407
  static isCollectionWithValue(pageFormFields) {
3417
3408
  return pageFormFields[0]['value'] !== undefined;
3418
3409
  }
3419
- static isLinkedCasesCaseField(caseField) {
3420
- if (!caseField) {
3421
- return false;
3422
- }
3423
- return caseField.field_type.collection_field_type.id === 'CaseLink';
3424
- }
3425
3410
  static cloneObject(obj) {
3426
3411
  return Object.assign({}, obj);
3427
3412
  }
@@ -3620,7 +3605,7 @@ class FieldsUtils {
3620
3605
  // If the Flags CaseField has a value, it is a root-level Complex field; if it does not, it is a Flags
3621
3606
  // CaseField that is a sub-field within another Complex field, so use the currentValue value (if any)
3622
3607
  // instead. The exception to this is the "caseFlags" Flags CaseField, which will have an empty object value
3623
- // initially or could be null or undefined, because no party name is required
3608
+ // initially, because no party name is required
3624
3609
  if (caseField.value && FieldsUtils.isNonEmptyObject(caseField.value) ||
3625
3610
  caseField.id === this.caseLevelCaseFlagsFieldId) {
3626
3611
  flags.push(this.mapCaseFieldToFlagsWithFormGroupPathObject(caseField, pathToFlagsFormGroup));
@@ -4323,9 +4308,7 @@ class AbstractFormFieldComponent {
4323
4308
  }
4324
4309
  addControlToFormGroup(control, parent, replace) {
4325
4310
  if (replace) {
4326
- if (this.caseField.field_type && this.caseField.field_type.collection_field_type
4327
- && this.caseField.field_type.collection_field_type.id === 'CaseLink'
4328
- && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4311
+ if (this.caseField.field_type && this.caseField.field_type.id === 'CaseLink' && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4329
4312
  parent.setControl('CaseReference', control['controls']['CaseReference']);
4330
4313
  }
4331
4314
  else {
@@ -5374,9 +5357,6 @@ class FormValueService {
5374
5357
  // Clear out any MultiSelect labels.
5375
5358
  FormValueService.removeMultiSelectLabels(data);
5376
5359
  }
5377
- /**
5378
- * Remove any empty or invalid array with only id
5379
- */
5380
5360
  removeInvalidCollectionData(data, field) {
5381
5361
  if (data[field.id] && data[field.id].length > 0) {
5382
5362
  for (const objCollection of data[field.id]) {
@@ -5435,13 +5415,17 @@ class FormValueService {
5435
5415
  // nothing for a given case field ID (hence the use of hasOwnProperty())
5436
5416
  if (data.hasOwnProperty(caseField.id) && caseField.value) {
5437
5417
  // Create new object for the case field ID within the data object, if necessary
5438
- if (!data[caseField.id]) {
5439
- data[caseField.id] = {};
5418
+ if (data[caseField.id]) {
5419
+ // Copy all values from the corresponding CaseField; this ensures all nested flag data (for example, a
5420
+ // Flags field within a Complex field or a collection of Complex fields) is copied across
5421
+ Object.keys(data[caseField.id]).forEach(key => {
5422
+ if (caseField.value.hasOwnProperty(key)) {
5423
+ data[caseField.id][key] = caseField.value[key];
5424
+ }
5425
+ });
5440
5426
  }
5441
- // Copy all values from the corresponding CaseField; this ensures all nested flag data (for example, a
5442
- // Flags field within a Complex field or a collection of Complex fields) is copied across
5443
- Object.keys(caseField.value).forEach(key => data[caseField.id][key] = caseField.value[key]);
5444
5427
  }
5428
+ ;
5445
5429
  });
5446
5430
  }
5447
5431
  }
@@ -6857,6 +6841,9 @@ class CaseAccessUtils {
6857
6841
  else if (this.roleOrCategoryExists(CaseAccessUtils.ADMIN_ROLE, CaseAccessUtils.ADMIN_ROLE_CATEGORY, roleKeywords, roleCategories)) {
6858
6842
  return CaseAccessUtils.ADMIN_ROLE_CATEGORY;
6859
6843
  }
6844
+ else if (this.roleOrCategoryExists(CaseAccessUtils.CTSC_ROLE, CaseAccessUtils.CTSC_ROLE_CATEGORY, roleKeywords, roleCategories)) {
6845
+ return CaseAccessUtils.CTSC_ROLE_CATEGORY;
6846
+ }
6860
6847
  else {
6861
6848
  return CaseAccessUtils.LEGAL_OPERATIONS_ROLE_CATEGORY;
6862
6849
  }
@@ -6881,6 +6868,9 @@ class CaseAccessUtils {
6881
6868
  case CaseAccessUtils.ADMIN_ROLE_CATEGORY:
6882
6869
  roleName = `${accessType}-access-${CaseAccessUtils.ADMIN_ROLE_NAME}`;
6883
6870
  break;
6871
+ case CaseAccessUtils.CTSC_ROLE_CATEGORY:
6872
+ roleName = `${accessType}-access-${CaseAccessUtils.CTSC_ROLE_NAME}`;
6873
+ break;
6884
6874
  default:
6885
6875
  roleName = `${accessType}-access-${CaseAccessUtils.LEGAL_OPERATIONS_ROLE_NAME}`;
6886
6876
  break;
@@ -6937,6 +6927,9 @@ CaseAccessUtils.LEGAL_OPERATIONS_ROLE_NAME = 'legal-ops';
6937
6927
  CaseAccessUtils.CITIZEN_ROLE = 'citizen';
6938
6928
  CaseAccessUtils.CITIZEN_ROLE_CATEGORY = 'CITIZEN';
6939
6929
  CaseAccessUtils.CITIZEN_ROLE_NAME = 'citizen';
6930
+ CaseAccessUtils.CTSC_ROLE = 'ctsc';
6931
+ CaseAccessUtils.CTSC_ROLE_CATEGORY = 'CTSC';
6932
+ CaseAccessUtils.CTSC_ROLE_NAME = 'ctsc';
6940
6933
 
6941
6934
  class WizardPageFieldToCaseFieldMapper {
6942
6935
  mapAll(wizardPageFields, caseFields) {
@@ -7303,33 +7296,6 @@ class CasesService {
7303
7296
  return throwError(error);
7304
7297
  }), finalize(() => this.loadingService.unregister(loadingToken)));
7305
7298
  }
7306
- /**
7307
- * TODO: Gets case link responses
7308
- * @returns case link responses
7309
- */
7310
- getCaseLinkResponses() {
7311
- const headers = new HttpHeaders()
7312
- .set('experimental', 'true')
7313
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
7314
- .set('Content-Type', 'application/json');
7315
- const loadingToken = this.loadingService.register();
7316
- return this.http
7317
- .get('assets/getCaseReasons.json', { headers, observe: 'body' })
7318
- .pipe(map((reasons) => {
7319
- return reasons.sort((reasonA, reasonB) => reasonA.value_en > reasonB.value_en ? 1 : -1);
7320
- }), catchError(error => {
7321
- this.errorService.setError(error);
7322
- return throwError(error);
7323
- }), finalize(() => this.loadingService.unregister(loadingToken)));
7324
- }
7325
- getLinkedCases(caseId) {
7326
- const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
7327
- return this.http
7328
- .get(url)
7329
- .pipe(catchError(error => {
7330
- return throwError(error);
7331
- }));
7332
- }
7333
7299
  getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
7334
7300
  ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
7335
7301
  const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
@@ -7363,7 +7329,7 @@ class CasesService {
7363
7329
  .set('Content-Type', 'application/json');
7364
7330
  return this.http
7365
7331
  .post(url, eventData, { headers, observe: 'body' })
7366
- .pipe(map(body => this.processResponseBody(body, eventData)), catchError(error => {
7332
+ .pipe(catchError(error => {
7367
7333
  this.errorService.setError(error);
7368
7334
  return throwError(error);
7369
7335
  }));
@@ -7396,7 +7362,7 @@ class CasesService {
7396
7362
  .set('Content-Type', 'application/json');
7397
7363
  return this.http
7398
7364
  .post(url, eventData, { headers, observe: 'body' })
7399
- .pipe(map(body => this.processResponseBody(body, eventData)), catchError(error => {
7365
+ .pipe(catchError(error => {
7400
7366
  this.errorService.setError(error);
7401
7367
  return throwError(error);
7402
7368
  }));
@@ -7435,10 +7401,6 @@ class CasesService {
7435
7401
  }
7436
7402
  return url;
7437
7403
  }
7438
- processResponseBody(body, eventData) {
7439
- this.processTasksOnSuccess(body, eventData.event);
7440
- return body;
7441
- }
7442
7404
  initialiseEventTrigger(eventTrigger) {
7443
7405
  if (!eventTrigger.wizard_pages) {
7444
7406
  eventTrigger.wizard_pages = [];
@@ -7448,22 +7410,6 @@ class CasesService {
7448
7410
  wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
7449
7411
  });
7450
7412
  }
7451
- processTasksOnSuccess(caseData, eventData) {
7452
- // The following code is work allocation 1 related
7453
- if (this.appConfig.getWorkAllocationApiUrl().toLowerCase() === 'workallocation') {
7454
- // This is used a feature toggle to
7455
- // control the work allocation
7456
- if (!this.isPuiCaseManager()) {
7457
- this.workAllocationService.completeAppropriateTask(caseData.id, eventData.id, caseData.jurisdiction, caseData.case_type)
7458
- .subscribe(() => {
7459
- // Success. Do nothing.
7460
- }, error => {
7461
- // Show an appropriate warning about something that went wrong.
7462
- console.warn('Could not process tasks for this case event', error);
7463
- });
7464
- }
7465
- }
7466
- }
7467
7413
  /*
7468
7414
  Checks if the user has role of pui-case-manager and returns true or false
7469
7415
  */
@@ -7486,7 +7432,7 @@ class CasesService {
7486
7432
  if (userInfoStr) {
7487
7433
  userInfo = JSON.parse(userInfoStr);
7488
7434
  }
7489
- const roleCategory = camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
7435
+ const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
7490
7436
  const roleName = camUtils.getAMRoleName('challenged', roleCategory);
7491
7437
  const beginTime = new Date();
7492
7438
  const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
@@ -7503,7 +7449,7 @@ class CasesService {
7503
7449
  if (userInfoStr) {
7504
7450
  userInfo = JSON.parse(userInfoStr);
7505
7451
  }
7506
- const roleCategory = camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
7452
+ const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
7507
7453
  const roleName = camUtils.getAMRoleName('specific', roleCategory);
7508
7454
  const id = userInfo.id ? userInfo.id : userInfo.uid;
7509
7455
  const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
@@ -8098,8 +8044,7 @@ class PageValidationService {
8098
8044
  .filter(caseField => !this.isHidden(caseField, editForm))
8099
8045
  .every(caseField => {
8100
8046
  const theControl = editForm.controls['data'].get(caseField.id);
8101
- return this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl) &&
8102
- this.checkCaseLinksCollectionField(caseField, theControl);
8047
+ return this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl);
8103
8048
  });
8104
8049
  }
8105
8050
  isHidden(caseField, editForm, path) {
@@ -8127,13 +8072,6 @@ class PageValidationService {
8127
8072
  checkMandatoryField(caseField, theControl) {
8128
8073
  return this.caseFieldService.isMandatory(caseField) && theControl === null;
8129
8074
  }
8130
- checkCaseLinksCollectionField(caseField, theControl) {
8131
- if (caseField && caseField.id === 'caseLinks') {
8132
- return theControl && theControl.value && Array.isArray(theControl.value) &&
8133
- theControl.value.length ? true : false;
8134
- }
8135
- return true;
8136
- }
8137
8075
  }
8138
8076
  PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0.ɵɵinject(CaseFieldService)); };
8139
8077
  PageValidationService.ɵprov = i0.ɵɵdefineInjectable({ token: PageValidationService, factory: PageValidationService.ɵfac });
@@ -8516,12 +8454,10 @@ class CaseEditDataService {
8516
8454
  constructor() {
8517
8455
  this.title$ = new BehaviorSubject(null);
8518
8456
  this.formValidationErrors$ = new BehaviorSubject([]);
8519
- this.linkError$ = new BehaviorSubject(null);
8520
8457
  this.eventTriggerName$ = new BehaviorSubject(null);
8521
8458
  this.triggerSubmitEvent$ = new BehaviorSubject(null);
8522
8459
  this.caseTitle$ = this.title$.asObservable();
8523
8460
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
8524
- this.caseLinkError$ = this.linkError$.asObservable();
8525
8461
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
8526
8462
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
8527
8463
  }
@@ -8531,18 +8467,12 @@ class CaseEditDataService {
8531
8467
  setCaseEventTriggerName(triggerName) {
8532
8468
  this.eventTriggerName$.next(triggerName);
8533
8469
  }
8534
- setCaseLinkError(error) {
8535
- this.linkError$.next(error);
8536
- }
8537
8470
  setFormValidationErrors(validationErrors) {
8538
8471
  this.formValidationErrors$.next(validationErrors);
8539
8472
  }
8540
8473
  clearFormValidationErrors() {
8541
8474
  this.formValidationErrors$.next([]);
8542
8475
  }
8543
- clearCaseLinkError() {
8544
- this.linkError$.next(null);
8545
- }
8546
8476
  addFormValidationError(validationError) {
8547
8477
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
8548
8478
  }
@@ -9021,27 +8951,18 @@ class CaseEditPageComponent {
9021
8951
  this.caseEditDataService.addFormValidationError({ id, message: `${label} exceeds the maximum length` });
9022
8952
  fieldElement.markAsDirty();
9023
8953
  }
9024
- else if (this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
9025
- this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
9026
- }
9027
8954
  else if (fieldElement.invalid) {
9028
8955
  if (casefield.isComplex()) {
9029
8956
  this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id);
9030
8957
  }
9031
8958
  else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
9032
- if (this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
9033
- this.caseEditDataService.addFormValidationError({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
9034
- // this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
9035
- }
9036
- else {
9037
- const fieldArray = fieldElement;
9038
- if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
9039
- id = `${fieldArray['component']['collItems'][0].prefix}`;
9040
- }
9041
- fieldArray.controls.forEach((c) => {
9042
- this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
9043
- });
8959
+ const fieldArray = fieldElement;
8960
+ if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
8961
+ id = `${fieldArray['component']['collItems'][0].prefix}`;
9044
8962
  }
8963
+ fieldArray.controls.forEach((c) => {
8964
+ this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
8965
+ });
9045
8966
  }
9046
8967
  else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
9047
8968
  // Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
@@ -9289,7 +9210,6 @@ class CaseEditPageComponent {
9289
9210
  }
9290
9211
  syncCaseEditDataService() {
9291
9212
  this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
9292
- this.caseEditDataService.setCaseLinkError(this.caseLinkError);
9293
9213
  this.caseEditDataService.setCaseTitle(this.getCaseTitle());
9294
9214
  this.caseEditDataService.caseFormValidationErrors$.subscribe({
9295
9215
  next: (validationErrors) => this.validationErrors = validationErrors
@@ -9755,10 +9675,6 @@ class ReadFieldsFilterPipe {
9755
9675
  && ReadFieldsFilterPipe.NESTED_TYPES[field.field_type.type](field, value);
9756
9676
  }
9757
9677
  static keepField(field, value, ignoreLabels = false) {
9758
- // We should always render the caselinks tables from and to regardless whether it has valid value or not
9759
- if (field.id === 'caseLinks') {
9760
- return true;
9761
- }
9762
9678
  // We shouldn't ditch labels.
9763
9679
  if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
9764
9680
  return true;
@@ -10023,154 +9939,6 @@ FieldsFilterPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFieldsFilter", type: Fie
10023
9939
  }]
10024
9940
  }], null, null); })();
10025
9941
 
10026
- class LinkedCasesService {
10027
- constructor(jurisdictionService, searchService) {
10028
- this.jurisdictionService = jurisdictionService;
10029
- this.searchService = searchService;
10030
- this.caseFieldValue = [];
10031
- this.isLinkedCasesEventTrigger = false;
10032
- this.linkCaseReasons = [];
10033
- this.linkedCases = [];
10034
- this.initialCaseLinks = [];
10035
- this.editMode = false;
10036
- this.jurisdictionsResponse = [];
10037
- this.serverError = null;
10038
- this.serverLinkedApiError = null;
10039
- this.isServerReasonCodeError = false;
10040
- this.caseJurisdictionID = null;
10041
- this.groupLinkedCasesByCaseType = (arrObj, key) => {
10042
- return arrObj.reduce((rv, x) => {
10043
- (rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
10044
- return rv;
10045
- }, {});
10046
- };
10047
- this.jurisdictionService.getJurisdictions().subscribe((jurisdictions) => {
10048
- this.jurisdictionsResponse = jurisdictions;
10049
- }, (error) => {
10050
- this.serverJurisdictionError = true;
10051
- });
10052
- }
10053
- constructElasticSearchQuery(caseIds, size) {
10054
- return {
10055
- query: {
10056
- terms: {
10057
- reference: caseIds,
10058
- },
10059
- },
10060
- size,
10061
- };
10062
- }
10063
- mapResponse(esSearchCasesResponse) {
10064
- const caseInfo = this.caseFieldValue.find(item => item.value && item.value.CaseReference === esSearchCasesResponse.case_id);
10065
- return caseInfo && {
10066
- caseReference: esSearchCasesResponse.case_id,
10067
- caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
10068
- caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
10069
- service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
10070
- state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
10071
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
10072
- caseInfo.value.ReasonForLink.map(reason => reason.value && reason.value.Reason),
10073
- };
10074
- }
10075
- searchCasesByCaseIds(searchCasesResponse) {
10076
- return forkJoin(searchCasesResponse);
10077
- }
10078
- getAllLinkedCaseInformation() {
10079
- const searchCasesResponse = [];
10080
- const linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
10081
- Object.keys(linkedCaseIds).forEach(key => {
10082
- const esQuery = this.constructElasticSearchQuery(linkedCaseIds[key], 100);
10083
- const query = this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
10084
- searchCasesResponse.push(query);
10085
- });
10086
- if (searchCasesResponse.length) {
10087
- this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
10088
- const casesResponse = [];
10089
- searchCases.forEach(response => {
10090
- response.results.forEach((result) => {
10091
- casesResponse.push(this.mapResponse(result));
10092
- });
10093
- });
10094
- const caseLinks = casesResponse.map(item => {
10095
- return {
10096
- caseReference: item.caseReference,
10097
- caseName: item.caseName,
10098
- caseService: item.service,
10099
- caseType: item.caseType,
10100
- unlink: false,
10101
- reasons: item.reasons && item.reasons.map(reason => {
10102
- return {
10103
- reasonCode: reason
10104
- };
10105
- }),
10106
- };
10107
- });
10108
- this.linkedCases = caseLinks;
10109
- this.serverLinkedApiError = null;
10110
- }, err => {
10111
- this.serverLinkedApiError = {
10112
- id: 'backendError', message: 'Some case information is not available at the moment'
10113
- };
10114
- });
10115
- }
10116
- }
10117
- mapLookupIDToValueFromJurisdictions(fieldName, fieldValue) {
10118
- const selectedJurisdiction = this.jurisdictionsResponse &&
10119
- this.jurisdictionsResponse.find(item => item.id === this.caseDetails.case_type.jurisdiction.id);
10120
- const selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(item => item.id === this.caseDetails.case_type.id);
10121
- const state = selectedCaseType && selectedCaseType.states.find(item => item.id === fieldValue);
10122
- switch (fieldName) {
10123
- case 'JURISDICTION':
10124
- return selectedJurisdiction && selectedJurisdiction.description;
10125
- case 'CASE_TYPE':
10126
- return selectedCaseType && selectedCaseType.name;
10127
- case 'CASE_TYPE_DESCRIPTION':
10128
- return selectedCaseType && selectedCaseType.description;
10129
- case 'STATE':
10130
- return state && state.name || fieldValue;
10131
- case 'STATE_DESCRIPTION':
10132
- return state && state.description || fieldValue;
10133
- default:
10134
- break;
10135
- }
10136
- }
10137
- getCaseName(searchCasesResponse) {
10138
- let caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
10139
- const tabs = searchCasesResponse.tabs.filter(tab => {
10140
- const caseNameHmctsInternalField = tab.fields.find(field => field.id === 'caseNameHmctsInternal');
10141
- if (caseNameHmctsInternalField) {
10142
- caseName = caseNameHmctsInternalField.value;
10143
- }
10144
- });
10145
- return caseName;
10146
- }
10147
- }
10148
- LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
10149
- LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0.ɵɵinject(JurisdictionService), i0.ɵɵinject(SearchService)); };
10150
- LinkedCasesService.ɵprov = i0.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
10151
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesService, [{
10152
- type: Injectable
10153
- }], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null); })();
10154
-
10155
- class LinkCasesReasonValuePipe {
10156
- constructor(linkedCasesService) {
10157
- this.linkedCasesService = linkedCasesService;
10158
- }
10159
- transform(reasonCode) {
10160
- const reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
10161
- this.linkedCasesService.linkCaseReasons.find(reason => reason.key === reasonCode);
10162
- return reasonCodeMapping && reasonCodeMapping.value_en;
10163
- }
10164
- }
10165
- LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
10166
- LinkCasesReasonValuePipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
10167
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
10168
- type: Pipe,
10169
- args: [{
10170
- name: 'ccdLinkCasesReasonValue'
10171
- }]
10172
- }], function () { return [{ type: LinkedCasesService }]; }, null); })();
10173
-
10174
9942
  var SortOrder;
10175
9943
  (function (SortOrder) {
10176
9944
  SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
@@ -10206,8 +9974,7 @@ const pipeDeclarations = [
10206
9974
  CcdCYAPageLabelFilterPipe,
10207
9975
  ReadFieldsFilterPipe,
10208
9976
  CcdTabFieldsPipe,
10209
- CcdPageFieldsPipe,
10210
- LinkCasesReasonValuePipe
9977
+ CcdPageFieldsPipe
10211
9978
  ];
10212
9979
  class PipesModule {
10213
9980
  }
@@ -10223,16 +9990,14 @@ PipesModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
10223
9990
  CcdCYAPageLabelFilterPipe,
10224
9991
  ReadFieldsFilterPipe,
10225
9992
  CcdTabFieldsPipe,
10226
- CcdPageFieldsPipe,
10227
- LinkCasesReasonValuePipe], imports: [CommonModule], exports: [CaseReferencePipe,
9993
+ CcdPageFieldsPipe], imports: [CommonModule], exports: [CaseReferencePipe,
10228
9994
  SortSearchResultPipe,
10229
9995
  CcdCaseTitlePipe,
10230
9996
  CcdCollectionTableCaseFieldsFilterPipe,
10231
9997
  CcdCYAPageLabelFilterPipe,
10232
9998
  ReadFieldsFilterPipe,
10233
9999
  CcdTabFieldsPipe,
10234
- CcdPageFieldsPipe,
10235
- LinkCasesReasonValuePipe] }); })();
10000
+ CcdPageFieldsPipe] }); })();
10236
10001
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PipesModule, [{
10237
10002
  type: NgModule,
10238
10003
  args: [{
@@ -10455,7 +10220,7 @@ class AddressOption {
10455
10220
  }
10456
10221
  }
10457
10222
 
10458
- const _c0$R = ["writeComplexFieldComponent"];
10223
+ const _c0$P = ["writeComplexFieldComponent"];
10459
10224
  function WriteAddressFieldComponent_div_1_div_5_span_5_Template(rf, ctx) { if (rf & 1) {
10460
10225
  i0.ɵɵelementStart(0, "span", 14);
10461
10226
  i0.ɵɵtext(1);
@@ -10667,7 +10432,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10667
10432
  }
10668
10433
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
10669
10434
  WriteAddressFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) { if (rf & 1) {
10670
- i0.ɵɵviewQuery(_c0$R, 1);
10435
+ i0.ɵɵviewQuery(_c0$P, 1);
10671
10436
  i0.ɵɵviewQuery(FocusElementDirective, 1);
10672
10437
  } if (rf & 2) {
10673
10438
  let _t;
@@ -10753,7 +10518,7 @@ function CaseFileViewFieldComponent_div_1_ng_container_8_Template(rf, ctx) { if
10753
10518
  } if (rf & 2) {
10754
10519
  const ctx_r2 = i0.ɵɵnextContext(2);
10755
10520
  i0.ɵɵadvance(1);
10756
- i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true);
10521
+ i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
10757
10522
  } }
10758
10523
  function CaseFileViewFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
10759
10524
  const _r4 = i0.ɵɵgetCurrentView();
@@ -10769,7 +10534,7 @@ function CaseFileViewFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
10769
10534
  i0.ɵɵelementEnd();
10770
10535
  i0.ɵɵelement(6, "div", 9);
10771
10536
  i0.ɵɵelementStart(7, "div", 10);
10772
- i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2, 6, "ng-container", 1);
10537
+ i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
10773
10538
  i0.ɵɵelementEnd();
10774
10539
  i0.ɵɵelementEnd();
10775
10540
  i0.ɵɵelementEnd();
@@ -10845,7 +10610,7 @@ class CaseFileViewFieldComponent {
10845
10610
  }
10846
10611
  CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
10847
10612
  CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(LoadingService)); };
10848
- CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
10613
+ CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
10849
10614
  i0.ɵɵtemplate(0, CaseFileViewFieldComponent_div_0_Template, 5, 0, "div", 0);
10850
10615
  i0.ɵɵtemplate(1, CaseFileViewFieldComponent_div_1_Template, 9, 3, "div", 1);
10851
10616
  } if (rf & 2) {
@@ -10879,7 +10644,7 @@ function CaseFileViewFieldReadComponent_div_1_ng_container_8_Template(rf, ctx) {
10879
10644
  } if (rf & 2) {
10880
10645
  const ctx_r2 = i0.ɵɵnextContext(2);
10881
10646
  i0.ɵɵadvance(1);
10882
- i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true);
10647
+ i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
10883
10648
  } }
10884
10649
  function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) { if (rf & 1) {
10885
10650
  const _r4 = i0.ɵɵgetCurrentView();
@@ -10895,7 +10660,7 @@ function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) { if (rf & 1) {
10895
10660
  i0.ɵɵelementEnd();
10896
10661
  i0.ɵɵelement(6, "div", 9);
10897
10662
  i0.ɵɵelementStart(7, "div", 10);
10898
- i0.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 6, "ng-container", 1);
10663
+ i0.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
10899
10664
  i0.ɵɵelementEnd();
10900
10665
  i0.ɵɵelementEnd();
10901
10666
  i0.ɵɵelementEnd();
@@ -10913,7 +10678,7 @@ class CaseFileViewFieldReadComponent extends CaseFileViewFieldComponent {
10913
10678
  }
10914
10679
  }
10915
10680
  CaseFileViewFieldReadComponent.ɵfac = function CaseFileViewFieldReadComponent_Factory(t) { return ɵCaseFileViewFieldReadComponent_BaseFactory(t || CaseFileViewFieldReadComponent); };
10916
- CaseFileViewFieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) { if (rf & 1) {
10681
+ CaseFileViewFieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) { if (rf & 1) {
10917
10682
  i0.ɵɵtemplate(0, CaseFileViewFieldReadComponent_div_0_Template, 5, 0, "div", 0);
10918
10683
  i0.ɵɵtemplate(1, CaseFileViewFieldReadComponent_div_1_Template, 9, 3, "div", 1);
10919
10684
  } if (rf & 2) {
@@ -11247,7 +11012,7 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_7_Template(rf, ctx) { if
11247
11012
  i0.ɵɵadvance(1);
11248
11013
  i0.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
11249
11014
  } }
11250
- const _c0$Q = function (a0) { return { "form-group-error": a0 }; };
11015
+ const _c0$O = function (a0) { return { "form-group-error": a0 }; };
11251
11016
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
11252
11017
  i0.ɵɵelementStart(0, "div", 8);
11253
11018
  i0.ɵɵelementStart(1, "div", 9);
@@ -11266,7 +11031,7 @@ function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
11266
11031
  i0.ɵɵadvance(1);
11267
11032
  i0.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
11268
11033
  i0.ɵɵadvance(1);
11269
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$Q, ctx_r1.errorMessages.length > 0));
11034
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$O, ctx_r1.errorMessages.length > 0));
11270
11035
  i0.ɵɵadvance(1);
11271
11036
  i0.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
11272
11037
  i0.ɵɵadvance(1);
@@ -11630,8 +11395,8 @@ WriteCaseFlagFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseFlag
11630
11395
  }], function () { return [{ type: i1$1.ActivatedRoute }, { type: CaseEditDataService }]; }, null); })();
11631
11396
 
11632
11397
  function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
11633
- i0.ɵɵelementStart(0, "a", 2);
11634
- i0.ɵɵelementStart(1, "span", 3);
11398
+ i0.ɵɵelementStart(0, "a", 1);
11399
+ i0.ɵɵelementStart(1, "span", 2);
11635
11400
  i0.ɵɵtext(2);
11636
11401
  i0.ɵɵpipe(3, "ccdCaseReference");
11637
11402
  i0.ɵɵelementEnd();
@@ -11642,114 +11407,74 @@ function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
11642
11407
  i0.ɵɵadvance(2);
11643
11408
  i0.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
11644
11409
  } }
11645
- function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
11646
- i0.ɵɵelementContainerStart(0);
11647
- i0.ɵɵelement(1, "ccd-read-linked-cases", 4);
11648
- i0.ɵɵelementContainerEnd();
11649
- } if (rf & 2) {
11650
- const ctx_r1 = i0.ɵɵnextContext();
11651
- i0.ɵɵadvance(1);
11652
- i0.ɵɵproperty("caseField", ctx_r1.caseField);
11653
- } }
11654
11410
  class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
11655
- constructor() {
11656
- super(...arguments);
11657
- this.paletteContext = PaletteContext;
11658
- }
11659
11411
  hasReference() {
11660
11412
  return this.caseField.value && this.caseField.value.CaseReference;
11661
11413
  }
11662
- hasCaseLinkCollection() {
11663
- return (this.caseField.field_type &&
11664
- this.caseField.field_type.type === 'Collection' &&
11665
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
11666
- }
11667
11414
  }
11668
11415
  ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
11669
- ReadCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0.ɵɵ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) { if (rf & 1) {
11416
+ ReadCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0.ɵɵ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) { if (rf & 1) {
11670
11417
  i0.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
11671
- i0.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
11672
11418
  } if (rf & 2) {
11673
11419
  i0.ɵɵproperty("ngIf", ctx.hasReference());
11674
- i0.ɵɵadvance(1);
11675
- i0.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
11676
- } }, encapsulation: 2 });
11420
+ } }, directives: [i2.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
11677
11421
  const ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
11678
11422
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
11679
11423
  type: Component,
11680
11424
  args: [{
11681
11425
  selector: 'ccd-read-case-link-field',
11682
- templateUrl: 'read-case-link-field.html',
11426
+ templateUrl: 'read-case-link-field.html'
11683
11427
  }]
11684
11428
  }], null, null); })();
11685
11429
 
11686
- const _c0$P = ["writeComplexFieldComponent"];
11687
- function WriteCaseLinkFieldComponent_div_1_span_2_Template(rf, ctx) { if (rf & 1) {
11430
+ const _c0$N = ["writeComplexFieldComponent"];
11431
+ function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
11688
11432
  i0.ɵɵelementStart(0, "span", 6);
11689
11433
  i0.ɵɵtext(1);
11690
11434
  i0.ɵɵpipe(2, "rpxTranslate");
11691
11435
  i0.ɵɵpipe(3, "ccdFieldLabel");
11692
11436
  i0.ɵɵelementEnd();
11693
11437
  } if (rf & 2) {
11694
- const ctx_r2 = i0.ɵɵnextContext(2);
11438
+ const ctx_r0 = i0.ɵɵnextContext();
11695
11439
  i0.ɵɵadvance(1);
11696
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, ctx_r2.caseField)));
11440
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, ctx_r0.caseField)), "}");
11697
11441
  } }
11698
- function WriteCaseLinkFieldComponent_div_1_span_3_Template(rf, ctx) { if (rf & 1) {
11442
+ function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
11699
11443
  i0.ɵɵelementStart(0, "span", 7);
11700
11444
  i0.ɵɵtext(1);
11701
11445
  i0.ɵɵpipe(2, "rpxTranslate");
11702
11446
  i0.ɵɵelementEnd();
11703
11447
  } if (rf & 2) {
11704
- const ctx_r3 = i0.ɵɵnextContext(2);
11705
- i0.ɵɵadvance(1);
11706
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r3.caseField.hint_text));
11707
- } }
11708
- function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
11709
- i0.ɵɵelementStart(0, "div", 1);
11710
- i0.ɵɵelementStart(1, "label", 2);
11711
- i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 4, 5, "span", 3);
11712
- i0.ɵɵelementEnd();
11713
- i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 3, 3, "span", 4);
11714
- i0.ɵɵelement(4, "input", 5);
11715
- i0.ɵɵelementEnd();
11716
- } if (rf & 2) {
11717
- const ctx_r0 = i0.ɵɵnextContext();
11718
- i0.ɵɵadvance(1);
11719
- i0.ɵɵproperty("for", ctx_r0.id());
11720
- i0.ɵɵadvance(1);
11721
- i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
11722
- i0.ɵɵadvance(1);
11723
- i0.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
11448
+ const ctx_r1 = i0.ɵɵnextContext();
11724
11449
  i0.ɵɵadvance(1);
11725
- i0.ɵɵproperty("id", ctx_r0.id())("formControl", ctx_r0.caseReferenceControl);
11450
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r1.caseField.hint_text));
11726
11451
  } }
11727
- function WriteCaseLinkFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
11728
- const _r5 = i0.ɵɵgetCurrentView();
11729
- i0.ɵɵelementStart(0, "div", 1);
11730
- i0.ɵɵelementStart(1, "ccd-write-linked-cases", 8);
11731
- i0.ɵɵlistener("onLinkedCasesSelected", function WriteCaseLinkFieldComponent_div_2_Template_ccd_write_linked_cases_onLinkedCasesSelected_1_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.submitLinkedCases(); });
11732
- i0.ɵɵelementEnd();
11452
+ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
11453
+ i0.ɵɵelementStart(0, "span", 8);
11454
+ i0.ɵɵtext(1);
11455
+ i0.ɵɵpipe(2, "rpxTranslate");
11456
+ i0.ɵɵpipe(3, "ccdFirstError");
11733
11457
  i0.ɵɵelementEnd();
11734
11458
  } if (rf & 2) {
11735
- const ctx_r1 = i0.ɵɵnextContext();
11459
+ const ctx_r2 = i0.ɵɵnextContext();
11736
11460
  i0.ɵɵadvance(1);
11737
- i0.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
11461
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label)));
11738
11462
  } }
11463
+ const _c1$k = function (a0) { return { "form-group-error": a0 }; };
11739
11464
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
11740
- constructor(linkedCasesService) {
11741
- super();
11742
- this.linkedCasesService = linkedCasesService;
11743
- this.caseFields = [];
11744
- }
11745
11465
  ngOnInit() {
11746
- this.formArray = this.registerControl(new FormArray([]), true);
11747
- this.formArray['caseField'] = this.caseField;
11748
- if (!this.hasCaseLinkCollection()) {
11466
+ if (this.caseField.value) {
11749
11467
  this.caseLinkGroup = this.registerControl(new FormGroup({
11750
11468
  CaseReference: new FormControl(this.caseField.value.CaseReference, Validators.required),
11751
11469
  }), true);
11752
11470
  }
11471
+ else {
11472
+ this.caseLinkGroup = this.registerControl(new FormGroup({
11473
+ CaseReference: new FormControl(null, Validators.required),
11474
+ }), true);
11475
+ }
11476
+ this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
11477
+ this.caseReferenceControl.setValidators(this.caseReferenceValidator());
11753
11478
  // Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
11754
11479
  // field uses the Complex type, it is meant to be treated as one field
11755
11480
  if (this.caseField && this.caseField.field_type.type === 'Complex') {
@@ -11757,18 +11482,22 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
11757
11482
  caseLinkSubField.retain_hidden_value = this.caseField.retain_hidden_value;
11758
11483
  }
11759
11484
  }
11760
- this.containsCaseLinkCollection = this.hasCaseLinkCollection();
11761
11485
  }
11762
- submitLinkedCases() {
11763
- const formGroup = this.formGroup;
11764
- if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
11765
- const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
11766
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue
11767
- .filter(item => unlinkedCaseRefereneIds.indexOf(item.id) === -1);
11768
- }
11769
- else if (formGroup.value && formGroup.value.caseLinks && this.linkedCasesService.linkedCases) {
11770
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
11771
- }
11486
+ caseReferenceValidator() {
11487
+ return (control) => {
11488
+ if (control.value) {
11489
+ if (this.validCaseReference(control.value)) {
11490
+ return null;
11491
+ }
11492
+ return { error: 'Please use a valid 16 Digit Case Reference' };
11493
+ }
11494
+ else {
11495
+ if (control.touched) {
11496
+ return { error: 'Please use a valid 16 Digit Case Reference' };
11497
+ }
11498
+ }
11499
+ return null;
11500
+ };
11772
11501
  }
11773
11502
  validCaseReference(valueString) {
11774
11503
  if (!valueString) {
@@ -11776,45 +11505,48 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
11776
11505
  }
11777
11506
  return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
11778
11507
  }
11779
- hasCaseLinkCollection() {
11780
- return (this.caseField.field_type &&
11781
- this.caseField.field_type.type === 'Collection' &&
11782
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
11783
- }
11784
11508
  }
11785
- WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return new (t || WriteCaseLinkFieldComponent)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
11509
+ WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
11786
11510
  WriteCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) { if (rf & 1) {
11787
- i0.ɵɵviewQuery(_c0$P, 1);
11511
+ i0.ɵɵviewQuery(_c0$N, 1);
11788
11512
  } if (rf & 2) {
11789
11513
  let _t;
11790
11514
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11791
- } }, inputs: { caseFields: "caseFields", formGroup: "formGroup" }, features: [i0.ɵɵ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) { if (rf & 1) {
11792
- i0.ɵɵelementContainerStart(0);
11793
- i0.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
11794
- i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
11795
- i0.ɵɵelementContainerEnd();
11515
+ } }, features: [i0.ɵɵ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) { if (rf & 1) {
11516
+ i0.ɵɵelementStart(0, "div", 0);
11517
+ i0.ɵɵelementStart(1, "label", 1);
11518
+ i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 4, 5, "span", 2);
11519
+ i0.ɵɵelementEnd();
11520
+ i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 3, 3, "span", 3);
11521
+ i0.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 4, 6, "span", 4);
11522
+ i0.ɵɵelement(5, "input", 5);
11523
+ i0.ɵɵelementEnd();
11796
11524
  } if (rf & 2) {
11525
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
11797
11526
  i0.ɵɵadvance(1);
11798
- i0.ɵɵproperty("ngIf", !ctx.containsCaseLinkCollection);
11527
+ i0.ɵɵproperty("for", ctx.id());
11799
11528
  i0.ɵɵadvance(1);
11800
- i0.ɵɵproperty("ngIf", ctx.containsCaseLinkCollection);
11801
- } }, encapsulation: 2 });
11529
+ i0.ɵɵproperty("ngIf", ctx.caseField.label);
11530
+ i0.ɵɵadvance(1);
11531
+ i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
11532
+ i0.ɵɵadvance(1);
11533
+ i0.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
11534
+ i0.ɵɵadvance(1);
11535
+ i0.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
11536
+ } }, directives: [i2.NgClass, i2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective], pipes: [i1.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
11537
+ const ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
11802
11538
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
11803
11539
  type: Component,
11804
11540
  args: [{
11805
11541
  selector: 'ccd-write-case-link-field',
11806
11542
  templateUrl: 'write-case-link-field.html'
11807
11543
  }]
11808
- }], function () { return [{ type: LinkedCasesService }]; }, { caseFields: [{
11809
- type: Input
11810
- }], formGroup: [{
11811
- type: Input
11812
- }], writeComplexFieldComponent: [{
11544
+ }], null, { writeComplexFieldComponent: [{
11813
11545
  type: ViewChild,
11814
- args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
11546
+ args: ['writeComplexFieldComponent']
11815
11547
  }] }); })();
11816
11548
 
11817
- const _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 }; };
11549
+ const _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 }; };
11818
11550
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf & 1) {
11819
11551
  i0.ɵɵelementStart(0, "tbody");
11820
11552
  i0.ɵɵelementStart(1, "tr");
@@ -11827,9 +11559,9 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf
11827
11559
  } if (rf & 2) {
11828
11560
  const ctx_r1 = i0.ɵɵnextContext(2);
11829
11561
  i0.ɵɵadvance(4);
11830
- i0.ɵɵproperty("caseField", i0.ɵɵ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);
11562
+ i0.ɵɵproperty("caseField", i0.ɵɵ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);
11831
11563
  } }
11832
- const _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
11564
+ const _c1$j = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
11833
11565
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
11834
11566
  i0.ɵɵelementStart(0, "tr");
11835
11567
  i0.ɵɵelementStart(1, "td");
@@ -11841,7 +11573,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
11841
11573
  const i_r5 = ctx.index;
11842
11574
  const ctx_r3 = i0.ɵɵnextContext(3);
11843
11575
  i0.ɵɵadvance(2);
11844
- i0.ɵɵproperty("caseField", i0.ɵɵ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));
11576
+ i0.ɵɵproperty("caseField", i0.ɵɵ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));
11845
11577
  } }
11846
11578
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
11847
11579
  i0.ɵɵelementStart(0, "tbody");
@@ -11968,7 +11700,7 @@ RemoveDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RemoveDialogCompone
11968
11700
  }]
11969
11701
  }], function () { return [{ type: i1$3.MatDialogRef }]; }, null); })();
11970
11702
 
11971
- const _c0$N = ["collectionItem"];
11703
+ const _c0$L = ["collectionItem"];
11972
11704
  function WriteCollectionFieldComponent_h2_9_span_1_Template(rf, ctx) { if (rf & 1) {
11973
11705
  i0.ɵɵelementStart(0, "span", 9);
11974
11706
  i0.ɵɵtext(1);
@@ -12351,7 +12083,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
12351
12083
  }
12352
12084
  WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(i2$2.ScrollToService), i0.ɵɵdirectiveInject(ProfileNotifier)); };
12353
12085
  WriteCollectionFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) { if (rf & 1) {
12354
- i0.ɵɵviewQuery(_c0$N, 1);
12086
+ i0.ɵɵviewQuery(_c0$L, 1);
12355
12087
  } if (rf & 2) {
12356
12088
  let _t;
12357
12089
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
@@ -12688,7 +12420,7 @@ FileUploadStateService.ɵprov = i0.ɵɵdefineInjectable({ token: FileUploadState
12688
12420
  type: Injectable
12689
12421
  }], null, null); })();
12690
12422
 
12691
- const _c0$M = ["fileInput"];
12423
+ const _c0$K = ["fileInput"];
12692
12424
  function WriteDocumentFieldComponent_span_7_Template(rf, ctx) { if (rf & 1) {
12693
12425
  i0.ɵɵelementStart(0, "span", 12);
12694
12426
  i0.ɵɵtext(1);
@@ -12715,7 +12447,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_10_Template(rf, ctx
12715
12447
  const ctx_r2 = i0.ɵɵnextContext();
12716
12448
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
12717
12449
  } }
12718
- const _c1$j = function (a0) { return { "form-group-error bottom-30": a0 }; };
12450
+ const _c1$i = function (a0) { return { "form-group-error bottom-30": a0 }; };
12719
12451
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
12720
12452
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
12721
12453
  super();
@@ -12968,7 +12700,7 @@ WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facili
12968
12700
  WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
12969
12701
  WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(FileUploadStateService)); };
12970
12702
  WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) { if (rf & 1) {
12971
- i0.ɵɵviewQuery(_c0$M, 1);
12703
+ i0.ɵɵviewQuery(_c0$K, 1);
12972
12704
  } if (rf & 2) {
12973
12705
  let _t;
12974
12706
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileInput = _t.first);
@@ -13006,7 +12738,7 @@ WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocument
13006
12738
  i0.ɵɵelementEnd();
13007
12739
  i0.ɵɵelementEnd();
13008
12740
  } if (rf & 2) {
13009
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c1$j, !ctx.valid));
12741
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c1$i, !ctx.valid));
13010
12742
  i0.ɵɵadvance(1);
13011
12743
  i0.ɵɵproperty("for", ctx.id());
13012
12744
  i0.ɵɵadvance(1);
@@ -13143,7 +12875,7 @@ function WriteDynamicListFieldComponent_option_10_Template(rf, ctx) { if (rf & 1
13143
12875
  i0.ɵɵadvance(1);
13144
12876
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, type_r5.label));
13145
12877
  } }
13146
- const _c0$L = function (a0) { return { "form-group-error": a0 }; };
12878
+ const _c0$J = function (a0) { return { "form-group-error": a0 }; };
13147
12879
  class WriteDynamicListFieldComponent extends AbstractFieldWriteComponent {
13148
12880
  ngOnInit() {
13149
12881
  /**
@@ -13186,7 +12918,7 @@ WriteDynamicListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDynam
13186
12918
  i0.ɵɵelementEnd();
13187
12919
  i0.ɵɵelementEnd();
13188
12920
  } if (rf & 2) {
13189
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c0$L, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
12921
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c0$J, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
13190
12922
  i0.ɵɵadvance(1);
13191
12923
  i0.ɵɵproperty("for", ctx.id());
13192
12924
  i0.ɵɵadvance(1);
@@ -13317,7 +13049,7 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
13317
13049
  i0.ɵɵadvance(1);
13318
13050
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, ctx_r3.dynamicRadioListControl.errors)));
13319
13051
  } }
13320
- const _c0$K = function (a0) { return { selected: a0 }; };
13052
+ const _c0$I = function (a0) { return { selected: a0 }; };
13321
13053
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
13322
13054
  i0.ɵɵelementStart(0, "div", 10);
13323
13055
  i0.ɵɵelement(1, "input", 11);
@@ -13329,7 +13061,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
13329
13061
  } if (rf & 2) {
13330
13062
  const radioButton_r5 = ctx.$implicit;
13331
13063
  const ctx_r4 = i0.ɵɵnextContext();
13332
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
13064
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$I, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
13333
13065
  i0.ɵɵadvance(1);
13334
13066
  i0.ɵɵpropertyInterpolate("name", ctx_r4.id());
13335
13067
  i0.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
@@ -13338,7 +13070,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
13338
13070
  i0.ɵɵadvance(1);
13339
13071
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
13340
13072
  } }
13341
- const _c1$i = function (a0) { return { "form-group-error": a0 }; };
13073
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
13342
13074
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
13343
13075
  ngOnInit() {
13344
13076
  /**
@@ -13379,7 +13111,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Write
13379
13111
  i0.ɵɵelementEnd();
13380
13112
  i0.ɵɵelementEnd();
13381
13113
  } if (rf & 2) {
13382
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$i, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
13114
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$h, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
13383
13115
  i0.ɵɵadvance(3);
13384
13116
  i0.ɵɵproperty("for", ctx.id());
13385
13117
  i0.ɵɵadvance(1);
@@ -13466,8 +13198,8 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
13466
13198
  i0.ɵɵadvance(1);
13467
13199
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.emailControl.errors, ctx_r2.caseField.label)));
13468
13200
  } }
13469
- const _c0$J = function (a0) { return { "form-group-error": a0 }; };
13470
- const _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
13201
+ const _c0$H = function (a0) { return { "form-group-error": a0 }; };
13202
+ const _c1$g = function (a0) { return { "govuk-input--error": a0 }; };
13471
13203
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
13472
13204
  ngOnInit() {
13473
13205
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -13484,7 +13216,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
13484
13216
  i0.ɵɵelement(5, "input", 5);
13485
13217
  i0.ɵɵelementEnd();
13486
13218
  } if (rf & 2) {
13487
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
13219
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$H, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
13488
13220
  i0.ɵɵadvance(1);
13489
13221
  i0.ɵɵproperty("for", ctx.id());
13490
13222
  i0.ɵɵadvance(1);
@@ -13494,7 +13226,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
13494
13226
  i0.ɵɵadvance(1);
13495
13227
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
13496
13228
  i0.ɵɵadvance(1);
13497
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$h, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
13229
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$g, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
13498
13230
  } }, directives: [i2.NgClass, i2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective], pipes: [i1.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
13499
13231
  const ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
13500
13232
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
@@ -13591,7 +13323,7 @@ function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
13591
13323
  i0.ɵɵadvance(1);
13592
13324
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, type_r4.label));
13593
13325
  } }
13594
- const _c0$I = function (a0) { return { "form-group-error": a0 }; };
13326
+ const _c0$G = function (a0) { return { "form-group-error": a0 }; };
13595
13327
  class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
13596
13328
  get listItems() {
13597
13329
  if (this.caseField) {
@@ -13629,7 +13361,7 @@ WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedLi
13629
13361
  i0.ɵɵelementEnd();
13630
13362
  i0.ɵɵelementEnd();
13631
13363
  } if (rf & 2) {
13632
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13364
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$G, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13633
13365
  i0.ɵɵadvance(1);
13634
13366
  i0.ɵɵproperty("for", ctx.id());
13635
13367
  i0.ɵɵadvance(1);
@@ -13724,7 +13456,7 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
13724
13456
  i0.ɵɵadvance(1);
13725
13457
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label)));
13726
13458
  } }
13727
- const _c0$H = function (a0) { return { selected: a0 }; };
13459
+ const _c0$F = function (a0) { return { selected: a0 }; };
13728
13460
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
13729
13461
  i0.ɵɵelementStart(0, "div", 9);
13730
13462
  i0.ɵɵelement(1, "input", 10);
@@ -13736,7 +13468,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
13736
13468
  } if (rf & 2) {
13737
13469
  const radioButton_r4 = ctx.$implicit;
13738
13470
  const ctx_r3 = i0.ɵɵnextContext();
13739
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13471
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$F, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13740
13472
  i0.ɵɵadvance(1);
13741
13473
  i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
13742
13474
  i0.ɵɵadvance(1);
@@ -13744,7 +13476,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
13744
13476
  i0.ɵɵadvance(1);
13745
13477
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
13746
13478
  } }
13747
- const _c1$g = function (a0) { return { "form-group-error": a0 }; };
13479
+ const _c1$f = function (a0) { return { "form-group-error": a0 }; };
13748
13480
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
13749
13481
  ngOnInit() {
13750
13482
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -13768,7 +13500,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFi
13768
13500
  i0.ɵɵelementEnd();
13769
13501
  i0.ɵɵelementEnd();
13770
13502
  } if (rf & 2) {
13771
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$g, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
13503
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$f, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
13772
13504
  i0.ɵɵadvance(3);
13773
13505
  i0.ɵɵproperty("for", ctx.id());
13774
13506
  i0.ɵɵadvance(1);
@@ -13867,7 +13599,7 @@ function WriteJudicialUserFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
13867
13599
  i0.ɵɵadvance(1);
13868
13600
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
13869
13601
  } }
13870
- const _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
13602
+ const _c0$E = function (a0) { return { "hide-autocomplete": a0 }; };
13871
13603
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf & 1) {
13872
13604
  const _r7 = i0.ɵɵgetCurrentView();
13873
13605
  i0.ɵɵelementStart(0, "mat-option", 11);
@@ -13877,7 +13609,7 @@ function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf
13877
13609
  } if (rf & 2) {
13878
13610
  const judicialUser_r5 = ctx.$implicit;
13879
13611
  const ctx_r3 = i0.ɵɵnextContext();
13880
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13612
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$E, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13881
13613
  i0.ɵɵadvance(1);
13882
13614
  i0.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
13883
13615
  } }
@@ -14207,7 +13939,7 @@ function WriteMoneyGbpFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14207
13939
  i0.ɵɵadvance(1);
14208
13940
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label)));
14209
13941
  } }
14210
- const _c0$F = function (a0) { return { "form-group-error": a0 }; };
13942
+ const _c0$D = function (a0) { return { "form-group-error": a0 }; };
14211
13943
  class WriteMoneyGbpFieldComponent extends AbstractFieldWriteComponent {
14212
13944
  ngOnInit() {
14213
13945
  this.moneyGbpControl = this.registerControl(new FormControl(this.caseField.value));
@@ -14230,7 +13962,7 @@ WriteMoneyGbpFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteMoneyGbp
14230
13962
  i0.ɵɵelementEnd();
14231
13963
  i0.ɵɵelementEnd();
14232
13964
  } if (rf & 2) {
14233
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$F, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
13965
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
14234
13966
  i0.ɵɵadvance(1);
14235
13967
  i0.ɵɵproperty("for", ctx.id());
14236
13968
  i0.ɵɵadvance(1);
@@ -14354,7 +14086,7 @@ function WriteMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { i
14354
14086
  i0.ɵɵadvance(1);
14355
14087
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 6, checkbox_r4.label));
14356
14088
  } }
14357
- const _c0$E = function (a0) { return { "error": a0 }; };
14089
+ const _c0$C = function (a0) { return { "error": a0 }; };
14358
14090
  class WriteMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
14359
14091
  ngOnInit() {
14360
14092
  this.checkboxes = new FormArray([]);
@@ -14409,7 +14141,7 @@ WriteMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteM
14409
14141
  i0.ɵɵelementEnd();
14410
14142
  i0.ɵɵelementEnd();
14411
14143
  } if (rf & 2) {
14412
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$E, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
14144
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
14413
14145
  i0.ɵɵadvance(3);
14414
14146
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
14415
14147
  i0.ɵɵadvance(1);
@@ -14481,8 +14213,8 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14481
14213
  i0.ɵɵadvance(1);
14482
14214
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.numberControl.errors, ctx_r2.caseField.label)));
14483
14215
  } }
14484
- const _c0$D = function (a0) { return { "form-group-error": a0 }; };
14485
- const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
14216
+ const _c0$B = function (a0) { return { "form-group-error": a0 }; };
14217
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
14486
14218
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
14487
14219
  ngOnInit() {
14488
14220
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -14499,7 +14231,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
14499
14231
  i0.ɵɵelement(5, "input", 5);
14500
14232
  i0.ɵɵelementEnd();
14501
14233
  } if (rf & 2) {
14502
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$D, !ctx.numberControl.valid && ctx.numberControl.dirty));
14234
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
14503
14235
  i0.ɵɵadvance(1);
14504
14236
  i0.ɵɵproperty("for", ctx.id());
14505
14237
  i0.ɵɵadvance(1);
@@ -14509,7 +14241,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
14509
14241
  i0.ɵɵadvance(1);
14510
14242
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
14511
14243
  i0.ɵɵadvance(1);
14512
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
14244
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
14513
14245
  } }, directives: [i2.NgClass, i2.NgIf, i2$1.NumberValueAccessor, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective], pipes: [i1.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14514
14246
  const ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
14515
14247
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
@@ -14785,7 +14517,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_17_div_4_Template(rf, ct
14785
14517
  i0.ɵɵadvance(2);
14786
14518
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "No results found."), " ");
14787
14519
  } }
14788
- const _c0$C = function (a0) { return { "scroll-container ": a0 }; };
14520
+ const _c0$A = function (a0) { return { "scroll-container ": a0 }; };
14789
14521
  function WriteOrganisationFieldComponent_fieldset_3_div_17_Template(rf, ctx) { if (rf & 1) {
14790
14522
  i0.ɵɵelementStart(0, "div", 26);
14791
14523
  i0.ɵɵpipe(1, "async");
@@ -14799,7 +14531,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_17_Template(rf, ctx) { i
14799
14531
  const ctx_r2 = i0.ɵɵnextContext(2);
14800
14532
  let tmp_0_0 = null;
14801
14533
  let tmp_2_0 = null;
14802
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$C, ((tmp_0_0 = i0.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
14534
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
14803
14535
  i0.ɵɵadvance(2);
14804
14536
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
14805
14537
  i0.ɵɵadvance(2);
@@ -15221,8 +14953,8 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
15221
14953
  i0.ɵɵadvance(1);
15222
14954
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label)), " ");
15223
14955
  } }
15224
- const _c0$B = function (a0) { return { "form-group-error": a0 }; };
15225
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
14956
+ const _c0$z = function (a0) { return { "form-group-error": a0 }; };
14957
+ const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
15226
14958
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
15227
14959
  ngOnInit() {
15228
14960
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15239,7 +14971,7 @@ WritePhoneUKFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WritePhoneUKFi
15239
14971
  i0.ɵɵelement(5, "input", 5);
15240
14972
  i0.ɵɵelementEnd();
15241
14973
  } if (rf & 2) {
15242
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
14974
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$z, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
15243
14975
  i0.ɵɵadvance(1);
15244
14976
  i0.ɵɵproperty("for", ctx.id());
15245
14977
  i0.ɵɵadvance(1);
@@ -15249,7 +14981,7 @@ WritePhoneUKFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WritePhoneUKFi
15249
14981
  i0.ɵɵadvance(1);
15250
14982
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
15251
14983
  i0.ɵɵadvance(1);
15252
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
14984
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
15253
14985
  } }, directives: [i2.NgClass, i2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective], pipes: [i1.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15254
14986
  const ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
15255
14987
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
@@ -15313,8 +15045,8 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
15313
15045
  i0.ɵɵadvance(1);
15314
15046
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.textareaControl.errors, ctx_r2.caseField.label)), " ");
15315
15047
  } }
15316
- const _c0$A = function (a0) { return { "form-group-error": a0 }; };
15317
- const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
15048
+ const _c0$y = function (a0) { return { "form-group-error": a0 }; };
15049
+ const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
15318
15050
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
15319
15051
  constructor(browserService) {
15320
15052
  super();
@@ -15344,7 +15076,7 @@ WriteTextAreaFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextArea
15344
15076
  i0.ɵɵelementEnd();
15345
15077
  i0.ɵɵelementEnd();
15346
15078
  } if (rf & 2) {
15347
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$A, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
15079
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$y, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
15348
15080
  i0.ɵɵadvance(1);
15349
15081
  i0.ɵɵproperty("for", ctx.id());
15350
15082
  i0.ɵɵadvance(1);
@@ -15354,7 +15086,7 @@ WriteTextAreaFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextArea
15354
15086
  i0.ɵɵadvance(1);
15355
15087
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
15356
15088
  i0.ɵɵadvance(1);
15357
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
15089
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
15358
15090
  } }, directives: [i2.NgClass, i2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective], pipes: [i1.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15359
15091
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextAreaFieldComponent, [{
15360
15092
  type: Component,
@@ -15418,8 +15150,8 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
15418
15150
  i0.ɵɵadvance(1);
15419
15151
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.textControl.errors, ctx_r2.caseField.label)), " ");
15420
15152
  } }
15421
- const _c0$z = function (a0) { return { "form-group-error": a0 }; };
15422
- const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
15153
+ const _c0$x = function (a0) { return { "form-group-error": a0 }; };
15154
+ const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
15423
15155
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
15424
15156
  ngOnInit() {
15425
15157
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15441,7 +15173,7 @@ WriteTextFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextFieldCom
15441
15173
  i0.ɵɵelementEnd();
15442
15174
  i0.ɵɵelementEnd();
15443
15175
  } if (rf & 2) {
15444
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$z, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
15176
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$x, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
15445
15177
  i0.ɵɵadvance(1);
15446
15178
  i0.ɵɵproperty("for", ctx.id());
15447
15179
  i0.ɵɵadvance(1);
@@ -15451,7 +15183,7 @@ WriteTextFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextFieldCom
15451
15183
  i0.ɵɵadvance(1);
15452
15184
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
15453
15185
  i0.ɵɵadvance(1);
15454
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
15186
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$b, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
15455
15187
  } }, directives: [i2.NgClass, i2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective], pipes: [i1.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15456
15188
  const ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteTextFieldComponent);
15457
15189
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
@@ -15611,7 +15343,7 @@ function WriteYesNoFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
15611
15343
  i0.ɵɵadvance(1);
15612
15344
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label)), " ");
15613
15345
  } }
15614
- const _c0$y = function (a0) { return { selected: a0 }; };
15346
+ const _c0$w = function (a0) { return { selected: a0 }; };
15615
15347
  function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
15616
15348
  i0.ɵɵelementStart(0, "div", 10);
15617
15349
  i0.ɵɵelement(1, "input", 11);
@@ -15623,7 +15355,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
15623
15355
  } if (rf & 2) {
15624
15356
  const value_r4 = ctx.$implicit;
15625
15357
  const ctx_r3 = i0.ɵɵnextContext();
15626
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$y, ctx_r3.yesNoControl.value === value_r4));
15358
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$w, ctx_r3.yesNoControl.value === value_r4));
15627
15359
  i0.ɵɵadvance(1);
15628
15360
  i0.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
15629
15361
  i0.ɵɵattribute("name", ctx_r3.id());
@@ -15632,7 +15364,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
15632
15364
  i0.ɵɵadvance(1);
15633
15365
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 8, value_r4));
15634
15366
  } }
15635
- const _c1$b = function (a0) { return { "form-group-error": a0 }; };
15367
+ const _c1$a = function (a0) { return { "form-group-error": a0 }; };
15636
15368
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
15637
15369
  constructor(yesNoService) {
15638
15370
  super();
@@ -15658,7 +15390,7 @@ WriteYesNoFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteYesNoFieldC
15658
15390
  i0.ɵɵelementEnd();
15659
15391
  i0.ɵɵelementEnd();
15660
15392
  } if (rf & 2) {
15661
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
15393
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
15662
15394
  i0.ɵɵadvance(3);
15663
15395
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
15664
15396
  i0.ɵɵadvance(1);
@@ -15719,6 +15451,8 @@ class PaletteService {
15719
15451
  return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
15720
15452
  case 'OrderSummary':
15721
15453
  return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
15454
+ case 'CaseLink':
15455
+ return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
15722
15456
  case 'Organisation':
15723
15457
  return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
15724
15458
  case 'JudicialUser':
@@ -15727,15 +15461,7 @@ class PaletteService {
15727
15461
  return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
15728
15462
  }
15729
15463
  case 'Collection':
15730
- switch (caseField.field_type.collection_field_type.id) {
15731
- case 'CaseLink':
15732
- if (caseField.id === 'caseLinks') {
15733
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
15734
- }
15735
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
15736
- default:
15737
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
15738
- }
15464
+ return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
15739
15465
  case 'MultiSelectList':
15740
15466
  return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
15741
15467
  case 'Document':
@@ -15772,7 +15498,7 @@ PaletteService.ɵprov = i0.ɵɵdefineInjectable({ token: PaletteService, factory
15772
15498
  type: Injectable
15773
15499
  }], null, null); })();
15774
15500
 
15775
- const _c0$x = ["fieldContainer"];
15501
+ const _c0$v = ["fieldContainer"];
15776
15502
  const FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
15777
15503
  class FieldReadComponent extends AbstractFieldReadComponent {
15778
15504
  constructor(resolver, paletteService) {
@@ -15820,7 +15546,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
15820
15546
  }
15821
15547
  FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(PaletteService)); };
15822
15548
  FieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) { if (rf & 1) {
15823
- i0.ɵɵviewQuery(_c0$x, 1, ViewContainerRef);
15549
+ i0.ɵɵviewQuery(_c0$v, 1, ViewContainerRef);
15824
15550
  } if (rf & 2) {
15825
15551
  let _t;
15826
15552
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fieldContainer = _t.first);
@@ -15854,7 +15580,7 @@ FieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadComponent, se
15854
15580
  args: ['fieldContainer', { static: false, read: ViewContainerRef }]
15855
15581
  }] }); })();
15856
15582
 
15857
- const _c0$w = ["fieldContainer"];
15583
+ const _c0$u = ["fieldContainer"];
15858
15584
  const FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
15859
15585
  class FieldWriteComponent extends AbstractFieldWriteComponent {
15860
15586
  constructor(resolver, paletteService) {
@@ -15899,7 +15625,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
15899
15625
  }
15900
15626
  FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(PaletteService)); };
15901
15627
  FieldWriteComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) { if (rf & 1) {
15902
- i0.ɵɵviewQuery(_c0$w, 3, ViewContainerRef);
15628
+ i0.ɵɵviewQuery(_c0$u, 3, ViewContainerRef);
15903
15629
  } if (rf & 2) {
15904
15630
  let _t;
15905
15631
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fieldContainer = _t.first);
@@ -15949,7 +15675,7 @@ function FieldReadLabelComponent_dl_1_Template(rf, ctx) { if (rf & 1) {
15949
15675
  function FieldReadLabelComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
15950
15676
  i0.ɵɵprojection(0);
15951
15677
  } }
15952
- const _c0$v = ["*"];
15678
+ const _c0$t = ["*"];
15953
15679
  class FieldReadLabelComponent extends AbstractFieldReadComponent {
15954
15680
  constructor() {
15955
15681
  super(...arguments);
@@ -15984,7 +15710,7 @@ class FieldReadLabelComponent extends AbstractFieldReadComponent {
15984
15710
  }
15985
15711
  }
15986
15712
  FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
15987
- FieldReadLabelComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵ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) { if (rf & 1) {
15713
+ FieldReadLabelComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵ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) { if (rf & 1) {
15988
15714
  i0.ɵɵprojectionDef();
15989
15715
  i0.ɵɵelementStart(0, "div", 0);
15990
15716
  i0.ɵɵtemplate(1, FieldReadLabelComponent_dl_1_Template, 6, 4, "dl", 1);
@@ -16013,25 +15739,25 @@ const ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedF
16013
15739
  type: Input
16014
15740
  }] }); })();
16015
15741
 
16016
- function CaseFileViewFolderSelectorComponent_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
15742
+ function CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template(rf, ctx) { if (rf & 1) {
16017
15743
  i0.ɵɵelementContainer(0);
16018
15744
  } }
16019
- const _c0$u = function (a0) { return { cat: a0, level: 1 }; };
16020
- function CaseFileViewFolderSelectorComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
15745
+ const _c0$s = function (a0) { return { cat: a0, level: 1 }; };
15746
+ function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
16021
15747
  i0.ɵɵelementContainerStart(0);
16022
- i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
15748
+ i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template, 1, 0, "ng-container", 8);
16023
15749
  i0.ɵɵelementContainerEnd();
16024
15750
  } if (rf & 2) {
16025
15751
  const cat_r3 = ctx.$implicit;
16026
15752
  i0.ɵɵnextContext();
16027
15753
  const _r1 = i0.ɵɵreference(13);
16028
15754
  i0.ɵɵadvance(1);
16029
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$u, cat_r3));
15755
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$s, cat_r3));
16030
15756
  } }
16031
15757
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
16032
15758
  i0.ɵɵelementContainer(0);
16033
15759
  } }
16034
- const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
15760
+ const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
16035
15761
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) { if (rf & 1) {
16036
15762
  i0.ɵɵelementContainerStart(0);
16037
15763
  i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
@@ -16042,7 +15768,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
16042
15768
  i0.ɵɵnextContext();
16043
15769
  const _r1 = i0.ɵɵreference(13);
16044
15770
  i0.ɵɵadvance(1);
16045
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
15771
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
16046
15772
  } }
16047
15773
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
16048
15774
  const _r12 = i0.ɵɵgetCurrentView();
@@ -16054,7 +15780,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
16054
15780
  i0.ɵɵelement(3, "img", 12);
16055
15781
  i0.ɵɵtext(4);
16056
15782
  i0.ɵɵelementEnd();
16057
- i0.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template, 2, 5, "ng-container", 2);
15783
+ i0.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template, 2, 5, "ng-container", 3);
16058
15784
  i0.ɵɵelementEnd();
16059
15785
  } if (rf & 2) {
16060
15786
  const cat_r5 = ctx.cat;
@@ -16125,42 +15851,43 @@ class CaseFileViewFolderSelectorComponent {
16125
15851
  }
16126
15852
  }
16127
15853
  CaseFileViewFolderSelectorComponent.ɵfac = function CaseFileViewFolderSelectorComponent_Factory(t) { return new (t || CaseFileViewFolderSelectorComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
16128
- CaseFileViewFolderSelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], decls: 14, vars: 2, consts: [[1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "cancel", 3, "click"], [1, "close", 3, "click"], ["folder", ""], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "name", "id", "click"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) { if (rf & 1) {
16129
- i0.ɵɵelementStart(0, "h2", 0);
16130
- i0.ɵɵtext(1, "Move File");
15854
+ CaseFileViewFolderSelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], decls: 14, vars: 2, consts: [[1, "close", 3, "click"], [1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "cancel", 3, "click"], ["folder", ""], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "name", "id", "click"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) { if (rf & 1) {
15855
+ i0.ɵɵelementStart(0, "div", 0);
15856
+ i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_div_click_0_listener() { return ctx.cancel(); });
16131
15857
  i0.ɵɵelementEnd();
16132
- i0.ɵɵelementStart(2, "p");
16133
- i0.ɵɵtext(3);
15858
+ i0.ɵɵelementStart(1, "h2", 1);
15859
+ i0.ɵɵtext(2, "Move File");
16134
15860
  i0.ɵɵelementEnd();
16135
- i0.ɵɵelementStart(4, "div", 1);
16136
- i0.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_container_5_Template, 2, 4, "ng-container", 2);
15861
+ i0.ɵɵelementStart(3, "p");
15862
+ i0.ɵɵtext(4);
16137
15863
  i0.ɵɵelementEnd();
16138
- i0.ɵɵelementStart(6, "div", 3);
16139
- i0.ɵɵelementStart(7, "button", 4);
16140
- i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_7_listener() { return ctx.save(); });
16141
- i0.ɵɵtext(8, "Save");
15864
+ i0.ɵɵelementStart(5, "div", 2);
15865
+ i0.ɵɵtemplate(6, CaseFileViewFolderSelectorComponent_ng_container_6_Template, 2, 4, "ng-container", 3);
16142
15866
  i0.ɵɵelementEnd();
16143
- i0.ɵɵelementStart(9, "a", 5);
16144
- i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_a_click_9_listener() { return ctx.cancel(); });
16145
- i0.ɵɵtext(10, "Cancel");
15867
+ i0.ɵɵelementStart(7, "div", 4);
15868
+ i0.ɵɵelementStart(8, "button", 5);
15869
+ i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_8_listener() { return ctx.save(); });
15870
+ i0.ɵɵtext(9, "Save");
16146
15871
  i0.ɵɵelementEnd();
15872
+ i0.ɵɵelementStart(10, "a", 6);
15873
+ i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_a_click_10_listener() { return ctx.cancel(); });
15874
+ i0.ɵɵtext(11, "Cancel");
16147
15875
  i0.ɵɵelementEnd();
16148
- i0.ɵɵelementStart(11, "div", 6);
16149
- i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_div_click_11_listener() { return ctx.cancel(); });
16150
15876
  i0.ɵɵelementEnd();
16151
15877
  i0.ɵɵtemplate(12, CaseFileViewFolderSelectorComponent_ng_template_12_Template, 6, 5, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
16152
15878
  } if (rf & 2) {
16153
- i0.ɵɵadvance(3);
15879
+ i0.ɵɵadvance(4);
16154
15880
  i0.ɵɵtextInterpolate1("Where do you want to move \"", ctx.data.document.document_filename, "\" file?");
16155
15881
  i0.ɵɵadvance(2);
16156
15882
  i0.ɵɵproperty("ngForOf", ctx.currentCategories);
16157
- } }, directives: [i2.NgForOf, i2.NgTemplateOutlet], styles: ["[_nghost-%COMP%]{position:relative;display:block}.folders[_ngcontent-%COMP%]{margin-bottom:20px}.folder[_ngcontent-%COMP%]{display:none;border-bottom:1px solid #ccc;border-top:1px solid #ccc;margin:0 0 -1px}.folders[_ngcontent-%COMP%] > .folder[_ngcontent-%COMP%], input[_ngcontent-%COMP%]:checked ~ .folder[_ngcontent-%COMP%]{display:block}.iconImg[_ngcontent-%COMP%]{position:relative;display:inline-block;height:28px}.folder[_ngcontent-%COMP%] > .folder[_ngcontent-%COMP%]{margin-left:20px}.folder[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:before{top:3px}.folder[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{top:13px}p[_ngcontent-%COMP%]{font-weight:700}button[_ngcontent-%COMP%]{margin-right:20px}.close[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel[_ngcontent-%COMP%], .close[_ngcontent-%COMP%]{cursor:pointer}"] });
15883
+ } }, directives: [i2.NgForOf, i2.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 });
16158
15884
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
16159
15885
  type: Component,
16160
15886
  args: [{
16161
15887
  selector: 'xui-case-file-view-folder-selector',
16162
15888
  templateUrl: './case-file-view-folder-selector.component.html',
16163
- styleUrls: ['./case-file-view-folder-selector.component.scss']
15889
+ styleUrls: ['./case-file-view-folder-selector.component.scss'],
15890
+ encapsulation: ViewEncapsulation.None
16164
15891
  }]
16165
15892
  }], function () { return [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
16166
15893
  type: Inject,
@@ -16216,8 +15943,8 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
16216
15943
  i0.ɵɵadvance(1);
16217
15944
  i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
16218
15945
  } }
16219
- const _c0$t = [[["", "trigger", ""]]];
16220
- const _c1$9 = ["[trigger]"];
15946
+ const _c0$r = [[["", "trigger", ""]]];
15947
+ const _c1$8 = ["[trigger]"];
16221
15948
  class CaseFileViewOverlayMenuComponent {
16222
15949
  constructor() {
16223
15950
  this.title = '';
@@ -16231,8 +15958,8 @@ class CaseFileViewOverlayMenuComponent {
16231
15958
  }
16232
15959
  }
16233
15960
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
16234
- CaseFileViewOverlayMenuComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
16235
- i0.ɵɵprojectionDef(_c0$t);
15961
+ CaseFileViewOverlayMenuComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
15962
+ i0.ɵɵprojectionDef(_c0$r);
16236
15963
  i0.ɵɵelementStart(0, "div");
16237
15964
  i0.ɵɵelementStart(1, "button", 0, 1);
16238
15965
  i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -16641,7 +16368,7 @@ class CaseFileViewFolderComponent {
16641
16368
  return Object.assign(documentTreeNode, node);
16642
16369
  }
16643
16370
  let filteredData = this.documentTreeData;
16644
- if (searchTerm && searchTerm.length >= CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS && this.documentFilterFormGroup.controls[CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME].value.length > 2) {
16371
+ if (searchTerm && searchTerm.length >= CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS && this.documentFilterFormGroup.controls[CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME].value.length > 0) {
16645
16372
  filteredData = this.documentTreeData.map(copy).filter(function filterTreeData(node) {
16646
16373
  if (node.name && node.name.toLowerCase().includes(searchTerm) && node.type === DocumentTreeNodeType.DOCUMENT) {
16647
16374
  return true;
@@ -16721,7 +16448,6 @@ class CaseFileViewFolderComponent {
16721
16448
  }
16722
16449
  openMoveDialog(node) {
16723
16450
  const dialogRef = this.dialog.open(CaseFileViewFolderSelectorComponent, {
16724
- width: '570px',
16725
16451
  data: { categories: this.categories, document: node }
16726
16452
  });
16727
16453
  dialogRef.afterClosed().subscribe(newCatId => {
@@ -16746,7 +16472,7 @@ class CaseFileViewFolderComponent {
16746
16472
  }
16747
16473
  CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
16748
16474
  CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
16749
- CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 3;
16475
+ CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 1;
16750
16476
  CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$3.MatDialog)); };
16751
16477
  CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments", allowMoving: "allowMoving" }, outputs: { clickedDocument: "clickedDocument", moveDocument: "moveDocument" }, decls: 9, vars: 3, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", 1, "form-control", "document-search"], [1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], ["class", "document-tree-container", 4, "ngIf"], [1, "document-tree-container"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-container__node document-tree-container__node--document", 4, "cdkTreeNodeDef"], ["class", "document-tree-container__node document-tree-container__folder", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-container__node", "document-tree-container__node--document"], [1, "node", 3, "click"], ["disabled", "", 1, "node__icon"], ["src", "/assets/img/case-file-view/case-file-view-document.svg", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], [1, "node__document-options"], [3, "allowMoving", "changeFolderAction", "openInANewTabAction", "downloadAction", "printAction"], [1, "document-tree-container__node", "document-tree-container__folder"], ["cdkTreeNodeToggle", "", 1, "node"], [1, "node__icon"], ["alt", "Folder icon", 1, "node__iconImg", 3, "src"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) { if (rf & 1) {
16752
16478
  i0.ɵɵelementStart(0, "div", 0);
@@ -16980,8 +16706,8 @@ function SelectFlagTypeComponent_div_9_div_4_Template(rf, ctx) { if (rf & 1) {
16980
16706
  i0.ɵɵadvance(3);
16981
16707
  i0.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
16982
16708
  } }
16983
- const _c0$s = function (a0) { return { "form-group-error": a0 }; };
16984
- const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
16709
+ const _c0$q = function (a0) { return { "form-group-error": a0 }; };
16710
+ const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
16985
16711
  function SelectFlagTypeComponent_div_9_Template(rf, ctx) { if (rf & 1) {
16986
16712
  i0.ɵɵelementStart(0, "div", 15);
16987
16713
  i0.ɵɵelementStart(1, "div", 1);
@@ -16995,11 +16721,11 @@ function SelectFlagTypeComponent_div_9_Template(rf, ctx) { if (rf & 1) {
16995
16721
  } if (rf & 2) {
16996
16722
  const ctx_r2 = i0.ɵɵnextContext();
16997
16723
  i0.ɵɵadvance(1);
16998
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$s, ctx_r2.flagTypeErrorMessage.length > 0));
16724
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$q, ctx_r2.flagTypeErrorMessage.length > 0));
16999
16725
  i0.ɵɵadvance(3);
17000
16726
  i0.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
17001
16727
  i0.ɵɵadvance(1);
17002
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$8, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
16728
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$7, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
17003
16729
  } }
17004
16730
  function SelectFlagTypeComponent_div_10_Template(rf, ctx) { if (rf & 1) {
17005
16731
  const _r10 = i0.ɵɵgetCurrentView();
@@ -17146,7 +16872,7 @@ SelectFlagTypeComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SelectFlagTypeCom
17146
16872
  } if (rf & 2) {
17147
16873
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17148
16874
  i0.ɵɵadvance(1);
17149
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$s, ctx.flagTypeNotSelectedErrorMessage.length > 0));
16875
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$q, ctx.flagTypeNotSelectedErrorMessage.length > 0));
17150
16876
  i0.ɵɵadvance(4);
17151
16877
  i0.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
17152
16878
  i0.ɵɵadvance(1);
@@ -17238,7 +16964,7 @@ function SearchLanguageInterpreterComponent_div_21_div_5_Template(rf, ctx) { if
17238
16964
  i0.ɵɵadvance(3);
17239
16965
  i0.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
17240
16966
  } }
17241
- const _c0$r = function (a0) { return { "form-group-error": a0 }; };
16967
+ const _c0$p = function (a0) { return { "form-group-error": a0 }; };
17242
16968
  function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) { if (rf & 1) {
17243
16969
  i0.ɵɵelementStart(0, "div", 25);
17244
16970
  i0.ɵɵelementStart(1, "div", 1);
@@ -17253,7 +16979,7 @@ function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) { if (rf &
17253
16979
  } if (rf & 2) {
17254
16980
  const ctx_r5 = i0.ɵɵnextContext();
17255
16981
  i0.ɵɵadvance(1);
17256
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$r, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
16982
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$p, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
17257
16983
  i0.ɵɵadvance(2);
17258
16984
  i0.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
17259
16985
  i0.ɵɵadvance(1);
@@ -17419,7 +17145,7 @@ SearchLanguageInterpreterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Search
17419
17145
  const _r2 = i0.ɵɵreference(12);
17420
17146
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17421
17147
  i0.ɵɵadvance(1);
17422
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$r, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
17148
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$p, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
17423
17149
  i0.ɵɵadvance(2);
17424
17150
  i0.ɵɵproperty("for", ctx.languageSearchTermControlName);
17425
17151
  i0.ɵɵadvance(1);
@@ -17533,7 +17259,7 @@ function SelectFlagLocationComponent_div_9_Template(rf, ctx) { if (rf & 1) {
17533
17259
  i0.ɵɵelementEnd();
17534
17260
  i0.ɵɵelementEnd();
17535
17261
  } }
17536
- const _c0$q = function (a0) { return { "form-group-error": a0 }; };
17262
+ const _c0$o = function (a0) { return { "form-group-error": a0 }; };
17537
17263
  class SelectFlagLocationComponent {
17538
17264
  constructor() {
17539
17265
  this.caseFlagStateEmitter = new EventEmitter();
@@ -17618,7 +17344,7 @@ SelectFlagLocationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SelectFlagLoc
17618
17344
  } if (rf & 2) {
17619
17345
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17620
17346
  i0.ɵɵadvance(1);
17621
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$q, ctx.errorMessages.length > 0));
17347
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
17622
17348
  i0.ɵɵadvance(4);
17623
17349
  i0.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
17624
17350
  i0.ɵɵadvance(1);
@@ -17671,7 +17397,7 @@ function AddCommentsComponent_div_10_Template(rf, ctx) { if (rf & 1) {
17671
17397
  i0.ɵɵadvance(3);
17672
17398
  i0.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
17673
17399
  } }
17674
- const _c0$p = function (a0) { return { "form-group-error": a0 }; };
17400
+ const _c0$n = function (a0) { return { "form-group-error": a0 }; };
17675
17401
  class AddCommentsComponent {
17676
17402
  constructor() {
17677
17403
  this.optional = false;
@@ -17749,7 +17475,7 @@ AddCommentsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddCommentsComponent
17749
17475
  } if (rf & 2) {
17750
17476
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17751
17477
  i0.ɵɵadvance(2);
17752
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c0$p, ctx.errorMessages.length > 0));
17478
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c0$n, ctx.errorMessages.length > 0));
17753
17479
  i0.ɵɵadvance(2);
17754
17480
  i0.ɵɵproperty("for", ctx.flagCommentsControlName);
17755
17481
  i0.ɵɵadvance(1);
@@ -17818,7 +17544,7 @@ function ManageCaseFlagsComponent_div_9_Template(rf, ctx) { if (rf & 1) {
17818
17544
  i0.ɵɵelementEnd();
17819
17545
  i0.ɵɵelementEnd();
17820
17546
  } }
17821
- const _c0$o = function (a0) { return { "form-group-error": a0 }; };
17547
+ const _c0$m = function (a0) { return { "form-group-error": a0 }; };
17822
17548
  class ManageCaseFlagsComponent {
17823
17549
  constructor() {
17824
17550
  this.caseFlagStateEmitter = new EventEmitter();
@@ -17982,7 +17708,7 @@ ManageCaseFlagsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ManageCaseFlagsC
17982
17708
  } if (rf & 2) {
17983
17709
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17984
17710
  i0.ɵɵadvance(1);
17985
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
17711
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$m, ctx.errorMessages.length > 0));
17986
17712
  i0.ɵɵadvance(4);
17987
17713
  i0.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
17988
17714
  i0.ɵɵadvance(1);
@@ -18041,8 +17767,8 @@ function UpdateFlagComponent_button_22_Template(rf, ctx) { if (rf & 1) {
18041
17767
  i0.ɵɵtext(1, " Make inactive ");
18042
17768
  i0.ɵɵelementEnd();
18043
17769
  } }
18044
- const _c0$n = function (a0) { return { "form-group-error": a0 }; };
18045
- const _c1$7 = function (a0) { return { "govuk-tag--grey": a0 }; };
17770
+ const _c0$l = function (a0) { return { "form-group-error": a0 }; };
17771
+ const _c1$6 = function (a0) { return { "govuk-tag--grey": a0 }; };
18046
17772
  class UpdateFlagComponent {
18047
17773
  constructor() {
18048
17774
  this.caseFlagStateEmitter = new EventEmitter();
@@ -18160,7 +17886,7 @@ UpdateFlagComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UpdateFlagComponent,
18160
17886
  } if (rf & 2) {
18161
17887
  i0.ɵɵproperty("formGroup", ctx.formGroup);
18162
17888
  i0.ɵɵadvance(2);
18163
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$n, ctx.errorMessages.length > 0));
17889
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$l, ctx.errorMessages.length > 0));
18164
17890
  i0.ɵɵadvance(2);
18165
17891
  i0.ɵɵproperty("for", ctx.updateFlagControlName);
18166
17892
  i0.ɵɵadvance(1);
@@ -18176,7 +17902,7 @@ UpdateFlagComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UpdateFlagComponent,
18176
17902
  i0.ɵɵadvance(3);
18177
17903
  i0.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
18178
17904
  i0.ɵɵadvance(6);
18179
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c1$7, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
17905
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c1$6, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
18180
17906
  i0.ɵɵadvance(1);
18181
17907
  i0.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
18182
17908
  i0.ɵɵadvance(2);
@@ -18294,2050 +18020,6 @@ CaseFlagSummaryListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFlagSumm
18294
18020
  type: Input
18295
18021
  }] }); })();
18296
18022
 
18297
- var LinkedCasesPages;
18298
- (function (LinkedCasesPages) {
18299
- LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
18300
- LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
18301
- LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
18302
- LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
18303
- LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
18304
- })(LinkedCasesPages || (LinkedCasesPages = {}));
18305
- var LinkedCasesErrorMessages;
18306
- (function (LinkedCasesErrorMessages) {
18307
- LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
18308
- LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
18309
- LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
18310
- LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
18311
- LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
18312
- LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
18313
- LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
18314
- LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
18315
- LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
18316
- LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
18317
- LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
18318
- LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
18319
- })(LinkedCasesErrorMessages || (LinkedCasesErrorMessages = {}));
18320
- var LinkedCasesEventTriggers;
18321
- (function (LinkedCasesEventTriggers) {
18322
- LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
18323
- LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
18324
- })(LinkedCasesEventTriggers || (LinkedCasesEventTriggers = {}));
18325
- var Patterns;
18326
- (function (Patterns) {
18327
- Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
18328
- })(Patterns || (Patterns = {}));
18329
-
18330
- function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) { if (rf & 1) {
18331
- i0.ɵɵelementStart(0, "p", 5);
18332
- i0.ɵɵelementStart(1, "span", 6);
18333
- i0.ɵɵtext(2, "Error:");
18334
- i0.ɵɵelementEnd();
18335
- i0.ɵɵtext(3);
18336
- i0.ɵɵelementEnd();
18337
- } if (rf & 2) {
18338
- const ctx_r2 = i0.ɵɵnextContext(2);
18339
- i0.ɵɵadvance(3);
18340
- i0.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
18341
- } }
18342
- function BeforeYouStartComponent_div_1_Template(rf, ctx) { if (rf & 1) {
18343
- const _r4 = i0.ɵɵgetCurrentView();
18344
- i0.ɵɵelementStart(0, "div");
18345
- i0.ɵɵelementStart(1, "h1", 1);
18346
- i0.ɵɵtext(2, "There is a problem");
18347
- i0.ɵɵelementEnd();
18348
- i0.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
18349
- i0.ɵɵelementStart(4, "p", 3);
18350
- i0.ɵɵelementStart(5, "a", 4);
18351
- i0.ɵɵlistener("click", function BeforeYouStartComponent_div_1_Template_a_click_5_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.onBack(); });
18352
- i0.ɵɵtext(6, "Go back to the Linked cases tab");
18353
- i0.ɵɵelementEnd();
18354
- i0.ɵɵelementEnd();
18355
- i0.ɵɵelementEnd();
18356
- } if (rf & 2) {
18357
- const ctx_r0 = i0.ɵɵnextContext();
18358
- i0.ɵɵadvance(3);
18359
- i0.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
18360
- } }
18361
- function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) { if (rf & 1) {
18362
- i0.ɵɵelementStart(0, "div", 11);
18363
- i0.ɵɵelementStart(1, "p", 3);
18364
- i0.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
18365
- i0.ɵɵelementEnd();
18366
- i0.ɵɵelementStart(3, "p", 3);
18367
- i0.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
18368
- i0.ɵɵelementEnd();
18369
- i0.ɵɵelementEnd();
18370
- } }
18371
- function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) { if (rf & 1) {
18372
- i0.ɵɵelementStart(0, "div", 12);
18373
- i0.ɵɵelementStart(1, "p", 3);
18374
- i0.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
18375
- i0.ɵɵelementEnd();
18376
- i0.ɵɵelementEnd();
18377
- } }
18378
- function BeforeYouStartComponent_div_2_Template(rf, ctx) { if (rf & 1) {
18379
- const _r8 = i0.ɵɵgetCurrentView();
18380
- i0.ɵɵelementStart(0, "div");
18381
- i0.ɵɵelementStart(1, "h1", 1);
18382
- i0.ɵɵtext(2, "Before you start");
18383
- i0.ɵɵelementEnd();
18384
- i0.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
18385
- i0.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
18386
- i0.ɵɵelementStart(5, "div", 9);
18387
- i0.ɵɵelementStart(6, "button", 10);
18388
- i0.ɵɵlistener("click", function BeforeYouStartComponent_div_2_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onNext(); });
18389
- i0.ɵɵtext(7, "Next");
18390
- i0.ɵɵelementEnd();
18391
- i0.ɵɵelementEnd();
18392
- i0.ɵɵelementEnd();
18393
- } if (rf & 2) {
18394
- const ctx_r1 = i0.ɵɵnextContext();
18395
- i0.ɵɵadvance(3);
18396
- i0.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
18397
- i0.ɵɵadvance(1);
18398
- i0.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
18399
- } }
18400
- class BeforeYouStartComponent {
18401
- constructor(router, linkedCasesService) {
18402
- this.router = router;
18403
- this.linkedCasesService = linkedCasesService;
18404
- this.linkedCasesStateEmitter = new EventEmitter();
18405
- this.isLinkCasesJourney = false;
18406
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
18407
- // re-initiate the state based on the casefield value
18408
- const linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(item => item).map(item => item.id);
18409
- this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(item => linkedCaseRefereneIds.indexOf(item.caseReference) !== -1);
18410
- this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
18411
- }
18412
- onNext() {
18413
- this.linkedCasesStateEmitter.emit({
18414
- currentLinkedCasesPage: LinkedCasesPages.BEFORE_YOU_START,
18415
- errorMessages: this.errorMessages,
18416
- navigateToNextPage: true
18417
- });
18418
- }
18419
- onBack() {
18420
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
18421
- window.location.hash = 'Linked cases';
18422
- });
18423
- }
18424
- }
18425
- BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
18426
- BeforeYouStartComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
18427
- i0.ɵɵelementStart(0, "div");
18428
- i0.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
18429
- i0.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
18430
- i0.ɵɵelementEnd();
18431
- } if (rf & 2) {
18432
- i0.ɵɵadvance(1);
18433
- i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
18434
- i0.ɵɵadvance(1);
18435
- i0.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
18436
- } }, directives: [i2.NgIf], encapsulation: 2 });
18437
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BeforeYouStartComponent, [{
18438
- type: Component,
18439
- args: [{
18440
- selector: 'ccd-linked-cases-before-you-start',
18441
- templateUrl: './before-you-start.component.html'
18442
- }]
18443
- }], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
18444
- type: Output
18445
- }] }); })();
18446
-
18447
- function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) { if (rf & 1) {
18448
- const _r8 = i0.ɵɵgetCurrentView();
18449
- i0.ɵɵelementStart(0, "tr", 7);
18450
- i0.ɵɵelementStart(1, "td", 14);
18451
- i0.ɵɵtext(2);
18452
- i0.ɵɵelement(3, "br");
18453
- i0.ɵɵtext(4);
18454
- i0.ɵɵpipe(5, "ccdCaseReference");
18455
- i0.ɵɵelementEnd();
18456
- i0.ɵɵelementStart(6, "td", 14);
18457
- i0.ɵɵelementStart(7, "a", 15);
18458
- i0.ɵɵlistener("click", function CheckYourAnswersComponent_table_4_tr_9_Template_a_click_7_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(2); return ctx_r7.onChange(); });
18459
- i0.ɵɵtext(8, "Change");
18460
- i0.ɵɵelementEnd();
18461
- i0.ɵɵelementEnd();
18462
- i0.ɵɵelementEnd();
18463
- } if (rf & 2) {
18464
- const case_r6 = ctx.$implicit;
18465
- i0.ɵɵadvance(2);
18466
- i0.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
18467
- i0.ɵɵadvance(2);
18468
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
18469
- } }
18470
- function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) { if (rf & 1) {
18471
- i0.ɵɵelementStart(0, "tr", 7);
18472
- i0.ɵɵelementStart(1, "td", 16);
18473
- i0.ɵɵtext(2, " None ");
18474
- i0.ɵɵelementEnd();
18475
- i0.ɵɵelementEnd();
18476
- } }
18477
- function CheckYourAnswersComponent_table_4_Template(rf, ctx) { if (rf & 1) {
18478
- i0.ɵɵelementStart(0, "table", 13);
18479
- i0.ɵɵelementStart(1, "caption", 5);
18480
- i0.ɵɵtext(2, "Cases to unlink");
18481
- i0.ɵɵelementEnd();
18482
- i0.ɵɵelementStart(3, "thead", 6);
18483
- i0.ɵɵelementStart(4, "tr", 7);
18484
- i0.ɵɵelementStart(5, "th", 8);
18485
- i0.ɵɵtext(6, "Case name and number");
18486
- i0.ɵɵelementEnd();
18487
- i0.ɵɵelement(7, "th", 8);
18488
- i0.ɵɵelementEnd();
18489
- i0.ɵɵelementEnd();
18490
- i0.ɵɵelementStart(8, "tbody", 10);
18491
- i0.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
18492
- i0.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
18493
- i0.ɵɵelementEnd();
18494
- i0.ɵɵelementEnd();
18495
- } if (rf & 2) {
18496
- const ctx_r0 = i0.ɵɵnextContext();
18497
- i0.ɵɵadvance(9);
18498
- i0.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
18499
- i0.ɵɵadvance(1);
18500
- i0.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
18501
- } }
18502
- function CheckYourAnswersComponent_th_15_Template(rf, ctx) { if (rf & 1) {
18503
- i0.ɵɵelement(0, "th", 8);
18504
- } }
18505
- function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) { if (rf & 1) {
18506
- i0.ɵɵelement(0, "br");
18507
- } }
18508
- function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) { if (rf & 1) {
18509
- i0.ɵɵelementStart(0, "span");
18510
- i0.ɵɵtext(1);
18511
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
18512
- i0.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
18513
- i0.ɵɵelementEnd();
18514
- } if (rf & 2) {
18515
- const reason_r12 = ctx.$implicit;
18516
- const isLast_r13 = ctx.last;
18517
- i0.ɵɵadvance(1);
18518
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
18519
- i0.ɵɵadvance(2);
18520
- i0.ɵɵproperty("ngIf", !isLast_r13);
18521
- } }
18522
- function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) { if (rf & 1) {
18523
- const _r16 = i0.ɵɵgetCurrentView();
18524
- i0.ɵɵelementStart(0, "td", 14);
18525
- i0.ɵɵelementStart(1, "a", 15);
18526
- i0.ɵɵlistener("click", function CheckYourAnswersComponent_tr_17_td_10_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(2); return ctx_r15.onChange(); });
18527
- i0.ɵɵtext(2, "Change");
18528
- i0.ɵɵelementEnd();
18529
- i0.ɵɵelementEnd();
18530
- } }
18531
- function CheckYourAnswersComponent_tr_17_Template(rf, ctx) { if (rf & 1) {
18532
- i0.ɵɵelementStart(0, "tr", 7);
18533
- i0.ɵɵelementStart(1, "td", 14);
18534
- i0.ɵɵelementStart(2, "span");
18535
- i0.ɵɵtext(3);
18536
- i0.ɵɵelement(4, "br");
18537
- i0.ɵɵtext(5);
18538
- i0.ɵɵpipe(6, "ccdCaseReference");
18539
- i0.ɵɵelementEnd();
18540
- i0.ɵɵelementEnd();
18541
- i0.ɵɵelementStart(7, "td", 14);
18542
- i0.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
18543
- i0.ɵɵelementEnd();
18544
- i0.ɵɵelement(9, "td", 14);
18545
- i0.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
18546
- i0.ɵɵelementEnd();
18547
- } if (rf & 2) {
18548
- const case_r9 = ctx.$implicit;
18549
- const ctx_r2 = i0.ɵɵnextContext();
18550
- i0.ɵɵadvance(3);
18551
- i0.ɵɵtextInterpolate1("", case_r9.caseName, " ");
18552
- i0.ɵɵadvance(2);
18553
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
18554
- i0.ɵɵadvance(3);
18555
- i0.ɵɵproperty("ngForOf", case_r9.reasons);
18556
- i0.ɵɵadvance(2);
18557
- i0.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
18558
- } }
18559
- function CheckYourAnswersComponent_tr_18_Template(rf, ctx) { if (rf & 1) {
18560
- i0.ɵɵelementStart(0, "tr", 7);
18561
- i0.ɵɵelementStart(1, "td", 20);
18562
- i0.ɵɵtext(2, " None ");
18563
- i0.ɵɵelementEnd();
18564
- i0.ɵɵelementEnd();
18565
- } }
18566
- class CheckYourAnswersComponent {
18567
- constructor(linkedCasesService) {
18568
- this.linkedCasesService = linkedCasesService;
18569
- this.linkedCasesStateEmitter = new EventEmitter();
18570
- }
18571
- ngOnInit() {
18572
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
18573
- this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
18574
- this.linkedCases = this.linkedCasesService.linkedCases.filter(linkedCase => !linkedCase.unlink);
18575
- this.casesToUnlink = this.linkedCasesService.linkedCases.filter(linkedCase => linkedCase.unlink && linkedCase.unlink === true);
18576
- }
18577
- onChange() {
18578
- this.linkedCasesService.editMode = true;
18579
- this.linkedCasesStateEmitter.emit({
18580
- currentLinkedCasesPage: LinkedCasesPages.CHECK_YOUR_ANSWERS,
18581
- navigateToPreviousPage: true,
18582
- navigateToNextPage: true
18583
- });
18584
- }
18585
- }
18586
- CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
18587
- CheckYourAnswersComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
18588
- i0.ɵɵelementStart(0, "div", 0);
18589
- i0.ɵɵelementStart(1, "div", 1);
18590
- i0.ɵɵelementStart(2, "h1", 2);
18591
- i0.ɵɵtext(3, "Check your answers");
18592
- i0.ɵɵelementEnd();
18593
- i0.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
18594
- i0.ɵɵelementStart(5, "table", 4);
18595
- i0.ɵɵelementStart(6, "caption", 5);
18596
- i0.ɵɵtext(7);
18597
- i0.ɵɵelementEnd();
18598
- i0.ɵɵelementStart(8, "thead", 6);
18599
- i0.ɵɵelementStart(9, "tr", 7);
18600
- i0.ɵɵelementStart(10, "th", 8);
18601
- i0.ɵɵtext(11, "Case name and number");
18602
- i0.ɵɵelementEnd();
18603
- i0.ɵɵelementStart(12, "th", 8);
18604
- i0.ɵɵtext(13, "Reasons for case link");
18605
- i0.ɵɵelementEnd();
18606
- i0.ɵɵelement(14, "th", 8);
18607
- i0.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
18608
- i0.ɵɵelementEnd();
18609
- i0.ɵɵelementEnd();
18610
- i0.ɵɵelementStart(16, "tbody", 10);
18611
- i0.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
18612
- i0.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
18613
- i0.ɵɵelementEnd();
18614
- i0.ɵɵelementEnd();
18615
- i0.ɵɵelementEnd();
18616
- i0.ɵɵelementEnd();
18617
- } if (rf & 2) {
18618
- i0.ɵɵadvance(4);
18619
- i0.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
18620
- i0.ɵɵadvance(3);
18621
- i0.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
18622
- i0.ɵɵadvance(8);
18623
- i0.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
18624
- i0.ɵɵadvance(2);
18625
- i0.ɵɵproperty("ngForOf", ctx.linkedCases);
18626
- i0.ɵɵadvance(1);
18627
- i0.ɵɵproperty("ngIf", !ctx.linkedCases.length);
18628
- } }, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
18629
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckYourAnswersComponent, [{
18630
- type: Component,
18631
- args: [{
18632
- selector: 'ccd-linked-cases-check-your-answers',
18633
- templateUrl: './check-your-answers.component.html',
18634
- styleUrls: ['./check-your-answers.component.scss']
18635
- }]
18636
- }], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
18637
- type: Output
18638
- }] }); })();
18639
-
18640
- class ValidatorsUtils {
18641
- numberLengthValidator(inputLength) {
18642
- return (control) => {
18643
- return control.value.length !== inputLength ? { isValid: false } : null;
18644
- };
18645
- }
18646
- formArraySelectedValidator() {
18647
- return (control) => {
18648
- return control.value.every((option) => !option.selected) ? { isValid: false } : null;
18649
- };
18650
- }
18651
- regexPattern(regexPattern) {
18652
- return (control) => {
18653
- const regex = new RegExp(regexPattern);
18654
- return regex.test(control.value) ? null : { isValid: false };
18655
- };
18656
- }
18657
- }
18658
- ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
18659
- ValidatorsUtils.ɵprov = i0.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
18660
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidatorsUtils, [{
18661
- type: Injectable,
18662
- args: [{ providedIn: 'root' }]
18663
- }], null, null); })();
18664
-
18665
- function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
18666
- i0.ɵɵelementStart(0, "span", 28);
18667
- i0.ɵɵelementStart(1, "span", 29);
18668
- i0.ɵɵtext(2, "Error:");
18669
- i0.ɵɵelementEnd();
18670
- i0.ɵɵtext(3);
18671
- i0.ɵɵelementEnd();
18672
- } if (rf & 2) {
18673
- const ctx_r4 = i0.ɵɵnextContext(2);
18674
- i0.ɵɵadvance(3);
18675
- i0.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
18676
- } }
18677
- function LinkCasesComponent_div_8_span_10_Template(rf, ctx) { if (rf & 1) {
18678
- i0.ɵɵelementStart(0, "span", 28);
18679
- i0.ɵɵelementStart(1, "span", 29);
18680
- i0.ɵɵtext(2, "Error:");
18681
- i0.ɵɵelementEnd();
18682
- i0.ɵɵtext(3);
18683
- i0.ɵɵelementEnd();
18684
- } if (rf & 2) {
18685
- const ctx_r5 = i0.ɵɵnextContext(2);
18686
- i0.ɵɵadvance(3);
18687
- i0.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
18688
- } }
18689
- function LinkCasesComponent_div_8_div_12_Template(rf, ctx) { if (rf & 1) {
18690
- i0.ɵɵelementStart(0, "div", 30);
18691
- i0.ɵɵelement(1, "input", 31);
18692
- i0.ɵɵelementStart(2, "label", 32);
18693
- i0.ɵɵtext(3);
18694
- i0.ɵɵelementEnd();
18695
- i0.ɵɵelementEnd();
18696
- } if (rf & 2) {
18697
- const reason_r8 = ctx.$implicit;
18698
- const pos_r9 = ctx.index;
18699
- i0.ɵɵproperty("formGroupName", pos_r9);
18700
- i0.ɵɵadvance(1);
18701
- i0.ɵɵpropertyInterpolate("id", reason_r8.key);
18702
- i0.ɵɵproperty("value", reason_r8.value_en);
18703
- i0.ɵɵadvance(1);
18704
- i0.ɵɵpropertyInterpolate("for", reason_r8.key);
18705
- i0.ɵɵadvance(1);
18706
- i0.ɵɵtextInterpolate(reason_r8.value_en);
18707
- } }
18708
- function LinkCasesComponent_div_8_span_15_Template(rf, ctx) { if (rf & 1) {
18709
- i0.ɵɵelementStart(0, "span", 28);
18710
- i0.ɵɵelementStart(1, "span", 29);
18711
- i0.ɵɵtext(2, "Error:");
18712
- i0.ɵɵelementEnd();
18713
- i0.ɵɵtext(3);
18714
- i0.ɵɵelementEnd();
18715
- } if (rf & 2) {
18716
- const ctx_r7 = i0.ɵɵnextContext(2);
18717
- i0.ɵɵadvance(3);
18718
- i0.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
18719
- } }
18720
- const _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
18721
- function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
18722
- const _r11 = i0.ɵɵgetCurrentView();
18723
- i0.ɵɵelementStart(0, "div", 21);
18724
- i0.ɵɵelementStart(1, "h3", 22);
18725
- i0.ɵɵtext(2, "Enter case reference");
18726
- i0.ɵɵelementEnd();
18727
- i0.ɵɵelementStart(3, "div", 5);
18728
- i0.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
18729
- i0.ɵɵelement(5, "input", 23);
18730
- i0.ɵɵelementEnd();
18731
- i0.ɵɵelementStart(6, "h3", 22);
18732
- i0.ɵɵtext(7, "Why should these cases be linked?");
18733
- i0.ɵɵelementEnd();
18734
- i0.ɵɵelementStart(8, "div", 24);
18735
- i0.ɵɵtext(9, " Select all that apply. ");
18736
- i0.ɵɵelementEnd();
18737
- i0.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
18738
- i0.ɵɵelementStart(11, "div", 25);
18739
- i0.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
18740
- i0.ɵɵelementEnd();
18741
- i0.ɵɵelement(13, "br");
18742
- i0.ɵɵelement(14, "br");
18743
- i0.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
18744
- i0.ɵɵelementStart(16, "button", 27);
18745
- i0.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.submitCaseInfo(); });
18746
- i0.ɵɵtext(17, "Propose case link");
18747
- i0.ɵɵelementEnd();
18748
- i0.ɵɵelementEnd();
18749
- } if (rf & 2) {
18750
- const ctx_r0 = i0.ɵɵnextContext();
18751
- i0.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
18752
- i0.ɵɵadvance(3);
18753
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
18754
- i0.ɵɵadvance(1);
18755
- i0.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
18756
- i0.ɵɵadvance(6);
18757
- i0.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
18758
- i0.ɵɵadvance(1);
18759
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
18760
- i0.ɵɵadvance(1);
18761
- i0.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
18762
- i0.ɵɵadvance(3);
18763
- i0.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
18764
- } }
18765
- function LinkCasesComponent_span_13_Template(rf, ctx) { if (rf & 1) {
18766
- i0.ɵɵelementStart(0, "span", 28);
18767
- i0.ɵɵelementStart(1, "span", 29);
18768
- i0.ɵɵtext(2, "Error:");
18769
- i0.ɵɵelementEnd();
18770
- i0.ɵɵtext(3);
18771
- i0.ɵɵelementEnd();
18772
- } if (rf & 2) {
18773
- const ctx_r1 = i0.ɵɵnextContext();
18774
- i0.ɵɵadvance(3);
18775
- i0.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
18776
- } }
18777
- function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
18778
- i0.ɵɵelementStart(0, "span");
18779
- i0.ɵɵtext(1);
18780
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
18781
- i0.ɵɵelement(3, "br");
18782
- i0.ɵɵelementEnd();
18783
- } if (rf & 2) {
18784
- const reason_r15 = ctx.$implicit;
18785
- i0.ɵɵadvance(1);
18786
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
18787
- } }
18788
- const _c1$6 = function (a0) { return { "table-group-error": a0 }; };
18789
- function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
18790
- const _r17 = i0.ɵɵgetCurrentView();
18791
- i0.ɵɵelementStart(0, "tr", 10);
18792
- i0.ɵɵelementStart(1, "td", 33);
18793
- i0.ɵɵelement(2, "div", 34);
18794
- i0.ɵɵelementStart(3, "span");
18795
- i0.ɵɵtext(4);
18796
- i0.ɵɵelement(5, "br");
18797
- i0.ɵɵtext(6);
18798
- i0.ɵɵpipe(7, "ccdCaseReference");
18799
- i0.ɵɵelementEnd();
18800
- i0.ɵɵelementEnd();
18801
- i0.ɵɵelementStart(8, "td", 35);
18802
- i0.ɵɵtext(9);
18803
- i0.ɵɵelementEnd();
18804
- i0.ɵɵelementStart(10, "td", 33);
18805
- i0.ɵɵtext(11);
18806
- i0.ɵɵelementEnd();
18807
- i0.ɵɵelementStart(12, "td", 35);
18808
- i0.ɵɵtext(13);
18809
- i0.ɵɵelementEnd();
18810
- i0.ɵɵelementStart(14, "td", 33);
18811
- i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
18812
- i0.ɵɵelementEnd();
18813
- i0.ɵɵelementStart(16, "td", 33);
18814
- i0.ɵɵelementStart(17, "a", 37);
18815
- i0.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { i0.ɵɵrestoreView(_r17); const pos_r13 = ctx.index; const case_r12 = ctx.$implicit; const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onSelectedLinkedCaseRemove(pos_r13, case_r12.caseReference); });
18816
- i0.ɵɵtext(18, "Remove");
18817
- i0.ɵɵelementEnd();
18818
- i0.ɵɵelementEnd();
18819
- i0.ɵɵelementEnd();
18820
- } if (rf & 2) {
18821
- const case_r12 = ctx.$implicit;
18822
- const ctx_r2 = i0.ɵɵnextContext();
18823
- i0.ɵɵadvance(2);
18824
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
18825
- i0.ɵɵadvance(2);
18826
- i0.ɵɵtextInterpolate1("", case_r12.caseName, " ");
18827
- i0.ɵɵadvance(2);
18828
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
18829
- i0.ɵɵadvance(2);
18830
- i0.ɵɵproperty("title", case_r12.caseTypeDescription);
18831
- i0.ɵɵadvance(1);
18832
- i0.ɵɵtextInterpolate(case_r12.caseType);
18833
- i0.ɵɵadvance(2);
18834
- i0.ɵɵtextInterpolate(case_r12.caseService);
18835
- i0.ɵɵadvance(1);
18836
- i0.ɵɵproperty("title", case_r12.caseStateDescription);
18837
- i0.ɵɵadvance(1);
18838
- i0.ɵɵtextInterpolate(case_r12.caseState);
18839
- i0.ɵɵadvance(2);
18840
- i0.ɵɵproperty("ngForOf", case_r12.reasons);
18841
- i0.ɵɵadvance(2);
18842
- i0.ɵɵattribute("id", case_r12.caseReference);
18843
- } }
18844
- function LinkCasesComponent_tr_32_Template(rf, ctx) { if (rf & 1) {
18845
- i0.ɵɵelementStart(0, "tr", 10);
18846
- i0.ɵɵelementStart(1, "td", 38);
18847
- i0.ɵɵtext(2, " None ");
18848
- i0.ɵɵelementEnd();
18849
- i0.ɵɵelementEnd();
18850
- } }
18851
- class LinkCasesComponent {
18852
- constructor(casesService, fb, validatorsUtils, linkedCasesService) {
18853
- this.casesService = casesService;
18854
- this.fb = fb;
18855
- this.validatorsUtils = validatorsUtils;
18856
- this.linkedCasesService = linkedCasesService;
18857
- this.linkedCasesStateEmitter = new EventEmitter();
18858
- this.errorMessages = [];
18859
- this.selectedCases = [];
18860
- this.linkCaseReasons = [];
18861
- this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
18862
- }
18863
- ngOnInit() {
18864
- this.caseId = this.linkedCasesService.caseId;
18865
- this.caseName = this.linkedCasesService.caseName;
18866
- this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
18867
- this.initForm();
18868
- if (this.linkedCasesService.editMode) {
18869
- // this may have includes the currently added one but yet to be submitted.
18870
- this.selectedCases = this.linkedCasesService.linkedCases;
18871
- }
18872
- else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
18873
- this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
18874
- }
18875
- }
18876
- initForm() {
18877
- this.linkCaseForm = this.fb.group({
18878
- caseNumber: ['', [Validators.minLength(16), this.validatorsUtils.regexPattern(Patterns.CASE_REF)]],
18879
- reasonType: this.getReasonTypeFormArray,
18880
- });
18881
- }
18882
- get getReasonTypeFormArray() {
18883
- return this.fb.array(this.linkCaseReasons.map((val) => this.fb.group({
18884
- key: [val.key],
18885
- value_en: [val.value_en],
18886
- value_cy: [val.value_cy],
18887
- hint_text_en: [val.hint_text_en],
18888
- hint_text_cy: [val.hint_text_cy],
18889
- lov_order: [val.lov_order],
18890
- parent_key: [val.parent_key],
18891
- selected: [!!val.selected],
18892
- })), this.validatorsUtils.formArraySelectedValidator());
18893
- }
18894
- submitCaseInfo() {
18895
- this.errorMessages = [];
18896
- this.caseReasonError = null;
18897
- this.caseNumberError = null;
18898
- this.caseSelectionError = null;
18899
- this.noSelectedCaseError = null;
18900
- if (this.linkCaseForm.valid &&
18901
- !this.isCaseSelected(this.selectedCases) &&
18902
- !this.isCaseSelected(this.linkedCasesService.linkedCases) &&
18903
- !this.isCaseSelectedSameAsCurrentCase()) {
18904
- this.getCaseInfo();
18905
- }
18906
- else {
18907
- this.showErrorInfo();
18908
- }
18909
- }
18910
- isCaseSelected(linkedCases) {
18911
- if (linkedCases.length === 0) {
18912
- return false;
18913
- }
18914
- const caseNumber = this.linkCaseForm.value.caseNumber;
18915
- return !!linkedCases.find((caseLink) => caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''));
18916
- }
18917
- isCaseSelectedSameAsCurrentCase() {
18918
- return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
18919
- }
18920
- showErrorInfo() {
18921
- if (this.linkCaseForm.controls.caseNumber.invalid) {
18922
- this.caseNumberError = LinkedCasesErrorMessages.CaseNumberError;
18923
- this.errorMessages.push({
18924
- title: 'dummy-case-number',
18925
- description: LinkedCasesErrorMessages.CaseNumberError,
18926
- fieldId: 'caseNumber',
18927
- });
18928
- }
18929
- if (this.linkCaseForm.controls.reasonType.invalid) {
18930
- this.caseReasonError = LinkedCasesErrorMessages.ReasonSelectionError;
18931
- this.errorMessages.push({
18932
- title: 'dummy-case-reason',
18933
- description: LinkedCasesErrorMessages.ReasonSelectionError,
18934
- fieldId: 'caseReason',
18935
- });
18936
- }
18937
- if (this.isCaseSelected(this.selectedCases)) {
18938
- this.caseSelectionError = LinkedCasesErrorMessages.CaseProposedError;
18939
- this.errorMessages.push({
18940
- title: 'dummy-case-number',
18941
- description: LinkedCasesErrorMessages.CaseProposedError,
18942
- fieldId: 'caseNumber',
18943
- });
18944
- }
18945
- if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
18946
- this.caseSelectionError = LinkedCasesErrorMessages.CasesLinkedError;
18947
- this.errorMessages.push({
18948
- title: 'dummy-case-number',
18949
- description: LinkedCasesErrorMessages.CasesLinkedError,
18950
- fieldId: 'caseNumber',
18951
- });
18952
- }
18953
- if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
18954
- this.errorMessages.push({
18955
- title: 'dummy-case-number',
18956
- description: LinkedCasesErrorMessages.ProposedCaseWithIn,
18957
- fieldId: 'caseNumber',
18958
- });
18959
- }
18960
- window.scrollTo(0, 0);
18961
- this.emitLinkedCasesState(false);
18962
- }
18963
- getCaseInfo() {
18964
- const caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
18965
- this.casesService
18966
- .getCaseViewV2(caseNumberData)
18967
- .subscribe((caseView) => {
18968
- this.linkedCasesService.caseDetails = caseView;
18969
- const caseLink = {
18970
- caseReference: caseView.case_id,
18971
- reasons: this.getSelectedCaseReasons(),
18972
- createdDateTime: moment(new Date()).format(this.ISO_FORMAT),
18973
- caseType: caseView.case_type.name || '',
18974
- caseTypeDescription: caseView.case_type.description || '',
18975
- caseState: caseView.state.name || '',
18976
- caseStateDescription: caseView.state.description || '',
18977
- caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
18978
- caseName: this.linkedCasesService.getCaseName(caseView),
18979
- };
18980
- const ccdApiCaseLinkData = {
18981
- CaseReference: caseView.case_id,
18982
- CaseType: caseView.case_type.id,
18983
- CreatedDateTime: moment(new Date()).format(this.ISO_FORMAT),
18984
- ReasonForLink: this.getSelectedCCDTypeCaseReason()
18985
- };
18986
- if (!this.linkedCasesService.caseFieldValue) {
18987
- this.linkedCasesService.caseFieldValue = [];
18988
- }
18989
- this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
18990
- this.selectedCases.push(caseLink);
18991
- this.initForm();
18992
- this.emitLinkedCasesState(false);
18993
- }, (error) => {
18994
- this.caseNumberError = LinkedCasesErrorMessages.CaseCheckAgainError;
18995
- this.errorMessages.push({
18996
- title: 'dummy-case-number',
18997
- description: LinkedCasesErrorMessages.CaseCheckAgainError,
18998
- fieldId: 'caseNumber',
18999
- });
19000
- this.emitLinkedCasesState(false);
19001
- window.scrollTo(0, 0);
19002
- return throwError(error);
19003
- });
19004
- }
19005
- // Return linked cases state and error messages to the parent
19006
- emitLinkedCasesState(isNavigateToNextPage) {
19007
- this.linkedCasesStateEmitter.emit({
19008
- currentLinkedCasesPage: LinkedCasesPages.LINK_CASE,
19009
- errorMessages: this.errorMessages,
19010
- navigateToNextPage: isNavigateToNextPage,
19011
- });
19012
- }
19013
- getSelectedCaseReasons() {
19014
- const selectedReasons = [];
19015
- this.linkCaseForm.controls.reasonType.value.forEach((selectedReason) => {
19016
- if (selectedReason.selected) {
19017
- selectedReasons.push({
19018
- reasonCode: selectedReason.key
19019
- });
19020
- }
19021
- });
19022
- return selectedReasons;
19023
- }
19024
- getSelectedCCDTypeCaseReason() {
19025
- const selectedReasons = [];
19026
- this.linkCaseForm.controls.reasonType.value.forEach((selectedReason) => {
19027
- if (selectedReason.selected) {
19028
- selectedReasons.push({
19029
- value: {
19030
- Reason: selectedReason.key,
19031
- }
19032
- });
19033
- }
19034
- });
19035
- return selectedReasons;
19036
- }
19037
- onSelectedLinkedCaseRemove(pos, selectedCaseReference) {
19038
- const caseFieldValue = this.linkedCasesService.caseFieldValue || [];
19039
- const updatedItems = caseFieldValue.filter(item => item.value && item.value.CaseReference !== selectedCaseReference);
19040
- if (updatedItems) {
19041
- this.linkedCasesService.caseFieldValue = updatedItems;
19042
- }
19043
- this.selectedCases.splice(pos, 1);
19044
- }
19045
- onNext() {
19046
- this.errorMessages = [];
19047
- this.caseReasonError = null;
19048
- this.caseNumberError = null;
19049
- this.caseSelectionError = null;
19050
- this.noSelectedCaseError = null;
19051
- let navigateToNextPage = true;
19052
- if (this.selectedCases.length) {
19053
- this.linkedCasesService.linkedCases = this.selectedCases;
19054
- }
19055
- else {
19056
- this.noSelectedCaseError = LinkedCasesErrorMessages.CaseSelectionError;
19057
- this.errorMessages.push({
19058
- title: 'dummy-case-selection',
19059
- description: LinkedCasesErrorMessages.CaseSelectionError,
19060
- fieldId: 'caseReason',
19061
- });
19062
- navigateToNextPage = false;
19063
- }
19064
- this.emitLinkedCasesState(navigateToNextPage);
19065
- }
19066
- }
19067
- LinkCasesComponent.ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(ValidatorsUtils), i0.ɵɵdirectiveInject(LinkedCasesService)); };
19068
- LinkCasesComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
19069
- i0.ɵɵelementStart(0, "div", 0);
19070
- i0.ɵɵelementStart(1, "div", 1);
19071
- i0.ɵɵelementStart(2, "div");
19072
- i0.ɵɵelementStart(3, "span", 2);
19073
- i0.ɵɵtext(4);
19074
- i0.ɵɵpipe(5, "ccdCaseReference");
19075
- i0.ɵɵelementEnd();
19076
- i0.ɵɵelementStart(6, "h1", 3);
19077
- i0.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
19078
- i0.ɵɵelementEnd();
19079
- i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
19080
- i0.ɵɵelement(9, "hr");
19081
- i0.ɵɵelement(10, "br");
19082
- i0.ɵɵelement(11, "br");
19083
- i0.ɵɵelementStart(12, "div", 5);
19084
- i0.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
19085
- i0.ɵɵelementStart(14, "table", 7);
19086
- i0.ɵɵelementStart(15, "caption", 8);
19087
- i0.ɵɵtext(16, "Proposed case links ");
19088
- i0.ɵɵelementEnd();
19089
- i0.ɵɵelementStart(17, "thead", 9);
19090
- i0.ɵɵelementStart(18, "tr", 10);
19091
- i0.ɵɵelementStart(19, "th", 11);
19092
- i0.ɵɵtext(20, "Case name and number");
19093
- i0.ɵɵelementEnd();
19094
- i0.ɵɵelementStart(21, "th", 12);
19095
- i0.ɵɵtext(22, "Case type ");
19096
- i0.ɵɵelementEnd();
19097
- i0.ɵɵelementStart(23, "th", 13);
19098
- i0.ɵɵtext(24, "Service");
19099
- i0.ɵɵelementEnd();
19100
- i0.ɵɵelementStart(25, "th", 13);
19101
- i0.ɵɵtext(26, "State");
19102
- i0.ɵɵelementEnd();
19103
- i0.ɵɵelementStart(27, "th", 14);
19104
- i0.ɵɵtext(28, "Reasons for case link");
19105
- i0.ɵɵelementEnd();
19106
- i0.ɵɵelement(29, "th", 15);
19107
- i0.ɵɵelementEnd();
19108
- i0.ɵɵelementEnd();
19109
- i0.ɵɵelementStart(30, "tbody", 16);
19110
- i0.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
19111
- i0.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
19112
- i0.ɵɵelementEnd();
19113
- i0.ɵɵelementEnd();
19114
- i0.ɵɵelementEnd();
19115
- i0.ɵɵelementStart(33, "div", 19);
19116
- i0.ɵɵelementStart(34, "button", 20);
19117
- i0.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
19118
- i0.ɵɵtext(35, "Next");
19119
- i0.ɵɵelementEnd();
19120
- i0.ɵɵelementEnd();
19121
- i0.ɵɵelementEnd();
19122
- i0.ɵɵelementEnd();
19123
- i0.ɵɵelementEnd();
19124
- } if (rf & 2) {
19125
- i0.ɵɵadvance(4);
19126
- i0.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0.ɵɵpipeBind1(5, 7, ctx.caseId), "");
19127
- i0.ɵɵadvance(4);
19128
- i0.ɵɵproperty("ngIf", ctx.linkCaseForm);
19129
- i0.ɵɵadvance(4);
19130
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
19131
- i0.ɵɵadvance(1);
19132
- i0.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
19133
- i0.ɵɵadvance(18);
19134
- i0.ɵɵproperty("ngForOf", ctx.selectedCases);
19135
- i0.ɵɵadvance(1);
19136
- i0.ɵɵproperty("ngIf", !ctx.selectedCases.length);
19137
- } }, 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}"] });
19138
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesComponent, [{
19139
- type: Component,
19140
- args: [{
19141
- selector: 'ccd-link-cases',
19142
- styleUrls: ['./link-cases.component.scss'],
19143
- templateUrl: './link-cases.component.html',
19144
- }]
19145
- }], function () { return [{ type: CasesService }, { type: i2$1.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
19146
- type: Output
19147
- }] }); })();
19148
-
19149
- function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) { if (rf & 1) {
19150
- const _r3 = i0.ɵɵgetCurrentView();
19151
- i0.ɵɵelementStart(0, "a", 2);
19152
- i0.ɵɵlistener("click", function LinkedCasesFromTableComponent_a_0_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.onClick(); });
19153
- i0.ɵɵtext(1);
19154
- i0.ɵɵelementEnd();
19155
- } if (rf & 2) {
19156
- const ctx_r0 = i0.ɵɵnextContext();
19157
- i0.ɵɵadvance(1);
19158
- i0.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
19159
- } }
19160
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) { if (rf & 1) {
19161
- i0.ɵɵelementStart(0, "span");
19162
- i0.ɵɵtext(1);
19163
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
19164
- i0.ɵɵelement(3, "br");
19165
- i0.ɵɵelementEnd();
19166
- } if (rf & 2) {
19167
- const reason_r11 = ctx.$implicit;
19168
- i0.ɵɵadvance(1);
19169
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
19170
- } }
19171
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) { if (rf & 1) {
19172
- i0.ɵɵelementStart(0, "td", 14);
19173
- i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
19174
- i0.ɵɵelementEnd();
19175
- } if (rf & 2) {
19176
- const details_r9 = ctx.$implicit;
19177
- i0.ɵɵadvance(1);
19178
- i0.ɵɵproperty("ngForOf", details_r9.reasons);
19179
- } }
19180
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) { if (rf & 1) {
19181
- i0.ɵɵelementStart(0, "tr", 5);
19182
- i0.ɵɵelementStart(1, "td", 11);
19183
- i0.ɵɵelementStart(2, "p", 12);
19184
- i0.ɵɵelementStart(3, "a", 13);
19185
- i0.ɵɵelementStart(4, "span");
19186
- i0.ɵɵtext(5);
19187
- i0.ɵɵelement(6, "br");
19188
- i0.ɵɵtext(7);
19189
- i0.ɵɵpipe(8, "ccdCaseReference");
19190
- i0.ɵɵelementEnd();
19191
- i0.ɵɵelementEnd();
19192
- i0.ɵɵelementEnd();
19193
- i0.ɵɵelementEnd();
19194
- i0.ɵɵelementStart(9, "td", 14);
19195
- i0.ɵɵelementStart(10, "span", 15);
19196
- i0.ɵɵtext(11);
19197
- i0.ɵɵelementEnd();
19198
- i0.ɵɵelementEnd();
19199
- i0.ɵɵelementStart(12, "td", 14);
19200
- i0.ɵɵelementStart(13, "span");
19201
- i0.ɵɵtext(14);
19202
- i0.ɵɵelementEnd();
19203
- i0.ɵɵelementEnd();
19204
- i0.ɵɵelementStart(15, "td", 14);
19205
- i0.ɵɵelementStart(16, "span", 15);
19206
- i0.ɵɵtext(17);
19207
- i0.ɵɵelementEnd();
19208
- i0.ɵɵelementEnd();
19209
- i0.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
19210
- i0.ɵɵelementEnd();
19211
- } if (rf & 2) {
19212
- const case_r7 = ctx.$implicit;
19213
- i0.ɵɵadvance(3);
19214
- i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0.ɵɵsanitizeUrl);
19215
- i0.ɵɵadvance(2);
19216
- i0.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
19217
- i0.ɵɵadvance(2);
19218
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
19219
- i0.ɵɵadvance(3);
19220
- i0.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
19221
- i0.ɵɵadvance(1);
19222
- i0.ɵɵtextInterpolate(case_r7.ccdCaseType);
19223
- i0.ɵɵadvance(3);
19224
- i0.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
19225
- i0.ɵɵadvance(2);
19226
- i0.ɵɵproperty("title", case_r7.stateDescription);
19227
- i0.ɵɵadvance(1);
19228
- i0.ɵɵtextInterpolate(case_r7.state);
19229
- i0.ɵɵadvance(1);
19230
- i0.ɵɵproperty("ngForOf", case_r7.linkDetails);
19231
- } }
19232
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) { if (rf & 1) {
19233
- i0.ɵɵelementStart(0, "tr", 5);
19234
- i0.ɵɵelementStart(1, "td", 18);
19235
- i0.ɵɵtext(2, " None ");
19236
- i0.ɵɵelementEnd();
19237
- i0.ɵɵelementEnd();
19238
- } }
19239
- function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) { if (rf & 1) {
19240
- i0.ɵɵelementStart(0, "tbody", 8);
19241
- i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
19242
- i0.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
19243
- i0.ɵɵelementEnd();
19244
- } if (rf & 2) {
19245
- const ctx_r4 = i0.ɵɵnextContext(2);
19246
- i0.ɵɵadvance(1);
19247
- i0.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
19248
- i0.ɵɵadvance(1);
19249
- i0.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
19250
- } }
19251
- function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) { if (rf & 1) {
19252
- i0.ɵɵelementStart(0, "table", 3);
19253
- i0.ɵɵelementStart(1, "thead", 4);
19254
- i0.ɵɵelementStart(2, "tr", 5);
19255
- i0.ɵɵelementStart(3, "th", 6);
19256
- i0.ɵɵtext(4, "Case name and number");
19257
- i0.ɵɵelementEnd();
19258
- i0.ɵɵelementStart(5, "th", 6);
19259
- i0.ɵɵtext(6, "Case type ");
19260
- i0.ɵɵelementEnd();
19261
- i0.ɵɵelementStart(7, "th", 6);
19262
- i0.ɵɵtext(8, "Service");
19263
- i0.ɵɵelementEnd();
19264
- i0.ɵɵelementStart(9, "th", 6);
19265
- i0.ɵɵtext(10, "State");
19266
- i0.ɵɵelementEnd();
19267
- i0.ɵɵelementStart(11, "th", 6);
19268
- i0.ɵɵtext(12, "Reasons for case link");
19269
- i0.ɵɵelementEnd();
19270
- i0.ɵɵelementEnd();
19271
- i0.ɵɵelementEnd();
19272
- i0.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
19273
- i0.ɵɵelementEnd();
19274
- } if (rf & 2) {
19275
- const ctx_r1 = i0.ɵɵnextContext();
19276
- i0.ɵɵadvance(13);
19277
- i0.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
19278
- } }
19279
- var PageType;
19280
- (function (PageType) {
19281
- PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
19282
- PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
19283
- })(PageType || (PageType = {}));
19284
- class LinkedCasesFromTableComponent {
19285
- constructor(route, casesService, linkedCasesService) {
19286
- this.route = route;
19287
- this.casesService = casesService;
19288
- this.linkedCasesService = linkedCasesService;
19289
- this.notifyAPIFailure = new EventEmitter(false);
19290
- this.pageType = PageType;
19291
- this.getLinkedCasesResponse = [];
19292
- this.showHideLinkText = 'Show';
19293
- this.noLinkedCases = true;
19294
- this.isServerError = false;
19295
- }
19296
- ngAfterViewInit() {
19297
- const labelField = document.getElementsByClassName('case-viewer-label');
19298
- if (labelField && labelField.length) {
19299
- labelField[0].replaceWith('');
19300
- }
19301
- }
19302
- ngOnInit() {
19303
- this.fetchPageData();
19304
- if (this.route.snapshot.data.case) {
19305
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
19306
- }
19307
- }
19308
- fetchPageData() {
19309
- this.caseId = this.route.snapshot.data.case.case_id;
19310
- this.getLinkedCases().subscribe(response => {
19311
- this.isServerError = false;
19312
- this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(item => {
19313
- const mappedCasetype = this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
19314
- const mappedCasetypeDescription = this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
19315
- const mappedCaseState = this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
19316
- const mappedCaseStateDescription = this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
19317
- const mappedCaseService = this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
19318
- return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
19319
- });
19320
- this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
19321
- }, err => {
19322
- this.isServerError = true;
19323
- this.notifyAPIFailure.emit(true);
19324
- });
19325
- }
19326
- getLinkedCases() {
19327
- return this.casesService.getLinkedCases(this.caseId);
19328
- }
19329
- mapLookupIDToValueFromJurisdictions(fieldName, fieldValue) {
19330
- return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
19331
- }
19332
- onClick() {
19333
- this.showHideLinkText = this.showHideLinkText === 'Show'
19334
- ? 'Hide'
19335
- : 'Show';
19336
- }
19337
- }
19338
- LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
19339
- LinkedCasesFromTableComponent.ɵfac = function LinkedCasesFromTableComponent_Factory(t) { return new (t || LinkedCasesFromTableComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
19340
- LinkedCasesFromTableComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 2, vars: 2, consts: [["id", "show-hide-link", "class", "govuk-link", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "table to display cases linked from", 4, "ngIf"], ["id", "show-hide-link", "href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["aria-describedby", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) { if (rf & 1) {
19341
- i0.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
19342
- i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
19343
- } if (rf & 2) {
19344
- i0.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
19345
- i0.ɵɵadvance(1);
19346
- i0.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
19347
- } }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
19348
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
19349
- type: Component,
19350
- args: [{
19351
- selector: 'ccd-linked-cases-from-table',
19352
- templateUrl: './linked-cases-from-table.component.html',
19353
- styleUrls: ['./linked-cases-from-table.component.scss']
19354
- }]
19355
- }], function () { return [{ type: i1$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
19356
- type: Input
19357
- }], notifyAPIFailure: [{
19358
- type: Output
19359
- }] }); })();
19360
-
19361
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) { if (rf & 1) {
19362
- i0.ɵɵelementStart(0, "a", 16);
19363
- i0.ɵɵtext(1);
19364
- i0.ɵɵelementEnd();
19365
- } if (rf & 2) {
19366
- const case_r3 = i0.ɵɵnextContext(3).$implicit;
19367
- const ctx_r9 = i0.ɵɵnextContext(2);
19368
- i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0.ɵɵsanitizeUrl);
19369
- i0.ɵɵadvance(1);
19370
- i0.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
19371
- } }
19372
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) { if (rf & 1) {
19373
- i0.ɵɵelement(0, "br");
19374
- } }
19375
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) { if (rf & 1) {
19376
- i0.ɵɵelementStart(0, "span");
19377
- i0.ɵɵtext(1);
19378
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
19379
- i0.ɵɵelementStart(3, "span");
19380
- i0.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
19381
- i0.ɵɵelementEnd();
19382
- i0.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
19383
- i0.ɵɵelementEnd();
19384
- } if (rf & 2) {
19385
- const reason_r6 = ctx.$implicit;
19386
- const isLast_r8 = ctx.last;
19387
- const ctx_r5 = i0.ɵɵnextContext(4);
19388
- i0.ɵɵadvance(1);
19389
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 3, reason_r6), "");
19390
- i0.ɵɵadvance(3);
19391
- i0.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
19392
- i0.ɵɵadvance(1);
19393
- i0.ɵɵproperty("ngIf", !isLast_r8);
19394
- } }
19395
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) { if (rf & 1) {
19396
- i0.ɵɵelementStart(0, "td");
19397
- i0.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
19398
- i0.ɵɵelementEnd();
19399
- } if (rf & 2) {
19400
- const case_r3 = i0.ɵɵnextContext().$implicit;
19401
- i0.ɵɵadvance(1);
19402
- i0.ɵɵproperty("ngForOf", case_r3.reasons);
19403
- } }
19404
- function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) { if (rf & 1) {
19405
- i0.ɵɵelementStart(0, "tr", 4);
19406
- i0.ɵɵelementStart(1, "td");
19407
- i0.ɵɵelementStart(2, "p", 9);
19408
- i0.ɵɵelementStart(3, "a", 10);
19409
- i0.ɵɵelementStart(4, "span", 11);
19410
- i0.ɵɵtext(5);
19411
- i0.ɵɵelement(6, "br");
19412
- i0.ɵɵtext(7);
19413
- i0.ɵɵpipe(8, "ccdCaseReference");
19414
- i0.ɵɵelementEnd();
19415
- i0.ɵɵelementEnd();
19416
- i0.ɵɵelementEnd();
19417
- i0.ɵɵelementEnd();
19418
- i0.ɵɵelementStart(9, "td");
19419
- i0.ɵɵelementStart(10, "span", 12);
19420
- i0.ɵɵtext(11);
19421
- i0.ɵɵelementEnd();
19422
- i0.ɵɵelementEnd();
19423
- i0.ɵɵelementStart(12, "td");
19424
- i0.ɵɵelementStart(13, "span");
19425
- i0.ɵɵtext(14);
19426
- i0.ɵɵelementEnd();
19427
- i0.ɵɵelementEnd();
19428
- i0.ɵɵelementStart(15, "td");
19429
- i0.ɵɵelementStart(16, "span", 12);
19430
- i0.ɵɵtext(17);
19431
- i0.ɵɵelementEnd();
19432
- i0.ɵɵelementEnd();
19433
- i0.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
19434
- i0.ɵɵelementEnd();
19435
- } if (rf & 2) {
19436
- const case_r3 = ctx.$implicit;
19437
- i0.ɵɵadvance(3);
19438
- i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0.ɵɵsanitizeUrl);
19439
- i0.ɵɵadvance(2);
19440
- i0.ɵɵtextInterpolate1("", case_r3.caseName, " ");
19441
- i0.ɵɵadvance(2);
19442
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
19443
- i0.ɵɵadvance(3);
19444
- i0.ɵɵproperty("title", case_r3.caseTypeDescription);
19445
- i0.ɵɵadvance(1);
19446
- i0.ɵɵtextInterpolate(case_r3.caseType);
19447
- i0.ɵɵadvance(3);
19448
- i0.ɵɵtextInterpolate(case_r3.service);
19449
- i0.ɵɵadvance(2);
19450
- i0.ɵɵproperty("title", case_r3.stateDescription);
19451
- i0.ɵɵadvance(1);
19452
- i0.ɵɵtextInterpolate(case_r3.state);
19453
- i0.ɵɵadvance(1);
19454
- i0.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
19455
- } }
19456
- function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) { if (rf & 1) {
19457
- i0.ɵɵelementStart(0, "tr", 4);
19458
- i0.ɵɵelementStart(1, "td", 17);
19459
- i0.ɵɵtext(2, " None ");
19460
- i0.ɵɵelementEnd();
19461
- i0.ɵɵelementEnd();
19462
- } }
19463
- function LinkedCasesToTableComponent_table_2_Template(rf, ctx) { if (rf & 1) {
19464
- i0.ɵɵelementStart(0, "table", 3);
19465
- i0.ɵɵelementStart(1, "thead");
19466
- i0.ɵɵelementStart(2, "tr", 4);
19467
- i0.ɵɵelementStart(3, "th", 5);
19468
- i0.ɵɵtext(4, "Case name and number");
19469
- i0.ɵɵelementEnd();
19470
- i0.ɵɵelementStart(5, "th", 5);
19471
- i0.ɵɵtext(6, "Case type ");
19472
- i0.ɵɵelementEnd();
19473
- i0.ɵɵelementStart(7, "th", 5);
19474
- i0.ɵɵtext(8, "Service");
19475
- i0.ɵɵelementEnd();
19476
- i0.ɵɵelementStart(9, "th", 5);
19477
- i0.ɵɵtext(10, "State");
19478
- i0.ɵɵelementEnd();
19479
- i0.ɵɵelementStart(11, "th", 5);
19480
- i0.ɵɵtext(12, "Reasons for case link");
19481
- i0.ɵɵelementEnd();
19482
- i0.ɵɵelementEnd();
19483
- i0.ɵɵelementEnd();
19484
- i0.ɵɵelementStart(13, "tbody", 6);
19485
- i0.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
19486
- i0.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
19487
- i0.ɵɵelementEnd();
19488
- i0.ɵɵelementEnd();
19489
- } if (rf & 2) {
19490
- const ctx_r0 = i0.ɵɵnextContext();
19491
- i0.ɵɵadvance(14);
19492
- i0.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
19493
- i0.ɵɵadvance(1);
19494
- i0.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
19495
- } }
19496
- class LinkedCasesToTableComponent {
19497
- constructor(route, linkedCasesService, casesService) {
19498
- this.route = route;
19499
- this.linkedCasesService = linkedCasesService;
19500
- this.casesService = casesService;
19501
- this.notifyAPIFailure = new EventEmitter(false);
19502
- this.linkedCasesFromResponse = [];
19503
- this.isServerError = false;
19504
- this.jurisdictionsResponse = [];
19505
- }
19506
- ngAfterViewInit() {
19507
- let labelField = document.getElementsByClassName('govuk-heading-l');
19508
- if (labelField && labelField.length) {
19509
- labelField[0].replaceWith('');
19510
- }
19511
- labelField = document.getElementsByClassName('heading-h2');
19512
- if (labelField && labelField.length) {
19513
- labelField[0].replaceWith('');
19514
- }
19515
- }
19516
- ngOnInit() {
19517
- this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
19518
- this.getAllLinkedCaseInformation();
19519
- if (this.route.snapshot.data.case) {
19520
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
19521
- }
19522
- }
19523
- getCaseRefereneLink(caseRef) {
19524
- return caseRef.slice(this.caseId.length - 4);
19525
- }
19526
- sortLinkedCasesByReasonCode(searchCasesResponse) {
19527
- const topLevelresultArray = [];
19528
- let secondLevelresultArray = [];
19529
- searchCasesResponse.forEach((item) => {
19530
- const reasons = item && item.reasons || [];
19531
- const consolidatedStateReason = reasons.map(x => x).find(reason => reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE);
19532
- const progressedStateReason = reasons.map(x => x).find(reason => reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE);
19533
- let arrayItem;
19534
- if (progressedStateReason) {
19535
- arrayItem = Object.assign({}, item);
19536
- topLevelresultArray.push(arrayItem);
19537
- }
19538
- else if (consolidatedStateReason) {
19539
- arrayItem = Object.assign({}, item);
19540
- secondLevelresultArray = [Object.assign({}, item), ...secondLevelresultArray];
19541
- }
19542
- else {
19543
- arrayItem = Object.assign({}, item);
19544
- secondLevelresultArray.push(Object.assign({}, item));
19545
- }
19546
- });
19547
- return topLevelresultArray.concat(secondLevelresultArray);
19548
- }
19549
- getAllLinkedCaseInformation() {
19550
- const searchCasesResponse = [];
19551
- const caseFieldValue = this.caseField ? this.caseField.value : [];
19552
- // Generate the list of observables
19553
- caseFieldValue.forEach(fieldValue => {
19554
- if (fieldValue && fieldValue.id) {
19555
- searchCasesResponse.push(this.casesService.getCaseViewV2(fieldValue.id));
19556
- }
19557
- });
19558
- if (searchCasesResponse.length) {
19559
- this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
19560
- const casesResponse = [];
19561
- searchCases.forEach(response => {
19562
- casesResponse.push(this.mapResponse(response));
19563
- });
19564
- this.linkedCasesFromResponse = this.sortLinkedCasesByReasonCode(casesResponse);
19565
- this.isLoaded = true;
19566
- const caseLinks = this.linkedCasesFromResponse.map(item => {
19567
- return {
19568
- caseReference: item.caseReference,
19569
- caseName: item.caseName,
19570
- caseService: item.service,
19571
- caseType: item.caseType,
19572
- unlink: false,
19573
- reasons: item.reasons && item.reasons.map(reason => {
19574
- return {
19575
- reasonCode: reason
19576
- };
19577
- }),
19578
- };
19579
- });
19580
- this.linkedCasesService.initialCaseLinks = caseLinks;
19581
- this.linkedCasesService.linkedCases = caseLinks;
19582
- this.isServerError = false;
19583
- }, err => {
19584
- this.isServerError = true;
19585
- this.notifyAPIFailure.emit(true);
19586
- });
19587
- }
19588
- }
19589
- searchCasesByCaseIds(searchCasesResponse) {
19590
- return forkJoin(searchCasesResponse);
19591
- }
19592
- hasLeadCaseOrConsolidated(reasonCode) {
19593
- return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
19594
- reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
19595
- }
19596
- mapResponse(esSearchCasesResponse) {
19597
- const caseInfo = this.caseField.value.find(item => item.value && item.value.CaseReference === esSearchCasesResponse.case_id);
19598
- return caseInfo && {
19599
- caseReference: esSearchCasesResponse.case_id,
19600
- caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
19601
- caseType: esSearchCasesResponse.case_type.name || '',
19602
- caseTypeDescription: esSearchCasesResponse.case_type.description || '',
19603
- service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
19604
- state: esSearchCasesResponse.state.name || '',
19605
- stateDescription: esSearchCasesResponse.state.description || '',
19606
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
19607
- caseInfo.value.ReasonForLink.map(reason => reason.value && reason.value.Reason),
19608
- };
19609
- }
19610
- }
19611
- LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
19612
- LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
19613
- LinkedCasesToTableComponent.ɵfac = function LinkedCasesToTableComponent_Factory(t) { return new (t || LinkedCasesToTableComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CasesService)); };
19614
- LinkedCasesToTableComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
19615
- i0.ɵɵelementStart(0, "div", 0);
19616
- i0.ɵɵelementStart(1, "div", 1);
19617
- i0.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
19618
- i0.ɵɵelementEnd();
19619
- i0.ɵɵelementEnd();
19620
- } if (rf & 2) {
19621
- i0.ɵɵadvance(2);
19622
- i0.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
19623
- } }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
19624
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
19625
- type: Component,
19626
- args: [{
19627
- selector: 'ccd-linked-cases-to-table',
19628
- templateUrl: './linked-cases-to-table.component.html',
19629
- styleUrls: ['./linked-cases-to-table.component.scss']
19630
- }]
19631
- }], function () { return [{ type: i1$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
19632
- type: Input
19633
- }], notifyAPIFailure: [{
19634
- type: Output
19635
- }] }); })();
19636
-
19637
- function NoLinkedCasesComponent_h1_2_Template(rf, ctx) { if (rf & 1) {
19638
- i0.ɵɵelementStart(0, "h1", 9);
19639
- i0.ɵɵtext(1, "There is a problem");
19640
- i0.ɵɵelementEnd();
19641
- } }
19642
- function NoLinkedCasesComponent_p_3_Template(rf, ctx) { if (rf & 1) {
19643
- i0.ɵɵelementStart(0, "p", 10);
19644
- i0.ɵɵelementStart(1, "span", 11);
19645
- i0.ɵɵtext(2, "Error:");
19646
- i0.ɵɵelementEnd();
19647
- i0.ɵɵtext(3);
19648
- i0.ɵɵelementEnd();
19649
- } if (rf & 2) {
19650
- const ctx_r1 = i0.ɵɵnextContext();
19651
- i0.ɵɵadvance(3);
19652
- i0.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
19653
- } }
19654
- function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
19655
- i0.ɵɵelementStart(0, "p", 5);
19656
- i0.ɵɵtext(1, "There are no cases linked to this one.");
19657
- i0.ɵɵelementEnd();
19658
- } }
19659
- class NoLinkedCasesComponent {
19660
- constructor(router, linkedCasesService) {
19661
- this.router = router;
19662
- this.linkedCasesService = linkedCasesService;
19663
- }
19664
- onBack() {
19665
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
19666
- window.location.hash = 'Linked cases';
19667
- });
19668
- }
19669
- }
19670
- NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
19671
- NoLinkedCasesComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
19672
- i0.ɵɵelementStart(0, "div", 0);
19673
- i0.ɵɵelementStart(1, "div", 1);
19674
- i0.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
19675
- i0.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
19676
- i0.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
19677
- i0.ɵɵelementStart(6, "p", 5);
19678
- i0.ɵɵelementStart(7, "a", 6);
19679
- i0.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
19680
- i0.ɵɵtext(8, "Go back to the Linked cases tab");
19681
- i0.ɵɵelementEnd();
19682
- i0.ɵɵelementEnd();
19683
- i0.ɵɵelementStart(9, "div", 7);
19684
- i0.ɵɵelementStart(10, "button", 8);
19685
- i0.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
19686
- i0.ɵɵtext(11, "Back");
19687
- i0.ɵɵelementEnd();
19688
- i0.ɵɵelementEnd();
19689
- i0.ɵɵelementEnd();
19690
- i0.ɵɵelementEnd();
19691
- } if (rf & 2) {
19692
- const _r2 = i0.ɵɵreference(5);
19693
- i0.ɵɵadvance(2);
19694
- i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
19695
- i0.ɵɵadvance(1);
19696
- i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
19697
- } }, directives: [i2.NgIf], encapsulation: 2 });
19698
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoLinkedCasesComponent, [{
19699
- type: Component,
19700
- args: [{
19701
- selector: 'ccd-no-linked-cases',
19702
- templateUrl: './no-linked-cases.component.html'
19703
- }]
19704
- }], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }]; }, null); })();
19705
-
19706
- function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) { if (rf & 1) {
19707
- i0.ɵɵelementStart(0, "p", 11);
19708
- i0.ɵɵelementStart(1, "span", 12);
19709
- i0.ɵɵtext(2, "Error:");
19710
- i0.ɵɵelementEnd();
19711
- i0.ɵɵtext(3);
19712
- i0.ɵɵelementEnd();
19713
- } if (rf & 2) {
19714
- const ctx_r2 = i0.ɵɵnextContext(3);
19715
- i0.ɵɵadvance(3);
19716
- i0.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
19717
- } }
19718
- function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) { if (rf & 1) {
19719
- const _r6 = i0.ɵɵgetCurrentView();
19720
- i0.ɵɵelementStart(0, "div", 13);
19721
- i0.ɵɵelementStart(1, "input", 14);
19722
- i0.ɵɵlistener("change", function UnLinkCasesComponent_div_0_div_4_div_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(3); return ctx_r5.onChange($event.target); });
19723
- i0.ɵɵelementEnd();
19724
- i0.ɵɵelementStart(2, "label", 15);
19725
- i0.ɵɵtext(3);
19726
- i0.ɵɵpipe(4, "ccdCaseReference");
19727
- i0.ɵɵelementEnd();
19728
- i0.ɵɵelementEnd();
19729
- } if (rf & 2) {
19730
- const case_r4 = ctx.$implicit;
19731
- i0.ɵɵadvance(1);
19732
- i0.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
19733
- i0.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
19734
- i0.ɵɵadvance(1);
19735
- i0.ɵɵpropertyInterpolate("for", case_r4.caseReference);
19736
- i0.ɵɵadvance(1);
19737
- i0.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
19738
- } }
19739
- const _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
19740
- function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
19741
- i0.ɵɵelementStart(0, "div", 7);
19742
- i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
19743
- i0.ɵɵelementStart(2, "div", 9);
19744
- i0.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
19745
- i0.ɵɵelementEnd();
19746
- i0.ɵɵelementEnd();
19747
- } if (rf & 2) {
19748
- const ctx_r1 = i0.ɵɵnextContext(2);
19749
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
19750
- i0.ɵɵadvance(1);
19751
- i0.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
19752
- i0.ɵɵadvance(2);
19753
- i0.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
19754
- } }
19755
- function UnLinkCasesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
19756
- const _r8 = i0.ɵɵgetCurrentView();
19757
- i0.ɵɵelementStart(0, "div", 1);
19758
- i0.ɵɵelementStart(1, "div", 2);
19759
- i0.ɵɵelementStart(2, "h1", 3);
19760
- i0.ɵɵtext(3, "Select the cases you want to unlink from this case");
19761
- i0.ɵɵelementEnd();
19762
- i0.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
19763
- i0.ɵɵelementStart(5, "div", 5);
19764
- i0.ɵɵelementStart(6, "button", 6);
19765
- i0.ɵɵlistener("click", function UnLinkCasesComponent_div_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onNext(); });
19766
- i0.ɵɵtext(7, "Next");
19767
- i0.ɵɵelementEnd();
19768
- i0.ɵɵelementEnd();
19769
- i0.ɵɵelementEnd();
19770
- i0.ɵɵelementEnd();
19771
- } if (rf & 2) {
19772
- const ctx_r0 = i0.ɵɵnextContext();
19773
- i0.ɵɵadvance(4);
19774
- i0.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
19775
- } }
19776
- class UnLinkCasesComponent {
19777
- constructor(caseEdit, fb, casesService, linkedCasesService) {
19778
- this.caseEdit = caseEdit;
19779
- this.fb = fb;
19780
- this.casesService = casesService;
19781
- this.linkedCasesService = linkedCasesService;
19782
- this.linkedCasesStateEmitter = new EventEmitter();
19783
- this.notifyAPIFailure = new EventEmitter(false);
19784
- this.linkedCases = [];
19785
- this.errorMessages = [];
19786
- this.isServerError = false;
19787
- }
19788
- ngOnInit() {
19789
- this.getLinkedCases();
19790
- }
19791
- getLinkedCases() {
19792
- this.caseId = this.linkedCasesService.caseId;
19793
- if (this.linkedCasesService.linkedCases.length > 0) {
19794
- this.linkedCases = this.linkedCasesService.linkedCases;
19795
- this.getAllLinkedCaseInformation();
19796
- }
19797
- else {
19798
- this.casesService.getCaseViewV2(this.caseId).subscribe((caseView) => {
19799
- const linkedCasesTab = caseView.tabs.find(tab => tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID);
19800
- if (linkedCasesTab) {
19801
- const linkedCases = linkedCasesTab.fields[0].value;
19802
- this.linkedCases = linkedCases;
19803
- this.linkedCasesService.linkedCases = linkedCases;
19804
- this.getAllLinkedCaseInformation();
19805
- }
19806
- });
19807
- }
19808
- }
19809
- getAllLinkedCaseInformation() {
19810
- const searchCasesResponse = [];
19811
- this.linkedCases.forEach(linkedCase => {
19812
- searchCasesResponse.push(this.casesService.getCaseViewV2(linkedCase.caseReference));
19813
- });
19814
- if (searchCasesResponse.length) {
19815
- this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
19816
- searchCases.forEach((response) => {
19817
- const linkedCaseFromList = this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id);
19818
- if (linkedCaseFromList) {
19819
- const caseName = this.linkedCasesService.getCaseName(response);
19820
- this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id).caseName = caseName;
19821
- }
19822
- });
19823
- this.initForm();
19824
- this.linkedCasesService.linkedCases = this.linkedCases;
19825
- this.isServerError = false;
19826
- }, err => {
19827
- this.isServerError = true;
19828
- this.notifyAPIFailure.emit(true);
19829
- });
19830
- }
19831
- }
19832
- searchCasesByCaseIds(searchCasesResponse) {
19833
- return forkJoin(searchCasesResponse);
19834
- }
19835
- initForm() {
19836
- this.unlinkCaseForm = this.fb.group({
19837
- linkedCases: this.getLinkedCasesFormArray
19838
- });
19839
- }
19840
- get getLinkedCasesFormArray() {
19841
- const formFieldArray = this.linkedCases.map(val => this.fb.group({
19842
- caseReference: val.caseReference,
19843
- reasons: val.reasons,
19844
- createdDateTime: val.createdDateTime,
19845
- caseType: val.caseType,
19846
- caseState: val.caseState,
19847
- caseService: val.caseService,
19848
- caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
19849
- unlink: val.unlink
19850
- }));
19851
- return this.fb.array(formFieldArray);
19852
- }
19853
- onChange(caseSelected) {
19854
- this.resetErrorMessages();
19855
- const selectedCase = this.linkedCases.find(linkedCase => linkedCase.caseReference === caseSelected.value);
19856
- if (selectedCase) {
19857
- selectedCase.unlink = caseSelected.checked ? true : false;
19858
- }
19859
- }
19860
- onNext() {
19861
- this.resetErrorMessages();
19862
- let navigateToNextPage = true;
19863
- const casesMarkedToUnlink = this.linkedCases.find(linkedCase => linkedCase.unlink && linkedCase.unlink === true);
19864
- if (!casesMarkedToUnlink) {
19865
- this.errorMessages.push({
19866
- title: 'case-selection',
19867
- description: LinkedCasesErrorMessages.UnlinkCaseSelectionError,
19868
- fieldId: `case-reference-${this.linkedCases[0].caseReference}`
19869
- });
19870
- this.unlinkErrorMessage = LinkedCasesErrorMessages.UnlinkCaseSelectionError;
19871
- navigateToNextPage = false;
19872
- }
19873
- const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
19874
- const updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(item => unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1);
19875
- this.caseEdit.form.controls['data'] = new FormGroup({ caseLinks: new FormControl(updatedLinkedCases || []) });
19876
- // Return linked cases state and error messages to the parent
19877
- this.linkedCasesStateEmitter.emit({
19878
- currentLinkedCasesPage: LinkedCasesPages.UNLINK_CASE,
19879
- errorMessages: this.errorMessages,
19880
- navigateToNextPage
19881
- });
19882
- }
19883
- resetErrorMessages() {
19884
- this.errorMessages = [];
19885
- this.unlinkErrorMessage = null;
19886
- }
19887
- }
19888
- UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
19889
- UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
19890
- UnLinkCasesComponent.ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
19891
- UnLinkCasesComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
19892
- i0.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
19893
- } if (rf & 2) {
19894
- i0.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
19895
- } }, directives: [i2.NgIf, i2.NgClass, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2.NgForOf, i2$1.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
19896
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UnLinkCasesComponent, [{
19897
- type: Component,
19898
- args: [{
19899
- selector: 'ccd-unlink-cases',
19900
- templateUrl: './unlink-cases.component.html'
19901
- }]
19902
- }], function () { return [{ type: CaseEditComponent }, { type: i2$1.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
19903
- type: Output
19904
- }], notifyAPIFailure: [{
19905
- type: Output
19906
- }] }); })();
19907
-
19908
- function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
19909
- const _r9 = i0.ɵɵgetCurrentView();
19910
- i0.ɵɵelementStart(0, "div", 7);
19911
- i0.ɵɵelementStart(1, "ul", 8);
19912
- i0.ɵɵelementStart(2, "li");
19913
- i0.ɵɵelementStart(3, "a", 9);
19914
- i0.ɵɵlistener("click", function WriteLinkedCasesComponent_div_0_div_3_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r9); const errorMessage_r7 = ctx.$implicit; const ctx_r8 = i0.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
19915
- i0.ɵɵtext(4);
19916
- i0.ɵɵelementEnd();
19917
- i0.ɵɵelementEnd();
19918
- i0.ɵɵelementEnd();
19919
- i0.ɵɵelementEnd();
19920
- } if (rf & 2) {
19921
- const errorMessage_r7 = ctx.$implicit;
19922
- i0.ɵɵadvance(4);
19923
- i0.ɵɵtextInterpolate(errorMessage_r7.description);
19924
- } }
19925
- function WriteLinkedCasesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
19926
- i0.ɵɵelementStart(0, "div", 4);
19927
- i0.ɵɵelementStart(1, "h2", 5);
19928
- i0.ɵɵtext(2, " There is a problem ");
19929
- i0.ɵɵelementEnd();
19930
- i0.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
19931
- i0.ɵɵelementEnd();
19932
- } if (rf & 2) {
19933
- const ctx_r0 = i0.ɵɵnextContext();
19934
- i0.ɵɵadvance(3);
19935
- i0.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
19936
- } }
19937
- function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
19938
- const _r11 = i0.ɵɵgetCurrentView();
19939
- i0.ɵɵelementContainerStart(0);
19940
- i0.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
19941
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_3_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onLinkedCasesStateEmitted($event); });
19942
- i0.ɵɵelementEnd();
19943
- i0.ɵɵelementContainerEnd();
19944
- } }
19945
- function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
19946
- const _r13 = i0.ɵɵgetCurrentView();
19947
- i0.ɵɵelementContainerStart(0);
19948
- i0.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
19949
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_4_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.onLinkedCasesStateEmitted($event); });
19950
- i0.ɵɵelementEnd();
19951
- i0.ɵɵelementContainerEnd();
19952
- } }
19953
- function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
19954
- const _r15 = i0.ɵɵgetCurrentView();
19955
- i0.ɵɵelementContainerStart(0);
19956
- i0.ɵɵelementStart(1, "ccd-link-cases", 10);
19957
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_5_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onLinkedCasesStateEmitted($event); });
19958
- i0.ɵɵelementEnd();
19959
- i0.ɵɵelementContainerEnd();
19960
- } }
19961
- function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
19962
- const _r17 = i0.ɵɵgetCurrentView();
19963
- i0.ɵɵelementContainerStart(0);
19964
- i0.ɵɵelementStart(1, "ccd-unlink-cases", 10);
19965
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
19966
- i0.ɵɵelementEnd();
19967
- i0.ɵɵelementContainerEnd();
19968
- } }
19969
- function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
19970
- const _r19 = i0.ɵɵgetCurrentView();
19971
- i0.ɵɵelementContainerStart(0);
19972
- i0.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
19973
- i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_7_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.onLinkedCasesStateEmitted($event); });
19974
- i0.ɵɵelementEnd();
19975
- i0.ɵɵelementContainerEnd();
19976
- } }
19977
- class WriteLinkedCasesComponent extends AbstractFieldWriteComponent {
19978
- constructor(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
19979
- super();
19980
- this.caseEdit = caseEdit;
19981
- this.appConfig = appConfig;
19982
- this.commonDataService = commonDataService;
19983
- this.casesService = casesService;
19984
- this.linkedCasesService = linkedCasesService;
19985
- this.caseEditDataService = caseEditDataService;
19986
- this.onLinkedCasesSelected = new EventEmitter();
19987
- this.isLinkedCasesJourney = false;
19988
- this.linkedCasesPages = LinkedCasesPages;
19989
- this.linkedCasesEventTriggers = LinkedCasesEventTriggers;
19990
- this.linkedCases = [];
19991
- this.errorMessages = [];
19992
- }
19993
- ngOnInit() {
19994
- this.caseEditDataService.clearFormValidationErrors();
19995
- this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
19996
- this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
19997
- this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
19998
- this.linkedCasesService.editMode = false;
19999
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
20000
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
20001
- next: reasons => {
20002
- this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
20003
- }
20004
- });
20005
- this.getLinkedCases();
20006
- this.caseEditDataService.caseEventTriggerName$.subscribe({
20007
- next: name => {
20008
- this.linkedCasesService.isLinkedCasesEventTrigger
20009
- = (name === LinkedCasesEventTriggers.LINK_CASES);
20010
- }
20011
- });
20012
- }
20013
- ngAfterViewInit() {
20014
- let labelField = document.getElementsByClassName('govuk-heading-l');
20015
- if (labelField && labelField.length) {
20016
- labelField[0].replaceWith('');
20017
- }
20018
- labelField = document.getElementsByClassName('heading-h2');
20019
- if (labelField && labelField.length) {
20020
- labelField[0].replaceWith('');
20021
- }
20022
- }
20023
- onLinkedCasesStateEmitted(linkedCasesState) {
20024
- this.errorMessages = [];
20025
- this.caseEditDataService.clearFormValidationErrors();
20026
- if (linkedCasesState.navigateToNextPage) {
20027
- this.linkedCasesPage = this.getNextPage(linkedCasesState);
20028
- this.setContinueButtonValidationErrorMessage();
20029
- this.proceedToNextPage();
20030
- }
20031
- else {
20032
- if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
20033
- linkedCasesState.errorMessages.forEach((errorMessage, index) => {
20034
- this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
20035
- });
20036
- }
20037
- }
20038
- }
20039
- isAtFinalState() {
20040
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
20041
- }
20042
- setContinueButtonValidationErrorMessage() {
20043
- const errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
20044
- ? LinkedCasesErrorMessages.LinkCasesNavigationError
20045
- : LinkedCasesErrorMessages.UnlinkCasesNavigationError;
20046
- const buttonId = this.linkedCasesService.linkedCases.length === 0
20047
- ? 'back-button'
20048
- : 'next-button';
20049
- this.caseEditDataService.setCaseLinkError({
20050
- componentId: buttonId,
20051
- errorMessage
20052
- });
20053
- }
20054
- proceedToNextPage() {
20055
- if (this.isAtFinalPage()) {
20056
- // Continue button event must be allowed in final page
20057
- this.caseEditDataService.clearCaseLinkError();
20058
- // Trigger validation to clear the "notAtFinalPage" error if now at the final state
20059
- this.formGroup.updateValueAndValidity();
20060
- // update form value
20061
- this.onLinkedCasesSelected.emit();
20062
- this.caseEdit.form.controls['data'] = new FormGroup({ caseLinks: new FormControl(this.linkedCasesService.caseFieldValue) });
20063
- }
20064
- }
20065
- isAtFinalPage() {
20066
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
20067
- }
20068
- getNextPage(linkedCasesState) {
20069
- if ((this.linkedCasesPage === LinkedCasesPages.BEFORE_YOU_START) ||
20070
- (linkedCasesState.currentLinkedCasesPage === LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
20071
- return this.isLinkedCasesJourney
20072
- ? LinkedCasesPages.LINK_CASE
20073
- : LinkedCasesPages.UNLINK_CASE;
20074
- }
20075
- return LinkedCasesPages.CHECK_YOUR_ANSWERS;
20076
- }
20077
- getLinkedCases() {
20078
- this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
20079
- const caseViewFiltered = caseView.tabs.filter(tab => {
20080
- const linkField = tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
20081
- return linkField;
20082
- });
20083
- if (caseViewFiltered) {
20084
- const caseLinkFieldValue = caseViewFiltered.map(filtered => filtered.fields.length && filtered.fields[0].value);
20085
- this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
20086
- this.linkedCasesService.getAllLinkedCaseInformation();
20087
- }
20088
- // Initialise the first page to display
20089
- this.linkedCasesPage = this.linkedCasesService.isLinkedCasesEventTrigger ||
20090
- (this.linkedCasesService.caseFieldValue && this.linkedCasesService.caseFieldValue.length > 0
20091
- && !this.linkedCasesService.serverLinkedApiError)
20092
- ? LinkedCasesPages.BEFORE_YOU_START
20093
- : LinkedCasesPages.NO_LINKED_CASES;
20094
- // Initialise the error to be displayed when clicked on Continue button
20095
- this.setContinueButtonValidationErrorMessage();
20096
- });
20097
- }
20098
- navigateToErrorElement(elementId) {
20099
- if (elementId) {
20100
- const htmlElement = document.getElementById(elementId);
20101
- if (htmlElement) {
20102
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
20103
- htmlElement.focus();
20104
- }
20105
- }
20106
- }
20107
- }
20108
- WriteLinkedCasesComponent.ɵfac = function WriteLinkedCasesComponent_Factory(t) { return new (t || WriteLinkedCasesComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseEditDataService)); };
20109
- WriteLinkedCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteLinkedCasesComponent, selectors: [["ccd-write-linked-cases"]], inputs: { caseFields: "caseFields", caseField: "caseField", isLinkedCasesJourney: "isLinkedCasesJourney", formGroup: "formGroup" }, outputs: { onLinkedCasesSelected: "onLinkedCasesSelected" }, features: [i0.ɵɵ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) { if (rf & 1) {
20110
- i0.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
20111
- i0.ɵɵelementStart(1, "div", 1);
20112
- i0.ɵɵelementStart(2, "div", 2);
20113
- i0.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
20114
- i0.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
20115
- i0.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
20116
- i0.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
20117
- i0.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
20118
- i0.ɵɵelementEnd();
20119
- i0.ɵɵelementEnd();
20120
- } if (rf & 2) {
20121
- i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
20122
- i0.ɵɵadvance(1);
20123
- i0.ɵɵproperty("formGroup", ctx.formGroup);
20124
- i0.ɵɵadvance(1);
20125
- i0.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
20126
- i0.ɵɵadvance(1);
20127
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
20128
- i0.ɵɵadvance(1);
20129
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
20130
- i0.ɵɵadvance(1);
20131
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
20132
- i0.ɵɵadvance(1);
20133
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
20134
- i0.ɵɵadvance(1);
20135
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
20136
- } }, encapsulation: 2 });
20137
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
20138
- type: Component,
20139
- args: [{
20140
- selector: 'ccd-write-linked-cases',
20141
- templateUrl: './write-linked-cases.component.html'
20142
- }]
20143
- }], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
20144
- type: Input
20145
- }], caseField: [{
20146
- type: Input
20147
- }], onLinkedCasesSelected: [{
20148
- type: Output
20149
- }], isLinkedCasesJourney: [{
20150
- type: Input
20151
- }], formGroup: [{
20152
- type: Input
20153
- }] }); })();
20154
-
20155
- function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
20156
- i0.ɵɵelementContainer(0);
20157
- } }
20158
- function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) { if (rf & 1) {
20159
- i0.ɵɵelementContainer(0);
20160
- } }
20161
- function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) { if (rf & 1) {
20162
- i0.ɵɵelementContainer(0);
20163
- } }
20164
- function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) { if (rf & 1) {
20165
- i0.ɵɵelementContainer(0);
20166
- } }
20167
- function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
20168
- const _r9 = i0.ɵɵgetCurrentView();
20169
- i0.ɵɵelementStart(0, "div", 8);
20170
- i0.ɵɵelementStart(1, "p", 9);
20171
- i0.ɵɵtext(2);
20172
- i0.ɵɵelementEnd();
20173
- i0.ɵɵelementStart(3, "span", 10);
20174
- i0.ɵɵelementStart(4, "a", 11);
20175
- i0.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_16_Template_a_click_4_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.reloadCurrentRoute(); });
20176
- i0.ɵɵtext(5, "Reload the Linked cases tab");
20177
- i0.ɵɵelementEnd();
20178
- i0.ɵɵelementEnd();
20179
- i0.ɵɵelementEnd();
20180
- } if (rf & 2) {
20181
- const ctx_r5 = i0.ɵɵnextContext();
20182
- i0.ɵɵadvance(2);
20183
- i0.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
20184
- } }
20185
- function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) { if (rf & 1) {
20186
- const _r11 = i0.ɵɵgetCurrentView();
20187
- i0.ɵɵelementStart(0, "div", 8);
20188
- i0.ɵɵelementStart(1, "p", 9);
20189
- i0.ɵɵtext(2);
20190
- i0.ɵɵelementEnd();
20191
- i0.ɵɵelementStart(3, "span", 10);
20192
- i0.ɵɵelementStart(4, "a", 11);
20193
- i0.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_18_Template_a_click_4_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.reloadCurrentRoute(); });
20194
- i0.ɵɵtext(5, "Reload the Linked cases tab");
20195
- i0.ɵɵelementEnd();
20196
- i0.ɵɵelementEnd();
20197
- i0.ɵɵelementEnd();
20198
- } if (rf & 2) {
20199
- const ctx_r7 = i0.ɵɵnextContext();
20200
- i0.ɵɵadvance(2);
20201
- i0.ɵɵtextInterpolate(ctx_r7.serverError.message);
20202
- } }
20203
- class ReadLinkedCasesComponent {
20204
- constructor(router, linkedCasesService, appConfig, commonDataService) {
20205
- this.router = router;
20206
- this.linkedCasesService = linkedCasesService;
20207
- this.appConfig = appConfig;
20208
- this.commonDataService = commonDataService;
20209
- this.reasonListLoaded = false;
20210
- this.reload = false;
20211
- this.serverError = null;
20212
- this.serverLinkedApiError = null;
20213
- this.isServerReasonCodeError = false;
20214
- this.isServerJurisdictionError = false;
20215
- this.isServerLinkedFromError = false;
20216
- this.isServerLinkedToError = false;
20217
- }
20218
- ngOnInit() {
20219
- this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
20220
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
20221
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
20222
- next: reasons => {
20223
- this.reasonListLoaded = true;
20224
- this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
20225
- },
20226
- error: error => {
20227
- this.isServerReasonCodeError = true;
20228
- this.linkedCasesService.isServerReasonCodeError = true;
20229
- }
20230
- });
20231
- this.serverLinkedApiError = {
20232
- id: 'backendError', message: 'Some case information is not available at the moment'
20233
- };
20234
- this.serverError = {
20235
- id: 'backendError', message: 'There has been a system error and your request could not be processed.'
20236
- };
20237
- }
20238
- ngAfterViewInit() {
20239
- this.linkedCasesService.caseFieldValue = this.caseField.value || [];
20240
- let labelField = document.getElementsByClassName('govuk-heading-l');
20241
- if (labelField && labelField.length) {
20242
- labelField[0].replaceWith('');
20243
- }
20244
- labelField = document.getElementsByClassName('heading-h2');
20245
- if (labelField && labelField.length) {
20246
- labelField[0].replaceWith('');
20247
- }
20248
- labelField = document.getElementsByClassName('case-viewer-label');
20249
- if (labelField && labelField.length) {
20250
- labelField[0].replaceWith('');
20251
- }
20252
- }
20253
- reloadCurrentRoute() {
20254
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(() => {
20255
- window.location.hash = 'Linked cases';
20256
- });
20257
- }
20258
- getFailureLinkedToNotification(evt) {
20259
- this.isServerLinkedToError = true;
20260
- }
20261
- getFailureLinkedFromNotification(evt) {
20262
- this.isServerLinkedFromError = true;
20263
- }
20264
- }
20265
- ReadLinkedCasesComponent.ɵfac = function ReadLinkedCasesComponent_Factory(t) { return new (t || ReadLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService)); };
20266
- ReadLinkedCasesComponent.ɵcmp = i0.ɵɵ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) { if (rf & 1) {
20267
- i0.ɵɵelementStart(0, "div");
20268
- i0.ɵɵelementStart(1, "div", 0);
20269
- i0.ɵɵelementStart(2, "h1", 1);
20270
- i0.ɵɵtext(3, "Linked cases");
20271
- i0.ɵɵelementEnd();
20272
- i0.ɵɵelementStart(4, "label", 2);
20273
- i0.ɵɵtext(5, "This case is linked to");
20274
- i0.ɵɵelementEnd();
20275
- i0.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
20276
- i0.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
20277
- i0.ɵɵelementEnd();
20278
- i0.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
20279
- i0.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
20280
- i0.ɵɵelementEnd();
20281
- i0.ɵɵelementStart(9, "div", 5);
20282
- i0.ɵɵelementStart(10, "label", 2);
20283
- i0.ɵɵtext(11, "This case is linked from");
20284
- i0.ɵɵelementEnd();
20285
- i0.ɵɵelement(12, "br");
20286
- i0.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
20287
- i0.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
20288
- i0.ɵɵelementEnd();
20289
- i0.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
20290
- i0.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
20291
- i0.ɵɵelementEnd();
20292
- i0.ɵɵelementEnd();
20293
- i0.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
20294
- i0.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
20295
- } if (rf & 2) {
20296
- const _r4 = i0.ɵɵreference(17);
20297
- const _r6 = i0.ɵɵreference(19);
20298
- i0.ɵɵadvance(6);
20299
- i0.ɵɵproperty("caseField", ctx.caseField);
20300
- i0.ɵɵadvance(1);
20301
- i0.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
20302
- i0.ɵɵadvance(1);
20303
- i0.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
20304
- i0.ɵɵadvance(5);
20305
- i0.ɵɵproperty("caseField", ctx.caseField);
20306
- i0.ɵɵadvance(1);
20307
- i0.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
20308
- i0.ɵɵadvance(1);
20309
- i0.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
20310
- } }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
20311
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
20312
- type: Component,
20313
- args: [{
20314
- selector: 'ccd-read-linked-cases',
20315
- templateUrl: './read-linked-cases.component.html',
20316
- styleUrls: ['./read-linked-cases.component.scss']
20317
- }]
20318
- }], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
20319
- type: Input
20320
- }] }); })();
20321
-
20322
- class LinkCaseReason {
20323
- }
20324
- class CCDCaseLinkType {
20325
- }
20326
- class CaseLink {
20327
- }
20328
- class LinkReason {
20329
- }
20330
- class LinkedCasesResponse {
20331
- }
20332
- class CaseLinkResponse {
20333
- }
20334
- class LinkDetails {
20335
- }
20336
- class Terms {
20337
- }
20338
- class ESQueryType {
20339
- }
20340
-
20341
18023
  class CollectionCreateCheckerService {
20342
18024
  setDisplayContextForChildren(caseField, profile) {
20343
18025
  const children = this.getCaseFieldChildren(caseField);
@@ -22185,7 +19867,6 @@ const PALETTE_COMPONENTS = [
22185
19867
  ReadComplexFieldTableComponent,
22186
19868
  ReadComplexFieldCollectionTableComponent,
22187
19869
  ReadCaseFlagFieldComponent,
22188
- ReadLinkedCasesComponent,
22189
19870
  // Write
22190
19871
  WriteJudicialUserFieldComponent,
22191
19872
  WriteAddressFieldComponent,
@@ -22221,15 +19902,7 @@ const PALETTE_COMPONENTS = [
22221
19902
  CaseFileViewFolderSortComponent,
22222
19903
  CaseFileViewOverlayMenuComponent,
22223
19904
  CaseFileViewFolderDocumentActionsComponent,
22224
- CaseFileViewFolderSelectorComponent,
22225
- LinkedCasesToTableComponent,
22226
- LinkedCasesFromTableComponent,
22227
- BeforeYouStartComponent,
22228
- LinkCasesComponent,
22229
- CheckYourAnswersComponent,
22230
- WriteLinkedCasesComponent,
22231
- UnLinkCasesComponent,
22232
- NoLinkedCasesComponent
19905
+ CaseFileViewFolderSelectorComponent
22233
19906
  ];
22234
19907
  class PaletteModule {
22235
19908
  }
@@ -22245,7 +19918,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22245
19918
  FileUploadStateService,
22246
19919
  FileUploadProgressGuard,
22247
19920
  WindowService,
22248
- LinkedCasesService,
22249
19921
  CommonDataService,
22250
19922
  JurisdictionService,
22251
19923
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -22341,7 +20013,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22341
20013
  ReadComplexFieldTableComponent,
22342
20014
  ReadComplexFieldCollectionTableComponent,
22343
20015
  ReadCaseFlagFieldComponent,
22344
- ReadLinkedCasesComponent,
22345
20016
  // Write
22346
20017
  WriteJudicialUserFieldComponent,
22347
20018
  WriteAddressFieldComponent,
@@ -22377,15 +20048,7 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22377
20048
  CaseFileViewFolderSortComponent,
22378
20049
  CaseFileViewOverlayMenuComponent,
22379
20050
  CaseFileViewFolderDocumentActionsComponent,
22380
- CaseFileViewFolderSelectorComponent,
22381
- LinkedCasesToTableComponent,
22382
- LinkedCasesFromTableComponent,
22383
- BeforeYouStartComponent,
22384
- LinkCasesComponent,
22385
- CheckYourAnswersComponent,
22386
- WriteLinkedCasesComponent,
22387
- UnLinkCasesComponent,
22388
- NoLinkedCasesComponent], imports: [CommonModule,
20051
+ CaseFileViewFolderSelectorComponent], imports: [CommonModule,
22389
20052
  RouterModule,
22390
20053
  FormsModule,
22391
20054
  ReactiveFormsModule,
@@ -22459,7 +20122,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22459
20122
  ReadComplexFieldTableComponent,
22460
20123
  ReadComplexFieldCollectionTableComponent,
22461
20124
  ReadCaseFlagFieldComponent,
22462
- ReadLinkedCasesComponent,
22463
20125
  // Write
22464
20126
  WriteJudicialUserFieldComponent,
22465
20127
  WriteAddressFieldComponent,
@@ -22495,15 +20157,7 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22495
20157
  CaseFileViewFolderSortComponent,
22496
20158
  CaseFileViewOverlayMenuComponent,
22497
20159
  CaseFileViewFolderDocumentActionsComponent,
22498
- CaseFileViewFolderSelectorComponent,
22499
- LinkedCasesToTableComponent,
22500
- LinkedCasesFromTableComponent,
22501
- BeforeYouStartComponent,
22502
- LinkCasesComponent,
22503
- CheckYourAnswersComponent,
22504
- WriteLinkedCasesComponent,
22505
- UnLinkCasesComponent,
22506
- NoLinkedCasesComponent] }); })();
20160
+ CaseFileViewFolderSelectorComponent] }); })();
22507
20161
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteModule, [{
22508
20162
  type: NgModule,
22509
20163
  args: [{
@@ -22574,7 +20228,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22574
20228
  FileUploadStateService,
22575
20229
  FileUploadProgressGuard,
22576
20230
  WindowService,
22577
- LinkedCasesService,
22578
20231
  CommonDataService,
22579
20232
  JurisdictionService,
22580
20233
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -22592,7 +20245,6 @@ i0.ɵɵsetComponentScope(ReadOrganisationFieldComponent, [i2.NgSwitch, i2.NgSwit
22592
20245
  i0.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i2.NgForOf, ReadOrderSummaryRowComponent,
22593
20246
  ReadMoneyGbpFieldComponent], [i1.RpxTranslatePipe]);
22594
20247
  i0.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], [i1.RpxTranslatePipe]);
22595
- i0.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i2.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
22596
20248
  i0.ɵɵsetComponentScope(ReadComplexFieldComponent, [i2.NgSwitch, i2.NgSwitchCase, ReadComplexFieldRawComponent,
22597
20249
  ReadComplexFieldCollectionTableComponent, i2.NgSwitchDefault, ReadComplexFieldTableComponent], []);
22598
20250
  i0.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i2.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe, i1.RpxTranslatePipe]);
@@ -22600,7 +20252,6 @@ i0.ɵɵsetComponentScope(ReadComplexFieldTableComponent, [i2.NgForOf, i2.NgIf, F
22600
20252
  i0.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i2.NgForOf, i2.NgIf, FieldReadComponent,
22601
20253
  ReadCaseLinkFieldComponent], [i1.RpxTranslatePipe, ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i2.KeyValuePipe, IsCompoundPipe]);
22602
20254
  i0.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i2.NgSwitch, i2.NgSwitchCase, CaseFlagSummaryListComponent, i2.NgSwitchDefault, i2.NgForOf, i2.NgIf, CaseFlagTableComponent], [i1.RpxTranslatePipe]);
22603
- i0.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i2.NgIf, LinkedCasesFromTableComponent], []);
22604
20255
  i0.ɵɵsetComponentScope(WriteAddressFieldComponent, [i2.NgIf, i2.NgClass, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective, i2$1.SelectControlValueAccessor, i2.NgForOf, i2$1.NgSelectOption, i2$1.ɵangular_packages_forms_forms_z, WriteComplexFieldComponent, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective], [i1.RpxTranslatePipe, FieldLabelPipe]);
22605
20256
  i0.ɵɵsetComponentScope(WriteComplexFieldComponent, [i2.NgIf, i2.NgForOf, i2.NgSwitch, i2.NgSwitchCase, FieldReadComponent, LabelSubstitutorDirective, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, FieldWriteComponent], [i1.RpxTranslatePipe, FieldLabelPipe, IsReadOnlyPipe]);
22606
20257
  i0.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i2.NgClass, i2.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe, i1.RpxTranslatePipe]);
@@ -22615,21 +20266,11 @@ i0.ɵɵsetComponentScope(WriteOrganisationFieldComponent, [i2$1.NgControlStatusG
22615
20266
  WriteOrganisationComplexFieldComponent], [i2.AsyncPipe, i1.RpxTranslatePipe]);
22616
20267
  i0.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
22617
20268
  i0.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i2.NgIf, DatetimePickerComponent, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, WriteDateFieldComponent], []);
22618
- i0.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlDirective, WriteLinkedCasesComponent, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective], [i1.RpxTranslatePipe, FieldLabelPipe]);
22619
20269
  i0.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i2.NgIf, i2.NgForOf, FieldWriteComponent, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective], [i1.RpxTranslatePipe, FieldLabelPipe, FirstErrorPipe]);
22620
20270
  i0.ɵɵsetComponentScope(
22621
20271
  // ComponentLauncher web components
22622
- CaseFileViewFieldComponent, [i2.NgIf, CaseFileViewFolderComponent, i13.ɵcs], []);
22623
- i0.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i2.NgIf, CaseFileViewFolderComponent, i13.ɵcs], []);
22624
- i0.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i2.NgIf, i2.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22625
- i0.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i2.NgIf, i2.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22626
- i0.ɵɵsetComponentScope(LinkCasesComponent, [i2.NgIf, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2.NgClass, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.FormControlName, i2$1.FormArrayName, i2.NgForOf, i2$1.FormGroupName, i2$1.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22627
- i0.ɵɵsetComponentScope(CheckYourAnswersComponent, [i2.NgIf, i2.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22628
- i0.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i2.NgIf, i2.NgForOf, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2.NgSwitch, i2.NgSwitchCase, BeforeYouStartComponent,
22629
- NoLinkedCasesComponent,
22630
- LinkCasesComponent,
22631
- UnLinkCasesComponent,
22632
- CheckYourAnswersComponent], []);
20272
+ CaseFileViewFieldComponent, [i2.NgIf, CaseFileViewFolderComponent, i12.ɵcs], []);
20273
+ i0.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i2.NgIf, CaseFileViewFolderComponent, i12.ɵcs], []);
22633
20274
 
22634
20275
  class Confirmation {
22635
20276
  constructor(caseId, status, header, body) {
@@ -26910,7 +24551,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_ng_
26910
24551
  function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_ng_container_3_tr_4_Template(rf, ctx) { if (rf & 1) {
26911
24552
  i0.ɵɵelementStart(0, "tr");
26912
24553
  i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_2_ng_container_3_tr_4_th_1_Template, 4, 3, "th", 32);
26913
- i0.ɵɵelementStart(2, "th", 33);
24554
+ i0.ɵɵelementStart(2, "td", 33);
26914
24555
  i0.ɵɵelementStart(3, "span", 34);
26915
24556
  i0.ɵɵelement(4, "ccd-field-read", 35);
26916
24557
  i0.ɵɵelementEnd();
@@ -31934,5 +29575,5 @@ class TestRouteSnapshotBuilder {
31934
29575
  * Generated bundle index. Do not edit.
31935
29576
  */
31936
29577
 
31937
- export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFieldReadComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagFieldState, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagText, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HasLoadingState, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LinkCaseReason, LinkCasesComponent, LinkCasesReasonValuePipe, LinkDetails, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageType, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
29578
+ export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BodyComponent, BrowserService, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFieldReadComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagFieldState, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagText, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HasLoadingState, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, TestRouteSnapshotBuilder, UnsupportedFieldComponent, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
31938
29579
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map