@hmcts/ccd-case-ui-toolkit 5.0.51-restricted-case-access → 5.0.52-rollback-case-link

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +446 -3091
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +1 -9
  6. package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +7 -17
  7. package/esm2015/lib/shared/components/case-editor/services/cases.service.js +1 -28
  8. package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -10
  9. package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +6 -10
  10. package/esm2015/lib/shared/components/palette/base-field/abstract-form-field.component.js +2 -4
  11. package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +1 -1
  12. package/esm2015/lib/shared/components/palette/case-link/index.js +1 -4
  13. package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +8 -28
  14. package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +66 -77
  15. package/esm2015/lib/shared/components/palette/palette.module.js +22 -68
  16. package/esm2015/lib/shared/components/palette/palette.service.js +4 -12
  17. package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +1 -10
  18. package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
  19. package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +1 -5
  20. package/esm2015/lib/shared/pipes/index.js +1 -2
  21. package/esm2015/lib/shared/pipes/pipes.module.js +4 -8
  22. package/esm2015/lib/shared/services/fields/fields.utils.js +1 -7
  23. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +254 -2610
  24. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  25. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +0 -5
  26. package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
  27. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +0 -2
  28. package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
  29. package/lib/shared/components/case-editor/services/cases.service.d.ts +0 -7
  30. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  31. package/lib/shared/components/case-editor/services/page-validation.service.d.ts +0 -1
  32. package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
  33. package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
  34. package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
  35. package/lib/shared/components/palette/case-link/index.d.ts +0 -3
  36. package/lib/shared/components/palette/case-link/index.d.ts.map +1 -1
  37. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts +0 -3
  38. package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
  39. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +3 -12
  40. package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
  41. package/lib/shared/components/palette/palette.module.d.ts +58 -67
  42. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  43. package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
  44. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +0 -1
  45. package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
  46. package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
  47. package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
  48. package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
  49. package/lib/shared/pipes/index.d.ts +0 -1
  50. package/lib/shared/pipes/index.d.ts.map +1 -1
  51. package/lib/shared/pipes/pipes.module.d.ts +2 -3
  52. package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
  53. package/lib/shared/services/fields/fields.utils.d.ts +0 -1
  54. package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
  55. package/package.json +1 -1
  56. package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +0 -125
  57. package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +0 -198
  58. package/esm2015/lib/shared/components/palette/case-link/components/index.js +0 -10
  59. package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +0 -497
  60. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +0 -221
  61. package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +0 -286
  62. package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +0 -76
  63. package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +0 -178
  64. package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +0 -216
  65. package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +0 -265
  66. package/esm2015/lib/shared/components/palette/case-link/domain/index.js +0 -3
  67. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +0 -2
  68. package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +0 -19
  69. package/esm2015/lib/shared/components/palette/case-link/enums/index.js +0 -2
  70. package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +0 -33
  71. package/esm2015/lib/shared/components/palette/case-link/services/index.js +0 -2
  72. package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +0 -134
  73. package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +0 -27
  74. package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +0 -23
  75. package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +0 -2
  76. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts +0 -19
  77. package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +0 -1
  78. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +0 -18
  79. package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +0 -1
  80. package/lib/shared/components/palette/case-link/components/index.d.ts +0 -10
  81. package/lib/shared/components/palette/case-link/components/index.d.ts.map +0 -1
  82. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +0 -45
  83. package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +0 -1
  84. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +0 -42
  85. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +0 -1
  86. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +0 -45
  87. package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +0 -1
  88. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +0 -12
  89. package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +0 -1
  90. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +0 -37
  91. package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +0 -1
  92. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +0 -38
  93. package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +0 -1
  94. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +0 -45
  95. package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +0 -1
  96. package/lib/shared/components/palette/case-link/domain/index.d.ts +0 -3
  97. package/lib/shared/components/palette/case-link/domain/index.d.ts.map +0 -1
  98. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +0 -12
  99. package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +0 -1
  100. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +0 -65
  101. package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +0 -1
  102. package/lib/shared/components/palette/case-link/enums/index.d.ts +0 -2
  103. package/lib/shared/components/palette/case-link/enums/index.d.ts.map +0 -1
  104. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +0 -29
  105. package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +0 -1
  106. package/lib/shared/components/palette/case-link/services/index.d.ts +0 -2
  107. package/lib/shared/components/palette/case-link/services/index.d.ts.map +0 -1
  108. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +0 -50
  109. package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +0 -1
  110. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +0 -10
  111. package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +0 -1
  112. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +0 -11
  113. package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +0 -1
  114. package/lib/shared/pipes/link-cases-reason-code/index.d.ts +0 -2
  115. package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +0 -1
@@ -7,7 +7,7 @@ import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
7
7
  import * as i2 from '@angular/forms';
8
8
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
9
  import polling from 'rx-polling';
10
- import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, forkJoin, fromEvent } from 'rxjs';
10
+ import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, fromEvent } from 'rxjs';
11
11
  import * as i1$2 from '@angular/common/http';
12
12
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
13
13
  import { catchError, map, publish, refCount, debounceTime, delay, distinctUntilChanged, finalize, publishReplay, take, tap, first, switchMap, takeUntil, filter } from 'rxjs/operators';
@@ -37,7 +37,7 @@ import * as i3$1 from '@angular/material/input';
37
37
  import { MatInputModule } from '@angular/material/input';
38
38
  import * as i3 from '@hmcts/ccpay-web-component';
39
39
  import { PaymentLibModule } from '@hmcts/ccpay-web-component';
40
- import * as i12 from '@hmcts/media-viewer';
40
+ import * as i11 from '@hmcts/media-viewer';
41
41
  import { MediaViewerModule } from '@hmcts/media-viewer';
42
42
  import * as i2$1 from '@nicky-lenaers/ngx-scroll-to';
43
43
  import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
@@ -115,13 +115,13 @@ function FooterComponent_div_3_Template(rf, ctx) { if (rf & 1) {
115
115
  i0.ɵɵadvance(3);
116
116
  i0.ɵɵtextInterpolate(ctx_r1.workhours);
117
117
  } }
118
- const _c0$_ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
118
+ const _c0$Y = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
119
119
  const _c1$r = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
120
120
  class FooterComponent {
121
121
  }
122
122
  FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
123
123
  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) {
124
- i0.ɵɵprojectionDef(_c0$_);
124
+ i0.ɵɵprojectionDef(_c0$Y);
125
125
  i0.ɵɵelementStart(0, "footer", 0);
126
126
  i0.ɵɵelementStart(1, "div", 1);
127
127
  i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 15, 0, "div", 2);
@@ -188,7 +188,7 @@ function HeaderBarComponent_div_9_Template(rf, ctx) { if (rf & 1) {
188
188
  i0.ɵɵadvance(3);
189
189
  i0.ɵɵtextInterpolate(ctx_r2.title);
190
190
  } }
191
- const _c0$Z = [[["", "headerNavigation", ""]]];
191
+ const _c0$X = [[["", "headerNavigation", ""]]];
192
192
  const _c1$q = ["[headerNavigation]"];
193
193
  class HeaderBarComponent {
194
194
  constructor() {
@@ -200,7 +200,7 @@ class HeaderBarComponent {
200
200
  }
201
201
  HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
202
202
  HeaderBarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$q, decls: 15, vars: 8, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
203
- i0.ɵɵprojectionDef(_c0$Z);
203
+ i0.ɵɵprojectionDef(_c0$X);
204
204
  i0.ɵɵelementStart(0, "header", 0);
205
205
  i0.ɵɵelementStart(1, "div", 1);
206
206
  i0.ɵɵelementStart(2, "div", 2);
@@ -257,13 +257,13 @@ HeaderBarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderBarComponent, se
257
257
  type: Output
258
258
  }] }); })();
259
259
 
260
- const _c0$Y = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
260
+ const _c0$W = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
261
261
  const _c1$p = ["[leftNavLinks]", "[rightNavLinks]"];
262
262
  class NavigationComponent {
263
263
  }
264
264
  NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
265
265
  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) {
266
- i0.ɵɵprojectionDef(_c0$Y);
266
+ i0.ɵɵprojectionDef(_c0$W);
267
267
  i0.ɵɵelementStart(0, "div");
268
268
  i0.ɵɵelementStart(1, "nav", 0);
269
269
  i0.ɵɵprojection(2);
@@ -380,13 +380,13 @@ HeadersModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[CommonModule, RouterMod
380
380
  }]
381
381
  }], null, null); })();
382
382
 
383
- const _c0$X = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
383
+ const _c0$V = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
384
384
  const _c1$o = ["[topBody]", "[leftBody]", "[rightBody]"];
385
385
  class BodyComponent {
386
386
  }
387
387
  BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
388
388
  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) {
389
- i0.ɵɵprojectionDef(_c0$X);
389
+ i0.ɵɵprojectionDef(_c0$V);
390
390
  i0.ɵɵelementStart(0, "div", 0);
391
391
  i0.ɵɵprojection(1);
392
392
  i0.ɵɵprojection(2, 1);
@@ -403,7 +403,7 @@ BodyComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [
403
403
  }]
404
404
  }], null, null); })();
405
405
 
406
- const _c0$W = function (a0) { return { "govuk-input--error": a0 }; };
406
+ const _c0$U = function (a0) { return { "govuk-input--error": a0 }; };
407
407
  function DateInputComponent_div_16_Template(rf, ctx) { if (rf & 1) {
408
408
  const _r8 = i0.ɵɵgetCurrentView();
409
409
  i0.ɵɵelementStart(0, "div", 12);
@@ -419,7 +419,7 @@ function DateInputComponent_div_16_Template(rf, ctx) { if (rf & 1) {
419
419
  i0.ɵɵadvance(1);
420
420
  i0.ɵɵproperty("for", ctx_r3.hourId());
421
421
  i0.ɵɵadvance(2);
422
- i0.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0.ɵɵpureFunction1(5, _c0$W, ctx_r3.isInvalid));
422
+ i0.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0.ɵɵpureFunction1(5, _c0$U, ctx_r3.isInvalid));
423
423
  } }
424
424
  function DateInputComponent_div_17_Template(rf, ctx) { if (rf & 1) {
425
425
  const _r13 = i0.ɵɵgetCurrentView();
@@ -436,7 +436,7 @@ function DateInputComponent_div_17_Template(rf, ctx) { if (rf & 1) {
436
436
  i0.ɵɵadvance(1);
437
437
  i0.ɵɵproperty("for", ctx_r4.minuteId());
438
438
  i0.ɵɵadvance(2);
439
- i0.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0.ɵɵpureFunction1(5, _c0$W, ctx_r4.isInvalid));
439
+ i0.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0.ɵɵpureFunction1(5, _c0$U, ctx_r4.isInvalid));
440
440
  } }
441
441
  function DateInputComponent_div_18_Template(rf, ctx) { if (rf & 1) {
442
442
  const _r18 = i0.ɵɵgetCurrentView();
@@ -453,7 +453,7 @@ function DateInputComponent_div_18_Template(rf, ctx) { if (rf & 1) {
453
453
  i0.ɵɵadvance(1);
454
454
  i0.ɵɵproperty("for", ctx_r5.secondId());
455
455
  i0.ɵɵadvance(2);
456
- i0.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0.ɵɵpureFunction1(5, _c0$W, ctx_r5.isInvalid));
456
+ i0.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0.ɵɵpureFunction1(5, _c0$U, ctx_r5.isInvalid));
457
457
  } }
458
458
  class DateInputComponent {
459
459
  constructor() {
@@ -682,15 +682,15 @@ DateInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DateInputComponent, se
682
682
  i0.ɵɵadvance(2);
683
683
  i0.ɵɵproperty("for", ctx.dayId());
684
684
  i0.ɵɵadvance(2);
685
- i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(18, _c0$W, ctx.isInvalid));
685
+ i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(18, _c0$U, ctx.isInvalid));
686
686
  i0.ɵɵadvance(3);
687
687
  i0.ɵɵproperty("for", ctx.monthId());
688
688
  i0.ɵɵadvance(2);
689
- i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(20, _c0$W, ctx.isInvalid));
689
+ i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(20, _c0$U, ctx.isInvalid));
690
690
  i0.ɵɵadvance(3);
691
691
  i0.ɵɵproperty("for", ctx.yearId());
692
692
  i0.ɵɵadvance(2);
693
- i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(22, _c0$W, ctx.isInvalid));
693
+ i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(22, _c0$U, ctx.isInvalid));
694
694
  i0.ɵɵadvance(2);
695
695
  i0.ɵɵproperty("ngIf", ctx.isDateTime);
696
696
  i0.ɵɵadvance(1);
@@ -760,7 +760,7 @@ function AlertComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
760
760
  i0.ɵɵelementEnd();
761
761
  i0.ɵɵelementContainerEnd();
762
762
  } }
763
- const _c0$V = ["*"];
763
+ const _c0$T = ["*"];
764
764
  var AlertMessageType;
765
765
  (function (AlertMessageType) {
766
766
  AlertMessageType["WARNING"] = "warning";
@@ -780,7 +780,7 @@ AlertComponent.TYPE_SUCCESS = 'success';
780
780
  AlertComponent.TYPE_ERROR = 'error';
781
781
  AlertComponent.TYPE_INFORMATION = 'information';
782
782
  AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
783
- AlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$V, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) { if (rf & 1) {
783
+ AlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$T, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) { if (rf & 1) {
784
784
  i0.ɵɵprojectionDef();
785
785
  i0.ɵɵelementStart(0, "div", 0);
786
786
  i0.ɵɵelementContainerStart(1, 1);
@@ -1011,7 +1011,7 @@ NotificationBannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NotificationB
1011
1011
  type: Output
1012
1012
  }] }); })();
1013
1013
 
1014
- const _c0$U = function (a0) { return { "js-hidden": a0 }; };
1014
+ const _c0$S = function (a0) { return { "js-hidden": a0 }; };
1015
1015
  const _c1$n = ["*"];
1016
1016
  class TabComponent {
1017
1017
  }
@@ -1022,7 +1022,7 @@ TabComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["
1022
1022
  i0.ɵɵprojection(1);
1023
1023
  i0.ɵɵelementEnd();
1024
1024
  } if (rf & 2) {
1025
- i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c0$U, !ctx.selected));
1025
+ i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c0$S, !ctx.selected));
1026
1026
  i0.ɵɵattribute("aria-hidden", !ctx.selected);
1027
1027
  } }, directives: [i1.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}}"] });
1028
1028
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TabComponent, [{
@@ -1042,7 +1042,7 @@ TabComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["
1042
1042
  type: Input
1043
1043
  }] }); })();
1044
1044
 
1045
- const _c0$T = ["tab"];
1045
+ const _c0$R = ["tab"];
1046
1046
  const _c1$m = function () { return ["."]; };
1047
1047
  const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
1048
1048
  function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
@@ -1087,7 +1087,7 @@ TabsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabsComponent, selectors: [
1087
1087
  let _t;
1088
1088
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.panels = _t);
1089
1089
  } }, viewQuery: function TabsComponent_Query(rf, ctx) { if (rf & 1) {
1090
- i0.ɵɵviewQuery(_c0$T, 1);
1090
+ i0.ɵɵviewQuery(_c0$R, 1);
1091
1091
  } if (rf & 2) {
1092
1092
  let _t;
1093
1093
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabs = _t);
@@ -1152,7 +1152,7 @@ TabsModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
1152
1152
  }]
1153
1153
  }], null, null); })();
1154
1154
 
1155
- const _c0$S = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1155
+ const _c0$Q = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
1156
1156
  class ActivityBannerComponent {
1157
1157
  constructor() { }
1158
1158
  ngOnInit() {
@@ -1169,7 +1169,7 @@ ActivityBannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ActivityBannerCom
1169
1169
  i0.ɵɵelementEnd();
1170
1170
  i0.ɵɵelementEnd();
1171
1171
  } if (rf & 2) {
1172
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(4, _c0$S, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1172
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(4, _c0$Q, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
1173
1173
  i0.ɵɵadvance(2);
1174
1174
  i0.ɵɵpropertyInterpolate("alt", ctx.description);
1175
1175
  i0.ɵɵpropertyInterpolate("src", ctx.imageLink, i0.ɵɵsanitizeUrl);
@@ -2592,14 +2592,6 @@ class IsCompoundPipe {
2592
2592
  if (!field || !field.field_type || !field.field_type.type) {
2593
2593
  return false;
2594
2594
  }
2595
- // Case link tab spacing alignment fix
2596
- // This Pipe needs to be re-visited
2597
- // to make it more generic to support and fix alignments issues for multiple tabs
2598
- if (field.field_type.collection_field_type &&
2599
- field.field_type.collection_field_type.id &&
2600
- field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
2601
- return true;
2602
- }
2603
2595
  if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
2604
2596
  if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
2605
2597
  return false;
@@ -2609,7 +2601,6 @@ class IsCompoundPipe {
2609
2601
  return false;
2610
2602
  }
2611
2603
  }
2612
- IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
2613
2604
  IsCompoundPipe.COMPOUND_TYPES = [
2614
2605
  'Complex',
2615
2606
  'Label',
@@ -3310,12 +3301,6 @@ class FieldsUtils {
3310
3301
  static isCollectionWithValue(pageFormFields) {
3311
3302
  return pageFormFields[0]['value'] !== undefined;
3312
3303
  }
3313
- static isLinkedCasesCaseField(caseField) {
3314
- if (!caseField) {
3315
- return false;
3316
- }
3317
- return caseField.field_type.collection_field_type.id === 'CaseLink';
3318
- }
3319
3304
  static cloneObject(obj) {
3320
3305
  return Object.assign({}, obj);
3321
3306
  }
@@ -4217,9 +4202,7 @@ class AbstractFormFieldComponent {
4217
4202
  }
4218
4203
  addControlToFormGroup(control, parent, replace) {
4219
4204
  if (replace) {
4220
- if (this.caseField.field_type && this.caseField.field_type.collection_field_type
4221
- && this.caseField.field_type.collection_field_type.id === 'CaseLink'
4222
- && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4205
+ if (this.caseField.field_type && this.caseField.field_type.id === 'CaseLink' && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
4223
4206
  parent.setControl('CaseReference', control['controls']['CaseReference']);
4224
4207
  }
4225
4208
  else {
@@ -7191,33 +7174,6 @@ class CasesService {
7191
7174
  return throwError(error);
7192
7175
  }), finalize(() => this.loadingService.unregister(loadingToken)));
7193
7176
  }
7194
- /**
7195
- * TODO: Gets case link responses
7196
- * @returns case link responses
7197
- */
7198
- getCaseLinkResponses() {
7199
- const headers = new HttpHeaders()
7200
- .set('experimental', 'true')
7201
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
7202
- .set('Content-Type', 'application/json');
7203
- const loadingToken = this.loadingService.register();
7204
- return this.http
7205
- .get('assets/getCaseReasons.json', { headers, observe: 'body' })
7206
- .pipe(map((reasons) => {
7207
- return reasons.sort((reasonA, reasonB) => reasonA.value_en > reasonB.value_en ? 1 : -1);
7208
- }), catchError(error => {
7209
- this.errorService.setError(error);
7210
- return throwError(error);
7211
- }), finalize(() => this.loadingService.unregister(loadingToken)));
7212
- }
7213
- getLinkedCases(caseId) {
7214
- const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
7215
- return this.http
7216
- .get(url)
7217
- .pipe(catchError(error => {
7218
- return throwError(error);
7219
- }));
7220
- }
7221
7177
  getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
7222
7178
  ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
7223
7179
  const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
@@ -7985,8 +7941,7 @@ class PageValidationService {
7985
7941
  .filter(caseField => !this.isHidden(caseField, editForm))
7986
7942
  .every(caseField => {
7987
7943
  const theControl = editForm.controls['data'].get(caseField.id);
7988
- return this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl) &&
7989
- this.checkCaseLinksCollectionField(caseField, theControl);
7944
+ return this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl);
7990
7945
  });
7991
7946
  }
7992
7947
  isHidden(caseField, editForm, path) {
@@ -8014,13 +7969,6 @@ class PageValidationService {
8014
7969
  checkMandatoryField(caseField, theControl) {
8015
7970
  return this.caseFieldService.isMandatory(caseField) && theControl === null;
8016
7971
  }
8017
- checkCaseLinksCollectionField(caseField, theControl) {
8018
- if (caseField && caseField.id === 'caseLinks') {
8019
- return theControl && theControl.value && Array.isArray(theControl.value) &&
8020
- theControl.value.length ? true : false;
8021
- }
8022
- return true;
8023
- }
8024
7972
  }
8025
7973
  PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0.ɵɵinject(CaseFieldService)); };
8026
7974
  PageValidationService.ɵprov = i0.ɵɵdefineInjectable({ token: PageValidationService, factory: PageValidationService.ɵfac });
@@ -8399,12 +8347,10 @@ class CaseEditDataService {
8399
8347
  constructor() {
8400
8348
  this.title$ = new BehaviorSubject(null);
8401
8349
  this.formValidationErrors$ = new BehaviorSubject([]);
8402
- this.linkError$ = new BehaviorSubject(null);
8403
8350
  this.eventTriggerName$ = new BehaviorSubject(null);
8404
8351
  this.triggerSubmitEvent$ = new BehaviorSubject(null);
8405
8352
  this.caseTitle$ = this.title$.asObservable();
8406
8353
  this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
8407
- this.caseLinkError$ = this.linkError$.asObservable();
8408
8354
  this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
8409
8355
  this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
8410
8356
  }
@@ -8414,18 +8360,12 @@ class CaseEditDataService {
8414
8360
  setCaseEventTriggerName(triggerName) {
8415
8361
  this.eventTriggerName$.next(triggerName);
8416
8362
  }
8417
- setCaseLinkError(error) {
8418
- this.linkError$.next(error);
8419
- }
8420
8363
  setFormValidationErrors(validationErrors) {
8421
8364
  this.formValidationErrors$.next(validationErrors);
8422
8365
  }
8423
8366
  clearFormValidationErrors() {
8424
8367
  this.formValidationErrors$.next([]);
8425
8368
  }
8426
- clearCaseLinkError() {
8427
- this.linkError$.next(null);
8428
- }
8429
8369
  addFormValidationError(validationError) {
8430
8370
  this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
8431
8371
  }
@@ -8863,27 +8803,18 @@ class CaseEditPageComponent {
8863
8803
  this.caseEditDataService.addFormValidationError({ id, message: `${label} exceeds the maximum length` });
8864
8804
  fieldElement.markAsDirty();
8865
8805
  }
8866
- else if (this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
8867
- this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
8868
- }
8869
8806
  else if (fieldElement.invalid) {
8870
8807
  if (casefield.isComplex()) {
8871
8808
  this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id);
8872
8809
  }
8873
8810
  else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
8874
- if (this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
8875
- this.caseEditDataService.addFormValidationError({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
8876
- // this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
8877
- }
8878
- else {
8879
- const fieldArray = fieldElement;
8880
- if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
8881
- id = `${fieldArray['component']['collItems'][0].prefix}`;
8882
- }
8883
- fieldArray.controls.forEach((c) => {
8884
- this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
8885
- });
8811
+ const fieldArray = fieldElement;
8812
+ if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
8813
+ id = `${fieldArray['component']['collItems'][0].prefix}`;
8886
8814
  }
8815
+ fieldArray.controls.forEach((c) => {
8816
+ this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
8817
+ });
8887
8818
  }
8888
8819
  else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
8889
8820
  // Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
@@ -9131,7 +9062,6 @@ class CaseEditPageComponent {
9131
9062
  }
9132
9063
  syncCaseEditDataService() {
9133
9064
  this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
9134
- this.caseEditDataService.setCaseLinkError(this.caseLinkError);
9135
9065
  this.caseEditDataService.setCaseTitle(this.getCaseTitle());
9136
9066
  this.caseEditDataService.caseFormValidationErrors$.subscribe({
9137
9067
  next: (validationErrors) => this.validationErrors = validationErrors
@@ -9579,10 +9509,6 @@ class ReadFieldsFilterPipe {
9579
9509
  && ReadFieldsFilterPipe.NESTED_TYPES[field.field_type.type](field, value);
9580
9510
  }
9581
9511
  static keepField(field, value, ignoreLabels = false) {
9582
- // We should always render the caselinks tables from and to regardless whether it has valid value or not
9583
- if (field.id === 'caseLinks') {
9584
- return true;
9585
- }
9586
9512
  // We shouldn't ditch labels.
9587
9513
  if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
9588
9514
  return true;
@@ -9847,154 +9773,6 @@ FieldsFilterPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFieldsFilter", type: Fie
9847
9773
  }]
9848
9774
  }], null, null); })();
9849
9775
 
9850
- class LinkedCasesService {
9851
- constructor(jurisdictionService, searchService) {
9852
- this.jurisdictionService = jurisdictionService;
9853
- this.searchService = searchService;
9854
- this.caseFieldValue = [];
9855
- this.isLinkedCasesEventTrigger = false;
9856
- this.linkCaseReasons = [];
9857
- this.linkedCases = [];
9858
- this.initialCaseLinks = [];
9859
- this.editMode = false;
9860
- this.jurisdictionsResponse = [];
9861
- this.serverError = null;
9862
- this.serverLinkedApiError = null;
9863
- this.isServerReasonCodeError = false;
9864
- this.caseJurisdictionID = null;
9865
- this.groupLinkedCasesByCaseType = (arrObj, key) => {
9866
- return arrObj.reduce((rv, x) => {
9867
- (rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
9868
- return rv;
9869
- }, {});
9870
- };
9871
- this.jurisdictionService.getJurisdictions().subscribe((jurisdictions) => {
9872
- this.jurisdictionsResponse = jurisdictions;
9873
- }, (error) => {
9874
- this.serverJurisdictionError = true;
9875
- });
9876
- }
9877
- constructElasticSearchQuery(caseIds, size) {
9878
- return {
9879
- query: {
9880
- terms: {
9881
- reference: caseIds,
9882
- },
9883
- },
9884
- size,
9885
- };
9886
- }
9887
- mapResponse(esSearchCasesResponse) {
9888
- const caseInfo = this.caseFieldValue.find(item => item.value && item.value.CaseReference === esSearchCasesResponse.case_id);
9889
- return caseInfo && {
9890
- caseReference: esSearchCasesResponse.case_id,
9891
- caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
9892
- caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
9893
- service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
9894
- state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
9895
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
9896
- caseInfo.value.ReasonForLink.map(reason => reason.value && reason.value.Reason),
9897
- };
9898
- }
9899
- searchCasesByCaseIds(searchCasesResponse) {
9900
- return forkJoin(searchCasesResponse);
9901
- }
9902
- getAllLinkedCaseInformation() {
9903
- const searchCasesResponse = [];
9904
- const linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
9905
- Object.keys(linkedCaseIds).forEach(key => {
9906
- const esQuery = this.constructElasticSearchQuery(linkedCaseIds[key], 100);
9907
- const query = this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
9908
- searchCasesResponse.push(query);
9909
- });
9910
- if (searchCasesResponse.length) {
9911
- this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
9912
- const casesResponse = [];
9913
- searchCases.forEach(response => {
9914
- response.results.forEach((result) => {
9915
- casesResponse.push(this.mapResponse(result));
9916
- });
9917
- });
9918
- const caseLinks = casesResponse.map(item => {
9919
- return {
9920
- caseReference: item.caseReference,
9921
- caseName: item.caseName,
9922
- caseService: item.service,
9923
- caseType: item.caseType,
9924
- unlink: false,
9925
- reasons: item.reasons && item.reasons.map(reason => {
9926
- return {
9927
- reasonCode: reason
9928
- };
9929
- }),
9930
- };
9931
- });
9932
- this.linkedCases = caseLinks;
9933
- this.serverLinkedApiError = null;
9934
- }, err => {
9935
- this.serverLinkedApiError = {
9936
- id: 'backendError', message: 'Some case information is not available at the moment'
9937
- };
9938
- });
9939
- }
9940
- }
9941
- mapLookupIDToValueFromJurisdictions(fieldName, fieldValue) {
9942
- const selectedJurisdiction = this.jurisdictionsResponse &&
9943
- this.jurisdictionsResponse.find(item => item.id === this.caseDetails.case_type.jurisdiction.id);
9944
- const selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(item => item.id === this.caseDetails.case_type.id);
9945
- const state = selectedCaseType && selectedCaseType.states.find(item => item.id === fieldValue);
9946
- switch (fieldName) {
9947
- case 'JURISDICTION':
9948
- return selectedJurisdiction && selectedJurisdiction.description;
9949
- case 'CASE_TYPE':
9950
- return selectedCaseType && selectedCaseType.name;
9951
- case 'CASE_TYPE_DESCRIPTION':
9952
- return selectedCaseType && selectedCaseType.description;
9953
- case 'STATE':
9954
- return state && state.name || fieldValue;
9955
- case 'STATE_DESCRIPTION':
9956
- return state && state.description || fieldValue;
9957
- default:
9958
- break;
9959
- }
9960
- }
9961
- getCaseName(searchCasesResponse) {
9962
- let caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
9963
- const tabs = searchCasesResponse.tabs.filter(tab => {
9964
- const caseNameHmctsInternalField = tab.fields.find(field => field.id === 'caseNameHmctsInternal');
9965
- if (caseNameHmctsInternalField) {
9966
- caseName = caseNameHmctsInternalField.value;
9967
- }
9968
- });
9969
- return caseName;
9970
- }
9971
- }
9972
- LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
9973
- LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0.ɵɵinject(JurisdictionService), i0.ɵɵinject(SearchService)); };
9974
- LinkedCasesService.ɵprov = i0.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
9975
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesService, [{
9976
- type: Injectable
9977
- }], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null); })();
9978
-
9979
- class LinkCasesReasonValuePipe {
9980
- constructor(linkedCasesService) {
9981
- this.linkedCasesService = linkedCasesService;
9982
- }
9983
- transform(reasonCode) {
9984
- const reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
9985
- this.linkedCasesService.linkCaseReasons.find(reason => reason.key === reasonCode);
9986
- return reasonCodeMapping && reasonCodeMapping.value_en;
9987
- }
9988
- }
9989
- LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
9990
- LinkCasesReasonValuePipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
9991
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
9992
- type: Pipe,
9993
- args: [{
9994
- name: 'ccdLinkCasesReasonValue'
9995
- }]
9996
- }], function () { return [{ type: LinkedCasesService }]; }, null); })();
9997
-
9998
9776
  var SortOrder;
9999
9777
  (function (SortOrder) {
10000
9778
  SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
@@ -10030,8 +9808,7 @@ const pipeDeclarations = [
10030
9808
  CcdCYAPageLabelFilterPipe,
10031
9809
  ReadFieldsFilterPipe,
10032
9810
  CcdTabFieldsPipe,
10033
- CcdPageFieldsPipe,
10034
- LinkCasesReasonValuePipe
9811
+ CcdPageFieldsPipe
10035
9812
  ];
10036
9813
  class PipesModule {
10037
9814
  }
@@ -10047,16 +9824,14 @@ PipesModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
10047
9824
  CcdCYAPageLabelFilterPipe,
10048
9825
  ReadFieldsFilterPipe,
10049
9826
  CcdTabFieldsPipe,
10050
- CcdPageFieldsPipe,
10051
- LinkCasesReasonValuePipe], imports: [CommonModule], exports: [CaseReferencePipe,
9827
+ CcdPageFieldsPipe], imports: [CommonModule], exports: [CaseReferencePipe,
10052
9828
  SortSearchResultPipe,
10053
9829
  CcdCaseTitlePipe,
10054
9830
  CcdCollectionTableCaseFieldsFilterPipe,
10055
9831
  CcdCYAPageLabelFilterPipe,
10056
9832
  ReadFieldsFilterPipe,
10057
9833
  CcdTabFieldsPipe,
10058
- CcdPageFieldsPipe,
10059
- LinkCasesReasonValuePipe] }); })();
9834
+ CcdPageFieldsPipe] }); })();
10060
9835
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PipesModule, [{
10061
9836
  type: NgModule,
10062
9837
  args: [{
@@ -10278,7 +10053,7 @@ class AddressOption {
10278
10053
  }
10279
10054
  }
10280
10055
 
10281
- const _c0$R = ["writeComplexFieldComponent"];
10056
+ const _c0$P = ["writeComplexFieldComponent"];
10282
10057
  function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) { if (rf & 1) {
10283
10058
  i0.ɵɵelementStart(0, "span", 14);
10284
10059
  i0.ɵɵtext(1, "Enter the Postcode");
@@ -10471,7 +10246,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
10471
10246
  }
10472
10247
  WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
10473
10248
  WriteAddressFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) { if (rf & 1) {
10474
- i0.ɵɵviewQuery(_c0$R, 1);
10249
+ i0.ɵɵviewQuery(_c0$P, 1);
10475
10250
  i0.ɵɵviewQuery(FocusElementDirective, 1);
10476
10251
  } if (rf & 2) {
10477
10252
  let _t;
@@ -11045,7 +10820,7 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_7_Template(rf, ctx) { if
11045
10820
  i0.ɵɵadvance(1);
11046
10821
  i0.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
11047
10822
  } }
11048
- const _c0$Q = function (a0) { return { "form-group-error": a0 }; };
10823
+ const _c0$O = function (a0) { return { "form-group-error": a0 }; };
11049
10824
  function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
11050
10825
  i0.ɵɵelementStart(0, "div", 8);
11051
10826
  i0.ɵɵelementStart(1, "div", 9);
@@ -11064,7 +10839,7 @@ function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
11064
10839
  i0.ɵɵadvance(1);
11065
10840
  i0.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
11066
10841
  i0.ɵɵadvance(1);
11067
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$Q, ctx_r1.errorMessages.length > 0));
10842
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$O, ctx_r1.errorMessages.length > 0));
11068
10843
  i0.ɵɵadvance(1);
11069
10844
  i0.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
11070
10845
  i0.ɵɵadvance(1);
@@ -11428,8 +11203,8 @@ WriteCaseFlagFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseFlag
11428
11203
  }], function () { return [{ type: i1$1.ActivatedRoute }, { type: CaseEditDataService }]; }, null); })();
11429
11204
 
11430
11205
  function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
11431
- i0.ɵɵelementStart(0, "a", 2);
11432
- i0.ɵɵelementStart(1, "span", 3);
11206
+ i0.ɵɵelementStart(0, "a", 1);
11207
+ i0.ɵɵelementStart(1, "span", 2);
11433
11208
  i0.ɵɵtext(2);
11434
11209
  i0.ɵɵpipe(3, "ccdCaseReference");
11435
11210
  i0.ɵɵelementEnd();
@@ -11440,112 +11215,71 @@ function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
11440
11215
  i0.ɵɵadvance(2);
11441
11216
  i0.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
11442
11217
  } }
11443
- function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
11444
- i0.ɵɵelementContainerStart(0);
11445
- i0.ɵɵelement(1, "ccd-read-linked-cases", 4);
11446
- i0.ɵɵelementContainerEnd();
11447
- } if (rf & 2) {
11448
- const ctx_r1 = i0.ɵɵnextContext();
11449
- i0.ɵɵadvance(1);
11450
- i0.ɵɵproperty("caseField", ctx_r1.caseField);
11451
- } }
11452
11218
  class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
11453
- constructor() {
11454
- super(...arguments);
11455
- this.paletteContext = PaletteContext;
11456
- }
11457
11219
  hasReference() {
11458
11220
  return this.caseField.value && this.caseField.value.CaseReference;
11459
11221
  }
11460
- hasCaseLinkCollection() {
11461
- return (this.caseField.field_type &&
11462
- this.caseField.field_type.type === 'Collection' &&
11463
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
11464
- }
11465
11222
  }
11466
11223
  ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
11467
- 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) {
11224
+ 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) {
11468
11225
  i0.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
11469
- i0.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
11470
11226
  } if (rf & 2) {
11471
11227
  i0.ɵɵproperty("ngIf", ctx.hasReference());
11472
- i0.ɵɵadvance(1);
11473
- i0.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
11474
- } }, encapsulation: 2 });
11228
+ } }, directives: [i1.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
11475
11229
  const ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
11476
11230
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
11477
11231
  type: Component,
11478
11232
  args: [{
11479
11233
  selector: 'ccd-read-case-link-field',
11480
- templateUrl: 'read-case-link-field.html',
11234
+ templateUrl: 'read-case-link-field.html'
11481
11235
  }]
11482
11236
  }], null, null); })();
11483
11237
 
11484
- const _c0$P = ["writeComplexFieldComponent"];
11485
- function WriteCaseLinkFieldComponent_div_1_span_2_Template(rf, ctx) { if (rf & 1) {
11238
+ const _c0$N = ["writeComplexFieldComponent"];
11239
+ function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
11486
11240
  i0.ɵɵelementStart(0, "span", 6);
11487
11241
  i0.ɵɵtext(1);
11488
11242
  i0.ɵɵpipe(2, "ccdFieldLabel");
11489
11243
  i0.ɵɵelementEnd();
11490
11244
  } if (rf & 2) {
11491
- const ctx_r2 = i0.ɵɵnextContext(2);
11245
+ const ctx_r0 = i0.ɵɵnextContext();
11492
11246
  i0.ɵɵadvance(1);
11493
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r2.caseField));
11247
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
11494
11248
  } }
11495
- function WriteCaseLinkFieldComponent_div_1_span_3_Template(rf, ctx) { if (rf & 1) {
11249
+ function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
11496
11250
  i0.ɵɵelementStart(0, "span", 7);
11497
11251
  i0.ɵɵtext(1);
11498
11252
  i0.ɵɵelementEnd();
11499
11253
  } if (rf & 2) {
11500
- const ctx_r3 = i0.ɵɵnextContext(2);
11501
- i0.ɵɵadvance(1);
11502
- i0.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
11503
- } }
11504
- function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
11505
- i0.ɵɵelementStart(0, "div", 1);
11506
- i0.ɵɵelementStart(1, "label", 2);
11507
- i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
11508
- i0.ɵɵelementEnd();
11509
- i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
11510
- i0.ɵɵelement(4, "input", 5);
11511
- i0.ɵɵelementEnd();
11512
- } if (rf & 2) {
11513
- const ctx_r0 = i0.ɵɵnextContext();
11514
- i0.ɵɵadvance(1);
11515
- i0.ɵɵproperty("for", ctx_r0.id());
11516
- i0.ɵɵadvance(1);
11517
- i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
11518
- i0.ɵɵadvance(1);
11519
- i0.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
11254
+ const ctx_r1 = i0.ɵɵnextContext();
11520
11255
  i0.ɵɵadvance(1);
11521
- i0.ɵɵproperty("id", ctx_r0.id())("formControl", ctx_r0.caseReferenceControl);
11256
+ i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
11522
11257
  } }
11523
- function WriteCaseLinkFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
11524
- const _r5 = i0.ɵɵgetCurrentView();
11525
- i0.ɵɵelementStart(0, "div", 1);
11526
- i0.ɵɵelementStart(1, "ccd-write-linked-cases", 8);
11527
- 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(); });
11528
- i0.ɵɵelementEnd();
11258
+ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
11259
+ i0.ɵɵelementStart(0, "span", 8);
11260
+ i0.ɵɵtext(1);
11261
+ i0.ɵɵpipe(2, "ccdFirstError");
11529
11262
  i0.ɵɵelementEnd();
11530
11263
  } if (rf & 2) {
11531
- const ctx_r1 = i0.ɵɵnextContext();
11264
+ const ctx_r2 = i0.ɵɵnextContext();
11532
11265
  i0.ɵɵadvance(1);
11533
- i0.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
11266
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
11534
11267
  } }
11268
+ const _c1$k = function (a0) { return { "form-group-error": a0 }; };
11535
11269
  class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
11536
- constructor(linkedCasesService) {
11537
- super();
11538
- this.linkedCasesService = linkedCasesService;
11539
- this.caseFields = [];
11540
- }
11541
11270
  ngOnInit() {
11542
- this.formArray = this.registerControl(new FormArray([]), true);
11543
- this.formArray['caseField'] = this.caseField;
11544
- if (!this.hasCaseLinkCollection()) {
11271
+ if (this.caseField.value) {
11545
11272
  this.caseLinkGroup = this.registerControl(new FormGroup({
11546
11273
  CaseReference: new FormControl(this.caseField.value.CaseReference, Validators.required),
11547
11274
  }), true);
11548
11275
  }
11276
+ else {
11277
+ this.caseLinkGroup = this.registerControl(new FormGroup({
11278
+ CaseReference: new FormControl(null, Validators.required),
11279
+ }), true);
11280
+ }
11281
+ this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
11282
+ this.caseReferenceControl.setValidators(this.caseReferenceValidator());
11549
11283
  // Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
11550
11284
  // field uses the Complex type, it is meant to be treated as one field
11551
11285
  if (this.caseField && this.caseField.field_type.type === 'Complex') {
@@ -11553,18 +11287,22 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
11553
11287
  caseLinkSubField.retain_hidden_value = this.caseField.retain_hidden_value;
11554
11288
  }
11555
11289
  }
11556
- this.containsCaseLinkCollection = this.hasCaseLinkCollection();
11557
11290
  }
11558
- submitLinkedCases() {
11559
- const formGroup = this.formGroup;
11560
- if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
11561
- const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
11562
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue
11563
- .filter(item => unlinkedCaseRefereneIds.indexOf(item.id) === -1);
11564
- }
11565
- else if (formGroup.value && formGroup.value.caseLinks && this.linkedCasesService.linkedCases) {
11566
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
11567
- }
11291
+ caseReferenceValidator() {
11292
+ return (control) => {
11293
+ if (control.value) {
11294
+ if (this.validCaseReference(control.value)) {
11295
+ return null;
11296
+ }
11297
+ return { error: 'Please use a valid 16 Digit Case Reference' };
11298
+ }
11299
+ else {
11300
+ if (control.touched) {
11301
+ return { error: 'Please use a valid 16 Digit Case Reference' };
11302
+ }
11303
+ }
11304
+ return null;
11305
+ };
11568
11306
  }
11569
11307
  validCaseReference(valueString) {
11570
11308
  if (!valueString) {
@@ -11572,45 +11310,48 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
11572
11310
  }
11573
11311
  return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
11574
11312
  }
11575
- hasCaseLinkCollection() {
11576
- return (this.caseField.field_type &&
11577
- this.caseField.field_type.type === 'Collection' &&
11578
- this.caseField.field_type.collection_field_type.id === 'CaseLink');
11579
- }
11580
11313
  }
11581
- WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return new (t || WriteCaseLinkFieldComponent)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
11314
+ WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
11582
11315
  WriteCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) { if (rf & 1) {
11583
- i0.ɵɵviewQuery(_c0$P, 1);
11316
+ i0.ɵɵviewQuery(_c0$N, 1);
11584
11317
  } if (rf & 2) {
11585
11318
  let _t;
11586
11319
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
11587
- } }, 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) {
11588
- i0.ɵɵelementContainerStart(0);
11589
- i0.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
11590
- i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
11591
- i0.ɵɵelementContainerEnd();
11320
+ } }, 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) {
11321
+ i0.ɵɵelementStart(0, "div", 0);
11322
+ i0.ɵɵelementStart(1, "label", 1);
11323
+ i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
11324
+ i0.ɵɵelementEnd();
11325
+ i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
11326
+ i0.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
11327
+ i0.ɵɵelement(5, "input", 5);
11328
+ i0.ɵɵelementEnd();
11592
11329
  } if (rf & 2) {
11330
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
11331
+ i0.ɵɵadvance(1);
11332
+ i0.ɵɵproperty("for", ctx.id());
11593
11333
  i0.ɵɵadvance(1);
11594
- i0.ɵɵproperty("ngIf", !ctx.containsCaseLinkCollection);
11334
+ i0.ɵɵproperty("ngIf", ctx.caseField.label);
11595
11335
  i0.ɵɵadvance(1);
11596
- i0.ɵɵproperty("ngIf", ctx.containsCaseLinkCollection);
11597
- } }, encapsulation: 2 });
11336
+ i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
11337
+ i0.ɵɵadvance(1);
11338
+ i0.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
11339
+ i0.ɵɵadvance(1);
11340
+ i0.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
11341
+ } }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
11342
+ const ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
11598
11343
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
11599
11344
  type: Component,
11600
11345
  args: [{
11601
11346
  selector: 'ccd-write-case-link-field',
11602
11347
  templateUrl: 'write-case-link-field.html'
11603
11348
  }]
11604
- }], function () { return [{ type: LinkedCasesService }]; }, { caseFields: [{
11605
- type: Input
11606
- }], formGroup: [{
11607
- type: Input
11608
- }], writeComplexFieldComponent: [{
11349
+ }], null, { writeComplexFieldComponent: [{
11609
11350
  type: ViewChild,
11610
- args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
11351
+ args: ['writeComplexFieldComponent']
11611
11352
  }] }); })();
11612
11353
 
11613
- 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 }; };
11354
+ 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 }; };
11614
11355
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf & 1) {
11615
11356
  i0.ɵɵelementStart(0, "tbody");
11616
11357
  i0.ɵɵelementStart(1, "tr");
@@ -11623,9 +11364,9 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf
11623
11364
  } if (rf & 2) {
11624
11365
  const ctx_r1 = i0.ɵɵnextContext(2);
11625
11366
  i0.ɵɵadvance(4);
11626
- 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);
11367
+ 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);
11627
11368
  } }
11628
- const _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
11369
+ const _c1$j = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
11629
11370
  function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
11630
11371
  i0.ɵɵelementStart(0, "tr");
11631
11372
  i0.ɵɵelementStart(1, "td");
@@ -11637,7 +11378,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
11637
11378
  const i_r5 = ctx.index;
11638
11379
  const ctx_r3 = i0.ɵɵnextContext(3);
11639
11380
  i0.ɵɵadvance(2);
11640
- 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));
11381
+ 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));
11641
11382
  } }
11642
11383
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
11643
11384
  i0.ɵɵelementStart(0, "tbody");
@@ -11751,7 +11492,7 @@ RemoveDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RemoveDialogCompone
11751
11492
  }]
11752
11493
  }], function () { return [{ type: i1$3.MatDialogRef }]; }, null); })();
11753
11494
 
11754
- const _c0$N = ["collectionItem"];
11495
+ const _c0$L = ["collectionItem"];
11755
11496
  function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) { if (rf & 1) {
11756
11497
  i0.ɵɵelementStart(0, "span", 9);
11757
11498
  i0.ɵɵtext(1);
@@ -12125,7 +11866,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
12125
11866
  }
12126
11867
  WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(i2$1.ScrollToService), i0.ɵɵdirectiveInject(ProfileNotifier)); };
12127
11868
  WriteCollectionFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) { if (rf & 1) {
12128
- i0.ɵɵviewQuery(_c0$N, 1);
11869
+ i0.ɵɵviewQuery(_c0$L, 1);
12129
11870
  } if (rf & 2) {
12130
11871
  let _t;
12131
11872
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
@@ -12445,7 +12186,7 @@ FileUploadStateService.ɵprov = i0.ɵɵdefineInjectable({ token: FileUploadState
12445
12186
  type: Injectable
12446
12187
  }], null, null); })();
12447
12188
 
12448
- const _c0$M = ["fileInput"];
12189
+ const _c0$K = ["fileInput"];
12449
12190
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
12450
12191
  i0.ɵɵelementStart(0, "span", 12);
12451
12192
  i0.ɵɵtext(1);
@@ -12470,7 +12211,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
12470
12211
  const ctx_r2 = i0.ɵɵnextContext();
12471
12212
  i0.ɵɵproperty("caseField", ctx_r2.caseField);
12472
12213
  } }
12473
- const _c1$j = function (a0) { return { "form-group-error bottom-30": a0 }; };
12214
+ const _c1$i = function (a0) { return { "form-group-error bottom-30": a0 }; };
12474
12215
  class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
12475
12216
  constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
12476
12217
  super();
@@ -12723,7 +12464,7 @@ WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facili
12723
12464
  WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
12724
12465
  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)); };
12725
12466
  WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) { if (rf & 1) {
12726
- i0.ɵɵviewQuery(_c0$M, 1);
12467
+ i0.ɵɵviewQuery(_c0$K, 1);
12727
12468
  } if (rf & 2) {
12728
12469
  let _t;
12729
12470
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileInput = _t.first);
@@ -12759,7 +12500,7 @@ WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocument
12759
12500
  i0.ɵɵelementEnd();
12760
12501
  i0.ɵɵelementEnd();
12761
12502
  } if (rf & 2) {
12762
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c1$j, !ctx.valid));
12503
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c1$i, !ctx.valid));
12763
12504
  i0.ɵɵadvance(1);
12764
12505
  i0.ɵɵproperty("for", ctx.id());
12765
12506
  i0.ɵɵadvance(1);
@@ -12885,7 +12626,7 @@ function WriteDynamicListFieldComponent_option_9_Template(rf, ctx) { if (rf & 1)
12885
12626
  i0.ɵɵadvance(1);
12886
12627
  i0.ɵɵtextInterpolate(type_r5.label);
12887
12628
  } }
12888
- const _c0$L = function (a0) { return { "form-group-error": a0 }; };
12629
+ const _c0$J = function (a0) { return { "form-group-error": a0 }; };
12889
12630
  class WriteDynamicListFieldComponent extends AbstractFieldWriteComponent {
12890
12631
  ngOnInit() {
12891
12632
  /**
@@ -12927,7 +12668,7 @@ WriteDynamicListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDynam
12927
12668
  i0.ɵɵelementEnd();
12928
12669
  i0.ɵɵelementEnd();
12929
12670
  } if (rf & 2) {
12930
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$L, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
12671
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$J, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
12931
12672
  i0.ɵɵadvance(1);
12932
12673
  i0.ɵɵproperty("for", ctx.id());
12933
12674
  i0.ɵɵadvance(1);
@@ -13048,7 +12789,7 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
13048
12789
  i0.ɵɵadvance(1);
13049
12790
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
13050
12791
  } }
13051
- const _c0$K = function (a0) { return { selected: a0 }; };
12792
+ const _c0$I = function (a0) { return { selected: a0 }; };
13052
12793
  function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
13053
12794
  i0.ɵɵelementStart(0, "div", 10);
13054
12795
  i0.ɵɵelement(1, "input", 11);
@@ -13059,7 +12800,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
13059
12800
  } if (rf & 2) {
13060
12801
  const radioButton_r5 = ctx.$implicit;
13061
12802
  const ctx_r4 = i0.ɵɵnextContext();
13062
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
12803
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$I, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
13063
12804
  i0.ɵɵadvance(1);
13064
12805
  i0.ɵɵpropertyInterpolate("name", ctx_r4.id());
13065
12806
  i0.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
@@ -13068,7 +12809,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
13068
12809
  i0.ɵɵadvance(1);
13069
12810
  i0.ɵɵtextInterpolate(radioButton_r5.label);
13070
12811
  } }
13071
- const _c1$i = function (a0) { return { "form-group-error": a0 }; };
12812
+ const _c1$h = function (a0) { return { "form-group-error": a0 }; };
13072
12813
  class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
13073
12814
  ngOnInit() {
13074
12815
  /**
@@ -13109,7 +12850,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Write
13109
12850
  i0.ɵɵelementEnd();
13110
12851
  i0.ɵɵelementEnd();
13111
12852
  } if (rf & 2) {
13112
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$i, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
12853
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$h, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
13113
12854
  i0.ɵɵadvance(3);
13114
12855
  i0.ɵɵproperty("for", ctx.id());
13115
12856
  i0.ɵɵadvance(1);
@@ -13193,8 +12934,8 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
13193
12934
  i0.ɵɵadvance(1);
13194
12935
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
13195
12936
  } }
13196
- const _c0$J = function (a0) { return { "form-group-error": a0 }; };
13197
- const _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
12937
+ const _c0$H = function (a0) { return { "form-group-error": a0 }; };
12938
+ const _c1$g = function (a0) { return { "govuk-input--error": a0 }; };
13198
12939
  class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
13199
12940
  ngOnInit() {
13200
12941
  this.emailControl = this.registerControl(new FormControl(this.caseField.value));
@@ -13211,7 +12952,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
13211
12952
  i0.ɵɵelement(5, "input", 5);
13212
12953
  i0.ɵɵelementEnd();
13213
12954
  } if (rf & 2) {
13214
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
12955
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$H, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
13215
12956
  i0.ɵɵadvance(1);
13216
12957
  i0.ɵɵproperty("for", ctx.id());
13217
12958
  i0.ɵɵadvance(1);
@@ -13221,7 +12962,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
13221
12962
  i0.ɵɵadvance(1);
13222
12963
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
13223
12964
  i0.ɵɵadvance(1);
13224
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$h, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
12965
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$g, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
13225
12966
  } }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
13226
12967
  const ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
13227
12968
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
@@ -13313,7 +13054,7 @@ function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
13313
13054
  i0.ɵɵadvance(1);
13314
13055
  i0.ɵɵtextInterpolate(type_r4.label);
13315
13056
  } }
13316
- const _c0$I = function (a0) { return { "form-group-error": a0 }; };
13057
+ const _c0$G = function (a0) { return { "form-group-error": a0 }; };
13317
13058
  class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
13318
13059
  get listItems() {
13319
13060
  if (this.caseField) {
@@ -13351,7 +13092,7 @@ WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedLi
13351
13092
  i0.ɵɵelementEnd();
13352
13093
  i0.ɵɵelementEnd();
13353
13094
  } if (rf & 2) {
13354
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13095
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$G, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
13355
13096
  i0.ɵɵadvance(1);
13356
13097
  i0.ɵɵproperty("for", ctx.id());
13357
13098
  i0.ɵɵadvance(1);
@@ -13442,7 +13183,7 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
13442
13183
  i0.ɵɵadvance(1);
13443
13184
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
13444
13185
  } }
13445
- const _c0$H = function (a0) { return { selected: a0 }; };
13186
+ const _c0$F = function (a0) { return { selected: a0 }; };
13446
13187
  function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
13447
13188
  i0.ɵɵelementStart(0, "div", 9);
13448
13189
  i0.ɵɵelement(1, "input", 10);
@@ -13453,7 +13194,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
13453
13194
  } if (rf & 2) {
13454
13195
  const radioButton_r4 = ctx.$implicit;
13455
13196
  const ctx_r3 = i0.ɵɵnextContext();
13456
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13197
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$F, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
13457
13198
  i0.ɵɵadvance(1);
13458
13199
  i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
13459
13200
  i0.ɵɵadvance(1);
@@ -13461,7 +13202,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
13461
13202
  i0.ɵɵadvance(1);
13462
13203
  i0.ɵɵtextInterpolate(radioButton_r4.label);
13463
13204
  } }
13464
- const _c1$g = function (a0) { return { "form-group-error": a0 }; };
13205
+ const _c1$f = function (a0) { return { "form-group-error": a0 }; };
13465
13206
  class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
13466
13207
  ngOnInit() {
13467
13208
  const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
@@ -13485,7 +13226,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFi
13485
13226
  i0.ɵɵelementEnd();
13486
13227
  i0.ɵɵelementEnd();
13487
13228
  } if (rf & 2) {
13488
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$g, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
13229
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$f, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
13489
13230
  i0.ɵɵadvance(3);
13490
13231
  i0.ɵɵproperty("for", ctx.id());
13491
13232
  i0.ɵɵadvance(1);
@@ -13584,7 +13325,7 @@ function WriteJudicialUserFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
13584
13325
  i0.ɵɵadvance(1);
13585
13326
  i0.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
13586
13327
  } }
13587
- const _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
13328
+ const _c0$E = function (a0) { return { "hide-autocomplete": a0 }; };
13588
13329
  function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf & 1) {
13589
13330
  const _r7 = i0.ɵɵgetCurrentView();
13590
13331
  i0.ɵɵelementStart(0, "mat-option", 11);
@@ -13594,7 +13335,7 @@ function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf
13594
13335
  } if (rf & 2) {
13595
13336
  const judicialUser_r5 = ctx.$implicit;
13596
13337
  const ctx_r3 = i0.ɵɵnextContext();
13597
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13338
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$E, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
13598
13339
  i0.ɵɵadvance(1);
13599
13340
  i0.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
13600
13341
  } }
@@ -13902,7 +13643,7 @@ function WriteMoneyGbpFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
13902
13643
  i0.ɵɵadvance(1);
13903
13644
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
13904
13645
  } }
13905
- const _c0$F = function (a0) { return { "form-group-error": a0 }; };
13646
+ const _c0$D = function (a0) { return { "form-group-error": a0 }; };
13906
13647
  class WriteMoneyGbpFieldComponent extends AbstractFieldWriteComponent {
13907
13648
  ngOnInit() {
13908
13649
  this.moneyGbpControl = this.registerControl(new FormControl(this.caseField.value));
@@ -13925,7 +13666,7 @@ WriteMoneyGbpFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteMoneyGbp
13925
13666
  i0.ɵɵelementEnd();
13926
13667
  i0.ɵɵelementEnd();
13927
13668
  } if (rf & 2) {
13928
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$F, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
13669
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
13929
13670
  i0.ɵɵadvance(1);
13930
13671
  i0.ɵɵproperty("for", ctx.id());
13931
13672
  i0.ɵɵadvance(1);
@@ -14042,7 +13783,7 @@ function WriteMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { i
14042
13783
  i0.ɵɵadvance(1);
14043
13784
  i0.ɵɵtextInterpolate(checkbox_r4.label);
14044
13785
  } }
14045
- const _c0$E = function (a0) { return { "error": a0 }; };
13786
+ const _c0$C = function (a0) { return { "error": a0 }; };
14046
13787
  class WriteMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
14047
13788
  ngOnInit() {
14048
13789
  this.checkboxes = new FormArray([]);
@@ -14097,7 +13838,7 @@ WriteMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteM
14097
13838
  i0.ɵɵelementEnd();
14098
13839
  i0.ɵɵelementEnd();
14099
13840
  } if (rf & 2) {
14100
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$E, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
13841
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
14101
13842
  i0.ɵɵadvance(3);
14102
13843
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
14103
13844
  i0.ɵɵadvance(1);
@@ -14166,8 +13907,8 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14166
13907
  i0.ɵɵadvance(1);
14167
13908
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
14168
13909
  } }
14169
- const _c0$D = function (a0) { return { "form-group-error": a0 }; };
14170
- const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
13910
+ const _c0$B = function (a0) { return { "form-group-error": a0 }; };
13911
+ const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
14171
13912
  class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
14172
13913
  ngOnInit() {
14173
13914
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
@@ -14184,7 +13925,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
14184
13925
  i0.ɵɵelement(5, "input", 5);
14185
13926
  i0.ɵɵelementEnd();
14186
13927
  } if (rf & 2) {
14187
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$D, !ctx.numberControl.valid && ctx.numberControl.dirty));
13928
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
14188
13929
  i0.ɵɵadvance(1);
14189
13930
  i0.ɵɵproperty("for", ctx.id());
14190
13931
  i0.ɵɵadvance(1);
@@ -14194,7 +13935,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
14194
13935
  i0.ɵɵadvance(1);
14195
13936
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
14196
13937
  i0.ɵɵadvance(1);
14197
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
13938
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
14198
13939
  } }, directives: [i1.NgClass, i1.NgIf, i2.NumberValueAccessor, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14199
13940
  const ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
14200
13941
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
@@ -14434,7 +14175,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_div_4_Template(rf, ct
14434
14175
  i0.ɵɵelementEnd();
14435
14176
  i0.ɵɵelementEnd();
14436
14177
  } }
14437
- const _c0$C = function (a0) { return { "scroll-container ": a0 }; };
14178
+ const _c0$A = function (a0) { return { "scroll-container ": a0 }; };
14438
14179
  function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { if (rf & 1) {
14439
14180
  i0.ɵɵelementStart(0, "div", 26);
14440
14181
  i0.ɵɵpipe(1, "async");
@@ -14448,7 +14189,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { i
14448
14189
  const ctx_r2 = i0.ɵɵnextContext(2);
14449
14190
  let tmp_0_0 = null;
14450
14191
  let tmp_2_0 = null;
14451
- 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));
14192
+ 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));
14452
14193
  i0.ɵɵadvance(2);
14453
14194
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
14454
14195
  i0.ɵɵadvance(2);
@@ -14847,8 +14588,8 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14847
14588
  i0.ɵɵadvance(1);
14848
14589
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label));
14849
14590
  } }
14850
- const _c0$B = function (a0) { return { "form-group-error": a0 }; };
14851
- const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
14591
+ const _c0$z = function (a0) { return { "form-group-error": a0 }; };
14592
+ const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
14852
14593
  class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
14853
14594
  ngOnInit() {
14854
14595
  this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
@@ -14865,7 +14606,7 @@ WritePhoneUKFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WritePhoneUKFi
14865
14606
  i0.ɵɵelement(5, "input", 5);
14866
14607
  i0.ɵɵelementEnd();
14867
14608
  } if (rf & 2) {
14868
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
14609
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$z, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
14869
14610
  i0.ɵɵadvance(1);
14870
14611
  i0.ɵɵproperty("for", ctx.id());
14871
14612
  i0.ɵɵadvance(1);
@@ -14875,7 +14616,7 @@ WritePhoneUKFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WritePhoneUKFi
14875
14616
  i0.ɵɵadvance(1);
14876
14617
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
14877
14618
  i0.ɵɵadvance(1);
14878
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
14619
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
14879
14620
  } }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14880
14621
  const ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
14881
14622
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
@@ -14935,8 +14676,8 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14935
14676
  i0.ɵɵadvance(1);
14936
14677
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label));
14937
14678
  } }
14938
- const _c0$A = function (a0) { return { "form-group-error": a0 }; };
14939
- const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
14679
+ const _c0$y = function (a0) { return { "form-group-error": a0 }; };
14680
+ const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
14940
14681
  class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
14941
14682
  constructor(browserService) {
14942
14683
  super();
@@ -14966,7 +14707,7 @@ WriteTextAreaFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextArea
14966
14707
  i0.ɵɵelementEnd();
14967
14708
  i0.ɵɵelementEnd();
14968
14709
  } if (rf & 2) {
14969
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$A, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
14710
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$y, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
14970
14711
  i0.ɵɵadvance(1);
14971
14712
  i0.ɵɵproperty("for", ctx.id());
14972
14713
  i0.ɵɵadvance(1);
@@ -14976,7 +14717,7 @@ WriteTextAreaFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextArea
14976
14717
  i0.ɵɵadvance(1);
14977
14718
  i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
14978
14719
  i0.ɵɵadvance(1);
14979
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
14720
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
14980
14721
  } }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
14981
14722
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextAreaFieldComponent, [{
14982
14723
  type: Component,
@@ -15036,8 +14777,8 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
15036
14777
  i0.ɵɵadvance(1);
15037
14778
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label));
15038
14779
  } }
15039
- const _c0$z = function (a0) { return { "form-group-error": a0 }; };
15040
- const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
14780
+ const _c0$x = function (a0) { return { "form-group-error": a0 }; };
14781
+ const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
15041
14782
  class WriteTextFieldComponent extends AbstractFieldWriteComponent {
15042
14783
  ngOnInit() {
15043
14784
  this.textControl = this.registerControl(new FormControl(this.caseField.value));
@@ -15059,7 +14800,7 @@ WriteTextFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextFieldCom
15059
14800
  i0.ɵɵelementEnd();
15060
14801
  i0.ɵɵelementEnd();
15061
14802
  } if (rf & 2) {
15062
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$z, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
14803
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$x, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
15063
14804
  i0.ɵɵadvance(1);
15064
14805
  i0.ɵɵproperty("for", ctx.id());
15065
14806
  i0.ɵɵadvance(1);
@@ -15069,7 +14810,7 @@ WriteTextFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextFieldCom
15069
14810
  i0.ɵɵadvance(1);
15070
14811
  i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
15071
14812
  i0.ɵɵadvance(1);
15072
- 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);
14813
+ 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);
15073
14814
  } }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
15074
14815
  const ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteTextFieldComponent);
15075
14816
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
@@ -15225,7 +14966,7 @@ function WriteYesNoFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
15225
14966
  i0.ɵɵadvance(1);
15226
14967
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label));
15227
14968
  } }
15228
- const _c0$y = function (a0) { return { selected: a0 }; };
14969
+ const _c0$w = function (a0) { return { selected: a0 }; };
15229
14970
  function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
15230
14971
  i0.ɵɵelementStart(0, "div", 10);
15231
14972
  i0.ɵɵelement(1, "input", 11);
@@ -15236,7 +14977,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
15236
14977
  } if (rf & 2) {
15237
14978
  const value_r4 = ctx.$implicit;
15238
14979
  const ctx_r3 = i0.ɵɵnextContext();
15239
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$y, ctx_r3.yesNoControl.value === value_r4));
14980
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$w, ctx_r3.yesNoControl.value === value_r4));
15240
14981
  i0.ɵɵadvance(1);
15241
14982
  i0.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
15242
14983
  i0.ɵɵattribute("name", ctx_r3.id());
@@ -15245,7 +14986,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
15245
14986
  i0.ɵɵadvance(1);
15246
14987
  i0.ɵɵtextInterpolate(value_r4);
15247
14988
  } }
15248
- const _c1$b = function (a0) { return { "form-group-error": a0 }; };
14989
+ const _c1$a = function (a0) { return { "form-group-error": a0 }; };
15249
14990
  class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
15250
14991
  constructor(yesNoService) {
15251
14992
  super();
@@ -15271,7 +15012,7 @@ WriteYesNoFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteYesNoFieldC
15271
15012
  i0.ɵɵelementEnd();
15272
15013
  i0.ɵɵelementEnd();
15273
15014
  } if (rf & 2) {
15274
- i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
15015
+ i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
15275
15016
  i0.ɵɵadvance(3);
15276
15017
  i0.ɵɵproperty("ngIf", ctx.caseField.label);
15277
15018
  i0.ɵɵadvance(1);
@@ -15332,25 +15073,17 @@ class PaletteService {
15332
15073
  return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
15333
15074
  case 'OrderSummary':
15334
15075
  return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
15076
+ case 'CaseLink':
15077
+ return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
15335
15078
  case 'Organisation':
15336
15079
  return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
15337
15080
  case 'JudicialUser':
15338
15081
  return write ? WriteJudicialUserFieldComponent : ReadJudicialUserFieldComponent;
15339
- case 'CaseLink':
15340
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
15341
15082
  default:
15342
15083
  return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
15343
15084
  }
15344
15085
  case 'Collection':
15345
- switch (caseField.field_type.collection_field_type.id) {
15346
- case 'CaseLink':
15347
- if (caseField.id === 'caseLinks') {
15348
- return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
15349
- }
15350
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
15351
- default:
15352
- return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
15353
- }
15086
+ return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
15354
15087
  case 'MultiSelectList':
15355
15088
  return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
15356
15089
  case 'Document':
@@ -15387,7 +15120,7 @@ PaletteService.ɵprov = i0.ɵɵdefineInjectable({ token: PaletteService, factory
15387
15120
  type: Injectable
15388
15121
  }], null, null); })();
15389
15122
 
15390
- const _c0$x = ["fieldContainer"];
15123
+ const _c0$v = ["fieldContainer"];
15391
15124
  const FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
15392
15125
  class FieldReadComponent extends AbstractFieldReadComponent {
15393
15126
  constructor(resolver, paletteService) {
@@ -15431,7 +15164,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
15431
15164
  }
15432
15165
  FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(PaletteService)); };
15433
15166
  FieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) { if (rf & 1) {
15434
- i0.ɵɵviewQuery(_c0$x, 1, ViewContainerRef);
15167
+ i0.ɵɵviewQuery(_c0$v, 1, ViewContainerRef);
15435
15168
  } if (rf & 2) {
15436
15169
  let _t;
15437
15170
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fieldContainer = _t.first);
@@ -15465,7 +15198,7 @@ FieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadComponent, se
15465
15198
  args: ['fieldContainer', { static: false, read: ViewContainerRef }]
15466
15199
  }] }); })();
15467
15200
 
15468
- const _c0$w = ["fieldContainer"];
15201
+ const _c0$u = ["fieldContainer"];
15469
15202
  const FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
15470
15203
  class FieldWriteComponent extends AbstractFieldWriteComponent {
15471
15204
  constructor(resolver, paletteService) {
@@ -15509,7 +15242,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
15509
15242
  }
15510
15243
  FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(PaletteService)); };
15511
15244
  FieldWriteComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) { if (rf & 1) {
15512
- i0.ɵɵviewQuery(_c0$w, 3, ViewContainerRef);
15245
+ i0.ɵɵviewQuery(_c0$u, 3, ViewContainerRef);
15513
15246
  } if (rf & 2) {
15514
15247
  let _t;
15515
15248
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fieldContainer = _t.first);
@@ -15558,7 +15291,7 @@ function FieldReadLabelComponent_dl_1_Template(rf, ctx) { if (rf & 1) {
15558
15291
  function FieldReadLabelComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
15559
15292
  i0.ɵɵprojection(0);
15560
15293
  } }
15561
- const _c0$v = ["*"];
15294
+ const _c0$t = ["*"];
15562
15295
  class FieldReadLabelComponent extends AbstractFieldReadComponent {
15563
15296
  constructor() {
15564
15297
  super(...arguments);
@@ -15593,7 +15326,7 @@ class FieldReadLabelComponent extends AbstractFieldReadComponent {
15593
15326
  }
15594
15327
  }
15595
15328
  FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
15596
- 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) {
15329
+ 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) {
15597
15330
  i0.ɵɵprojectionDef();
15598
15331
  i0.ɵɵelementStart(0, "div", 0);
15599
15332
  i0.ɵɵtemplate(1, FieldReadLabelComponent_dl_1_Template, 5, 2, "dl", 1);
@@ -15625,7 +15358,7 @@ const ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedF
15625
15358
  function CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template(rf, ctx) { if (rf & 1) {
15626
15359
  i0.ɵɵelementContainer(0);
15627
15360
  } }
15628
- const _c0$u = function (a0) { return { cat: a0, level: 1 }; };
15361
+ const _c0$s = function (a0) { return { cat: a0, level: 1 }; };
15629
15362
  function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
15630
15363
  i0.ɵɵelementContainerStart(0);
15631
15364
  i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template, 1, 0, "ng-container", 8);
@@ -15635,12 +15368,12 @@ function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
15635
15368
  i0.ɵɵnextContext();
15636
15369
  const _r1 = i0.ɵɵreference(13);
15637
15370
  i0.ɵɵadvance(1);
15638
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$u, cat_r3));
15371
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$s, cat_r3));
15639
15372
  } }
15640
15373
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
15641
15374
  i0.ɵɵelementContainer(0);
15642
15375
  } }
15643
- const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
15376
+ const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
15644
15377
  function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) { if (rf & 1) {
15645
15378
  i0.ɵɵelementContainerStart(0);
15646
15379
  i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
@@ -15651,7 +15384,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
15651
15384
  i0.ɵɵnextContext();
15652
15385
  const _r1 = i0.ɵɵreference(13);
15653
15386
  i0.ɵɵadvance(1);
15654
- i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
15387
+ i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
15655
15388
  } }
15656
15389
  function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
15657
15390
  const _r12 = i0.ɵɵgetCurrentView();
@@ -15763,7 +15496,7 @@ CaseFileViewFolderSelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseF
15763
15496
  i0.ɵɵtextInterpolate1("Where do you want to move \"", ctx.data.document.document_filename, "\" file?");
15764
15497
  i0.ɵɵadvance(2);
15765
15498
  i0.ɵɵproperty("ngForOf", ctx.currentCategories);
15766
- } }, directives: [i1.NgForOf, i1.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder,.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
15499
+ } }, directives: [i1.NgForOf, i1.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 });
15767
15500
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
15768
15501
  type: Component,
15769
15502
  args: [{
@@ -15826,8 +15559,8 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
15826
15559
  i0.ɵɵadvance(1);
15827
15560
  i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
15828
15561
  } }
15829
- const _c0$t = [[["", "trigger", ""]]];
15830
- const _c1$9 = ["[trigger]"];
15562
+ const _c0$r = [[["", "trigger", ""]]];
15563
+ const _c1$8 = ["[trigger]"];
15831
15564
  class CaseFileViewOverlayMenuComponent {
15832
15565
  constructor() {
15833
15566
  this.title = '';
@@ -15841,8 +15574,8 @@ class CaseFileViewOverlayMenuComponent {
15841
15574
  }
15842
15575
  }
15843
15576
  CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
15844
- 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) {
15845
- i0.ɵɵprojectionDef(_c0$t);
15577
+ 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) {
15578
+ i0.ɵɵprojectionDef(_c0$r);
15846
15579
  i0.ɵɵelementStart(0, "div");
15847
15580
  i0.ɵɵelementStart(1, "button", 0, 1);
15848
15581
  i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
@@ -16589,8 +16322,8 @@ function SelectFlagTypeComponent_div_9_div_4_Template(rf, ctx) { if (rf & 1) {
16589
16322
  i0.ɵɵadvance(3);
16590
16323
  i0.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
16591
16324
  } }
16592
- const _c0$s = function (a0) { return { "form-group-error": a0 }; };
16593
- const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
16325
+ const _c0$q = function (a0) { return { "form-group-error": a0 }; };
16326
+ const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
16594
16327
  function SelectFlagTypeComponent_div_9_Template(rf, ctx) { if (rf & 1) {
16595
16328
  i0.ɵɵelementStart(0, "div", 15);
16596
16329
  i0.ɵɵelementStart(1, "div", 1);
@@ -16604,11 +16337,11 @@ function SelectFlagTypeComponent_div_9_Template(rf, ctx) { if (rf & 1) {
16604
16337
  } if (rf & 2) {
16605
16338
  const ctx_r2 = i0.ɵɵnextContext();
16606
16339
  i0.ɵɵadvance(1);
16607
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$s, ctx_r2.flagTypeErrorMessage.length > 0));
16340
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$q, ctx_r2.flagTypeErrorMessage.length > 0));
16608
16341
  i0.ɵɵadvance(3);
16609
16342
  i0.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
16610
16343
  i0.ɵɵadvance(1);
16611
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$8, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
16344
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$7, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
16612
16345
  } }
16613
16346
  function SelectFlagTypeComponent_div_10_Template(rf, ctx) { if (rf & 1) {
16614
16347
  const _r10 = i0.ɵɵgetCurrentView();
@@ -16755,7 +16488,7 @@ SelectFlagTypeComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SelectFlagTypeCom
16755
16488
  } if (rf & 2) {
16756
16489
  i0.ɵɵproperty("formGroup", ctx.formGroup);
16757
16490
  i0.ɵɵadvance(1);
16758
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$s, ctx.flagTypeNotSelectedErrorMessage.length > 0));
16491
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$q, ctx.flagTypeNotSelectedErrorMessage.length > 0));
16759
16492
  i0.ɵɵadvance(4);
16760
16493
  i0.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
16761
16494
  i0.ɵɵadvance(1);
@@ -16847,7 +16580,7 @@ function SearchLanguageInterpreterComponent_div_21_div_5_Template(rf, ctx) { if
16847
16580
  i0.ɵɵadvance(3);
16848
16581
  i0.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
16849
16582
  } }
16850
- const _c0$r = function (a0) { return { "form-group-error": a0 }; };
16583
+ const _c0$p = function (a0) { return { "form-group-error": a0 }; };
16851
16584
  function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) { if (rf & 1) {
16852
16585
  i0.ɵɵelementStart(0, "div", 25);
16853
16586
  i0.ɵɵelementStart(1, "div", 1);
@@ -16862,7 +16595,7 @@ function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) { if (rf &
16862
16595
  } if (rf & 2) {
16863
16596
  const ctx_r5 = i0.ɵɵnextContext();
16864
16597
  i0.ɵɵadvance(1);
16865
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$r, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
16598
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$p, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
16866
16599
  i0.ɵɵadvance(2);
16867
16600
  i0.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
16868
16601
  i0.ɵɵadvance(1);
@@ -17028,7 +16761,7 @@ SearchLanguageInterpreterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Search
17028
16761
  const _r2 = i0.ɵɵreference(12);
17029
16762
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17030
16763
  i0.ɵɵadvance(1);
17031
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$r, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
16764
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$p, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
17032
16765
  i0.ɵɵadvance(2);
17033
16766
  i0.ɵɵproperty("for", ctx.languageSearchTermControlName);
17034
16767
  i0.ɵɵadvance(1);
@@ -17142,7 +16875,7 @@ function SelectFlagLocationComponent_div_9_Template(rf, ctx) { if (rf & 1) {
17142
16875
  i0.ɵɵelementEnd();
17143
16876
  i0.ɵɵelementEnd();
17144
16877
  } }
17145
- const _c0$q = function (a0) { return { "form-group-error": a0 }; };
16878
+ const _c0$o = function (a0) { return { "form-group-error": a0 }; };
17146
16879
  class SelectFlagLocationComponent {
17147
16880
  constructor() {
17148
16881
  this.caseFlagStateEmitter = new EventEmitter();
@@ -17227,7 +16960,7 @@ SelectFlagLocationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SelectFlagLoc
17227
16960
  } if (rf & 2) {
17228
16961
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17229
16962
  i0.ɵɵadvance(1);
17230
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$q, ctx.errorMessages.length > 0));
16963
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
17231
16964
  i0.ɵɵadvance(4);
17232
16965
  i0.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
17233
16966
  i0.ɵɵadvance(1);
@@ -17280,7 +17013,7 @@ function AddCommentsComponent_div_10_Template(rf, ctx) { if (rf & 1) {
17280
17013
  i0.ɵɵadvance(3);
17281
17014
  i0.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
17282
17015
  } }
17283
- const _c0$p = function (a0) { return { "form-group-error": a0 }; };
17016
+ const _c0$n = function (a0) { return { "form-group-error": a0 }; };
17284
17017
  class AddCommentsComponent {
17285
17018
  constructor() {
17286
17019
  this.optional = false;
@@ -17358,7 +17091,7 @@ AddCommentsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddCommentsComponent
17358
17091
  } if (rf & 2) {
17359
17092
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17360
17093
  i0.ɵɵadvance(2);
17361
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c0$p, ctx.errorMessages.length > 0));
17094
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c0$n, ctx.errorMessages.length > 0));
17362
17095
  i0.ɵɵadvance(2);
17363
17096
  i0.ɵɵproperty("for", ctx.flagCommentsControlName);
17364
17097
  i0.ɵɵadvance(1);
@@ -17427,7 +17160,7 @@ function ManageCaseFlagsComponent_div_9_Template(rf, ctx) { if (rf & 1) {
17427
17160
  i0.ɵɵelementEnd();
17428
17161
  i0.ɵɵelementEnd();
17429
17162
  } }
17430
- const _c0$o = function (a0) { return { "form-group-error": a0 }; };
17163
+ const _c0$m = function (a0) { return { "form-group-error": a0 }; };
17431
17164
  class ManageCaseFlagsComponent {
17432
17165
  constructor() {
17433
17166
  this.caseFlagStateEmitter = new EventEmitter();
@@ -17586,7 +17319,7 @@ ManageCaseFlagsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ManageCaseFlagsC
17586
17319
  } if (rf & 2) {
17587
17320
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17588
17321
  i0.ɵɵadvance(1);
17589
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
17322
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$m, ctx.errorMessages.length > 0));
17590
17323
  i0.ɵɵadvance(4);
17591
17324
  i0.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
17592
17325
  i0.ɵɵadvance(1);
@@ -17645,8 +17378,8 @@ function UpdateFlagComponent_button_22_Template(rf, ctx) { if (rf & 1) {
17645
17378
  i0.ɵɵtext(1, " Make inactive ");
17646
17379
  i0.ɵɵelementEnd();
17647
17380
  } }
17648
- const _c0$n = function (a0) { return { "form-group-error": a0 }; };
17649
- const _c1$7 = function (a0) { return { "govuk-tag--grey": a0 }; };
17381
+ const _c0$l = function (a0) { return { "form-group-error": a0 }; };
17382
+ const _c1$6 = function (a0) { return { "govuk-tag--grey": a0 }; };
17650
17383
  class UpdateFlagComponent {
17651
17384
  constructor() {
17652
17385
  this.caseFlagStateEmitter = new EventEmitter();
@@ -17764,7 +17497,7 @@ UpdateFlagComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UpdateFlagComponent,
17764
17497
  } if (rf & 2) {
17765
17498
  i0.ɵɵproperty("formGroup", ctx.formGroup);
17766
17499
  i0.ɵɵadvance(2);
17767
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$n, ctx.errorMessages.length > 0));
17500
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$l, ctx.errorMessages.length > 0));
17768
17501
  i0.ɵɵadvance(2);
17769
17502
  i0.ɵɵproperty("for", ctx.updateFlagControlName);
17770
17503
  i0.ɵɵadvance(1);
@@ -17780,7 +17513,7 @@ UpdateFlagComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UpdateFlagComponent,
17780
17513
  i0.ɵɵadvance(3);
17781
17514
  i0.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
17782
17515
  i0.ɵɵadvance(6);
17783
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c1$7, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
17516
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c1$6, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
17784
17517
  i0.ɵɵadvance(1);
17785
17518
  i0.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
17786
17519
  i0.ɵɵadvance(2);
@@ -17893,2101 +17626,57 @@ CaseFlagSummaryListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFlagSumm
17893
17626
  type: Input
17894
17627
  }] }); })();
17895
17628
 
17896
- var LinkedCasesPages;
17897
- (function (LinkedCasesPages) {
17898
- LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
17899
- LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
17900
- LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
17901
- LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
17902
- LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
17903
- })(LinkedCasesPages || (LinkedCasesPages = {}));
17904
- var LinkedCasesErrorMessages;
17905
- (function (LinkedCasesErrorMessages) {
17906
- LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
17907
- LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
17908
- LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
17909
- LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
17910
- LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
17911
- LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
17912
- LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
17913
- LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
17914
- LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
17915
- LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
17916
- LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
17917
- LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
17918
- })(LinkedCasesErrorMessages || (LinkedCasesErrorMessages = {}));
17919
- var LinkedCasesEventTriggers;
17920
- (function (LinkedCasesEventTriggers) {
17921
- LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
17922
- LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
17923
- })(LinkedCasesEventTriggers || (LinkedCasesEventTriggers = {}));
17924
- var Patterns;
17925
- (function (Patterns) {
17926
- Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
17927
- })(Patterns || (Patterns = {}));
17928
-
17929
- function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) { if (rf & 1) {
17930
- i0.ɵɵelementStart(0, "p", 5);
17931
- i0.ɵɵelementStart(1, "span", 6);
17932
- i0.ɵɵtext(2, "Error:");
17933
- i0.ɵɵelementEnd();
17629
+ class CollectionCreateCheckerService {
17630
+ setDisplayContextForChildren(caseField, profile) {
17631
+ const children = this.getCaseFieldChildren(caseField);
17632
+ if (children && children.length > 0) {
17633
+ children.forEach(child => {
17634
+ if (!!profile.user.idam.roles.find(role => this.hasCreateAccess(child, role))) {
17635
+ child.display_context = caseField.display_context;
17636
+ }
17637
+ if (this.isCollection(child) || this.isComplex(child)) {
17638
+ this.setDisplayContextForChildren(child, profile);
17639
+ }
17640
+ });
17641
+ }
17642
+ }
17643
+ getCaseFieldChildren(caseField) {
17644
+ let childrenCaseFields = [];
17645
+ if (this.isCollection(caseField)) {
17646
+ childrenCaseFields = caseField.field_type.collection_field_type.complex_fields || [];
17647
+ }
17648
+ else if (this.isComplex(caseField)) {
17649
+ childrenCaseFields = caseField.field_type.complex_fields || [];
17650
+ }
17651
+ return childrenCaseFields;
17652
+ }
17653
+ isComplex(case_field) {
17654
+ return case_field.field_type.type === 'Complex';
17655
+ }
17656
+ isCollection(case_field) {
17657
+ return case_field.field_type.type === 'Collection';
17658
+ }
17659
+ hasCreateAccess(caseField, role) {
17660
+ return !!caseField.acls.find(acl => acl.role === role && acl.create === true);
17661
+ }
17662
+ }
17663
+ CollectionCreateCheckerService.ɵfac = function CollectionCreateCheckerService_Factory(t) { return new (t || CollectionCreateCheckerService)(); };
17664
+ CollectionCreateCheckerService.ɵprov = i0.ɵɵdefineInjectable({ token: CollectionCreateCheckerService, factory: CollectionCreateCheckerService.ɵfac });
17665
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionCreateCheckerService, [{
17666
+ type: Injectable
17667
+ }], null, null); })();
17668
+
17669
+ function ReadComplexFieldRawComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
17670
+ i0.ɵɵelementContainerStart(0);
17671
+ i0.ɵɵelementStart(1, "dt", 2);
17672
+ i0.ɵɵelementStart(2, "span", 3);
17934
17673
  i0.ɵɵtext(3);
17935
17674
  i0.ɵɵelementEnd();
17936
- } if (rf & 2) {
17937
- const ctx_r2 = i0.ɵɵnextContext(2);
17938
- i0.ɵɵadvance(3);
17939
- i0.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
17940
- } }
17941
- function BeforeYouStartComponent_div_1_Template(rf, ctx) { if (rf & 1) {
17942
- const _r4 = i0.ɵɵgetCurrentView();
17943
- i0.ɵɵelementStart(0, "div");
17944
- i0.ɵɵelementStart(1, "h1", 1);
17945
- i0.ɵɵtext(2, "There is a problem");
17946
- i0.ɵɵelementEnd();
17947
- i0.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
17948
- i0.ɵɵelementStart(4, "p", 3);
17949
- i0.ɵɵelementStart(5, "a", 4);
17950
- i0.ɵɵlistener("click", function BeforeYouStartComponent_div_1_Template_a_click_5_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.onBack(); });
17951
- i0.ɵɵtext(6, "Go back to the Linked cases tab");
17952
- i0.ɵɵelementEnd();
17953
17675
  i0.ɵɵelementEnd();
17676
+ i0.ɵɵelementStart(4, "dd", 2);
17677
+ i0.ɵɵelement(5, "ccd-field-read", 4);
17954
17678
  i0.ɵɵelementEnd();
17955
- } if (rf & 2) {
17956
- const ctx_r0 = i0.ɵɵnextContext();
17957
- i0.ɵɵadvance(3);
17958
- i0.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
17959
- } }
17960
- function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) { if (rf & 1) {
17961
- i0.ɵɵelementStart(0, "div", 11);
17962
- i0.ɵɵelementStart(1, "p", 3);
17963
- i0.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
17964
- i0.ɵɵelementEnd();
17965
- i0.ɵɵelementStart(3, "p", 3);
17966
- i0.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
17967
- i0.ɵɵelementEnd();
17968
- i0.ɵɵelementEnd();
17969
- } }
17970
- function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) { if (rf & 1) {
17971
- i0.ɵɵelementStart(0, "div", 12);
17972
- i0.ɵɵelementStart(1, "p", 3);
17973
- i0.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
17974
- i0.ɵɵelementEnd();
17975
- i0.ɵɵelementEnd();
17976
- } }
17977
- function BeforeYouStartComponent_div_2_Template(rf, ctx) { if (rf & 1) {
17978
- const _r8 = i0.ɵɵgetCurrentView();
17979
- i0.ɵɵelementStart(0, "div");
17980
- i0.ɵɵelementStart(1, "h1", 1);
17981
- i0.ɵɵtext(2, "Before you start");
17982
- i0.ɵɵelementEnd();
17983
- i0.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
17984
- i0.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
17985
- i0.ɵɵelementStart(5, "div", 9);
17986
- i0.ɵɵelementStart(6, "button", 10);
17987
- i0.ɵɵlistener("click", function BeforeYouStartComponent_div_2_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onNext(); });
17988
- i0.ɵɵtext(7, "Next");
17989
- i0.ɵɵelementEnd();
17990
- i0.ɵɵelementEnd();
17991
- i0.ɵɵelementEnd();
17992
- } if (rf & 2) {
17993
- const ctx_r1 = i0.ɵɵnextContext();
17994
- i0.ɵɵadvance(3);
17995
- i0.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
17996
- i0.ɵɵadvance(1);
17997
- i0.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
17998
- } }
17999
- class BeforeYouStartComponent {
18000
- constructor(router, linkedCasesService) {
18001
- this.router = router;
18002
- this.linkedCasesService = linkedCasesService;
18003
- this.linkedCasesStateEmitter = new EventEmitter();
18004
- this.isLinkCasesJourney = false;
18005
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
18006
- // re-initiate the state based on the casefield value
18007
- const linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(item => item).map(item => item.id);
18008
- this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(item => linkedCaseRefereneIds.indexOf(item.caseReference) !== -1);
18009
- this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
18010
- }
18011
- onNext() {
18012
- this.linkedCasesStateEmitter.emit({
18013
- currentLinkedCasesPage: LinkedCasesPages.BEFORE_YOU_START,
18014
- errorMessages: this.errorMessages,
18015
- navigateToNextPage: true
18016
- });
18017
- }
18018
- onBack() {
18019
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
18020
- window.location.hash = 'Linked cases';
18021
- });
18022
- }
18023
- }
18024
- BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
18025
- 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) {
18026
- i0.ɵɵelementStart(0, "div");
18027
- i0.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
18028
- i0.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
18029
- i0.ɵɵelementEnd();
18030
- } if (rf & 2) {
18031
- i0.ɵɵadvance(1);
18032
- i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
18033
- i0.ɵɵadvance(1);
18034
- i0.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
18035
- } }, directives: [i1.NgIf], encapsulation: 2 });
18036
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BeforeYouStartComponent, [{
18037
- type: Component,
18038
- args: [{
18039
- selector: 'ccd-linked-cases-before-you-start',
18040
- templateUrl: './before-you-start.component.html'
18041
- }]
18042
- }], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
18043
- type: Output
18044
- }] }); })();
18045
-
18046
- function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) { if (rf & 1) {
18047
- const _r8 = i0.ɵɵgetCurrentView();
18048
- i0.ɵɵelementStart(0, "tr", 7);
18049
- i0.ɵɵelementStart(1, "td", 14);
18050
- i0.ɵɵtext(2);
18051
- i0.ɵɵelement(3, "br");
18052
- i0.ɵɵtext(4);
18053
- i0.ɵɵpipe(5, "ccdCaseReference");
18054
- i0.ɵɵelementEnd();
18055
- i0.ɵɵelementStart(6, "td", 14);
18056
- i0.ɵɵelementStart(7, "a", 15);
18057
- 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(); });
18058
- i0.ɵɵtext(8, "Change");
18059
- i0.ɵɵelementEnd();
18060
- i0.ɵɵelementEnd();
18061
- i0.ɵɵelementEnd();
18062
- } if (rf & 2) {
18063
- const case_r6 = ctx.$implicit;
18064
- i0.ɵɵadvance(2);
18065
- i0.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
18066
- i0.ɵɵadvance(2);
18067
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
18068
- } }
18069
- function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) { if (rf & 1) {
18070
- i0.ɵɵelementStart(0, "tr", 7);
18071
- i0.ɵɵelementStart(1, "td", 16);
18072
- i0.ɵɵtext(2, " None ");
18073
- i0.ɵɵelementEnd();
18074
- i0.ɵɵelementEnd();
18075
- } }
18076
- function CheckYourAnswersComponent_table_4_Template(rf, ctx) { if (rf & 1) {
18077
- i0.ɵɵelementStart(0, "table", 13);
18078
- i0.ɵɵelementStart(1, "caption", 5);
18079
- i0.ɵɵtext(2, "Cases to unlink");
18080
- i0.ɵɵelementEnd();
18081
- i0.ɵɵelementStart(3, "thead", 6);
18082
- i0.ɵɵelementStart(4, "tr", 7);
18083
- i0.ɵɵelementStart(5, "th", 8);
18084
- i0.ɵɵtext(6, "Case name and number");
18085
- i0.ɵɵelementEnd();
18086
- i0.ɵɵelement(7, "th", 8);
18087
- i0.ɵɵelementEnd();
18088
- i0.ɵɵelementEnd();
18089
- i0.ɵɵelementStart(8, "tbody", 10);
18090
- i0.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
18091
- i0.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
18092
- i0.ɵɵelementEnd();
18093
- i0.ɵɵelementEnd();
18094
- } if (rf & 2) {
18095
- const ctx_r0 = i0.ɵɵnextContext();
18096
- i0.ɵɵadvance(9);
18097
- i0.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
18098
- i0.ɵɵadvance(1);
18099
- i0.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
18100
- } }
18101
- function CheckYourAnswersComponent_th_15_Template(rf, ctx) { if (rf & 1) {
18102
- i0.ɵɵelement(0, "th", 8);
18103
- } }
18104
- function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) { if (rf & 1) {
18105
- i0.ɵɵelement(0, "br");
18106
- } }
18107
- function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) { if (rf & 1) {
18108
- i0.ɵɵelementStart(0, "span");
18109
- i0.ɵɵtext(1);
18110
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
18111
- i0.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
18112
- i0.ɵɵelementEnd();
18113
- } if (rf & 2) {
18114
- const reason_r12 = ctx.$implicit;
18115
- const isLast_r13 = ctx.last;
18116
- i0.ɵɵadvance(1);
18117
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
18118
- i0.ɵɵadvance(2);
18119
- i0.ɵɵproperty("ngIf", !isLast_r13);
18120
- } }
18121
- function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) { if (rf & 1) {
18122
- const _r16 = i0.ɵɵgetCurrentView();
18123
- i0.ɵɵelementStart(0, "td", 14);
18124
- i0.ɵɵelementStart(1, "a", 15);
18125
- 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(); });
18126
- i0.ɵɵtext(2, "Change");
18127
- i0.ɵɵelementEnd();
18128
- i0.ɵɵelementEnd();
18129
- } }
18130
- function CheckYourAnswersComponent_tr_17_Template(rf, ctx) { if (rf & 1) {
18131
- i0.ɵɵelementStart(0, "tr", 7);
18132
- i0.ɵɵelementStart(1, "td", 14);
18133
- i0.ɵɵelementStart(2, "span");
18134
- i0.ɵɵtext(3);
18135
- i0.ɵɵelement(4, "br");
18136
- i0.ɵɵtext(5);
18137
- i0.ɵɵpipe(6, "ccdCaseReference");
18138
- i0.ɵɵelementEnd();
18139
- i0.ɵɵelementEnd();
18140
- i0.ɵɵelementStart(7, "td", 14);
18141
- i0.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
18142
- i0.ɵɵelementEnd();
18143
- i0.ɵɵelement(9, "td", 14);
18144
- i0.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
18145
- i0.ɵɵelementEnd();
18146
- } if (rf & 2) {
18147
- const case_r9 = ctx.$implicit;
18148
- const ctx_r2 = i0.ɵɵnextContext();
18149
- i0.ɵɵadvance(3);
18150
- i0.ɵɵtextInterpolate1("", case_r9.caseName, " ");
18151
- i0.ɵɵadvance(2);
18152
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
18153
- i0.ɵɵadvance(3);
18154
- i0.ɵɵproperty("ngForOf", case_r9.reasons);
18155
- i0.ɵɵadvance(2);
18156
- i0.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
18157
- } }
18158
- function CheckYourAnswersComponent_tr_18_Template(rf, ctx) { if (rf & 1) {
18159
- i0.ɵɵelementStart(0, "tr", 7);
18160
- i0.ɵɵelementStart(1, "td", 20);
18161
- i0.ɵɵtext(2, " None ");
18162
- i0.ɵɵelementEnd();
18163
- i0.ɵɵelementEnd();
18164
- } }
18165
- class CheckYourAnswersComponent {
18166
- constructor(linkedCasesService) {
18167
- this.linkedCasesService = linkedCasesService;
18168
- this.linkedCasesStateEmitter = new EventEmitter();
18169
- }
18170
- ngOnInit() {
18171
- this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
18172
- this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
18173
- this.linkedCases = this.linkedCasesService.linkedCases.filter(linkedCase => !linkedCase.unlink);
18174
- this.casesToUnlink = this.linkedCasesService.linkedCases.filter(linkedCase => linkedCase.unlink && linkedCase.unlink === true);
18175
- }
18176
- onChange() {
18177
- this.linkedCasesService.editMode = true;
18178
- this.linkedCasesStateEmitter.emit({
18179
- currentLinkedCasesPage: LinkedCasesPages.CHECK_YOUR_ANSWERS,
18180
- navigateToPreviousPage: true,
18181
- navigateToNextPage: true
18182
- });
18183
- }
18184
- }
18185
- CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
18186
- 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) {
18187
- i0.ɵɵelementStart(0, "div", 0);
18188
- i0.ɵɵelementStart(1, "div", 1);
18189
- i0.ɵɵelementStart(2, "h1", 2);
18190
- i0.ɵɵtext(3, "Check your answers");
18191
- i0.ɵɵelementEnd();
18192
- i0.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
18193
- i0.ɵɵelementStart(5, "table", 4);
18194
- i0.ɵɵelementStart(6, "caption", 5);
18195
- i0.ɵɵtext(7);
18196
- i0.ɵɵelementEnd();
18197
- i0.ɵɵelementStart(8, "thead", 6);
18198
- i0.ɵɵelementStart(9, "tr", 7);
18199
- i0.ɵɵelementStart(10, "th", 8);
18200
- i0.ɵɵtext(11, "Case name and number");
18201
- i0.ɵɵelementEnd();
18202
- i0.ɵɵelementStart(12, "th", 8);
18203
- i0.ɵɵtext(13, "Reasons for case link");
18204
- i0.ɵɵelementEnd();
18205
- i0.ɵɵelement(14, "th", 8);
18206
- i0.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
18207
- i0.ɵɵelementEnd();
18208
- i0.ɵɵelementEnd();
18209
- i0.ɵɵelementStart(16, "tbody", 10);
18210
- i0.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
18211
- i0.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
18212
- i0.ɵɵelementEnd();
18213
- i0.ɵɵelementEnd();
18214
- i0.ɵɵelementEnd();
18215
- i0.ɵɵelementEnd();
18216
- } if (rf & 2) {
18217
- i0.ɵɵadvance(4);
18218
- i0.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
18219
- i0.ɵɵadvance(3);
18220
- i0.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
18221
- i0.ɵɵadvance(8);
18222
- i0.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
18223
- i0.ɵɵadvance(2);
18224
- i0.ɵɵproperty("ngForOf", ctx.linkedCases);
18225
- i0.ɵɵadvance(1);
18226
- i0.ɵɵproperty("ngIf", !ctx.linkedCases.length);
18227
- } }, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
18228
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckYourAnswersComponent, [{
18229
- type: Component,
18230
- args: [{
18231
- selector: 'ccd-linked-cases-check-your-answers',
18232
- templateUrl: './check-your-answers.component.html',
18233
- styleUrls: ['./check-your-answers.component.scss']
18234
- }]
18235
- }], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
18236
- type: Output
18237
- }] }); })();
18238
-
18239
- class ValidatorsUtils {
18240
- numberLengthValidator(inputLength) {
18241
- return (control) => {
18242
- return control.value.length !== inputLength ? { isValid: false } : null;
18243
- };
18244
- }
18245
- formArraySelectedValidator() {
18246
- return (control) => {
18247
- return control.value.every((option) => !option.selected) ? { isValid: false } : null;
18248
- };
18249
- }
18250
- regexPattern(regexPattern) {
18251
- return (control) => {
18252
- const regex = new RegExp(regexPattern);
18253
- return regex.test(control.value) ? null : { isValid: false };
18254
- };
18255
- }
18256
- }
18257
- ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
18258
- ValidatorsUtils.ɵprov = i0.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
18259
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidatorsUtils, [{
18260
- type: Injectable,
18261
- args: [{ providedIn: 'root' }]
18262
- }], null, null); })();
18263
-
18264
- function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
18265
- i0.ɵɵelementStart(0, "span", 28);
18266
- i0.ɵɵelementStart(1, "span", 29);
18267
- i0.ɵɵtext(2, "Error:");
18268
- i0.ɵɵelementEnd();
18269
- i0.ɵɵtext(3);
18270
- i0.ɵɵelementEnd();
18271
- } if (rf & 2) {
18272
- const ctx_r4 = i0.ɵɵnextContext(2);
18273
- i0.ɵɵadvance(3);
18274
- i0.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
18275
- } }
18276
- function LinkCasesComponent_div_8_span_10_Template(rf, ctx) { if (rf & 1) {
18277
- i0.ɵɵelementStart(0, "span", 28);
18278
- i0.ɵɵelementStart(1, "span", 29);
18279
- i0.ɵɵtext(2, "Error:");
18280
- i0.ɵɵelementEnd();
18281
- i0.ɵɵtext(3);
18282
- i0.ɵɵelementEnd();
18283
- } if (rf & 2) {
18284
- const ctx_r5 = i0.ɵɵnextContext(2);
18285
- i0.ɵɵadvance(3);
18286
- i0.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
18287
- } }
18288
- function LinkCasesComponent_div_8_div_12_Template(rf, ctx) { if (rf & 1) {
18289
- i0.ɵɵelementStart(0, "div", 30);
18290
- i0.ɵɵelement(1, "input", 31);
18291
- i0.ɵɵelementStart(2, "label", 32);
18292
- i0.ɵɵtext(3);
18293
- i0.ɵɵelementEnd();
18294
- i0.ɵɵelementEnd();
18295
- } if (rf & 2) {
18296
- const reason_r8 = ctx.$implicit;
18297
- const pos_r9 = ctx.index;
18298
- i0.ɵɵproperty("formGroupName", pos_r9);
18299
- i0.ɵɵadvance(1);
18300
- i0.ɵɵpropertyInterpolate("id", reason_r8.key);
18301
- i0.ɵɵproperty("value", reason_r8.value_en);
18302
- i0.ɵɵadvance(1);
18303
- i0.ɵɵpropertyInterpolate("for", reason_r8.key);
18304
- i0.ɵɵadvance(1);
18305
- i0.ɵɵtextInterpolate(reason_r8.value_en);
18306
- } }
18307
- function LinkCasesComponent_div_8_span_15_Template(rf, ctx) { if (rf & 1) {
18308
- i0.ɵɵelementStart(0, "span", 28);
18309
- i0.ɵɵelementStart(1, "span", 29);
18310
- i0.ɵɵtext(2, "Error:");
18311
- i0.ɵɵelementEnd();
18312
- i0.ɵɵtext(3);
18313
- i0.ɵɵelementEnd();
18314
- } if (rf & 2) {
18315
- const ctx_r7 = i0.ɵɵnextContext(2);
18316
- i0.ɵɵadvance(3);
18317
- i0.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
18318
- } }
18319
- const _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
18320
- function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
18321
- const _r11 = i0.ɵɵgetCurrentView();
18322
- i0.ɵɵelementStart(0, "div", 21);
18323
- i0.ɵɵelementStart(1, "h3", 22);
18324
- i0.ɵɵtext(2, "Enter case reference");
18325
- i0.ɵɵelementEnd();
18326
- i0.ɵɵelementStart(3, "div", 5);
18327
- i0.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
18328
- i0.ɵɵelement(5, "input", 23);
18329
- i0.ɵɵelementEnd();
18330
- i0.ɵɵelementStart(6, "h3", 22);
18331
- i0.ɵɵtext(7, "Why should these cases be linked?");
18332
- i0.ɵɵelementEnd();
18333
- i0.ɵɵelementStart(8, "div", 24);
18334
- i0.ɵɵtext(9, " Select all that apply. ");
18335
- i0.ɵɵelementEnd();
18336
- i0.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
18337
- i0.ɵɵelementStart(11, "div", 25);
18338
- i0.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
18339
- i0.ɵɵelementEnd();
18340
- i0.ɵɵelement(13, "br");
18341
- i0.ɵɵelement(14, "br");
18342
- i0.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
18343
- i0.ɵɵelementStart(16, "button", 27);
18344
- i0.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.submitCaseInfo(); });
18345
- i0.ɵɵtext(17, "Propose case link");
18346
- i0.ɵɵelementEnd();
18347
- i0.ɵɵelementEnd();
18348
- } if (rf & 2) {
18349
- const ctx_r0 = i0.ɵɵnextContext();
18350
- i0.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
18351
- i0.ɵɵadvance(3);
18352
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
18353
- i0.ɵɵadvance(1);
18354
- i0.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
18355
- i0.ɵɵadvance(6);
18356
- i0.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
18357
- i0.ɵɵadvance(1);
18358
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
18359
- i0.ɵɵadvance(1);
18360
- i0.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
18361
- i0.ɵɵadvance(3);
18362
- i0.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
18363
- } }
18364
- function LinkCasesComponent_span_13_Template(rf, ctx) { if (rf & 1) {
18365
- i0.ɵɵelementStart(0, "span", 28);
18366
- i0.ɵɵelementStart(1, "span", 29);
18367
- i0.ɵɵtext(2, "Error:");
18368
- i0.ɵɵelementEnd();
18369
- i0.ɵɵtext(3);
18370
- i0.ɵɵelementEnd();
18371
- } if (rf & 2) {
18372
- const ctx_r1 = i0.ɵɵnextContext();
18373
- i0.ɵɵadvance(3);
18374
- i0.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
18375
- } }
18376
- function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
18377
- i0.ɵɵelementStart(0, "span");
18378
- i0.ɵɵtext(1);
18379
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
18380
- i0.ɵɵelement(3, "br");
18381
- i0.ɵɵelementEnd();
18382
- } if (rf & 2) {
18383
- const reason_r15 = ctx.$implicit;
18384
- i0.ɵɵadvance(1);
18385
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
18386
- } }
18387
- const _c1$6 = function (a0) { return { "table-group-error": a0 }; };
18388
- function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
18389
- const _r17 = i0.ɵɵgetCurrentView();
18390
- i0.ɵɵelementStart(0, "tr", 10);
18391
- i0.ɵɵelementStart(1, "td", 33);
18392
- i0.ɵɵelement(2, "div", 34);
18393
- i0.ɵɵelementStart(3, "span");
18394
- i0.ɵɵtext(4);
18395
- i0.ɵɵelement(5, "br");
18396
- i0.ɵɵtext(6);
18397
- i0.ɵɵpipe(7, "ccdCaseReference");
18398
- i0.ɵɵelementEnd();
18399
- i0.ɵɵelementEnd();
18400
- i0.ɵɵelementStart(8, "td", 35);
18401
- i0.ɵɵtext(9);
18402
- i0.ɵɵelementEnd();
18403
- i0.ɵɵelementStart(10, "td", 33);
18404
- i0.ɵɵtext(11);
18405
- i0.ɵɵelementEnd();
18406
- i0.ɵɵelementStart(12, "td", 35);
18407
- i0.ɵɵtext(13);
18408
- i0.ɵɵelementEnd();
18409
- i0.ɵɵelementStart(14, "td", 33);
18410
- i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
18411
- i0.ɵɵelementEnd();
18412
- i0.ɵɵelementStart(16, "td", 33);
18413
- i0.ɵɵelementStart(17, "a", 37);
18414
- 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); });
18415
- i0.ɵɵtext(18, "Remove");
18416
- i0.ɵɵelementEnd();
18417
- i0.ɵɵelementEnd();
18418
- i0.ɵɵelementEnd();
18419
- } if (rf & 2) {
18420
- const case_r12 = ctx.$implicit;
18421
- const ctx_r2 = i0.ɵɵnextContext();
18422
- i0.ɵɵadvance(2);
18423
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
18424
- i0.ɵɵadvance(2);
18425
- i0.ɵɵtextInterpolate1("", case_r12.caseName, " ");
18426
- i0.ɵɵadvance(2);
18427
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
18428
- i0.ɵɵadvance(2);
18429
- i0.ɵɵproperty("title", case_r12.caseTypeDescription);
18430
- i0.ɵɵadvance(1);
18431
- i0.ɵɵtextInterpolate(case_r12.caseType);
18432
- i0.ɵɵadvance(2);
18433
- i0.ɵɵtextInterpolate(case_r12.caseService);
18434
- i0.ɵɵadvance(1);
18435
- i0.ɵɵproperty("title", case_r12.caseStateDescription);
18436
- i0.ɵɵadvance(1);
18437
- i0.ɵɵtextInterpolate(case_r12.caseState);
18438
- i0.ɵɵadvance(2);
18439
- i0.ɵɵproperty("ngForOf", case_r12.reasons);
18440
- i0.ɵɵadvance(2);
18441
- i0.ɵɵattribute("id", case_r12.caseReference);
18442
- } }
18443
- function LinkCasesComponent_tr_32_Template(rf, ctx) { if (rf & 1) {
18444
- i0.ɵɵelementStart(0, "tr", 10);
18445
- i0.ɵɵelementStart(1, "td", 38);
18446
- i0.ɵɵtext(2, " None ");
18447
- i0.ɵɵelementEnd();
18448
- i0.ɵɵelementEnd();
18449
- } }
18450
- class LinkCasesComponent {
18451
- constructor(casesService, fb, validatorsUtils, linkedCasesService) {
18452
- this.casesService = casesService;
18453
- this.fb = fb;
18454
- this.validatorsUtils = validatorsUtils;
18455
- this.linkedCasesService = linkedCasesService;
18456
- this.linkedCasesStateEmitter = new EventEmitter();
18457
- this.errorMessages = [];
18458
- this.selectedCases = [];
18459
- this.linkCaseReasons = [];
18460
- this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
18461
- }
18462
- ngOnInit() {
18463
- this.caseId = this.linkedCasesService.caseId;
18464
- this.caseName = this.linkedCasesService.caseName;
18465
- this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
18466
- this.initForm();
18467
- if (this.linkedCasesService.editMode) {
18468
- // this may have includes the currently added one but yet to be submitted.
18469
- this.selectedCases = this.linkedCasesService.linkedCases;
18470
- }
18471
- else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
18472
- this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
18473
- }
18474
- }
18475
- initForm() {
18476
- this.linkCaseForm = this.fb.group({
18477
- caseNumber: ['', [Validators.minLength(16), this.validatorsUtils.regexPattern(Patterns.CASE_REF)]],
18478
- reasonType: this.getReasonTypeFormArray,
18479
- });
18480
- }
18481
- get getReasonTypeFormArray() {
18482
- return this.fb.array(this.linkCaseReasons.map((val) => this.fb.group({
18483
- key: [val.key],
18484
- value_en: [val.value_en],
18485
- value_cy: [val.value_cy],
18486
- hint_text_en: [val.hint_text_en],
18487
- hint_text_cy: [val.hint_text_cy],
18488
- lov_order: [val.lov_order],
18489
- parent_key: [val.parent_key],
18490
- selected: [!!val.selected],
18491
- })), this.validatorsUtils.formArraySelectedValidator());
18492
- }
18493
- submitCaseInfo() {
18494
- this.errorMessages = [];
18495
- this.caseReasonError = null;
18496
- this.caseNumberError = null;
18497
- this.caseSelectionError = null;
18498
- this.noSelectedCaseError = null;
18499
- if (this.linkCaseForm.valid &&
18500
- !this.isCaseSelected(this.selectedCases) &&
18501
- !this.isCaseSelected(this.linkedCasesService.linkedCases) &&
18502
- !this.isCaseSelectedSameAsCurrentCase()) {
18503
- this.getCaseInfo();
18504
- }
18505
- else {
18506
- this.showErrorInfo();
18507
- }
18508
- }
18509
- isCaseSelected(linkedCases) {
18510
- if (linkedCases.length === 0) {
18511
- return false;
18512
- }
18513
- const caseNumber = this.linkCaseForm.value.caseNumber;
18514
- return !!linkedCases.find((caseLink) => caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''));
18515
- }
18516
- isCaseSelectedSameAsCurrentCase() {
18517
- return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
18518
- }
18519
- showErrorInfo() {
18520
- if (this.linkCaseForm.controls.caseNumber.invalid) {
18521
- this.caseNumberError = LinkedCasesErrorMessages.CaseNumberError;
18522
- this.errorMessages.push({
18523
- title: 'dummy-case-number',
18524
- description: LinkedCasesErrorMessages.CaseNumberError,
18525
- fieldId: 'caseNumber',
18526
- });
18527
- }
18528
- if (this.linkCaseForm.controls.reasonType.invalid) {
18529
- this.caseReasonError = LinkedCasesErrorMessages.ReasonSelectionError;
18530
- this.errorMessages.push({
18531
- title: 'dummy-case-reason',
18532
- description: LinkedCasesErrorMessages.ReasonSelectionError,
18533
- fieldId: 'caseReason',
18534
- });
18535
- }
18536
- if (this.isCaseSelected(this.selectedCases)) {
18537
- this.caseSelectionError = LinkedCasesErrorMessages.CaseProposedError;
18538
- this.errorMessages.push({
18539
- title: 'dummy-case-number',
18540
- description: LinkedCasesErrorMessages.CaseProposedError,
18541
- fieldId: 'caseNumber',
18542
- });
18543
- }
18544
- if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
18545
- this.caseSelectionError = LinkedCasesErrorMessages.CasesLinkedError;
18546
- this.errorMessages.push({
18547
- title: 'dummy-case-number',
18548
- description: LinkedCasesErrorMessages.CasesLinkedError,
18549
- fieldId: 'caseNumber',
18550
- });
18551
- }
18552
- if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
18553
- this.errorMessages.push({
18554
- title: 'dummy-case-number',
18555
- description: LinkedCasesErrorMessages.ProposedCaseWithIn,
18556
- fieldId: 'caseNumber',
18557
- });
18558
- }
18559
- window.scrollTo(0, 0);
18560
- this.emitLinkedCasesState(false);
18561
- }
18562
- getCaseInfo() {
18563
- const caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
18564
- this.casesService
18565
- .getCaseViewV2(caseNumberData)
18566
- .subscribe((caseView) => {
18567
- this.linkedCasesService.caseDetails = caseView;
18568
- const caseLink = {
18569
- caseReference: caseView.case_id,
18570
- reasons: this.getSelectedCaseReasons(),
18571
- createdDateTime: moment(new Date()).format(this.ISO_FORMAT),
18572
- caseType: caseView.case_type.name || '',
18573
- caseTypeDescription: caseView.case_type.description || '',
18574
- caseState: caseView.state.name || '',
18575
- caseStateDescription: caseView.state.description || '',
18576
- caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
18577
- caseName: this.linkedCasesService.getCaseName(caseView),
18578
- };
18579
- const ccdApiCaseLinkData = {
18580
- CaseReference: caseView.case_id,
18581
- CaseType: caseView.case_type.id,
18582
- CreatedDateTime: moment(new Date()).format(this.ISO_FORMAT),
18583
- ReasonForLink: this.getSelectedCCDTypeCaseReason()
18584
- };
18585
- if (!this.linkedCasesService.caseFieldValue) {
18586
- this.linkedCasesService.caseFieldValue = [];
18587
- }
18588
- this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
18589
- this.selectedCases.push(caseLink);
18590
- this.initForm();
18591
- this.emitLinkedCasesState(false);
18592
- }, (error) => {
18593
- this.caseNumberError = LinkedCasesErrorMessages.CaseCheckAgainError;
18594
- this.errorMessages.push({
18595
- title: 'dummy-case-number',
18596
- description: LinkedCasesErrorMessages.CaseCheckAgainError,
18597
- fieldId: 'caseNumber',
18598
- });
18599
- this.emitLinkedCasesState(false);
18600
- window.scrollTo(0, 0);
18601
- return throwError(error);
18602
- });
18603
- }
18604
- // Return linked cases state and error messages to the parent
18605
- emitLinkedCasesState(isNavigateToNextPage) {
18606
- this.linkedCasesStateEmitter.emit({
18607
- currentLinkedCasesPage: LinkedCasesPages.LINK_CASE,
18608
- errorMessages: this.errorMessages,
18609
- navigateToNextPage: isNavigateToNextPage,
18610
- });
18611
- }
18612
- getSelectedCaseReasons() {
18613
- const selectedReasons = [];
18614
- this.linkCaseForm.controls.reasonType.value.forEach((selectedReason) => {
18615
- if (selectedReason.selected) {
18616
- selectedReasons.push({
18617
- reasonCode: selectedReason.key
18618
- });
18619
- }
18620
- });
18621
- return selectedReasons;
18622
- }
18623
- getSelectedCCDTypeCaseReason() {
18624
- const selectedReasons = [];
18625
- this.linkCaseForm.controls.reasonType.value.forEach((selectedReason) => {
18626
- if (selectedReason.selected) {
18627
- selectedReasons.push({
18628
- value: {
18629
- Reason: selectedReason.key,
18630
- }
18631
- });
18632
- }
18633
- });
18634
- return selectedReasons;
18635
- }
18636
- onSelectedLinkedCaseRemove(pos, selectedCaseReference) {
18637
- const caseFieldValue = this.linkedCasesService.caseFieldValue || [];
18638
- const updatedItems = caseFieldValue.filter(item => item.value && item.value.CaseReference !== selectedCaseReference);
18639
- if (updatedItems) {
18640
- this.linkedCasesService.caseFieldValue = updatedItems;
18641
- }
18642
- this.selectedCases.splice(pos, 1);
18643
- }
18644
- onNext() {
18645
- this.errorMessages = [];
18646
- this.caseReasonError = null;
18647
- this.caseNumberError = null;
18648
- this.caseSelectionError = null;
18649
- this.noSelectedCaseError = null;
18650
- let navigateToNextPage = true;
18651
- if (this.selectedCases.length) {
18652
- this.linkedCasesService.linkedCases = this.selectedCases;
18653
- }
18654
- else {
18655
- this.noSelectedCaseError = LinkedCasesErrorMessages.CaseSelectionError;
18656
- this.errorMessages.push({
18657
- title: 'dummy-case-selection',
18658
- description: LinkedCasesErrorMessages.CaseSelectionError,
18659
- fieldId: 'caseReason',
18660
- });
18661
- navigateToNextPage = false;
18662
- }
18663
- this.emitLinkedCasesState(navigateToNextPage);
18664
- }
18665
- }
18666
- LinkCasesComponent.ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(ValidatorsUtils), i0.ɵɵdirectiveInject(LinkedCasesService)); };
18667
- 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) {
18668
- i0.ɵɵelementStart(0, "div", 0);
18669
- i0.ɵɵelementStart(1, "div", 1);
18670
- i0.ɵɵelementStart(2, "div");
18671
- i0.ɵɵelementStart(3, "span", 2);
18672
- i0.ɵɵtext(4);
18673
- i0.ɵɵpipe(5, "ccdCaseReference");
18674
- i0.ɵɵelementEnd();
18675
- i0.ɵɵelementStart(6, "h1", 3);
18676
- i0.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
18677
- i0.ɵɵelementEnd();
18678
- i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
18679
- i0.ɵɵelement(9, "hr");
18680
- i0.ɵɵelement(10, "br");
18681
- i0.ɵɵelement(11, "br");
18682
- i0.ɵɵelementStart(12, "div", 5);
18683
- i0.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
18684
- i0.ɵɵelementStart(14, "table", 7);
18685
- i0.ɵɵelementStart(15, "caption", 8);
18686
- i0.ɵɵtext(16, "Proposed case links ");
18687
- i0.ɵɵelementEnd();
18688
- i0.ɵɵelementStart(17, "thead", 9);
18689
- i0.ɵɵelementStart(18, "tr", 10);
18690
- i0.ɵɵelementStart(19, "th", 11);
18691
- i0.ɵɵtext(20, "Case name and number");
18692
- i0.ɵɵelementEnd();
18693
- i0.ɵɵelementStart(21, "th", 12);
18694
- i0.ɵɵtext(22, "Case type ");
18695
- i0.ɵɵelementEnd();
18696
- i0.ɵɵelementStart(23, "th", 13);
18697
- i0.ɵɵtext(24, "Service");
18698
- i0.ɵɵelementEnd();
18699
- i0.ɵɵelementStart(25, "th", 13);
18700
- i0.ɵɵtext(26, "State");
18701
- i0.ɵɵelementEnd();
18702
- i0.ɵɵelementStart(27, "th", 14);
18703
- i0.ɵɵtext(28, "Reasons for case link");
18704
- i0.ɵɵelementEnd();
18705
- i0.ɵɵelement(29, "th", 15);
18706
- i0.ɵɵelementEnd();
18707
- i0.ɵɵelementEnd();
18708
- i0.ɵɵelementStart(30, "tbody", 16);
18709
- i0.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
18710
- i0.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
18711
- i0.ɵɵelementEnd();
18712
- i0.ɵɵelementEnd();
18713
- i0.ɵɵelementEnd();
18714
- i0.ɵɵelementStart(33, "div", 19);
18715
- i0.ɵɵelementStart(34, "button", 20);
18716
- i0.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
18717
- i0.ɵɵtext(35, "Next");
18718
- i0.ɵɵelementEnd();
18719
- i0.ɵɵelementEnd();
18720
- i0.ɵɵelementEnd();
18721
- i0.ɵɵelementEnd();
18722
- i0.ɵɵelementEnd();
18723
- } if (rf & 2) {
18724
- i0.ɵɵadvance(4);
18725
- i0.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0.ɵɵpipeBind1(5, 7, ctx.caseId), "");
18726
- i0.ɵɵadvance(4);
18727
- i0.ɵɵproperty("ngIf", ctx.linkCaseForm);
18728
- i0.ɵɵadvance(4);
18729
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
18730
- i0.ɵɵadvance(1);
18731
- i0.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
18732
- i0.ɵɵadvance(18);
18733
- i0.ɵɵproperty("ngForOf", ctx.selectedCases);
18734
- i0.ɵɵadvance(1);
18735
- i0.ɵɵproperty("ngIf", !ctx.selectedCases.length);
18736
- } }, 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}"] });
18737
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesComponent, [{
18738
- type: Component,
18739
- args: [{
18740
- selector: 'ccd-link-cases',
18741
- styleUrls: ['./link-cases.component.scss'],
18742
- templateUrl: './link-cases.component.html',
18743
- }]
18744
- }], function () { return [{ type: CasesService }, { type: i2.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
18745
- type: Output
18746
- }] }); })();
18747
-
18748
- function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) { if (rf & 1) {
18749
- const _r3 = i0.ɵɵgetCurrentView();
18750
- i0.ɵɵelementStart(0, "a", 2);
18751
- i0.ɵɵlistener("click", function LinkedCasesFromTableComponent_a_0_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.onClick(); });
18752
- i0.ɵɵtext(1);
18753
- i0.ɵɵelementEnd();
18754
- } if (rf & 2) {
18755
- const ctx_r0 = i0.ɵɵnextContext();
18756
- i0.ɵɵadvance(1);
18757
- i0.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
18758
- } }
18759
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) { if (rf & 1) {
18760
- i0.ɵɵelementStart(0, "span");
18761
- i0.ɵɵtext(1);
18762
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
18763
- i0.ɵɵelement(3, "br");
18764
- i0.ɵɵelementEnd();
18765
- } if (rf & 2) {
18766
- const reason_r11 = ctx.$implicit;
18767
- i0.ɵɵadvance(1);
18768
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
18769
- } }
18770
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) { if (rf & 1) {
18771
- i0.ɵɵelementStart(0, "td", 14);
18772
- i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
18773
- i0.ɵɵelementEnd();
18774
- } if (rf & 2) {
18775
- const details_r9 = ctx.$implicit;
18776
- i0.ɵɵadvance(1);
18777
- i0.ɵɵproperty("ngForOf", details_r9.reasons);
18778
- } }
18779
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) { if (rf & 1) {
18780
- i0.ɵɵelementStart(0, "tr", 5);
18781
- i0.ɵɵelementStart(1, "td", 11);
18782
- i0.ɵɵelementStart(2, "p", 12);
18783
- i0.ɵɵelementStart(3, "a", 13);
18784
- i0.ɵɵelementStart(4, "span");
18785
- i0.ɵɵtext(5);
18786
- i0.ɵɵelement(6, "br");
18787
- i0.ɵɵtext(7);
18788
- i0.ɵɵpipe(8, "ccdCaseReference");
18789
- i0.ɵɵelementEnd();
18790
- i0.ɵɵelementEnd();
18791
- i0.ɵɵelementEnd();
18792
- i0.ɵɵelementEnd();
18793
- i0.ɵɵelementStart(9, "td", 14);
18794
- i0.ɵɵelementStart(10, "span", 15);
18795
- i0.ɵɵtext(11);
18796
- i0.ɵɵelementEnd();
18797
- i0.ɵɵelementEnd();
18798
- i0.ɵɵelementStart(12, "td", 14);
18799
- i0.ɵɵelementStart(13, "span");
18800
- i0.ɵɵtext(14);
18801
- i0.ɵɵelementEnd();
18802
- i0.ɵɵelementEnd();
18803
- i0.ɵɵelementStart(15, "td", 14);
18804
- i0.ɵɵelementStart(16, "span", 15);
18805
- i0.ɵɵtext(17);
18806
- i0.ɵɵelementEnd();
18807
- i0.ɵɵelementEnd();
18808
- i0.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
18809
- i0.ɵɵelementEnd();
18810
- } if (rf & 2) {
18811
- const case_r7 = ctx.$implicit;
18812
- i0.ɵɵadvance(3);
18813
- i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0.ɵɵsanitizeUrl);
18814
- i0.ɵɵadvance(2);
18815
- i0.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
18816
- i0.ɵɵadvance(2);
18817
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
18818
- i0.ɵɵadvance(3);
18819
- i0.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
18820
- i0.ɵɵadvance(1);
18821
- i0.ɵɵtextInterpolate(case_r7.ccdCaseType);
18822
- i0.ɵɵadvance(3);
18823
- i0.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
18824
- i0.ɵɵadvance(2);
18825
- i0.ɵɵproperty("title", case_r7.stateDescription);
18826
- i0.ɵɵadvance(1);
18827
- i0.ɵɵtextInterpolate(case_r7.state);
18828
- i0.ɵɵadvance(1);
18829
- i0.ɵɵproperty("ngForOf", case_r7.linkDetails);
18830
- } }
18831
- function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) { if (rf & 1) {
18832
- i0.ɵɵelementStart(0, "tr", 5);
18833
- i0.ɵɵelementStart(1, "td", 18);
18834
- i0.ɵɵtext(2, " None ");
18835
- i0.ɵɵelementEnd();
18836
- i0.ɵɵelementEnd();
18837
- } }
18838
- function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) { if (rf & 1) {
18839
- i0.ɵɵelementStart(0, "tbody", 8);
18840
- i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
18841
- i0.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
18842
- i0.ɵɵelementEnd();
18843
- } if (rf & 2) {
18844
- const ctx_r4 = i0.ɵɵnextContext(2);
18845
- i0.ɵɵadvance(1);
18846
- i0.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
18847
- i0.ɵɵadvance(1);
18848
- i0.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
18849
- } }
18850
- function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) { if (rf & 1) {
18851
- i0.ɵɵelementStart(0, "table", 3);
18852
- i0.ɵɵelementStart(1, "thead", 4);
18853
- i0.ɵɵelementStart(2, "tr", 5);
18854
- i0.ɵɵelementStart(3, "th", 6);
18855
- i0.ɵɵtext(4, "Case name and number");
18856
- i0.ɵɵelementEnd();
18857
- i0.ɵɵelementStart(5, "th", 6);
18858
- i0.ɵɵtext(6, "Case type ");
18859
- i0.ɵɵelementEnd();
18860
- i0.ɵɵelementStart(7, "th", 6);
18861
- i0.ɵɵtext(8, "Service");
18862
- i0.ɵɵelementEnd();
18863
- i0.ɵɵelementStart(9, "th", 6);
18864
- i0.ɵɵtext(10, "State");
18865
- i0.ɵɵelementEnd();
18866
- i0.ɵɵelementStart(11, "th", 6);
18867
- i0.ɵɵtext(12, "Reasons for case link");
18868
- i0.ɵɵelementEnd();
18869
- i0.ɵɵelementEnd();
18870
- i0.ɵɵelementEnd();
18871
- i0.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
18872
- i0.ɵɵelementEnd();
18873
- } if (rf & 2) {
18874
- const ctx_r1 = i0.ɵɵnextContext();
18875
- i0.ɵɵadvance(13);
18876
- i0.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
18877
- } }
18878
- var PageType;
18879
- (function (PageType) {
18880
- PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
18881
- PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
18882
- })(PageType || (PageType = {}));
18883
- class LinkedCasesFromTableComponent {
18884
- constructor(route, casesService, linkedCasesService) {
18885
- this.route = route;
18886
- this.casesService = casesService;
18887
- this.linkedCasesService = linkedCasesService;
18888
- this.notifyAPIFailure = new EventEmitter(false);
18889
- this.pageType = PageType;
18890
- this.getLinkedCasesResponse = [];
18891
- this.showHideLinkText = 'Show';
18892
- this.noLinkedCases = true;
18893
- this.isServerError = false;
18894
- }
18895
- ngAfterViewInit() {
18896
- const labelField = document.getElementsByClassName('case-viewer-label');
18897
- if (labelField && labelField.length) {
18898
- labelField[0].replaceWith('');
18899
- }
18900
- }
18901
- ngOnInit() {
18902
- this.fetchPageData();
18903
- if (this.route.snapshot.data.case) {
18904
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
18905
- }
18906
- }
18907
- fetchPageData() {
18908
- this.caseId = this.route.snapshot.data.case.case_id;
18909
- this.getLinkedCases().subscribe(response => {
18910
- this.isServerError = false;
18911
- this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(item => {
18912
- const mappedCasetype = this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
18913
- const mappedCasetypeDescription = this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
18914
- const mappedCaseState = this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
18915
- const mappedCaseStateDescription = this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
18916
- const mappedCaseService = this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
18917
- return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
18918
- });
18919
- this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
18920
- }, err => {
18921
- this.isServerError = true;
18922
- this.notifyAPIFailure.emit(true);
18923
- });
18924
- }
18925
- getLinkedCases() {
18926
- return this.casesService.getLinkedCases(this.caseId);
18927
- }
18928
- mapLookupIDToValueFromJurisdictions(fieldName, fieldValue) {
18929
- return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
18930
- }
18931
- onClick() {
18932
- this.showHideLinkText = this.showHideLinkText === 'Show'
18933
- ? 'Hide'
18934
- : 'Show';
18935
- }
18936
- }
18937
- LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
18938
- LinkedCasesFromTableComponent.ɵfac = function LinkedCasesFromTableComponent_Factory(t) { return new (t || LinkedCasesFromTableComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
18939
- 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) {
18940
- i0.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
18941
- i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
18942
- } if (rf & 2) {
18943
- i0.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
18944
- i0.ɵɵadvance(1);
18945
- i0.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
18946
- } }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
18947
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
18948
- type: Component,
18949
- args: [{
18950
- selector: 'ccd-linked-cases-from-table',
18951
- templateUrl: './linked-cases-from-table.component.html',
18952
- styleUrls: ['./linked-cases-from-table.component.scss']
18953
- }]
18954
- }], function () { return [{ type: i1$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
18955
- type: Input
18956
- }], notifyAPIFailure: [{
18957
- type: Output
18958
- }] }); })();
18959
-
18960
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) { if (rf & 1) {
18961
- i0.ɵɵelementStart(0, "a", 16);
18962
- i0.ɵɵtext(1);
18963
- i0.ɵɵelementEnd();
18964
- } if (rf & 2) {
18965
- const case_r3 = i0.ɵɵnextContext(3).$implicit;
18966
- const ctx_r9 = i0.ɵɵnextContext(2);
18967
- i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0.ɵɵsanitizeUrl);
18968
- i0.ɵɵadvance(1);
18969
- i0.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
18970
- } }
18971
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) { if (rf & 1) {
18972
- i0.ɵɵelement(0, "br");
18973
- } }
18974
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) { if (rf & 1) {
18975
- i0.ɵɵelementStart(0, "span");
18976
- i0.ɵɵtext(1);
18977
- i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
18978
- i0.ɵɵelementStart(3, "span");
18979
- i0.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
18980
- i0.ɵɵelementEnd();
18981
- i0.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
18982
- i0.ɵɵelementEnd();
18983
- } if (rf & 2) {
18984
- const reason_r6 = ctx.$implicit;
18985
- const isLast_r8 = ctx.last;
18986
- const ctx_r5 = i0.ɵɵnextContext(4);
18987
- i0.ɵɵadvance(1);
18988
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 3, reason_r6), "");
18989
- i0.ɵɵadvance(3);
18990
- i0.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
18991
- i0.ɵɵadvance(1);
18992
- i0.ɵɵproperty("ngIf", !isLast_r8);
18993
- } }
18994
- function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) { if (rf & 1) {
18995
- i0.ɵɵelementStart(0, "td");
18996
- i0.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
18997
- i0.ɵɵelementEnd();
18998
- } if (rf & 2) {
18999
- const case_r3 = i0.ɵɵnextContext().$implicit;
19000
- i0.ɵɵadvance(1);
19001
- i0.ɵɵproperty("ngForOf", case_r3.reasons);
19002
- } }
19003
- function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) { if (rf & 1) {
19004
- i0.ɵɵelementStart(0, "tr", 4);
19005
- i0.ɵɵelementStart(1, "td");
19006
- i0.ɵɵelementStart(2, "p", 9);
19007
- i0.ɵɵelementStart(3, "a", 10);
19008
- i0.ɵɵelementStart(4, "span", 11);
19009
- i0.ɵɵtext(5);
19010
- i0.ɵɵelement(6, "br");
19011
- i0.ɵɵtext(7);
19012
- i0.ɵɵpipe(8, "ccdCaseReference");
19013
- i0.ɵɵelementEnd();
19014
- i0.ɵɵelementEnd();
19015
- i0.ɵɵelementEnd();
19016
- i0.ɵɵelementEnd();
19017
- i0.ɵɵelementStart(9, "td");
19018
- i0.ɵɵelementStart(10, "span", 12);
19019
- i0.ɵɵtext(11);
19020
- i0.ɵɵelementEnd();
19021
- i0.ɵɵelementEnd();
19022
- i0.ɵɵelementStart(12, "td");
19023
- i0.ɵɵelementStart(13, "span");
19024
- i0.ɵɵtext(14);
19025
- i0.ɵɵelementEnd();
19026
- i0.ɵɵelementEnd();
19027
- i0.ɵɵelementStart(15, "td");
19028
- i0.ɵɵelementStart(16, "span", 12);
19029
- i0.ɵɵtext(17);
19030
- i0.ɵɵelementEnd();
19031
- i0.ɵɵelementEnd();
19032
- i0.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
19033
- i0.ɵɵelementEnd();
19034
- } if (rf & 2) {
19035
- const case_r3 = ctx.$implicit;
19036
- i0.ɵɵadvance(3);
19037
- i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0.ɵɵsanitizeUrl);
19038
- i0.ɵɵadvance(2);
19039
- i0.ɵɵtextInterpolate1("", case_r3.caseName, " ");
19040
- i0.ɵɵadvance(2);
19041
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
19042
- i0.ɵɵadvance(3);
19043
- i0.ɵɵproperty("title", case_r3.caseTypeDescription);
19044
- i0.ɵɵadvance(1);
19045
- i0.ɵɵtextInterpolate(case_r3.caseType);
19046
- i0.ɵɵadvance(3);
19047
- i0.ɵɵtextInterpolate(case_r3.service);
19048
- i0.ɵɵadvance(2);
19049
- i0.ɵɵproperty("title", case_r3.stateDescription);
19050
- i0.ɵɵadvance(1);
19051
- i0.ɵɵtextInterpolate(case_r3.state);
19052
- i0.ɵɵadvance(1);
19053
- i0.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
19054
- } }
19055
- function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) { if (rf & 1) {
19056
- i0.ɵɵelementStart(0, "tr", 4);
19057
- i0.ɵɵelementStart(1, "td", 17);
19058
- i0.ɵɵtext(2, " None ");
19059
- i0.ɵɵelementEnd();
19060
- i0.ɵɵelementEnd();
19061
- } }
19062
- function LinkedCasesToTableComponent_table_2_Template(rf, ctx) { if (rf & 1) {
19063
- i0.ɵɵelementStart(0, "table", 3);
19064
- i0.ɵɵelementStart(1, "thead");
19065
- i0.ɵɵelementStart(2, "tr", 4);
19066
- i0.ɵɵelementStart(3, "th", 5);
19067
- i0.ɵɵtext(4, "Case name and number");
19068
- i0.ɵɵelementEnd();
19069
- i0.ɵɵelementStart(5, "th", 5);
19070
- i0.ɵɵtext(6, "Case type ");
19071
- i0.ɵɵelementEnd();
19072
- i0.ɵɵelementStart(7, "th", 5);
19073
- i0.ɵɵtext(8, "Service");
19074
- i0.ɵɵelementEnd();
19075
- i0.ɵɵelementStart(9, "th", 5);
19076
- i0.ɵɵtext(10, "State");
19077
- i0.ɵɵelementEnd();
19078
- i0.ɵɵelementStart(11, "th", 5);
19079
- i0.ɵɵtext(12, "Reasons for case link");
19080
- i0.ɵɵelementEnd();
19081
- i0.ɵɵelementEnd();
19082
- i0.ɵɵelementEnd();
19083
- i0.ɵɵelementStart(13, "tbody", 6);
19084
- i0.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
19085
- i0.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
19086
- i0.ɵɵelementEnd();
19087
- i0.ɵɵelementEnd();
19088
- } if (rf & 2) {
19089
- const ctx_r0 = i0.ɵɵnextContext();
19090
- i0.ɵɵadvance(14);
19091
- i0.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
19092
- i0.ɵɵadvance(1);
19093
- i0.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
19094
- } }
19095
- class LinkedCasesToTableComponent {
19096
- constructor(route, linkedCasesService, casesService) {
19097
- this.route = route;
19098
- this.linkedCasesService = linkedCasesService;
19099
- this.casesService = casesService;
19100
- this.notifyAPIFailure = new EventEmitter(false);
19101
- this.linkedCasesFromResponse = [];
19102
- this.isServerError = false;
19103
- this.jurisdictionsResponse = [];
19104
- }
19105
- ngAfterViewInit() {
19106
- let labelField = document.getElementsByClassName('govuk-heading-l');
19107
- if (labelField && labelField.length) {
19108
- labelField[0].replaceWith('');
19109
- }
19110
- labelField = document.getElementsByClassName('heading-h2');
19111
- if (labelField && labelField.length) {
19112
- labelField[0].replaceWith('');
19113
- }
19114
- }
19115
- ngOnInit() {
19116
- this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
19117
- this.getAllLinkedCaseInformation();
19118
- if (this.route.snapshot.data.case) {
19119
- this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
19120
- }
19121
- }
19122
- getCaseRefereneLink(caseRef) {
19123
- return caseRef.slice(this.caseId.length - 4);
19124
- }
19125
- sortLinkedCasesByReasonCode(searchCasesResponse) {
19126
- const topLevelresultArray = [];
19127
- let secondLevelresultArray = [];
19128
- searchCasesResponse.forEach((item) => {
19129
- const reasons = item && item.reasons || [];
19130
- const consolidatedStateReason = reasons.map(x => x).find(reason => reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE);
19131
- const progressedStateReason = reasons.map(x => x).find(reason => reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE);
19132
- let arrayItem;
19133
- if (progressedStateReason) {
19134
- arrayItem = Object.assign({}, item);
19135
- topLevelresultArray.push(arrayItem);
19136
- }
19137
- else if (consolidatedStateReason) {
19138
- arrayItem = Object.assign({}, item);
19139
- secondLevelresultArray = [Object.assign({}, item), ...secondLevelresultArray];
19140
- }
19141
- else {
19142
- arrayItem = Object.assign({}, item);
19143
- secondLevelresultArray.push(Object.assign({}, item));
19144
- }
19145
- });
19146
- return topLevelresultArray.concat(secondLevelresultArray);
19147
- }
19148
- getAllLinkedCaseInformation() {
19149
- const searchCasesResponse = [];
19150
- const caseFieldValue = this.caseField ? this.caseField.value : [];
19151
- // Generate the list of observables
19152
- caseFieldValue.forEach(fieldValue => {
19153
- if (fieldValue && fieldValue.id) {
19154
- searchCasesResponse.push(this.casesService.getCaseViewV2(fieldValue.id));
19155
- }
19156
- });
19157
- if (searchCasesResponse.length) {
19158
- this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
19159
- const casesResponse = [];
19160
- searchCases.forEach(response => {
19161
- casesResponse.push(this.mapResponse(response));
19162
- });
19163
- this.linkedCasesFromResponse = this.sortLinkedCasesByReasonCode(casesResponse);
19164
- this.isLoaded = true;
19165
- const caseLinks = this.linkedCasesFromResponse.map(item => {
19166
- return {
19167
- caseReference: item.caseReference,
19168
- caseName: item.caseName,
19169
- caseService: item.service,
19170
- caseType: item.caseType,
19171
- unlink: false,
19172
- reasons: item.reasons && item.reasons.map(reason => {
19173
- return {
19174
- reasonCode: reason
19175
- };
19176
- }),
19177
- };
19178
- });
19179
- this.linkedCasesService.initialCaseLinks = caseLinks;
19180
- this.linkedCasesService.linkedCases = caseLinks;
19181
- this.isServerError = false;
19182
- }, err => {
19183
- this.isServerError = true;
19184
- this.notifyAPIFailure.emit(true);
19185
- });
19186
- }
19187
- }
19188
- searchCasesByCaseIds(searchCasesResponse) {
19189
- return forkJoin(searchCasesResponse);
19190
- }
19191
- hasLeadCaseOrConsolidated(reasonCode) {
19192
- return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
19193
- reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
19194
- }
19195
- mapResponse(esSearchCasesResponse) {
19196
- const caseInfo = this.caseField.value.find(item => item.value && item.value.CaseReference === esSearchCasesResponse.case_id);
19197
- return caseInfo && {
19198
- caseReference: esSearchCasesResponse.case_id,
19199
- caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
19200
- caseType: esSearchCasesResponse.case_type.name || '',
19201
- caseTypeDescription: esSearchCasesResponse.case_type.description || '',
19202
- service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
19203
- state: esSearchCasesResponse.state.name || '',
19204
- stateDescription: esSearchCasesResponse.state.description || '',
19205
- reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
19206
- caseInfo.value.ReasonForLink.map(reason => reason.value && reason.value.Reason),
19207
- };
19208
- }
19209
- }
19210
- LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
19211
- LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
19212
- LinkedCasesToTableComponent.ɵfac = function LinkedCasesToTableComponent_Factory(t) { return new (t || LinkedCasesToTableComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CasesService)); };
19213
- 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) {
19214
- i0.ɵɵelementStart(0, "div", 0);
19215
- i0.ɵɵelementStart(1, "div", 1);
19216
- i0.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
19217
- i0.ɵɵelementEnd();
19218
- i0.ɵɵelementEnd();
19219
- } if (rf & 2) {
19220
- i0.ɵɵadvance(2);
19221
- i0.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
19222
- } }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
19223
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
19224
- type: Component,
19225
- args: [{
19226
- selector: 'ccd-linked-cases-to-table',
19227
- templateUrl: './linked-cases-to-table.component.html',
19228
- styleUrls: ['./linked-cases-to-table.component.scss']
19229
- }]
19230
- }], function () { return [{ type: i1$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
19231
- type: Input
19232
- }], notifyAPIFailure: [{
19233
- type: Output
19234
- }] }); })();
19235
-
19236
- function NoLinkedCasesComponent_h1_2_Template(rf, ctx) { if (rf & 1) {
19237
- i0.ɵɵelementStart(0, "h1", 9);
19238
- i0.ɵɵtext(1, "There is a problem");
19239
- i0.ɵɵelementEnd();
19240
- } }
19241
- function NoLinkedCasesComponent_p_3_Template(rf, ctx) { if (rf & 1) {
19242
- i0.ɵɵelementStart(0, "p", 10);
19243
- i0.ɵɵelementStart(1, "span", 11);
19244
- i0.ɵɵtext(2, "Error:");
19245
- i0.ɵɵelementEnd();
19246
- i0.ɵɵtext(3);
19247
- i0.ɵɵelementEnd();
19248
- } if (rf & 2) {
19249
- const ctx_r1 = i0.ɵɵnextContext();
19250
- i0.ɵɵadvance(3);
19251
- i0.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
19252
- } }
19253
- function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
19254
- i0.ɵɵelementStart(0, "p", 5);
19255
- i0.ɵɵtext(1, "There are no cases linked to this one.");
19256
- i0.ɵɵelementEnd();
19257
- } }
19258
- class NoLinkedCasesComponent {
19259
- constructor(router, linkedCasesService) {
19260
- this.router = router;
19261
- this.linkedCasesService = linkedCasesService;
19262
- }
19263
- onBack() {
19264
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
19265
- window.location.hash = 'Linked cases';
19266
- });
19267
- }
19268
- }
19269
- NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
19270
- 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) {
19271
- i0.ɵɵelementStart(0, "div", 0);
19272
- i0.ɵɵelementStart(1, "div", 1);
19273
- i0.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
19274
- i0.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
19275
- i0.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
19276
- i0.ɵɵelementStart(6, "p", 5);
19277
- i0.ɵɵelementStart(7, "a", 6);
19278
- i0.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
19279
- i0.ɵɵtext(8, "Go back to the Linked cases tab");
19280
- i0.ɵɵelementEnd();
19281
- i0.ɵɵelementEnd();
19282
- i0.ɵɵelementStart(9, "div", 7);
19283
- i0.ɵɵelementStart(10, "button", 8);
19284
- i0.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
19285
- i0.ɵɵtext(11, "Back");
19286
- i0.ɵɵelementEnd();
19287
- i0.ɵɵelementEnd();
19288
- i0.ɵɵelementEnd();
19289
- i0.ɵɵelementEnd();
19290
- } if (rf & 2) {
19291
- const _r2 = i0.ɵɵreference(5);
19292
- i0.ɵɵadvance(2);
19293
- i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
19294
- i0.ɵɵadvance(1);
19295
- i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
19296
- } }, directives: [i1.NgIf], encapsulation: 2 });
19297
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoLinkedCasesComponent, [{
19298
- type: Component,
19299
- args: [{
19300
- selector: 'ccd-no-linked-cases',
19301
- templateUrl: './no-linked-cases.component.html'
19302
- }]
19303
- }], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }]; }, null); })();
19304
-
19305
- function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) { if (rf & 1) {
19306
- i0.ɵɵelementStart(0, "p", 11);
19307
- i0.ɵɵelementStart(1, "span", 12);
19308
- i0.ɵɵtext(2, "Error:");
19309
- i0.ɵɵelementEnd();
19310
- i0.ɵɵtext(3);
19311
- i0.ɵɵelementEnd();
19312
- } if (rf & 2) {
19313
- const ctx_r2 = i0.ɵɵnextContext(3);
19314
- i0.ɵɵadvance(3);
19315
- i0.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
19316
- } }
19317
- function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) { if (rf & 1) {
19318
- const _r6 = i0.ɵɵgetCurrentView();
19319
- i0.ɵɵelementStart(0, "div", 13);
19320
- i0.ɵɵelementStart(1, "input", 14);
19321
- 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); });
19322
- i0.ɵɵelementEnd();
19323
- i0.ɵɵelementStart(2, "label", 15);
19324
- i0.ɵɵtext(3);
19325
- i0.ɵɵpipe(4, "ccdCaseReference");
19326
- i0.ɵɵelementEnd();
19327
- i0.ɵɵelementEnd();
19328
- } if (rf & 2) {
19329
- const case_r4 = ctx.$implicit;
19330
- i0.ɵɵadvance(1);
19331
- i0.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
19332
- i0.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
19333
- i0.ɵɵadvance(1);
19334
- i0.ɵɵpropertyInterpolate("for", case_r4.caseReference);
19335
- i0.ɵɵadvance(1);
19336
- i0.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
19337
- } }
19338
- const _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
19339
- function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
19340
- i0.ɵɵelementStart(0, "div", 7);
19341
- i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
19342
- i0.ɵɵelementStart(2, "div", 9);
19343
- i0.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
19344
- i0.ɵɵelementEnd();
19345
- i0.ɵɵelementEnd();
19346
- } if (rf & 2) {
19347
- const ctx_r1 = i0.ɵɵnextContext(2);
19348
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
19349
- i0.ɵɵadvance(1);
19350
- i0.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
19351
- i0.ɵɵadvance(2);
19352
- i0.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
19353
- } }
19354
- function UnLinkCasesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
19355
- const _r8 = i0.ɵɵgetCurrentView();
19356
- i0.ɵɵelementStart(0, "div", 1);
19357
- i0.ɵɵelementStart(1, "div", 2);
19358
- i0.ɵɵelementStart(2, "h1", 3);
19359
- i0.ɵɵtext(3, "Select the cases you want to unlink from this case");
19360
- i0.ɵɵelementEnd();
19361
- i0.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
19362
- i0.ɵɵelementStart(5, "div", 5);
19363
- i0.ɵɵelementStart(6, "button", 6);
19364
- i0.ɵɵlistener("click", function UnLinkCasesComponent_div_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onNext(); });
19365
- i0.ɵɵtext(7, "Next");
19366
- i0.ɵɵelementEnd();
19367
- i0.ɵɵelementEnd();
19368
- i0.ɵɵelementEnd();
19369
- i0.ɵɵelementEnd();
19370
- } if (rf & 2) {
19371
- const ctx_r0 = i0.ɵɵnextContext();
19372
- i0.ɵɵadvance(4);
19373
- i0.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
19374
- } }
19375
- class UnLinkCasesComponent {
19376
- constructor(caseEdit, fb, casesService, linkedCasesService) {
19377
- this.caseEdit = caseEdit;
19378
- this.fb = fb;
19379
- this.casesService = casesService;
19380
- this.linkedCasesService = linkedCasesService;
19381
- this.linkedCasesStateEmitter = new EventEmitter();
19382
- this.notifyAPIFailure = new EventEmitter(false);
19383
- this.linkedCases = [];
19384
- this.errorMessages = [];
19385
- this.isServerError = false;
19386
- }
19387
- ngOnInit() {
19388
- this.getLinkedCases();
19389
- }
19390
- getLinkedCases() {
19391
- this.caseId = this.linkedCasesService.caseId;
19392
- if (this.linkedCasesService.linkedCases.length > 0) {
19393
- this.linkedCases = this.linkedCasesService.linkedCases;
19394
- this.getAllLinkedCaseInformation();
19395
- }
19396
- else {
19397
- this.casesService.getCaseViewV2(this.caseId).subscribe((caseView) => {
19398
- const linkedCasesTab = caseView.tabs.find(tab => tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID);
19399
- if (linkedCasesTab) {
19400
- const linkedCases = linkedCasesTab.fields[0].value;
19401
- this.linkedCases = linkedCases;
19402
- this.linkedCasesService.linkedCases = linkedCases;
19403
- this.getAllLinkedCaseInformation();
19404
- }
19405
- });
19406
- }
19407
- }
19408
- getAllLinkedCaseInformation() {
19409
- const searchCasesResponse = [];
19410
- this.linkedCases.forEach(linkedCase => {
19411
- searchCasesResponse.push(this.casesService.getCaseViewV2(linkedCase.caseReference));
19412
- });
19413
- if (searchCasesResponse.length) {
19414
- this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
19415
- searchCases.forEach((response) => {
19416
- const linkedCaseFromList = this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id);
19417
- if (linkedCaseFromList) {
19418
- const caseName = this.linkedCasesService.getCaseName(response);
19419
- this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id).caseName = caseName;
19420
- }
19421
- });
19422
- this.initForm();
19423
- this.linkedCasesService.linkedCases = this.linkedCases;
19424
- this.isServerError = false;
19425
- }, err => {
19426
- this.isServerError = true;
19427
- this.notifyAPIFailure.emit(true);
19428
- });
19429
- }
19430
- }
19431
- searchCasesByCaseIds(searchCasesResponse) {
19432
- return forkJoin(searchCasesResponse);
19433
- }
19434
- initForm() {
19435
- this.unlinkCaseForm = this.fb.group({
19436
- linkedCases: this.getLinkedCasesFormArray
19437
- });
19438
- }
19439
- get getLinkedCasesFormArray() {
19440
- const formFieldArray = this.linkedCases.map(val => this.fb.group({
19441
- caseReference: val.caseReference,
19442
- reasons: val.reasons,
19443
- createdDateTime: val.createdDateTime,
19444
- caseType: val.caseType,
19445
- caseState: val.caseState,
19446
- caseService: val.caseService,
19447
- caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
19448
- unlink: val.unlink
19449
- }));
19450
- return this.fb.array(formFieldArray);
19451
- }
19452
- onChange(caseSelected) {
19453
- this.resetErrorMessages();
19454
- const selectedCase = this.linkedCases.find(linkedCase => linkedCase.caseReference === caseSelected.value);
19455
- if (selectedCase) {
19456
- selectedCase.unlink = caseSelected.checked ? true : false;
19457
- }
19458
- }
19459
- onNext() {
19460
- this.resetErrorMessages();
19461
- let navigateToNextPage = true;
19462
- const casesMarkedToUnlink = this.linkedCases.find(linkedCase => linkedCase.unlink && linkedCase.unlink === true);
19463
- if (!casesMarkedToUnlink) {
19464
- this.errorMessages.push({
19465
- title: 'case-selection',
19466
- description: LinkedCasesErrorMessages.UnlinkCaseSelectionError,
19467
- fieldId: `case-reference-${this.linkedCases[0].caseReference}`
19468
- });
19469
- this.unlinkErrorMessage = LinkedCasesErrorMessages.UnlinkCaseSelectionError;
19470
- navigateToNextPage = false;
19471
- }
19472
- const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
19473
- const updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(item => unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1);
19474
- this.caseEdit.form.controls['data'] = new FormGroup({ caseLinks: new FormControl(updatedLinkedCases || []) });
19475
- // Return linked cases state and error messages to the parent
19476
- this.linkedCasesStateEmitter.emit({
19477
- currentLinkedCasesPage: LinkedCasesPages.UNLINK_CASE,
19478
- errorMessages: this.errorMessages,
19479
- navigateToNextPage
19480
- });
19481
- }
19482
- resetErrorMessages() {
19483
- this.errorMessages = [];
19484
- this.unlinkErrorMessage = null;
19485
- }
19486
- }
19487
- UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
19488
- UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
19489
- UnLinkCasesComponent.ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
19490
- 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) {
19491
- i0.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
19492
- } if (rf & 2) {
19493
- i0.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
19494
- } }, directives: [i1.NgIf, i1.NgClass, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgForOf, i2.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
19495
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UnLinkCasesComponent, [{
19496
- type: Component,
19497
- args: [{
19498
- selector: 'ccd-unlink-cases',
19499
- templateUrl: './unlink-cases.component.html'
19500
- }]
19501
- }], function () { return [{ type: CaseEditComponent }, { type: i2.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
19502
- type: Output
19503
- }], notifyAPIFailure: [{
19504
- type: Output
19505
- }] }); })();
19506
-
19507
- function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
19508
- const _r9 = i0.ɵɵgetCurrentView();
19509
- i0.ɵɵelementStart(0, "div", 7);
19510
- i0.ɵɵelementStart(1, "ul", 8);
19511
- i0.ɵɵelementStart(2, "li");
19512
- i0.ɵɵelementStart(3, "a", 9);
19513
- 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); });
19514
- i0.ɵɵtext(4);
19515
- i0.ɵɵelementEnd();
19516
- i0.ɵɵelementEnd();
19517
- i0.ɵɵelementEnd();
19518
- i0.ɵɵelementEnd();
19519
- } if (rf & 2) {
19520
- const errorMessage_r7 = ctx.$implicit;
19521
- i0.ɵɵadvance(4);
19522
- i0.ɵɵtextInterpolate(errorMessage_r7.description);
19523
- } }
19524
- function WriteLinkedCasesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
19525
- i0.ɵɵelementStart(0, "div", 4);
19526
- i0.ɵɵelementStart(1, "h2", 5);
19527
- i0.ɵɵtext(2, " There is a problem ");
19528
- i0.ɵɵelementEnd();
19529
- i0.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
19530
- i0.ɵɵelementEnd();
19531
- } if (rf & 2) {
19532
- const ctx_r0 = i0.ɵɵnextContext();
19533
- i0.ɵɵadvance(3);
19534
- i0.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
19535
- } }
19536
- function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
19537
- const _r11 = i0.ɵɵgetCurrentView();
19538
- i0.ɵɵelementContainerStart(0);
19539
- i0.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
19540
- 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); });
19541
- i0.ɵɵelementEnd();
19542
- i0.ɵɵelementContainerEnd();
19543
- } }
19544
- function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
19545
- const _r13 = i0.ɵɵgetCurrentView();
19546
- i0.ɵɵelementContainerStart(0);
19547
- i0.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
19548
- 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); });
19549
- i0.ɵɵelementEnd();
19550
- i0.ɵɵelementContainerEnd();
19551
- } }
19552
- function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
19553
- const _r15 = i0.ɵɵgetCurrentView();
19554
- i0.ɵɵelementContainerStart(0);
19555
- i0.ɵɵelementStart(1, "ccd-link-cases", 10);
19556
- 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); });
19557
- i0.ɵɵelementEnd();
19558
- i0.ɵɵelementContainerEnd();
19559
- } }
19560
- function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
19561
- const _r17 = i0.ɵɵgetCurrentView();
19562
- i0.ɵɵelementContainerStart(0);
19563
- i0.ɵɵelementStart(1, "ccd-unlink-cases", 10);
19564
- 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); });
19565
- i0.ɵɵelementEnd();
19566
- i0.ɵɵelementContainerEnd();
19567
- } }
19568
- function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
19569
- const _r19 = i0.ɵɵgetCurrentView();
19570
- i0.ɵɵelementContainerStart(0);
19571
- i0.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
19572
- 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); });
19573
- i0.ɵɵelementEnd();
19574
- i0.ɵɵelementContainerEnd();
19575
- } }
19576
- class WriteLinkedCasesComponent extends AbstractFieldWriteComponent {
19577
- constructor(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
19578
- super();
19579
- this.caseEdit = caseEdit;
19580
- this.appConfig = appConfig;
19581
- this.commonDataService = commonDataService;
19582
- this.casesService = casesService;
19583
- this.linkedCasesService = linkedCasesService;
19584
- this.caseEditDataService = caseEditDataService;
19585
- this.onLinkedCasesSelected = new EventEmitter();
19586
- this.isLinkedCasesJourney = false;
19587
- this.linkedCasesPages = LinkedCasesPages;
19588
- this.linkedCasesEventTriggers = LinkedCasesEventTriggers;
19589
- this.linkedCases = [];
19590
- this.errorMessages = [];
19591
- }
19592
- ngOnInit() {
19593
- this.caseEditDataService.clearFormValidationErrors();
19594
- this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
19595
- this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
19596
- this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
19597
- this.linkedCasesService.editMode = false;
19598
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
19599
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
19600
- next: reasons => {
19601
- this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
19602
- }
19603
- });
19604
- this.getLinkedCases();
19605
- this.caseEditDataService.caseEventTriggerName$.subscribe({
19606
- next: name => {
19607
- this.linkedCasesService.isLinkedCasesEventTrigger
19608
- = (name === LinkedCasesEventTriggers.LINK_CASES);
19609
- }
19610
- });
19611
- }
19612
- ngAfterViewInit() {
19613
- let labelField = document.getElementsByClassName('govuk-heading-l');
19614
- if (labelField && labelField.length) {
19615
- labelField[0].replaceWith('');
19616
- }
19617
- labelField = document.getElementsByClassName('heading-h2');
19618
- if (labelField && labelField.length) {
19619
- labelField[0].replaceWith('');
19620
- }
19621
- }
19622
- onLinkedCasesStateEmitted(linkedCasesState) {
19623
- this.errorMessages = [];
19624
- this.caseEditDataService.clearFormValidationErrors();
19625
- if (linkedCasesState.navigateToNextPage) {
19626
- this.linkedCasesPage = this.getNextPage(linkedCasesState);
19627
- this.setContinueButtonValidationErrorMessage();
19628
- this.proceedToNextPage();
19629
- }
19630
- else {
19631
- if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
19632
- linkedCasesState.errorMessages.forEach((errorMessage, index) => {
19633
- this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
19634
- });
19635
- }
19636
- }
19637
- }
19638
- isAtFinalState() {
19639
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
19640
- }
19641
- setContinueButtonValidationErrorMessage() {
19642
- const errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
19643
- ? LinkedCasesErrorMessages.LinkCasesNavigationError
19644
- : LinkedCasesErrorMessages.UnlinkCasesNavigationError;
19645
- const buttonId = this.linkedCasesService.linkedCases.length === 0
19646
- ? 'back-button'
19647
- : 'next-button';
19648
- this.caseEditDataService.setCaseLinkError({
19649
- componentId: buttonId,
19650
- errorMessage
19651
- });
19652
- }
19653
- proceedToNextPage() {
19654
- if (this.isAtFinalPage()) {
19655
- // Continue button event must be allowed in final page
19656
- this.caseEditDataService.clearCaseLinkError();
19657
- // Trigger validation to clear the "notAtFinalPage" error if now at the final state
19658
- this.formGroup.updateValueAndValidity();
19659
- // update form value
19660
- this.onLinkedCasesSelected.emit();
19661
- this.caseEdit.form.controls['data'] = new FormGroup({ caseLinks: new FormControl(this.linkedCasesService.caseFieldValue) });
19662
- }
19663
- }
19664
- isAtFinalPage() {
19665
- return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
19666
- }
19667
- getNextPage(linkedCasesState) {
19668
- if ((this.linkedCasesPage === LinkedCasesPages.BEFORE_YOU_START) ||
19669
- (linkedCasesState.currentLinkedCasesPage === LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
19670
- return this.isLinkedCasesJourney
19671
- ? LinkedCasesPages.LINK_CASE
19672
- : LinkedCasesPages.UNLINK_CASE;
19673
- }
19674
- return LinkedCasesPages.CHECK_YOUR_ANSWERS;
19675
- }
19676
- getLinkedCases() {
19677
- this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
19678
- const caseViewFiltered = caseView.tabs.filter(tab => {
19679
- const linkField = tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
19680
- return linkField;
19681
- });
19682
- if (caseViewFiltered) {
19683
- const caseLinkFieldValue = caseViewFiltered.map(filtered => filtered.fields.length && filtered.fields[0].value);
19684
- this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
19685
- this.linkedCasesService.getAllLinkedCaseInformation();
19686
- }
19687
- // Initialise the first page to display
19688
- this.linkedCasesPage = this.linkedCasesService.isLinkedCasesEventTrigger ||
19689
- (this.linkedCasesService.caseFieldValue && this.linkedCasesService.caseFieldValue.length > 0
19690
- && !this.linkedCasesService.serverLinkedApiError)
19691
- ? LinkedCasesPages.BEFORE_YOU_START
19692
- : LinkedCasesPages.NO_LINKED_CASES;
19693
- // Initialise the error to be displayed when clicked on Continue button
19694
- this.setContinueButtonValidationErrorMessage();
19695
- });
19696
- }
19697
- navigateToErrorElement(elementId) {
19698
- if (elementId) {
19699
- const htmlElement = document.getElementById(elementId);
19700
- if (htmlElement) {
19701
- htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
19702
- htmlElement.focus();
19703
- }
19704
- }
19705
- }
19706
- }
19707
- 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)); };
19708
- 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) {
19709
- i0.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
19710
- i0.ɵɵelementStart(1, "div", 1);
19711
- i0.ɵɵelementStart(2, "div", 2);
19712
- i0.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
19713
- i0.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
19714
- i0.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
19715
- i0.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
19716
- i0.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
19717
- i0.ɵɵelementEnd();
19718
- i0.ɵɵelementEnd();
19719
- } if (rf & 2) {
19720
- i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
19721
- i0.ɵɵadvance(1);
19722
- i0.ɵɵproperty("formGroup", ctx.formGroup);
19723
- i0.ɵɵadvance(1);
19724
- i0.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
19725
- i0.ɵɵadvance(1);
19726
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
19727
- i0.ɵɵadvance(1);
19728
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
19729
- i0.ɵɵadvance(1);
19730
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
19731
- i0.ɵɵadvance(1);
19732
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
19733
- i0.ɵɵadvance(1);
19734
- i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
19735
- } }, encapsulation: 2 });
19736
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
19737
- type: Component,
19738
- args: [{
19739
- selector: 'ccd-write-linked-cases',
19740
- templateUrl: './write-linked-cases.component.html'
19741
- }]
19742
- }], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
19743
- type: Input
19744
- }], caseField: [{
19745
- type: Input
19746
- }], onLinkedCasesSelected: [{
19747
- type: Output
19748
- }], isLinkedCasesJourney: [{
19749
- type: Input
19750
- }], formGroup: [{
19751
- type: Input
19752
- }] }); })();
19753
-
19754
- function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
19755
- i0.ɵɵelementContainer(0);
19756
- } }
19757
- function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) { if (rf & 1) {
19758
- i0.ɵɵelementContainer(0);
19759
- } }
19760
- function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) { if (rf & 1) {
19761
- i0.ɵɵelementContainer(0);
19762
- } }
19763
- function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) { if (rf & 1) {
19764
- i0.ɵɵelementContainer(0);
19765
- } }
19766
- function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
19767
- const _r9 = i0.ɵɵgetCurrentView();
19768
- i0.ɵɵelementStart(0, "div", 8);
19769
- i0.ɵɵelementStart(1, "p", 9);
19770
- i0.ɵɵtext(2);
19771
- i0.ɵɵelementEnd();
19772
- i0.ɵɵelementStart(3, "span", 10);
19773
- i0.ɵɵelementStart(4, "a", 11);
19774
- 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(); });
19775
- i0.ɵɵtext(5, "Reload the Linked cases tab");
19776
- i0.ɵɵelementEnd();
19777
- i0.ɵɵelementEnd();
19778
- i0.ɵɵelementEnd();
19779
- } if (rf & 2) {
19780
- const ctx_r5 = i0.ɵɵnextContext();
19781
- i0.ɵɵadvance(2);
19782
- i0.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
19783
- } }
19784
- function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) { if (rf & 1) {
19785
- const _r11 = i0.ɵɵgetCurrentView();
19786
- i0.ɵɵelementStart(0, "div", 8);
19787
- i0.ɵɵelementStart(1, "p", 9);
19788
- i0.ɵɵtext(2);
19789
- i0.ɵɵelementEnd();
19790
- i0.ɵɵelementStart(3, "span", 10);
19791
- i0.ɵɵelementStart(4, "a", 11);
19792
- 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(); });
19793
- i0.ɵɵtext(5, "Reload the Linked cases tab");
19794
- i0.ɵɵelementEnd();
19795
- i0.ɵɵelementEnd();
19796
- i0.ɵɵelementEnd();
19797
- } if (rf & 2) {
19798
- const ctx_r7 = i0.ɵɵnextContext();
19799
- i0.ɵɵadvance(2);
19800
- i0.ɵɵtextInterpolate(ctx_r7.serverError.message);
19801
- } }
19802
- class ReadLinkedCasesComponent {
19803
- constructor(router, linkedCasesService, appConfig, commonDataService) {
19804
- this.router = router;
19805
- this.linkedCasesService = linkedCasesService;
19806
- this.appConfig = appConfig;
19807
- this.commonDataService = commonDataService;
19808
- this.reasonListLoaded = false;
19809
- this.reload = false;
19810
- this.serverError = null;
19811
- this.serverLinkedApiError = null;
19812
- this.isServerReasonCodeError = false;
19813
- this.isServerJurisdictionError = false;
19814
- this.isServerLinkedFromError = false;
19815
- this.isServerLinkedToError = false;
19816
- }
19817
- ngOnInit() {
19818
- this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
19819
- const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
19820
- this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
19821
- next: reasons => {
19822
- this.reasonListLoaded = true;
19823
- this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
19824
- },
19825
- error: error => {
19826
- this.isServerReasonCodeError = true;
19827
- this.linkedCasesService.isServerReasonCodeError = true;
19828
- }
19829
- });
19830
- this.serverLinkedApiError = {
19831
- id: 'backendError', message: 'Some case information is not available at the moment'
19832
- };
19833
- this.serverError = {
19834
- id: 'backendError', message: 'There has been a system error and your request could not be processed.'
19835
- };
19836
- }
19837
- ngAfterViewInit() {
19838
- this.linkedCasesService.caseFieldValue = this.caseField.value || [];
19839
- let labelField = document.getElementsByClassName('govuk-heading-l');
19840
- if (labelField && labelField.length) {
19841
- labelField[0].replaceWith('');
19842
- }
19843
- labelField = document.getElementsByClassName('heading-h2');
19844
- if (labelField && labelField.length) {
19845
- labelField[0].replaceWith('');
19846
- }
19847
- labelField = document.getElementsByClassName('case-viewer-label');
19848
- if (labelField && labelField.length) {
19849
- labelField[0].replaceWith('');
19850
- }
19851
- }
19852
- reloadCurrentRoute() {
19853
- this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(() => {
19854
- window.location.hash = 'Linked cases';
19855
- });
19856
- }
19857
- getFailureLinkedToNotification(evt) {
19858
- this.isServerLinkedToError = true;
19859
- }
19860
- getFailureLinkedFromNotification(evt) {
19861
- this.isServerLinkedFromError = true;
19862
- }
19863
- }
19864
- ReadLinkedCasesComponent.ɵfac = function ReadLinkedCasesComponent_Factory(t) { return new (t || ReadLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService)); };
19865
- 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) {
19866
- i0.ɵɵelementStart(0, "div");
19867
- i0.ɵɵelementStart(1, "div", 0);
19868
- i0.ɵɵelementStart(2, "h1", 1);
19869
- i0.ɵɵtext(3, "Linked cases");
19870
- i0.ɵɵelementEnd();
19871
- i0.ɵɵelementStart(4, "label", 2);
19872
- i0.ɵɵtext(5, "This case is linked to");
19873
- i0.ɵɵelementEnd();
19874
- i0.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
19875
- i0.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
19876
- i0.ɵɵelementEnd();
19877
- i0.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
19878
- i0.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
19879
- i0.ɵɵelementEnd();
19880
- i0.ɵɵelementStart(9, "div", 5);
19881
- i0.ɵɵelementStart(10, "label", 2);
19882
- i0.ɵɵtext(11, "This case is linked from");
19883
- i0.ɵɵelementEnd();
19884
- i0.ɵɵelement(12, "br");
19885
- i0.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
19886
- i0.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
19887
- i0.ɵɵelementEnd();
19888
- i0.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
19889
- i0.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
19890
- i0.ɵɵelementEnd();
19891
- i0.ɵɵelementEnd();
19892
- i0.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
19893
- i0.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
19894
- } if (rf & 2) {
19895
- const _r4 = i0.ɵɵreference(17);
19896
- const _r6 = i0.ɵɵreference(19);
19897
- i0.ɵɵadvance(6);
19898
- i0.ɵɵproperty("caseField", ctx.caseField);
19899
- i0.ɵɵadvance(1);
19900
- i0.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
19901
- i0.ɵɵadvance(1);
19902
- i0.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
19903
- i0.ɵɵadvance(5);
19904
- i0.ɵɵproperty("caseField", ctx.caseField);
19905
- i0.ɵɵadvance(1);
19906
- i0.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
19907
- i0.ɵɵadvance(1);
19908
- i0.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
19909
- } }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
19910
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
19911
- type: Component,
19912
- args: [{
19913
- selector: 'ccd-read-linked-cases',
19914
- templateUrl: './read-linked-cases.component.html',
19915
- styleUrls: ['./read-linked-cases.component.scss']
19916
- }]
19917
- }], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
19918
- type: Input
19919
- }] }); })();
19920
-
19921
- class LinkCaseReason {
19922
- }
19923
- class CCDCaseLinkType {
19924
- }
19925
- class CaseLink {
19926
- }
19927
- class LinkReason {
19928
- }
19929
- class LinkedCasesResponse {
19930
- }
19931
- class CaseLinkResponse {
19932
- }
19933
- class LinkDetails {
19934
- }
19935
- class Terms {
19936
- }
19937
- class ESQueryType {
19938
- }
19939
-
19940
- class CollectionCreateCheckerService {
19941
- setDisplayContextForChildren(caseField, profile) {
19942
- const children = this.getCaseFieldChildren(caseField);
19943
- if (children && children.length > 0) {
19944
- children.forEach(child => {
19945
- if (!!profile.user.idam.roles.find(role => this.hasCreateAccess(child, role))) {
19946
- child.display_context = caseField.display_context;
19947
- }
19948
- if (this.isCollection(child) || this.isComplex(child)) {
19949
- this.setDisplayContextForChildren(child, profile);
19950
- }
19951
- });
19952
- }
19953
- }
19954
- getCaseFieldChildren(caseField) {
19955
- let childrenCaseFields = [];
19956
- if (this.isCollection(caseField)) {
19957
- childrenCaseFields = caseField.field_type.collection_field_type.complex_fields || [];
19958
- }
19959
- else if (this.isComplex(caseField)) {
19960
- childrenCaseFields = caseField.field_type.complex_fields || [];
19961
- }
19962
- return childrenCaseFields;
19963
- }
19964
- isComplex(case_field) {
19965
- return case_field.field_type.type === 'Complex';
19966
- }
19967
- isCollection(case_field) {
19968
- return case_field.field_type.type === 'Collection';
19969
- }
19970
- hasCreateAccess(caseField, role) {
19971
- return !!caseField.acls.find(acl => acl.role === role && acl.create === true);
19972
- }
19973
- }
19974
- CollectionCreateCheckerService.ɵfac = function CollectionCreateCheckerService_Factory(t) { return new (t || CollectionCreateCheckerService)(); };
19975
- CollectionCreateCheckerService.ɵprov = i0.ɵɵdefineInjectable({ token: CollectionCreateCheckerService, factory: CollectionCreateCheckerService.ɵfac });
19976
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionCreateCheckerService, [{
19977
- type: Injectable
19978
- }], null, null); })();
19979
-
19980
- function ReadComplexFieldRawComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
19981
- i0.ɵɵelementContainerStart(0);
19982
- i0.ɵɵelementStart(1, "dt", 2);
19983
- i0.ɵɵelementStart(2, "span", 3);
19984
- i0.ɵɵtext(3);
19985
- i0.ɵɵelementEnd();
19986
- i0.ɵɵelementEnd();
19987
- i0.ɵɵelementStart(4, "dd", 2);
19988
- i0.ɵɵelement(5, "ccd-field-read", 4);
19989
- i0.ɵɵelementEnd();
19990
- i0.ɵɵelementContainerEnd();
17679
+ i0.ɵɵelementContainerEnd();
19991
17680
  } if (rf & 2) {
19992
17681
  const field_r1 = ctx.$implicit;
19993
17682
  const ctx_r0 = i0.ɵɵnextContext();
@@ -21705,7 +19394,6 @@ const PALETTE_COMPONENTS = [
21705
19394
  ReadComplexFieldTableComponent,
21706
19395
  ReadComplexFieldCollectionTableComponent,
21707
19396
  ReadCaseFlagFieldComponent,
21708
- ReadLinkedCasesComponent,
21709
19397
  // Write
21710
19398
  WriteJudicialUserFieldComponent,
21711
19399
  WriteAddressFieldComponent,
@@ -21741,15 +19429,7 @@ const PALETTE_COMPONENTS = [
21741
19429
  CaseFileViewFolderSortComponent,
21742
19430
  CaseFileViewOverlayMenuComponent,
21743
19431
  CaseFileViewFolderDocumentActionsComponent,
21744
- CaseFileViewFolderSelectorComponent,
21745
- LinkedCasesToTableComponent,
21746
- LinkedCasesFromTableComponent,
21747
- BeforeYouStartComponent,
21748
- LinkCasesComponent,
21749
- CheckYourAnswersComponent,
21750
- WriteLinkedCasesComponent,
21751
- UnLinkCasesComponent,
21752
- NoLinkedCasesComponent
19432
+ CaseFileViewFolderSelectorComponent
21753
19433
  ];
21754
19434
  class PaletteModule {
21755
19435
  }
@@ -21765,7 +19445,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
21765
19445
  FileUploadStateService,
21766
19446
  FileUploadProgressGuard,
21767
19447
  WindowService,
21768
- LinkedCasesService,
21769
19448
  CommonDataService,
21770
19449
  JurisdictionService,
21771
19450
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -21860,7 +19539,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
21860
19539
  ReadComplexFieldTableComponent,
21861
19540
  ReadComplexFieldCollectionTableComponent,
21862
19541
  ReadCaseFlagFieldComponent,
21863
- ReadLinkedCasesComponent,
21864
19542
  // Write
21865
19543
  WriteJudicialUserFieldComponent,
21866
19544
  WriteAddressFieldComponent,
@@ -21896,15 +19574,7 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
21896
19574
  CaseFileViewFolderSortComponent,
21897
19575
  CaseFileViewOverlayMenuComponent,
21898
19576
  CaseFileViewFolderDocumentActionsComponent,
21899
- CaseFileViewFolderSelectorComponent,
21900
- LinkedCasesToTableComponent,
21901
- LinkedCasesFromTableComponent,
21902
- BeforeYouStartComponent,
21903
- LinkCasesComponent,
21904
- CheckYourAnswersComponent,
21905
- WriteLinkedCasesComponent,
21906
- UnLinkCasesComponent,
21907
- NoLinkedCasesComponent], imports: [CommonModule,
19577
+ CaseFileViewFolderSelectorComponent], imports: [CommonModule,
21908
19578
  RouterModule,
21909
19579
  FormsModule,
21910
19580
  ReactiveFormsModule,
@@ -21978,7 +19648,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
21978
19648
  ReadComplexFieldTableComponent,
21979
19649
  ReadComplexFieldCollectionTableComponent,
21980
19650
  ReadCaseFlagFieldComponent,
21981
- ReadLinkedCasesComponent,
21982
19651
  // Write
21983
19652
  WriteJudicialUserFieldComponent,
21984
19653
  WriteAddressFieldComponent,
@@ -22014,15 +19683,7 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22014
19683
  CaseFileViewFolderSortComponent,
22015
19684
  CaseFileViewOverlayMenuComponent,
22016
19685
  CaseFileViewFolderDocumentActionsComponent,
22017
- CaseFileViewFolderSelectorComponent,
22018
- LinkedCasesToTableComponent,
22019
- LinkedCasesFromTableComponent,
22020
- BeforeYouStartComponent,
22021
- LinkCasesComponent,
22022
- CheckYourAnswersComponent,
22023
- WriteLinkedCasesComponent,
22024
- UnLinkCasesComponent,
22025
- NoLinkedCasesComponent] }); })();
19686
+ CaseFileViewFolderSelectorComponent] }); })();
22026
19687
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteModule, [{
22027
19688
  type: NgModule,
22028
19689
  args: [{
@@ -22092,7 +19753,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
22092
19753
  FileUploadStateService,
22093
19754
  FileUploadProgressGuard,
22094
19755
  WindowService,
22095
- LinkedCasesService,
22096
19756
  CommonDataService,
22097
19757
  JurisdictionService,
22098
19758
  { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
@@ -22110,7 +19770,6 @@ i0.ɵɵsetComponentScope(ReadOrganisationFieldComponent, [i1.NgSwitch, i1.NgSwit
22110
19770
  i0.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i1.NgForOf, ReadOrderSummaryRowComponent,
22111
19771
  ReadMoneyGbpFieldComponent], []);
22112
19772
  i0.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], []);
22113
- i0.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i1.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
22114
19773
  i0.ɵɵsetComponentScope(ReadComplexFieldComponent, [i1.NgSwitch, i1.NgSwitchCase, ReadComplexFieldRawComponent,
22115
19774
  ReadComplexFieldCollectionTableComponent, i1.NgSwitchDefault, ReadComplexFieldTableComponent], []);
22116
19775
  i0.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i1.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe]);
@@ -22118,7 +19777,6 @@ i0.ɵɵsetComponentScope(ReadComplexFieldTableComponent, [i1.NgForOf, i1.NgIf, F
22118
19777
  i0.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i1.NgForOf, i1.NgIf, FieldReadComponent,
22119
19778
  ReadCaseLinkFieldComponent], [ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i1.KeyValuePipe, IsCompoundPipe]);
22120
19779
  i0.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i1.NgSwitch, i1.NgSwitchCase, CaseFlagSummaryListComponent, i1.NgSwitchDefault, i1.NgForOf, i1.NgIf, CaseFlagTableComponent], []);
22121
- i0.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i1.NgIf, LinkedCasesFromTableComponent], []);
22122
19780
  i0.ɵɵsetComponentScope(WriteAddressFieldComponent, [i1.NgIf, i1.NgClass, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i2.SelectControlValueAccessor, i1.NgForOf, i2.NgSelectOption, i2.ɵangular_packages_forms_forms_z, WriteComplexFieldComponent, i2.NgControlStatusGroup, i2.FormGroupDirective], [FieldLabelPipe]);
22123
19781
  i0.ɵɵsetComponentScope(WriteComplexFieldComponent, [i1.NgIf, i1.NgForOf, i1.NgSwitch, i1.NgSwitchCase, FieldReadComponent, LabelSubstitutorDirective, i2.NgControlStatusGroup, i2.FormGroupDirective, FieldWriteComponent], [FieldLabelPipe, IsReadOnlyPipe]);
22124
19782
  i0.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i1.NgClass, i1.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe]);
@@ -22133,21 +19791,11 @@ i0.ɵɵsetComponentScope(WriteOrganisationFieldComponent, [i2.NgControlStatusGro
22133
19791
  WriteOrganisationComplexFieldComponent], [i1.AsyncPipe]);
22134
19792
  i0.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
22135
19793
  i0.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i1.NgIf, DatetimePickerComponent, i2.NgControlStatusGroup, i2.FormGroupDirective, WriteDateFieldComponent], []);
22136
- i0.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective, WriteLinkedCasesComponent, i2.NgControlStatusGroup, i2.FormGroupDirective], [FieldLabelPipe]);
22137
19794
  i0.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1.NgIf, i1.NgForOf, FieldWriteComponent, i2.NgControlStatusGroup, i2.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
22138
19795
  i0.ɵɵsetComponentScope(
22139
19796
  // ComponentLauncher web components
22140
- CaseFileViewFieldComponent, [i1.NgIf, CaseFileViewFolderComponent, i12.ɵcs], []);
22141
- i0.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1.NgIf, CaseFileViewFolderComponent, i12.ɵcs], []);
22142
- i0.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1.NgIf, i1.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22143
- i0.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1.NgIf, i1.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22144
- i0.ɵɵsetComponentScope(LinkCasesComponent, [i1.NgIf, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgClass, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlName, i2.FormArrayName, i1.NgForOf, i2.FormGroupName, i2.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22145
- i0.ɵɵsetComponentScope(CheckYourAnswersComponent, [i1.NgIf, i1.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
22146
- i0.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i1.NgIf, i1.NgForOf, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgSwitch, i1.NgSwitchCase, BeforeYouStartComponent,
22147
- NoLinkedCasesComponent,
22148
- LinkCasesComponent,
22149
- UnLinkCasesComponent,
22150
- CheckYourAnswersComponent], []);
19797
+ CaseFileViewFieldComponent, [i1.NgIf, CaseFileViewFolderComponent, i11.ɵcs], []);
19798
+ i0.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1.NgIf, CaseFileViewFolderComponent, i11.ɵcs], []);
22151
19799
 
22152
19800
  class Confirmation {
22153
19801
  constructor(caseId, status, header, body) {
@@ -25404,7 +23052,7 @@ class CaseResolver {
25404
23052
  }
25405
23053
  else {
25406
23054
  return this.caseNotifier.fetchAndRefresh(cid)
25407
- .pipe(catchError(error => this.checkAuthorizationError(error, cid)))
23055
+ .pipe(catchError(error => this.checkAuthorizationError(error)))
25408
23056
  .toPromise();
25409
23057
  }
25410
23058
  }
@@ -25416,24 +23064,20 @@ class CaseResolver {
25416
23064
  this.caseNotifier.cachedCaseView = plainToClassFromExist(new CaseView(), caseView);
25417
23065
  this.caseNotifier.announceCase(this.caseNotifier.cachedCaseView);
25418
23066
  return this.caseNotifier.cachedCaseView;
25419
- }), catchError(error => this.checkAuthorizationError(error, cid))).toPromise();
23067
+ }), catchError(error => this.checkAuthorizationError(error))).toPromise();
25420
23068
  }
25421
- checkAuthorizationError(error, caseReference) {
23069
+ checkAuthorizationError(error) {
25422
23070
  // TODO Should be logged to remote logging infrastructure
25423
23071
  if (error.status === 400) {
25424
23072
  this.router.navigate(['/search/noresults']);
25425
23073
  return of(null);
25426
23074
  }
23075
+ console.error(error);
25427
23076
  if (CaseResolver.EVENT_REGEX.test(this.previousUrl) && error.status === 404) {
25428
23077
  this.router.navigate(['/list/case']);
25429
23078
  return of(null);
25430
23079
  }
25431
- // Error 403, navigate to restricted case access page
25432
- if (error.status === 403) {
25433
- this.router.navigate([`/cases/restricted-case-access/${caseReference}`]);
25434
- return of(null);
25435
- }
25436
- if (error.status !== 401) {
23080
+ if (error.status !== 401 && error.status !== 403) {
25437
23081
  this.router.navigate(['/error']);
25438
23082
  }
25439
23083
  this.goToDefaultPage();
@@ -30822,5 +28466,5 @@ class TestRouteSnapshotBuilder {
30822
28466
  * Generated bundle index. Do not edit.
30823
28467
  */
30824
28468
 
30825
- 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 };
28469
+ 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 };
30826
28470
  //# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map