@hmcts/ccd-case-ui-toolkit 7.1.4-query-management → 7.1.6-query-management

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 (62) hide show
  1. package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +60 -22
  2. package/esm2022/lib/shared/components/case-editor/case-editor.module.mjs +1 -1
  3. package/esm2022/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.mjs +40 -28
  4. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.mjs +18 -17
  5. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +27 -37
  6. package/esm2022/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.mjs +1 -1
  7. package/esm2022/lib/shared/components/case-editor/domain/event-completion-task-states.model.mjs +6 -0
  8. package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +12 -6
  9. package/esm2022/lib/shared/components/case-editor/services/work-allocation.service.mjs +1 -1
  10. package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +40 -7
  11. package/esm2022/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.mjs +11 -4
  12. package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +15 -1
  13. package/esm2022/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.mjs +14 -13
  14. package/esm2022/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.mjs +12 -12
  15. package/esm2022/lib/shared/components/palette/palette.module.mjs +6 -2
  16. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +225 -155
  17. package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +73 -72
  18. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-date-input/query-write-date-input.component.mjs +4 -4
  19. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +2 -2
  20. package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +55 -28
  21. package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +5 -8
  22. package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
  23. package/esm2022/lib/shared/domain/work-allocation/task-response.model.mjs +1 -1
  24. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +664 -461
  25. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  26. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +5 -2
  27. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  28. package/lib/shared/components/case-editor/case-editor.module.d.ts.map +1 -1
  29. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts +5 -3
  30. package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
  31. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.d.ts +7 -5
  32. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.d.ts.map +1 -1
  33. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +7 -11
  34. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
  35. package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts +1 -1
  36. package/lib/shared/components/case-editor/domain/event-completion-state-machine-context.model.d.ts.map +1 -1
  37. package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts +5 -0
  38. package/lib/shared/components/case-editor/domain/event-completion-task-states.model.d.ts.map +1 -0
  39. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
  40. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts +2 -2
  41. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  42. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +3 -1
  43. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  44. package/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.d.ts +3 -1
  45. package/lib/shared/components/event-start/resolvers/event-tasks-resolver.service.d.ts.map +1 -1
  46. package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
  47. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
  48. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +10 -8
  49. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  50. package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts.map +1 -1
  51. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts +4 -1
  52. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
  53. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
  54. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
  55. package/lib/shared/domain/work-allocation/Task.d.ts +10 -1
  56. package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
  57. package/lib/shared/domain/work-allocation/task-response.model.d.ts +1 -1
  58. package/lib/shared/domain/work-allocation/task-response.model.d.ts.map +1 -1
  59. package/package.json +1 -1
  60. package/esm2022/lib/shared/components/case-editor/domain/event-completion-portal-types.model.mjs +0 -6
  61. package/lib/shared/components/case-editor/domain/event-completion-portal-types.model.d.ts +0 -5
  62. package/lib/shared/components/case-editor/domain/event-completion-portal-types.model.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, Injector, ViewChild, HostListener, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, ViewChild, HostListener, Injector, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
3
  import * as i5 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, AsyncPipe, CurrencyPipe, formatDate } from '@angular/common';
5
5
  import * as i1 from 'rpx-xui-translation';
@@ -24,7 +24,6 @@ import { StateMachine } from '@edium/fsm';
24
24
  import * as i1$3 from '@angular/material/legacy-dialog';
25
25
  import { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogModule } from '@angular/material/legacy-dialog';
26
26
  import { MatDialogConfig } from '@angular/material/dialog';
27
- import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
28
27
  import * as i2 from '@nicky-lenaers/ngx-scroll-to';
29
28
  import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
30
29
  import * as marked from 'marked';
@@ -36,11 +35,11 @@ import * as i6 from '@angular/material/legacy-core';
36
35
  import { MAT_LEGACY_DATE_LOCALE } from '@angular/material/legacy-core';
37
36
  import * as i3 from '@hmcts/ccpay-web-component';
38
37
  import { PaymentLibModule } from '@hmcts/ccpay-web-component';
38
+ import { v4 } from 'uuid';
39
39
  import * as i2$2 from '@angular/cdk/overlay';
40
40
  import { OverlayModule } from '@angular/cdk/overlay';
41
41
  import * as i7 from '@angular/cdk/tree';
42
42
  import { NestedTreeControl, CdkTreeModule } from '@angular/cdk/tree';
43
- import moment$1 from 'moment/moment';
44
43
  import * as i4$1 from '@angular-material-components/datetime-picker';
45
44
  import { NGX_MAT_DATE_FORMATS, NgxMatDateAdapter, NgxMatDatetimePickerModule, NgxMatTimepickerModule, NgxMatNativeDateModule } from '@angular-material-components/datetime-picker';
46
45
  import { NgxMatMomentAdapter, NGX_MAT_MOMENT_DATE_ADAPTER_OPTIONS } from '@angular-material-components/moment-adapter';
@@ -52,6 +51,7 @@ import * as i15 from '@angular/material/legacy-input';
52
51
  import { MatLegacyInputModule } from '@angular/material/legacy-input';
53
52
  import * as i14 from '@hmcts/media-viewer';
54
53
  import { MediaViewerModule } from '@hmcts/media-viewer';
54
+ import { PortalModule } from '@angular/cdk/portal';
55
55
  import * as i2$3 from 'ngx-pagination';
56
56
  import { NgxPaginationModule, PaginatePipe } from 'ngx-pagination';
57
57
  import * as i10 from '@angular/material/legacy-tabs';
@@ -59,7 +59,7 @@ import { MatLegacyTabsModule } from '@angular/material/legacy-tabs';
59
59
  import { decompressFromUTF16, compressToUTF16 } from 'lz-string';
60
60
 
61
61
  const _c0$14 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
62
- const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
62
+ const _c1$v = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
63
63
  function FooterComponent_div_2_Template(rf, ctx) { if (rf & 1) {
64
64
  i0.ɵɵelementStart(0, "div", 3)(1, "div", 4);
65
65
  i0.ɵɵprojection(2);
@@ -135,7 +135,7 @@ class FooterComponent {
135
135
  phone;
136
136
  workhours;
137
137
  static ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
138
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, 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) {
138
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$v, 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) {
139
139
  i0.ɵɵprojectionDef(_c0$14);
140
140
  i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
141
141
  i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2)(3, FooterComponent_div_3_Template, 20, 16, "div", 2);
@@ -164,7 +164,7 @@ class FooterComponent {
164
164
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FooterComponent, { className: "FooterComponent", filePath: "lib/components/footer/footer.component.ts", lineNumber: 8 }); })();
165
165
 
166
166
  const _c0$13 = [[["", "headerNavigation", ""]]];
167
- const _c1$t = ["[headerNavigation]"];
167
+ const _c1$u = ["[headerNavigation]"];
168
168
  function HeaderBarComponent_div_3_Template(rf, ctx) { if (rf & 1) {
169
169
  i0.ɵɵelementStart(0, "div")(1, "a", 12);
170
170
  i0.ɵɵelement(2, "img", 13);
@@ -206,7 +206,7 @@ class HeaderBarComponent {
206
206
  this.signOutRequest.emit();
207
207
  }
208
208
  static ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
209
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
209
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$u, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
210
210
  i0.ɵɵprojectionDef(_c0$13);
211
211
  i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
212
212
  i0.ɵɵtemplate(3, HeaderBarComponent_div_3_Template, 5, 3, "div", 3)(4, HeaderBarComponent_div_4_Template, 5, 3, "div", 4);
@@ -258,11 +258,11 @@ class HeaderBarComponent {
258
258
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HeaderBarComponent, { className: "HeaderBarComponent", filePath: "lib/components/header/header-bar/header-bar.component.ts", lineNumber: 8 }); })();
259
259
 
260
260
  const _c0$12 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
261
- const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
261
+ const _c1$t = ["[leftNavLinks]", "[rightNavLinks]"];
262
262
  class NavigationComponent {
263
263
  isSolicitor;
264
264
  static ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
265
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
265
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$t, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
266
266
  i0.ɵɵprojectionDef(_c0$12);
267
267
  i0.ɵɵelementStart(0, "div")(1, "nav", 0);
268
268
  i0.ɵɵprojection(2);
@@ -383,10 +383,10 @@ class HeadersModule {
383
383
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
384
384
 
385
385
  const _c0$11 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
386
- const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
386
+ const _c1$s = ["[topBody]", "[leftBody]", "[rightBody]"];
387
387
  class BodyComponent {
388
388
  static ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
389
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
389
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$s, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
390
390
  i0.ɵɵprojectionDef(_c0$11);
391
391
  i0.ɵɵelementStart(0, "div", 0);
392
392
  i0.ɵɵprojection(1);
@@ -1001,7 +1001,7 @@ class NotificationBannerComponent {
1001
1001
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NotificationBannerComponent, { className: "NotificationBannerComponent", filePath: "lib/components/banners/notification-banner/notification-banner.component.ts", lineNumber: 10 }); })();
1002
1002
 
1003
1003
  const _c0$_ = ["*"];
1004
- const _c1$q = a0 => ({ "js-hidden": a0 });
1004
+ const _c1$r = a0 => ({ "js-hidden": a0 });
1005
1005
  class TabComponent {
1006
1006
  id;
1007
1007
  title;
@@ -1013,7 +1013,7 @@ class TabComponent {
1013
1013
  i0.ɵɵprojection(1);
1014
1014
  i0.ɵɵelementEnd();
1015
1015
  } if (rf & 2) {
1016
- i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c1$q, !ctx.selected));
1016
+ i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c1$r, !ctx.selected));
1017
1017
  i0.ɵɵattribute("aria-hidden", !ctx.selected);
1018
1018
  } }, dependencies: [i5.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:0px;border-color:#bfc1c3;padding-bottom:11px;margin-bottom:0;color:#0b0c0c}}"] });
1019
1019
  }
@@ -1030,7 +1030,7 @@ class TabComponent {
1030
1030
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TabComponent, { className: "TabComponent", filePath: "lib/components/tabs/tab.component.ts", lineNumber: 10 }); })();
1031
1031
 
1032
1032
  const _c0$Z = ["tab"];
1033
- const _c1$p = ["*"];
1033
+ const _c1$q = ["*"];
1034
1034
  const _c2$4 = () => ["."];
1035
1035
  const _c3 = a0 => ({ "tabs-toggle-selected": a0 });
1036
1036
  function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
@@ -1080,7 +1080,7 @@ class TabsComponent {
1080
1080
  } if (rf & 2) {
1081
1081
  let _t;
1082
1082
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabs = _t);
1083
- } }, ngContentSelectors: _c1$p, decls: 5, vars: 1, consts: [["tab", ""], [1, "tabs"], ["role", "list", 1, "tabs-list"], ["class", "tabs-list-item", 4, "ngFor", "ngForOf"], [1, "tabs-content"], [1, "tabs-list-item"], ["role", "tab", "tabindex", "0", 1, "tabs-toggle", 3, "click", "routerLink", "fragment", "ngClass"]], template: function TabsComponent_Template(rf, ctx) { if (rf & 1) {
1083
+ } }, ngContentSelectors: _c1$q, decls: 5, vars: 1, consts: [["tab", ""], [1, "tabs"], ["role", "list", 1, "tabs-list"], ["class", "tabs-list-item", 4, "ngFor", "ngForOf"], [1, "tabs-content"], [1, "tabs-list-item"], ["role", "tab", "tabindex", "0", 1, "tabs-toggle", 3, "click", "routerLink", "fragment", "ngClass"]], template: function TabsComponent_Template(rf, ctx) { if (rf & 1) {
1084
1084
  i0.ɵɵprojectionDef();
1085
1085
  i0.ɵɵelementStart(0, "div", 1)(1, "ul", 2);
1086
1086
  i0.ɵɵtemplate(2, TabsComponent_li_2_Template, 5, 11, "li", 3);
@@ -8712,11 +8712,11 @@ var TaskState;
8712
8712
  TaskState["PendingReConfiguration"] = "PENDING_RECONFIGURATION";
8713
8713
  })(TaskState || (TaskState = {}));
8714
8714
 
8715
- var EventCompletionPortalTypes;
8716
- (function (EventCompletionPortalTypes) {
8717
- EventCompletionPortalTypes[EventCompletionPortalTypes["TaskCancelled"] = 0] = "TaskCancelled";
8718
- EventCompletionPortalTypes[EventCompletionPortalTypes["TaskReassigned"] = 1] = "TaskReassigned";
8719
- })(EventCompletionPortalTypes || (EventCompletionPortalTypes = {}));
8715
+ var EventCompletionTaskStates;
8716
+ (function (EventCompletionTaskStates) {
8717
+ EventCompletionTaskStates[EventCompletionTaskStates["TaskCancelled"] = 0] = "TaskCancelled";
8718
+ EventCompletionTaskStates[EventCompletionTaskStates["TaskReassigned"] = 1] = "TaskReassigned";
8719
+ })(EventCompletionTaskStates || (EventCompletionTaskStates = {}));
8720
8720
 
8721
8721
  const EVENT_COMPLETION_STATE_MACHINE = 'EVENT COMPLETION STATE MACHINE';
8722
8722
  class EventCompletionStateMachineService {
@@ -8755,7 +8755,8 @@ class EventCompletionStateMachineService {
8755
8755
  this.addTransitionsForStateTaskUnassigned();
8756
8756
  }
8757
8757
  entryActionForStateCheckTasksCanBeCompleted(state, context) {
8758
- context.workAllocationService.getTask(context?.task?.id).subscribe(taskResponse => {
8758
+ const assignNeeded = context.sessionStorageService.getItem('assignNeeded');
8759
+ context.workAllocationService.getTask(context.task.id).subscribe(taskResponse => {
8759
8760
  if (taskResponse && taskResponse.task && taskResponse.task.task_state) {
8760
8761
  switch (taskResponse.task.task_state.toUpperCase()) {
8761
8762
  case TaskState.Unassigned:
@@ -8774,6 +8775,11 @@ class EventCompletionStateMachineService {
8774
8775
  // Task still assigned to current user, complete event and task
8775
8776
  state.trigger(EventCompletionStates.CompleteEventAndTask);
8776
8777
  }
8778
+ else if (assignNeeded === 'true - override') {
8779
+ // this will treat task as unassigned instead of reassigned to complete after user confirmation
8780
+ // assignNeeded will also be immediately overwritten to true
8781
+ state.trigger(EventCompletionStates.TaskUnassigned);
8782
+ }
8777
8783
  else {
8778
8784
  // Task has been reassigned to another user, display error message
8779
8785
  context.reassignedTask = taskResponse.task;
@@ -8795,7 +8801,7 @@ class EventCompletionStateMachineService {
8795
8801
  // Trigger final state to complete processing of state machine
8796
8802
  state.trigger(EventCompletionStates.Final);
8797
8803
  // Load case event completion task cancelled component
8798
- context.component.showPortal(EventCompletionPortalTypes.TaskCancelled);
8804
+ context.component.setTaskState(EventCompletionTaskStates.TaskCancelled);
8799
8805
  }
8800
8806
  entryActionForStateCompleteEventAndTask(state, context) {
8801
8807
  // Trigger final state to complete processing of state machine
@@ -8816,7 +8822,7 @@ class EventCompletionStateMachineService {
8816
8822
  // Trigger final state to complete processing of state machine
8817
8823
  state.trigger(EventCompletionStates.Final);
8818
8824
  // Load case event completion task reassigned component
8819
- context.component.showPortal(EventCompletionPortalTypes.TaskReassigned);
8825
+ context.component.setTaskState(EventCompletionTaskStates.TaskReassigned);
8820
8826
  }
8821
8827
  entryActionForStateTaskUnassigned(state, context) {
8822
8828
  // Trigger final state to complete processing of state machine
@@ -9381,15 +9387,22 @@ class CaseEditComponent {
9381
9387
  const clientContextStr = this.sessionStorageService.getItem('clientContext');
9382
9388
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9383
9389
  const taskInSessionStorage = userTask ? userTask.task_data : null;
9384
- let taskEventInSessionStorage;
9385
- const taskStr = this.sessionStorageService.getItem('taskToComplete');
9386
- const taskEventStr = this.sessionStorageService.getItem('taskEvent');
9387
- if (taskEventStr) {
9388
- taskEventInSessionStorage = JSON.parse(taskEventStr);
9390
+ let taskEventCompletionInfo;
9391
+ let userInfo;
9392
+ const taskEventCompletionStr = this.sessionStorageService.getItem('taskEventCompletionInfo');
9393
+ const userInfoStr = this.sessionStorageService.getItem('userDetails');
9394
+ const assignNeeded = this.sessionStorageService.getItem('assignNeeded');
9395
+ if (taskEventCompletionStr) {
9396
+ taskEventCompletionInfo = JSON.parse(taskEventCompletionStr);
9397
+ }
9398
+ if (userInfoStr) {
9399
+ userInfo = JSON.parse(userInfoStr);
9389
9400
  }
9390
9401
  const eventId = this.getEventId(form);
9391
9402
  const caseId = this.getCaseId(caseDetails);
9392
- if (this.taskExistsForThisEventAndCase(taskInSessionStorage, taskEventInSessionStorage, eventId, caseId)) {
9403
+ const userId = userInfo.id ? userInfo.id : userInfo.uid;
9404
+ const eventDetails = { eventId, caseId, userId, assignNeeded };
9405
+ if (this.taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails)) {
9393
9406
  this.abstractConfig.logMessage(`task exist for this event for caseId and eventId as ${caseId} ${eventId}`);
9394
9407
  // Show event completion component to perform event completion checks
9395
9408
  this.eventCompletionParams = ({
@@ -9397,9 +9410,16 @@ class CaseEditComponent {
9397
9410
  eventId,
9398
9411
  task: taskInSessionStorage
9399
9412
  });
9400
- // add taskEvent to link current event with task id
9401
- const taskEvent = { eventId, taskId: taskInSessionStorage.id };
9402
- this.sessionStorageService.setItem('taskEvent', JSON.stringify(taskEvent));
9413
+ // add taskEventCompletionInfo again to ensure link current event with task id
9414
+ // note: previous usage was created here so this is to ensure correct functionality continues
9415
+ const taskEventCompletionInfo = {
9416
+ caseId,
9417
+ eventId,
9418
+ userId,
9419
+ taskId: taskInSessionStorage.id,
9420
+ createdTimestamp: Date.now()
9421
+ };
9422
+ this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
9403
9423
  this.isEventCompletionChecksRequired = true;
9404
9424
  }
9405
9425
  else {
@@ -9564,9 +9584,9 @@ class CaseEditComponent {
9564
9584
  return this.postCompleteTaskIfRequired();
9565
9585
  }), finalize(() => {
9566
9586
  this.loadingService.unregister(loadingSpinnerToken);
9567
- // on event completion ensure the previous event taskToComplete/taskEvent removed
9568
- this.sessionStorageService.removeItem('taskToComplete');
9569
- this.sessionStorageService.removeItem('taskEvent');
9587
+ // on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
9588
+ this.sessionStorageService.removeItem('clientContext');
9589
+ this.sessionStorageService.removeItem('taskEventCompletionInfo');
9570
9590
  this.isSubmitting = false;
9571
9591
  }))
9572
9592
  .subscribe(() => {
@@ -9627,22 +9647,32 @@ class CaseEditComponent {
9627
9647
  return null;
9628
9648
  }
9629
9649
  }
9630
- // checks whether current taskToComplete relevant for the event
9631
- taskExistsForThisEventAndCase(taskInSessionStorage, taskEvent, eventId, caseId) {
9632
- if (!taskInSessionStorage || taskInSessionStorage.case_id !== caseId) {
9650
+ // checks whether current clientContext relevant for the event
9651
+ taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails) {
9652
+ if (!taskInSessionStorage || taskInSessionStorage.case_id !== eventDetails.caseId) {
9633
9653
  return false;
9634
9654
  }
9635
- if (!taskEvent) {
9655
+ if (!taskEventCompletionInfo) {
9636
9656
  // if no task event present then there is no task to complete from previous event present
9637
9657
  return true;
9638
9658
  }
9639
9659
  else {
9640
- if (taskEvent.taskId === taskInSessionStorage.id && taskEvent.eventId !== eventId) {
9660
+ if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
9661
+ return true;
9662
+ }
9663
+ else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
9664
+ this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
9665
+ || this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
9641
9666
  // if the session storage not related to event, ignore it and remove
9642
- this.sessionStorageService.removeItem('taskToComplete');
9643
- this.sessionStorageService.removeItem('taskEvent');
9667
+ this.sessionStorageService.removeItem('clientContext');
9668
+ this.sessionStorageService.removeItem('taskEventCompletionInfo');
9644
9669
  return false;
9645
9670
  }
9671
+ if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
9672
+ // if the user does not match task assignee, assign is now needed
9673
+ // data cannot be deleted and ignored as it matches understanding
9674
+ this.sessionStorageService.setItem('assignNeeded', 'true');
9675
+ }
9646
9676
  return true;
9647
9677
  }
9648
9678
  }
@@ -9663,6 +9693,20 @@ class CaseEditComponent {
9663
9693
  hasCallbackFailed(response) {
9664
9694
  return response['callback_response_status'] !== 'CALLBACK_COMPLETED';
9665
9695
  }
9696
+ eventMoreThanDayAgo(timestamp) {
9697
+ if ((new Date().getTime() - timestamp) > (24 * 60 * 60 * 1000)) {
9698
+ return true;
9699
+ }
9700
+ return false;
9701
+ }
9702
+ eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails) {
9703
+ if (taskEventCompletionInfo.eventId !== eventDetails.eventId
9704
+ || taskEventCompletionInfo.caseId !== eventDetails.caseId
9705
+ || taskEventCompletionInfo.userId !== eventDetails.userId) {
9706
+ return true;
9707
+ }
9708
+ return false;
9709
+ }
9666
9710
  static ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
9667
9711
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditComponent, selectors: [["ccd-case-edit"]], inputs: { eventTrigger: "eventTrigger", submit: "submit", validate: "validate", saveDraft: "saveDraft", caseDetails: "caseDetails" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
9668
9712
  i0.ɵɵelement(0, "router-outlet");
@@ -9686,7 +9730,7 @@ class CaseEditComponent {
9686
9730
  }], submitted: [{
9687
9731
  type: Output
9688
9732
  }] }); })();
9689
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 34 }); })();
9733
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 35 }); })();
9690
9734
 
9691
9735
  function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
9692
9736
  i0.ɵɵelement(0, "div");
@@ -11005,20 +11049,118 @@ class CallbackErrorsComponent {
11005
11049
  }] }); })();
11006
11050
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CallbackErrorsComponent, { className: "CallbackErrorsComponent", filePath: "lib/shared/components/error/callback-errors.component.ts", lineNumber: 10 }); })();
11007
11051
 
11052
+ function CaseEventCompletionComponent_app_case_event_completion_task_cancelled_0_Template(rf, ctx) { if (rf & 1) {
11053
+ const _r1 = i0.ɵɵgetCurrentView();
11054
+ i0.ɵɵelementStart(0, "app-case-event-completion-task-cancelled", 2);
11055
+ i0.ɵɵlistener("notifyEventCompletionCancelled", function CaseEventCompletionComponent_app_case_event_completion_task_cancelled_0_Template_app_case_event_completion_task_cancelled_notifyEventCompletionCancelled_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setEventCanBeCompleted($event)); });
11056
+ i0.ɵɵelementEnd();
11057
+ } if (rf & 2) {
11058
+ const ctx_r1 = i0.ɵɵnextContext();
11059
+ i0.ɵɵproperty("context", ctx_r1.context);
11060
+ } }
11061
+ function CaseEventCompletionComponent_app_case_event_completion_task_reassigned_1_Template(rf, ctx) { if (rf & 1) {
11062
+ const _r3 = i0.ɵɵgetCurrentView();
11063
+ i0.ɵɵelementStart(0, "app-case-event-completion-task-reassigned", 3);
11064
+ i0.ɵɵlistener("notifyEventCompletionReassigned", function CaseEventCompletionComponent_app_case_event_completion_task_reassigned_1_Template_app_case_event_completion_task_reassigned_notifyEventCompletionReassigned_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setEventCanBeCompleted($event)); });
11065
+ i0.ɵɵelementEnd();
11066
+ } if (rf & 2) {
11067
+ const ctx_r1 = i0.ɵɵnextContext();
11068
+ i0.ɵɵproperty("context", ctx_r1.context);
11069
+ } }
11070
+ const COMPONENT_PORTAL_INJECTION_TOKEN = new InjectionToken('');
11071
+ class CaseEventCompletionComponent {
11072
+ service;
11073
+ router;
11074
+ route;
11075
+ sessionStorageService;
11076
+ workAllocationService;
11077
+ alertService;
11078
+ eventCompletionParams;
11079
+ eventCanBeCompleted = new EventEmitter();
11080
+ eventCompletionTaskStates = EventCompletionTaskStates;
11081
+ stateMachine;
11082
+ context;
11083
+ taskState;
11084
+ constructor(service, router, route, sessionStorageService, workAllocationService, alertService) {
11085
+ this.service = service;
11086
+ this.router = router;
11087
+ this.route = route;
11088
+ this.sessionStorageService = sessionStorageService;
11089
+ this.workAllocationService = workAllocationService;
11090
+ this.alertService = alertService;
11091
+ }
11092
+ ngOnChanges(changes) {
11093
+ if (changes.eventCompletionParams?.currentValue) {
11094
+ // Setup the context
11095
+ this.context = {
11096
+ task: this.eventCompletionParams.task,
11097
+ caseId: this.eventCompletionParams.caseId,
11098
+ eventId: this.eventCompletionParams.eventId,
11099
+ reassignedTask: null,
11100
+ router: this.router,
11101
+ route: this.route,
11102
+ sessionStorageService: this.sessionStorageService,
11103
+ workAllocationService: this.workAllocationService,
11104
+ alertService: this.alertService,
11105
+ canBeCompleted: false,
11106
+ component: this
11107
+ };
11108
+ // Initialise state machine
11109
+ this.stateMachine = this.service.initialiseStateMachine(this.context);
11110
+ // Create states
11111
+ this.service.createStates(this.stateMachine);
11112
+ // Add transitions for the states
11113
+ this.service.addTransitions();
11114
+ // Start state machine
11115
+ this.service.startStateMachine(this.stateMachine);
11116
+ }
11117
+ }
11118
+ setTaskState(taskState) {
11119
+ this.taskState = taskState;
11120
+ }
11121
+ setEventCanBeCompleted(completable) {
11122
+ // note: event not completed from here as will then skip task completion
11123
+ if (!completable) {
11124
+ // if event cannot be completed ensure that this is communicated
11125
+ // otherwise this will be handled via onchanges
11126
+ this.eventCanBeCompleted.emit(completable);
11127
+ }
11128
+ }
11129
+ static ɵfac = function CaseEventCompletionComponent_Factory(t) { return new (t || CaseEventCompletionComponent)(i0.ɵɵdirectiveInject(EventCompletionStateMachineService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService)); };
11130
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionComponent, selectors: [["ccd-case-event-completion"]], inputs: { eventCompletionParams: "eventCompletionParams" }, outputs: { eventCanBeCompleted: "eventCanBeCompleted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 2, consts: [[3, "context", "notifyEventCompletionCancelled", 4, "ngIf"], [3, "context", "notifyEventCompletionReassigned", 4, "ngIf"], [3, "notifyEventCompletionCancelled", "context"], [3, "notifyEventCompletionReassigned", "context"]], template: function CaseEventCompletionComponent_Template(rf, ctx) { if (rf & 1) {
11131
+ i0.ɵɵtemplate(0, CaseEventCompletionComponent_app_case_event_completion_task_cancelled_0_Template, 1, 1, "app-case-event-completion-task-cancelled", 0)(1, CaseEventCompletionComponent_app_case_event_completion_task_reassigned_1_Template, 1, 1, "app-case-event-completion-task-reassigned", 1);
11132
+ } if (rf & 2) {
11133
+ i0.ɵɵproperty("ngIf", ctx.taskState === ctx.eventCompletionTaskStates.TaskCancelled);
11134
+ i0.ɵɵadvance();
11135
+ i0.ɵɵproperty("ngIf", ctx.taskState === ctx.eventCompletionTaskStates.TaskReassigned);
11136
+ } }, encapsulation: 2 });
11137
+ }
11138
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionComponent, [{
11139
+ type: Component,
11140
+ args: [{ selector: 'ccd-case-event-completion', template: "<app-case-event-completion-task-cancelled\n *ngIf=\"taskState === eventCompletionTaskStates.TaskCancelled\"\n [context]=\"context\"\n (notifyEventCompletionCancelled)=\"setEventCanBeCompleted($event)\">\n</app-case-event-completion-task-cancelled>\n<app-case-event-completion-task-reassigned\n *ngIf=\"taskState === eventCompletionTaskStates.TaskReassigned\"\n [context]=\"context\"\n (notifyEventCompletionReassigned)=\"setEventCanBeCompleted($event)\">\n</app-case-event-completion-task-reassigned>" }]
11141
+ }], () => [{ type: EventCompletionStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: WorkAllocationService }, { type: AlertService }], { eventCompletionParams: [{
11142
+ type: Input
11143
+ }], eventCanBeCompleted: [{
11144
+ type: Output
11145
+ }] }); })();
11146
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionComponent, { className: "CaseEventCompletionComponent", filePath: "lib/shared/components/case-editor/case-event-completion/case-event-completion.component.ts", lineNumber: 20 }); })();
11147
+
11008
11148
  const _c0$X = a0 => ["/", "cases", "case-details", a0, "tasks"];
11009
11149
  class CaseEventCompletionTaskCancelledComponent {
11010
- parentComponent;
11150
+ context;
11151
+ notifyEventCompletionCancelled = new EventEmitter();
11011
11152
  caseId;
11012
- constructor(parentComponent) {
11013
- this.parentComponent = parentComponent;
11014
- this.caseId = this.parentComponent.context.caseId;
11153
+ ngOnInit() {
11154
+ this.caseId = this.context.caseId;
11015
11155
  }
11016
11156
  onContinue() {
11017
- // Emit event can be completed event
11018
- this.parentComponent.eventCanBeCompleted.emit(true);
11157
+ // Removes task to complete so event completes without task
11158
+ this.context.sessionStorageService.removeItem('clientContext');
11159
+ // may be able to remove this call below since it is now unneccesary
11160
+ this.notifyEventCompletionCancelled.emit(true);
11019
11161
  }
11020
- static ɵfac = function CaseEventCompletionTaskCancelledComponent_Factory(t) { return new (t || CaseEventCompletionTaskCancelledComponent)(i0.ɵɵdirectiveInject(COMPONENT_PORTAL_INJECTION_TOKEN)); };
11021
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskCancelledComponent, selectors: [["app-case-event-completion-task-cancelled"]], decls: 31, vars: 27, consts: [[1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskCancelledComponent_Template(rf, ctx) { if (rf & 1) {
11162
+ static ɵfac = function CaseEventCompletionTaskCancelledComponent_Factory(t) { return new (t || CaseEventCompletionTaskCancelledComponent)(); };
11163
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskCancelledComponent, selectors: [["app-case-event-completion-task-cancelled"]], inputs: { context: "context" }, outputs: { notifyEventCompletionCancelled: "notifyEventCompletionCancelled" }, decls: 31, vars: 27, consts: [[1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskCancelledComponent_Template(rf, ctx) { if (rf & 1) {
11022
11164
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
11023
11165
  i0.ɵɵtext(3);
11024
11166
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -11076,11 +11218,12 @@ class CaseEventCompletionTaskCancelledComponent {
11076
11218
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionTaskCancelledComponent, [{
11077
11219
  type: Component,
11078
11220
  args: [{ selector: 'app-case-event-completion-task-cancelled', template: "<div class=\"govuk-!-margin-9\">\n <div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a href=\"#\">{{'Task cancelled/marked as done' | rpxTranslate}}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"govuk-form-group govuk-form-group--error\">\n <h2 class=\"govuk-heading-m\">{{'Task cancelled/marked as done' | rpxTranslate}}</h2>\n <p>{{'This task has been cancelled or marked as done.' | rpxTranslate}}</p>\n <p>{{'Click Continue to complete the event and save your progress.' | rpxTranslate}}</p>\n\n <p>{{'Alternatively, click Cancel to return to the tasks tab without saving your progress.' | rpxTranslate}}</p>\n\n <div class=\"form-group form-group-related\">\n <button class=\"govuk-button govuk-!-margin-right-2\" data-module=\"govuk-button\" (click)=\"onContinue()\">\n {{'Continue' | rpxTranslate}}\n </button>\n <a [routerLink]=\"['/', 'cases', 'case-details', caseId, 'tasks']\"\n class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </div>\n </div>\n</div>\n" }]
11079
- }], () => [{ type: CaseEventCompletionComponent, decorators: [{
11080
- type: Inject,
11081
- args: [COMPONENT_PORTAL_INJECTION_TOKEN]
11082
- }] }], null); })();
11083
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskCancelledComponent, { className: "CaseEventCompletionTaskCancelledComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.ts", lineNumber: 8 }); })();
11221
+ }], null, { context: [{
11222
+ type: Input
11223
+ }], notifyEventCompletionCancelled: [{
11224
+ type: Output
11225
+ }] }); })();
11226
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskCancelledComponent, { className: "CaseEventCompletionTaskCancelledComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.ts", lineNumber: 9 }); })();
11084
11227
 
11085
11228
  const _c0$W = a0 => ["/", "cases", "case-details", a0, "tasks"];
11086
11229
  function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if (rf & 1) {
@@ -11140,32 +11283,26 @@ function CaseEventCompletionTaskReassignedComponent_div_0_Template(rf, ctx) { if
11140
11283
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(30, 24, "Cancel"), " ");
11141
11284
  } }
11142
11285
  class CaseEventCompletionTaskReassignedComponent {
11143
- parentComponent;
11144
- route;
11145
- workAllocationService;
11146
11286
  sessionStorageService;
11147
11287
  judicialworkerService;
11148
11288
  caseworkerService;
11149
- alertService;
11289
+ context;
11290
+ notifyEventCompletionReassigned = new EventEmitter();
11150
11291
  caseId;
11151
11292
  assignedUserId;
11152
11293
  assignedUserName;
11153
11294
  subscription;
11154
11295
  caseworkerSubscription;
11155
11296
  judicialworkerSubscription;
11156
- constructor(parentComponent, route, workAllocationService, sessionStorageService, judicialworkerService, caseworkerService, alertService) {
11157
- this.parentComponent = parentComponent;
11158
- this.route = route;
11159
- this.workAllocationService = workAllocationService;
11297
+ constructor(sessionStorageService, judicialworkerService, caseworkerService) {
11160
11298
  this.sessionStorageService = sessionStorageService;
11161
11299
  this.judicialworkerService = judicialworkerService;
11162
11300
  this.caseworkerService = caseworkerService;
11163
- this.alertService = alertService;
11164
11301
  }
11165
11302
  ngOnInit() {
11166
11303
  // Get case id and task from the parent component
11167
- this.caseId = this.parentComponent.context.caseId;
11168
- const task = this.parentComponent.context.reassignedTask;
11304
+ this.caseId = this.context.caseId;
11305
+ const task = this.context.reassignedTask;
11169
11306
  // Current user is a caseworker?
11170
11307
  this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(result => {
11171
11308
  if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
@@ -11210,17 +11347,17 @@ class CaseEventCompletionTaskReassignedComponent {
11210
11347
  // not complete_task not utilised here as related to event completion
11211
11348
  // service wanting task associated with event to not be completed not directly relevant
11212
11349
  if (task) {
11213
- this.sessionStorageService.setItem('assignNeeded', 'true');
11214
- // set event can be completed to true
11215
- this.parentComponent.eventCanBeCompleted.emit(true);
11350
+ // Set session to override reassignment settings so code flow does not return to this component
11351
+ this.sessionStorageService.setItem('assignNeeded', 'true - override');
11352
+ this.notifyEventCompletionReassigned.emit(true);
11216
11353
  }
11217
11354
  else {
11218
11355
  // Emit event cannot be completed event
11219
- this.parentComponent.eventCanBeCompleted.emit(false);
11356
+ this.notifyEventCompletionReassigned.emit(false);
11220
11357
  }
11221
11358
  }
11222
- static ɵfac = function CaseEventCompletionTaskReassignedComponent_Factory(t) { return new (t || CaseEventCompletionTaskReassignedComponent)(i0.ɵɵdirectiveInject(COMPONENT_PORTAL_INJECTION_TOKEN), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(JudicialworkerService), i0.ɵɵdirectiveInject(CaseworkerService), i0.ɵɵdirectiveInject(AlertService)); };
11223
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskReassignedComponent, selectors: [["app-case-event-completion-task-reassigned"]], decls: 1, vars: 1, consts: [["class", "govuk-!-margin-9", 4, "ngIf"], [1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskReassignedComponent_Template(rf, ctx) { if (rf & 1) {
11359
+ static ɵfac = function CaseEventCompletionTaskReassignedComponent_Factory(t) { return new (t || CaseEventCompletionTaskReassignedComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(JudicialworkerService), i0.ɵɵdirectiveInject(CaseworkerService)); };
11360
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionTaskReassignedComponent, selectors: [["app-case-event-completion-task-reassigned"]], inputs: { context: "context" }, outputs: { notifyEventCompletionReassigned: "notifyEventCompletionReassigned" }, decls: 1, vars: 1, consts: [["class", "govuk-!-margin-9", 4, "ngIf"], [1, "govuk-!-margin-9"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "#"], [1, "govuk-form-group", "govuk-form-group--error"], [1, "govuk-heading-m"], [1, "form-group", "form-group-related"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-!-margin-right-2", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "routerLink"]], template: function CaseEventCompletionTaskReassignedComponent_Template(rf, ctx) { if (rf & 1) {
11224
11361
  i0.ɵɵtemplate(0, CaseEventCompletionTaskReassignedComponent_div_0_Template, 31, 28, "div", 0);
11225
11362
  } if (rf & 2) {
11226
11363
  i0.ɵɵproperty("ngIf", ctx.assignedUserName);
@@ -11229,92 +11366,12 @@ class CaseEventCompletionTaskReassignedComponent {
11229
11366
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionTaskReassignedComponent, [{
11230
11367
  type: Component,
11231
11368
  args: [{ selector: 'app-case-event-completion-task-reassigned', template: "<div class=\"govuk-!-margin-9\" *ngIf=\"assignedUserName\">\n <div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\"\n data-module=\"error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a href=\"#\">{{'Task reassigned' | rpxTranslate}}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"govuk-form-group govuk-form-group--error\">\n <h2 class=\"govuk-heading-m\">{{'Task reassigned' | rpxTranslate}}</h2>\n <p>{{'This task has been reassigned to' | rpxTranslate}} {{assignedUserName}}.</p>\n <p>{{'Click Continue to reassign the task to you and save your progress.' | rpxTranslate}}</p>\n <p>{{'Alternatively, click Cancel to return to the tasks tab without saving your progress.' | rpxTranslate}}</p>\n <div class=\"form-group form-group-related\">\n <button class=\"govuk-button govuk-!-margin-right-2\" data-module=\"govuk-button\" (click)=\"onContinue()\">\n {{'Continue' | rpxTranslate}}\n </button>\n <a [routerLink]=\"['/', 'cases', 'case-details', caseId, 'tasks']\"\n class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </div>\n </div>\n</div>\n" }]
11232
- }], () => [{ type: CaseEventCompletionComponent, decorators: [{
11233
- type: Inject,
11234
- args: [COMPONENT_PORTAL_INJECTION_TOKEN]
11235
- }] }, { type: i1$1.ActivatedRoute }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: JudicialworkerService }, { type: CaseworkerService }, { type: AlertService }], null); })();
11236
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 19 }); })();
11237
-
11238
- function CaseEventCompletionComponent_ng_template_0_Template(rf, ctx) { }
11239
- const COMPONENT_PORTAL_INJECTION_TOKEN = new InjectionToken('');
11240
- class CaseEventCompletionComponent {
11241
- service;
11242
- router;
11243
- route;
11244
- sessionStorageService;
11245
- workAllocationService;
11246
- alertService;
11247
- eventCompletionParams;
11248
- eventCanBeCompleted = new EventEmitter();
11249
- stateMachine;
11250
- context;
11251
- selectedComponentPortal;
11252
- constructor(service, router, route, sessionStorageService, workAllocationService, alertService) {
11253
- this.service = service;
11254
- this.router = router;
11255
- this.route = route;
11256
- this.sessionStorageService = sessionStorageService;
11257
- this.workAllocationService = workAllocationService;
11258
- this.alertService = alertService;
11259
- }
11260
- ngOnChanges(changes) {
11261
- if (changes.eventCompletionParams && changes.eventCompletionParams.currentValue) {
11262
- // Setup the context
11263
- this.context = {
11264
- task: this.eventCompletionParams.task,
11265
- caseId: this.eventCompletionParams.caseId,
11266
- eventId: this.eventCompletionParams.eventId,
11267
- reassignedTask: null,
11268
- router: this.router,
11269
- route: this.route,
11270
- sessionStorageService: this.sessionStorageService,
11271
- workAllocationService: this.workAllocationService,
11272
- alertService: this.alertService,
11273
- canBeCompleted: false,
11274
- component: this
11275
- };
11276
- // Initialise state machine
11277
- this.stateMachine = this.service.initialiseStateMachine(this.context);
11278
- // Create states
11279
- this.service.createStates(this.stateMachine);
11280
- // Add transitions for the states
11281
- this.service.addTransitions();
11282
- // Start state machine
11283
- this.service.startStateMachine(this.stateMachine);
11284
- }
11285
- }
11286
- showPortal(portalType) {
11287
- const injector = Injector.create({
11288
- providers: [
11289
- { provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
11290
- ]
11291
- });
11292
- // tslint:disable-next-line:switch-default
11293
- switch (portalType) {
11294
- case EventCompletionPortalTypes.TaskCancelled:
11295
- this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
11296
- break;
11297
- case EventCompletionPortalTypes.TaskReassigned:
11298
- this.selectedComponentPortal = new ComponentPortal(CaseEventCompletionTaskReassignedComponent, null, injector);
11299
- break;
11300
- }
11301
- }
11302
- static ɵfac = function CaseEventCompletionComponent_Factory(t) { return new (t || CaseEventCompletionComponent)(i0.ɵɵdirectiveInject(EventCompletionStateMachineService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService)); };
11303
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventCompletionComponent, selectors: [["ccd-case-event-completion"]], inputs: { eventCompletionParams: "eventCompletionParams" }, outputs: { eventCanBeCompleted: "eventCanBeCompleted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "cdkPortalOutlet"]], template: function CaseEventCompletionComponent_Template(rf, ctx) { if (rf & 1) {
11304
- i0.ɵɵtemplate(0, CaseEventCompletionComponent_ng_template_0_Template, 0, 0, "ng-template", 0);
11305
- } if (rf & 2) {
11306
- i0.ɵɵproperty("cdkPortalOutlet", ctx.selectedComponentPortal);
11307
- } }, encapsulation: 2 });
11308
- }
11309
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventCompletionComponent, [{
11310
- type: Component,
11311
- args: [{ selector: 'ccd-case-event-completion', template: "<ng-template [cdkPortalOutlet]=\"selectedComponentPortal\"></ng-template>\n" }]
11312
- }], () => [{ type: EventCompletionStateMachineService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: WorkAllocationService }, { type: AlertService }], { eventCompletionParams: [{
11369
+ }], () => [{ type: SessionStorageService }, { type: JudicialworkerService }, { type: CaseworkerService }], { context: [{
11313
11370
  type: Input
11314
- }], eventCanBeCompleted: [{
11371
+ }], notifyEventCompletionReassigned: [{
11315
11372
  type: Output
11316
11373
  }] }); })();
11317
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionComponent, { className: "CaseEventCompletionComponent", filePath: "lib/shared/components/case-editor/case-event-completion/case-event-completion.component.ts", lineNumber: 21 }); })();
11374
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 15 }); })();
11318
11375
 
11319
11376
  class AddressOption {
11320
11377
  description;
@@ -11612,7 +11669,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
11612
11669
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteComplexFieldComponent, { className: "WriteComplexFieldComponent", filePath: "lib/shared/components/palette/complex/write-complex-field.component.ts", lineNumber: 21 }); })();
11613
11670
 
11614
11671
  const _c0$V = ["writeComplexFieldComponent"];
11615
- const _c1$o = a0 => ({ "form-group-error": a0 });
11672
+ const _c1$p = a0 => ({ "form-group-error": a0 });
11616
11673
  const _c2$3 = a0 => ({ "govuk-input--error": a0 });
11617
11674
  function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) { if (rf & 1) {
11618
11675
  i0.ɵɵelementStart(0, "span", 14);
@@ -11639,7 +11696,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
11639
11696
  i0.ɵɵelementEnd()();
11640
11697
  } if (rf & 2) {
11641
11698
  const ctx_r1 = i0.ɵɵnextContext(2);
11642
- i0.ɵɵproperty("id", ctx_r1.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r1.missingPostcode));
11699
+ i0.ɵɵproperty("id", ctx_r1.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$p, ctx_r1.missingPostcode));
11643
11700
  i0.ɵɵadvance();
11644
11701
  i0.ɵɵproperty("for", ctx_r1.createElementId("postcodeInput"));
11645
11702
  i0.ɵɵadvance(2);
@@ -11685,7 +11742,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) { if (rf & 1)
11685
11742
  i0.ɵɵelementEnd()();
11686
11743
  } if (rf & 2) {
11687
11744
  const ctx_r1 = i0.ɵɵnextContext(2);
11688
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r1.noAddressSelected));
11745
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$p, ctx_r1.noAddressSelected));
11689
11746
  i0.ɵɵadvance();
11690
11747
  i0.ɵɵproperty("for", ctx_r1.createElementId("addressList"));
11691
11748
  i0.ɵɵadvance(2);
@@ -13118,7 +13175,7 @@ class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
13118
13175
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadCaseLinkFieldComponent, { className: "ReadCaseLinkFieldComponent", filePath: "lib/shared/components/palette/case-link/read-case-link-field.component.ts", lineNumber: 8 }); })();
13119
13176
 
13120
13177
  const _c0$U = ["writeComplexFieldComponent"];
13121
- const _c1$n = a0 => ({ "form-group-error": a0 });
13178
+ const _c1$o = a0 => ({ "form-group-error": a0 });
13122
13179
  function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
13123
13180
  i0.ɵɵelementStart(0, "span", 6);
13124
13181
  i0.ɵɵtext(1);
@@ -13210,7 +13267,7 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
13210
13267
  i0.ɵɵelement(5, "input", 5);
13211
13268
  i0.ɵɵelementEnd();
13212
13269
  } if (rf & 2) {
13213
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
13270
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$o, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
13214
13271
  i0.ɵɵadvance();
13215
13272
  i0.ɵɵproperty("for", ctx.id());
13216
13273
  i0.ɵɵadvance();
@@ -13233,7 +13290,7 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
13233
13290
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteCaseLinkFieldComponent, { className: "WriteCaseLinkFieldComponent", filePath: "lib/shared/components/palette/case-link/write-case-link-field.component.ts", lineNumber: 11 }); })();
13234
13291
 
13235
13292
  const _c0$T = (a0, a1, a2, a3, a4, a5) => ({ id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 });
13236
- const _c1$m = (a0, a1, a2, a3, a4) => ({ id: a0, label: a1, field_type: a2, value: a3, hidden: a4 });
13293
+ const _c1$n = (a0, a1, a2, a3, a4) => ({ id: a0, label: a1, field_type: a2, value: a3, hidden: a4 });
13237
13294
  function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf & 1) {
13238
13295
  i0.ɵɵelementStart(0, "tbody")(1, "tr");
13239
13296
  i0.ɵɵelement(2, "th", 4);
@@ -13254,7 +13311,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
13254
13311
  const i_r3 = ctx.index;
13255
13312
  const ctx_r0 = i0.ɵɵnextContext(3);
13256
13313
  i0.ɵɵadvance(2);
13257
- i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$m, i_r3, ctx_r0.caseField.label + " " + (i_r3 + 1), ctx_r0.caseField.field_type.collection_field_type, item_r2.value, ctx_r0.caseField.hidden))("context", ctx_r0.context)("topLevelFormGroup", ctx_r0.topLevelFormGroup)("idPrefix", ctx_r0.buildIdPrefix(i_r3));
13314
+ i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$n, i_r3, ctx_r0.caseField.label + " " + (i_r3 + 1), ctx_r0.caseField.field_type.collection_field_type, item_r2.value, ctx_r0.caseField.hidden))("context", ctx_r0.context)("topLevelFormGroup", ctx_r0.topLevelFormGroup)("idPrefix", ctx_r0.buildIdPrefix(i_r3));
13258
13315
  } }
13259
13316
  function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
13260
13317
  i0.ɵɵelementStart(0, "tbody");
@@ -14060,7 +14117,7 @@ class FileUploadStateService {
14060
14117
  }], null, null); })();
14061
14118
 
14062
14119
  const _c0$R = ["fileInput"];
14063
- const _c1$l = a0 => ({ "form-group-error bottom-30": a0 });
14120
+ const _c1$m = a0 => ({ "form-group-error bottom-30": a0 });
14064
14121
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
14065
14122
  i0.ɵɵelementStart(0, "span", 12);
14066
14123
  i0.ɵɵtext(1);
@@ -14437,7 +14494,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14437
14494
  i0.ɵɵpipe(17, "rpxTranslate");
14438
14495
  i0.ɵɵelementEnd()();
14439
14496
  } if (rf & 2) {
14440
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
14497
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$m, !ctx.valid));
14441
14498
  i0.ɵɵadvance();
14442
14499
  i0.ɵɵproperty("for", ctx.id());
14443
14500
  i0.ɵɵadvance();
@@ -14965,7 +15022,7 @@ class ReadDynamicRadioListFieldComponent extends AbstractFieldReadComponent {
14965
15022
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadDynamicRadioListFieldComponent, { className: "ReadDynamicRadioListFieldComponent", filePath: "lib/shared/components/palette/dynamic-radio-list/read-dynamic-radio-list-field.component.ts", lineNumber: 8 }); })();
14966
15023
 
14967
15024
  const _c0$O = a0 => ({ "form-group-error": a0 });
14968
- const _c1$k = a0 => ({ selected: a0 });
15025
+ const _c1$l = a0 => ({ selected: a0 });
14969
15026
  function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
14970
15027
  i0.ɵɵelementStart(0, "span", 7);
14971
15028
  i0.ɵɵtext(1);
@@ -15015,7 +15072,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
15015
15072
  } if (rf & 2) {
15016
15073
  const radioButton_r2 = ctx.$implicit;
15017
15074
  const ctx_r0 = i0.ɵɵnextContext();
15018
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$k, ctx_r0.dynamicRadioListControl.value === radioButton_r2.code));
15075
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$l, ctx_r0.dynamicRadioListControl.value === radioButton_r2.code));
15019
15076
  i0.ɵɵadvance();
15020
15077
  i0.ɵɵproperty("id", ctx_r0.createElementId(radioButton_r2.code))("name", ctx_r0.id())("formControl", ctx_r0.dynamicRadioListControl)("value", radioButton_r2.code);
15021
15078
  i0.ɵɵadvance();
@@ -15111,7 +15168,7 @@ class ReadEmailFieldComponent extends AbstractFieldReadComponent {
15111
15168
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadEmailFieldComponent, { className: "ReadEmailFieldComponent", filePath: "lib/shared/components/palette/email/read-email-field.component.ts", lineNumber: 10 }); })();
15112
15169
 
15113
15170
  const _c0$N = a0 => ({ "form-group-error": a0 });
15114
- const _c1$j = a0 => ({ "govuk-input--error": a0 });
15171
+ const _c1$k = a0 => ({ "govuk-input--error": a0 });
15115
15172
  function WriteEmailFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
15116
15173
  i0.ɵɵelementStart(0, "span", 6);
15117
15174
  i0.ɵɵtext(1);
@@ -15166,7 +15223,7 @@ class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
15166
15223
  i0.ɵɵadvance();
15167
15224
  i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
15168
15225
  i0.ɵɵadvance();
15169
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15226
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$k, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
15170
15227
  } }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
15171
15228
  }
15172
15229
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
@@ -15334,7 +15391,7 @@ class ReadFixedRadioListFieldComponent extends AbstractFieldReadComponent {
15334
15391
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadFixedRadioListFieldComponent, { className: "ReadFixedRadioListFieldComponent", filePath: "lib/shared/components/palette/fixed-radio-list/read-fixed-radio-list-field.component.ts", lineNumber: 8 }); })();
15335
15392
 
15336
15393
  const _c0$L = a0 => ({ "form-group-error": a0 });
15337
- const _c1$i = a0 => ({ selected: a0 });
15394
+ const _c1$j = a0 => ({ selected: a0 });
15338
15395
  function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
15339
15396
  i0.ɵɵelementStart(0, "span", 6);
15340
15397
  i0.ɵɵtext(1);
@@ -15375,7 +15432,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
15375
15432
  } if (rf & 2) {
15376
15433
  const radioButton_r2 = ctx.$implicit;
15377
15434
  const ctx_r0 = i0.ɵɵnextContext();
15378
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$i, ctx_r0.fixedRadioListControl.value === radioButton_r2.code));
15435
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$j, ctx_r0.fixedRadioListControl.value === radioButton_r2.code));
15379
15436
  i0.ɵɵadvance();
15380
15437
  i0.ɵɵproperty("id", ctx_r0.id() + "-" + radioButton_r2.code)("name", ctx_r0.id())("formControl", ctx_r0.fixedRadioListControl)("value", radioButton_r2.code);
15381
15438
  i0.ɵɵadvance();
@@ -15478,7 +15535,7 @@ class ReadJudicialUserFieldComponent extends AbstractFieldReadComponent {
15478
15535
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadJudicialUserFieldComponent, { className: "ReadJudicialUserFieldComponent", filePath: "lib/shared/components/palette/judicial-user/read-judicial-user-field.component.ts", lineNumber: 11 }); })();
15479
15536
 
15480
15537
  const _c0$K = a0 => ({ "form-group-error": a0 });
15481
- const _c1$h = a0 => ({ "hide-autocomplete": a0 });
15538
+ const _c1$i = a0 => ({ "hide-autocomplete": a0 });
15482
15539
  function WriteJudicialUserFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
15483
15540
  i0.ɵɵelementStart(0, "span", 10);
15484
15541
  i0.ɵɵtext(1);
@@ -15517,7 +15574,7 @@ function WriteJudicialUserFieldComponent_mat_option_8_Template(rf, ctx) { if (rf
15517
15574
  } if (rf & 2) {
15518
15575
  const judicialUser_r4 = ctx.$implicit;
15519
15576
  const ctx_r1 = i0.ɵɵnextContext();
15520
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$h, !ctx_r1.showAutocomplete))("value", judicialUser_r4);
15577
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$i, !ctx_r1.showAutocomplete))("value", judicialUser_r4);
15521
15578
  i0.ɵɵadvance();
15522
15579
  i0.ɵɵtextInterpolate2(" ", (judicialUser_r4 == null ? null : judicialUser_r4.fullName) ? judicialUser_r4.fullName : "", "", (judicialUser_r4 == null ? null : judicialUser_r4.emailId) ? " (" + judicialUser_r4.emailId + ")" : "", " ");
15523
15580
  } }
@@ -16243,7 +16300,7 @@ class ValidatorsUtils {
16243
16300
  }], null, null); })();
16244
16301
 
16245
16302
  const _c0$J = a0 => ({ "govuk-form-group--error": a0 });
16246
- const _c1$g = a0 => ({ "table-group-error": a0 });
16303
+ const _c1$h = a0 => ({ "table-group-error": a0 });
16247
16304
  function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
16248
16305
  i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
16249
16306
  i0.ɵɵtext(2, "Error:");
@@ -16420,7 +16477,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
16420
16477
  const case_r9 = ctx.$implicit;
16421
16478
  const ctx_r1 = i0.ɵɵnextContext();
16422
16479
  i0.ɵɵadvance(2);
16423
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r1.caseSelectionError && case_r9.caseReference === ctx_r1.linkCaseForm.value.caseNumber));
16480
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$h, ctx_r1.caseSelectionError && case_r9.caseReference === ctx_r1.linkCaseForm.value.caseNumber));
16424
16481
  i0.ɵɵadvance(2);
16425
16482
  i0.ɵɵtextInterpolate1("", case_r9.caseName, " ");
16426
16483
  i0.ɵɵadvance(2);
@@ -18429,7 +18486,7 @@ class ReadNumberFieldComponent extends AbstractFieldReadComponent {
18429
18486
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadNumberFieldComponent, { className: "ReadNumberFieldComponent", filePath: "lib/shared/components/palette/number/read-number-field.component.ts", lineNumber: 8 }); })();
18430
18487
 
18431
18488
  const _c0$F = a0 => ({ "form-group-error": a0 });
18432
- const _c1$f = a0 => ({ "govuk-input--error": a0 });
18489
+ const _c1$g = a0 => ({ "govuk-input--error": a0 });
18433
18490
  function WriteNumberFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
18434
18491
  i0.ɵɵelementStart(0, "span", 6);
18435
18492
  i0.ɵɵtext(1);
@@ -18484,7 +18541,7 @@ class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
18484
18541
  i0.ɵɵadvance();
18485
18542
  i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
18486
18543
  i0.ɵɵadvance();
18487
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18544
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$g, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
18488
18545
  } }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NumberValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
18489
18546
  }
18490
18547
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
@@ -19112,7 +19169,7 @@ class ReadPhoneUKFieldComponent extends AbstractFieldReadComponent {
19112
19169
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadPhoneUKFieldComponent, { className: "ReadPhoneUKFieldComponent", filePath: "lib/shared/components/palette/phone-uk/read-phone-uk-field.component.ts", lineNumber: 8 }); })();
19113
19170
 
19114
19171
  const _c0$D = a0 => ({ "form-group-error": a0 });
19115
- const _c1$e = a0 => ({ "govuk-input--error": a0 });
19172
+ const _c1$f = a0 => ({ "govuk-input--error": a0 });
19116
19173
  function WritePhoneUKFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
19117
19174
  i0.ɵɵelementStart(0, "span", 6);
19118
19175
  i0.ɵɵtext(1);
@@ -19167,7 +19224,7 @@ class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
19167
19224
  i0.ɵɵadvance();
19168
19225
  i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
19169
19226
  i0.ɵɵadvance();
19170
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19227
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
19171
19228
  } }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
19172
19229
  }
19173
19230
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
@@ -19596,7 +19653,7 @@ class QueryManagementUtils {
19596
19653
  static caseLevelCaseFieldId = 'CaseQueriesCollection';
19597
19654
  static FIELD_TYPE_COLLECTION = 'Collection';
19598
19655
  static FIELD_TYPE_COMPLEX = 'Complex';
19599
- static extractCaseQueriesFromCaseField(caseField, caseFieldId) {
19656
+ static extractCaseQueriesFromCaseField(caseField) {
19600
19657
  const { field_type, value } = caseField;
19601
19658
  // Handle Complex type fields
19602
19659
  if (field_type.type === QueryManagementUtils.FIELD_TYPE_COMPLEX) {
@@ -19605,10 +19662,6 @@ class QueryManagementUtils {
19605
19662
  }
19606
19663
  return null;
19607
19664
  }
19608
- // Handle Collection type fields
19609
- // if (field_type.type === QueryManagementUtils.FIELD_TYPE_COLLECTION) {
19610
- // return [];
19611
- // }
19612
19665
  }
19613
19666
  static documentToCollectionFormDocument(document) {
19614
19667
  return {
@@ -19631,7 +19684,7 @@ class QueryManagementUtils {
19631
19684
  : null;
19632
19685
  const attachments = formGroup.get('attachments').value;
19633
19686
  return {
19634
- id: null,
19687
+ id: v4(),
19635
19688
  subject,
19636
19689
  name: currentUserName,
19637
19690
  body,
@@ -19649,7 +19702,7 @@ class QueryManagementUtils {
19649
19702
  const attachments = formGroup.get('attachments').value;
19650
19703
  queryItem.isHearingRelated = queryItem.isHearingRelated ? 'Yes' : 'No';
19651
19704
  return {
19652
- id: null,
19705
+ id: v4(),
19653
19706
  subject: queryItem.subject,
19654
19707
  name: currentUserName,
19655
19708
  body,
@@ -19866,9 +19919,36 @@ class QueryListData {
19866
19919
  }
19867
19920
  }
19868
19921
 
19869
- function QueryCheckYourAnswersComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
19922
+ function QueryCheckYourAnswersComponent_div_2_li_6_Template(rf, ctx) { if (rf & 1) {
19923
+ i0.ɵɵelementStart(0, "li")(1, "a", 26);
19924
+ i0.ɵɵtext(2);
19925
+ i0.ɵɵpipe(3, "rpxTranslate");
19926
+ i0.ɵɵelementEnd()();
19927
+ } if (rf & 2) {
19928
+ const errorMessage_r2 = ctx.$implicit;
19929
+ i0.ɵɵadvance();
19930
+ i0.ɵɵproperty("id", "error-" + errorMessage_r2.fieldId);
19931
+ i0.ɵɵadvance();
19932
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, errorMessage_r2.description));
19933
+ } }
19934
+ function QueryCheckYourAnswersComponent_div_2_Template(rf, ctx) { if (rf & 1) {
19935
+ i0.ɵɵelementStart(0, "div", 21)(1, "h2", 22);
19936
+ i0.ɵɵtext(2);
19937
+ i0.ɵɵpipe(3, "rpxTranslate");
19938
+ i0.ɵɵelementEnd();
19939
+ i0.ɵɵelementStart(4, "div", 23)(5, "ul", 24);
19940
+ i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_2_li_6_Template, 4, 4, "li", 25);
19941
+ i0.ɵɵelementEnd()()();
19942
+ } if (rf & 2) {
19943
+ const ctx_r2 = i0.ɵɵnextContext();
19944
+ i0.ɵɵadvance(2);
19945
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "There is a problem"), " ");
19946
+ i0.ɵɵadvance(4);
19947
+ i0.ɵɵproperty("ngForOf", ctx_r2.errorMessages);
19948
+ } }
19949
+ function QueryCheckYourAnswersComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
19870
19950
  i0.ɵɵelementContainerStart(0);
19871
- i0.ɵɵelementStart(1, "div", 20);
19951
+ i0.ɵɵelementStart(1, "div", 27);
19872
19952
  i0.ɵɵtext(2);
19873
19953
  i0.ɵɵpipe(3, "rpxTranslate");
19874
19954
  i0.ɵɵelementEnd();
@@ -19877,7 +19957,7 @@ function QueryCheckYourAnswersComponent_ng_container_2_Template(rf, ctx) { if (r
19877
19957
  i0.ɵɵadvance(2);
19878
19958
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Raise a query"));
19879
19959
  } }
19880
- function QueryCheckYourAnswersComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
19960
+ function QueryCheckYourAnswersComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
19881
19961
  i0.ɵɵelementContainerStart(0);
19882
19962
  i0.ɵɵtext(1);
19883
19963
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -19886,16 +19966,16 @@ function QueryCheckYourAnswersComponent_ng_container_4_Template(rf, ctx) { if (r
19886
19966
  i0.ɵɵadvance();
19887
19967
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Review query response details"), " ");
19888
19968
  } }
19889
- function QueryCheckYourAnswersComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
19969
+ function QueryCheckYourAnswersComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
19890
19970
  i0.ɵɵtext(0);
19891
19971
  i0.ɵɵpipe(1, "rpxTranslate");
19892
19972
  } if (rf & 2) {
19893
19973
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(1, 1, "Review query details"), " ");
19894
19974
  } }
19895
- function QueryCheckYourAnswersComponent_dl_9_a_8_Template(rf, ctx) { if (rf & 1) {
19896
- const _r2 = i0.ɵɵgetCurrentView();
19897
- i0.ɵɵelementStart(0, "a", 14);
19898
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_9_a_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
19975
+ function QueryCheckYourAnswersComponent_dl_10_a_8_Template(rf, ctx) { if (rf & 1) {
19976
+ const _r4 = i0.ɵɵgetCurrentView();
19977
+ i0.ɵɵelementStart(0, "a", 15);
19978
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_10_a_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
19899
19979
  i0.ɵɵtext(1);
19900
19980
  i0.ɵɵpipe(2, "rpxTranslate");
19901
19981
  i0.ɵɵelementEnd();
@@ -19903,16 +19983,16 @@ function QueryCheckYourAnswersComponent_dl_9_a_8_Template(rf, ctx) { if (rf & 1)
19903
19983
  i0.ɵɵadvance();
19904
19984
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Change"), " ");
19905
19985
  } }
19906
- function QueryCheckYourAnswersComponent_dl_9_Template(rf, ctx) { if (rf & 1) {
19907
- i0.ɵɵelementStart(0, "dl", 9)(1, "div", 10)(2, "dt", 11);
19986
+ function QueryCheckYourAnswersComponent_dl_10_Template(rf, ctx) { if (rf & 1) {
19987
+ i0.ɵɵelementStart(0, "dl", 10)(1, "div", 11)(2, "dt", 12);
19908
19988
  i0.ɵɵtext(3);
19909
19989
  i0.ɵɵpipe(4, "rpxTranslate");
19910
19990
  i0.ɵɵelementEnd();
19911
- i0.ɵɵelementStart(5, "dd", 12);
19991
+ i0.ɵɵelementStart(5, "dd", 13);
19912
19992
  i0.ɵɵtext(6);
19913
19993
  i0.ɵɵelementEnd();
19914
- i0.ɵɵelementStart(7, "dd", 13);
19915
- i0.ɵɵtemplate(8, QueryCheckYourAnswersComponent_dl_9_a_8_Template, 3, 3, "a", 21);
19994
+ i0.ɵɵelementStart(7, "dd", 14);
19995
+ i0.ɵɵtemplate(8, QueryCheckYourAnswersComponent_dl_10_a_8_Template, 3, 3, "a", 28);
19916
19996
  i0.ɵɵelementEnd()()();
19917
19997
  } if (rf & 2) {
19918
19998
  let tmp_3_0;
@@ -19924,7 +20004,7 @@ function QueryCheckYourAnswersComponent_dl_9_Template(rf, ctx) { if (rf & 1) {
19924
20004
  i0.ɵɵadvance(2);
19925
20005
  i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.NEW_QUERY);
19926
20006
  } }
19927
- function QueryCheckYourAnswersComponent_dl_21_ng_container_6_Template(rf, ctx) { if (rf & 1) {
20007
+ function QueryCheckYourAnswersComponent_dl_22_ng_container_6_Template(rf, ctx) { if (rf & 1) {
19928
20008
  i0.ɵɵelementContainerStart(0);
19929
20009
  i0.ɵɵtext(1);
19930
20010
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -19933,24 +20013,24 @@ function QueryCheckYourAnswersComponent_dl_21_ng_container_6_Template(rf, ctx) {
19933
20013
  i0.ɵɵadvance();
19934
20014
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(2, 1, "Is the query hearing related?", null, "Yes"), " ");
19935
20015
  } }
19936
- function QueryCheckYourAnswersComponent_dl_21_ng_template_7_Template(rf, ctx) { if (rf & 1) {
20016
+ function QueryCheckYourAnswersComponent_dl_22_ng_template_7_Template(rf, ctx) { if (rf & 1) {
19937
20017
  i0.ɵɵtext(0);
19938
20018
  i0.ɵɵpipe(1, "rpxTranslate");
19939
20019
  } if (rf & 2) {
19940
20020
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(1, 1, "Is the query hearing related?", null, "No"), " ");
19941
20021
  } }
19942
- function QueryCheckYourAnswersComponent_dl_21_div_13_Template(rf, ctx) { if (rf & 1) {
19943
- const _r5 = i0.ɵɵgetCurrentView();
19944
- i0.ɵɵelementStart(0, "div", 10)(1, "dt", 11);
20022
+ function QueryCheckYourAnswersComponent_dl_22_div_13_Template(rf, ctx) { if (rf & 1) {
20023
+ const _r6 = i0.ɵɵgetCurrentView();
20024
+ i0.ɵɵelementStart(0, "div", 11)(1, "dt", 12);
19945
20025
  i0.ɵɵtext(2);
19946
20026
  i0.ɵɵpipe(3, "rpxTranslate");
19947
20027
  i0.ɵɵelementEnd();
19948
- i0.ɵɵelementStart(4, "dd", 12);
20028
+ i0.ɵɵelementStart(4, "dd", 13);
19949
20029
  i0.ɵɵtext(5);
19950
20030
  i0.ɵɵpipe(6, "date");
19951
20031
  i0.ɵɵelementEnd();
19952
- i0.ɵɵelementStart(7, "dd", 13)(8, "a", 14);
19953
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_21_div_13_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
20032
+ i0.ɵɵelementStart(7, "dd", 14)(8, "a", 15);
20033
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_22_div_13_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
19954
20034
  i0.ɵɵtext(9);
19955
20035
  i0.ɵɵpipe(10, "rpxTranslate");
19956
20036
  i0.ɵɵelementEnd()()();
@@ -19964,38 +20044,38 @@ function QueryCheckYourAnswersComponent_dl_21_div_13_Template(rf, ctx) { if (rf
19964
20044
  i0.ɵɵadvance(4);
19965
20045
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 8, "Change"), " ");
19966
20046
  } }
19967
- function QueryCheckYourAnswersComponent_dl_21_Template(rf, ctx) { if (rf & 1) {
19968
- const _r4 = i0.ɵɵgetCurrentView();
19969
- i0.ɵɵelementStart(0, "dl", 9)(1, "div", 10)(2, "dt", 11);
20047
+ function QueryCheckYourAnswersComponent_dl_22_Template(rf, ctx) { if (rf & 1) {
20048
+ const _r5 = i0.ɵɵgetCurrentView();
20049
+ i0.ɵɵelementStart(0, "dl", 10)(1, "div", 11)(2, "dt", 12);
19970
20050
  i0.ɵɵtext(3);
19971
20051
  i0.ɵɵpipe(4, "rpxTranslate");
19972
20052
  i0.ɵɵelementEnd();
19973
- i0.ɵɵelementStart(5, "dd", 12);
19974
- i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_dl_21_ng_container_6_Template, 3, 5, "ng-container", 6)(7, QueryCheckYourAnswersComponent_dl_21_ng_template_7_Template, 2, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
20053
+ i0.ɵɵelementStart(5, "dd", 13);
20054
+ i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_dl_22_ng_container_6_Template, 3, 5, "ng-container", 7)(7, QueryCheckYourAnswersComponent_dl_22_ng_template_7_Template, 2, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
19975
20055
  i0.ɵɵelementEnd();
19976
- i0.ɵɵelementStart(9, "dd", 13)(10, "a", 14);
19977
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_21_Template_a_click_10_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
20056
+ i0.ɵɵelementStart(9, "dd", 14)(10, "a", 15);
20057
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_dl_22_Template_a_click_10_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
19978
20058
  i0.ɵɵtext(11);
19979
20059
  i0.ɵɵpipe(12, "rpxTranslate");
19980
20060
  i0.ɵɵelementEnd()()();
19981
- i0.ɵɵtemplate(13, QueryCheckYourAnswersComponent_dl_21_div_13_Template, 11, 10, "div", 22);
20061
+ i0.ɵɵtemplate(13, QueryCheckYourAnswersComponent_dl_22_div_13_Template, 11, 10, "div", 29);
19982
20062
  i0.ɵɵelementEnd();
19983
20063
  } if (rf & 2) {
19984
20064
  let tmp_4_0;
19985
20065
  let tmp_7_0;
19986
- const isHearingRelatedFalse_r6 = i0.ɵɵreference(8);
20066
+ const isHearingRelatedFalse_r7 = i0.ɵɵreference(8);
19987
20067
  const ctx_r2 = i0.ɵɵnextContext();
19988
20068
  i0.ɵɵadvance(3);
19989
20069
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, "Is the query hearing related?"), " ");
19990
20070
  i0.ɵɵadvance(3);
19991
- i0.ɵɵproperty("ngIf", ((tmp_4_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_4_0.value) === true)("ngIfElse", isHearingRelatedFalse_r6);
20071
+ i0.ɵɵproperty("ngIf", ((tmp_4_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_4_0.value) === true)("ngIfElse", isHearingRelatedFalse_r7);
19992
20072
  i0.ɵɵadvance(5);
19993
20073
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 7, "Change"), " ");
19994
20074
  i0.ɵɵadvance(2);
19995
20075
  i0.ɵɵproperty("ngIf", (tmp_7_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_7_0.value);
19996
20076
  } }
19997
- function QueryCheckYourAnswersComponent_ccd_query_attachments_read_28_Template(rf, ctx) { if (rf & 1) {
19998
- i0.ɵɵelement(0, "ccd-query-attachments-read", 23);
20077
+ function QueryCheckYourAnswersComponent_ccd_query_attachments_read_29_Template(rf, ctx) { if (rf & 1) {
20078
+ i0.ɵɵelement(0, "ccd-query-attachments-read", 30);
19999
20079
  } if (rf & 2) {
20000
20080
  const ctx_r2 = i0.ɵɵnextContext();
20001
20081
  i0.ɵɵproperty("attachments", ctx_r2.formGroup.get("attachments").value);
@@ -20007,6 +20087,7 @@ class QueryCheckYourAnswersComponent {
20007
20087
  caseNotifier;
20008
20088
  workAllocationService;
20009
20089
  sessionStorageService;
20090
+ eventTriggerService;
20010
20091
  RAISE_A_QUERY_EVENT_TRIGGER_ID = 'queryManagementRaiseQuery';
20011
20092
  RESPOND_TO_QUERY_EVENT_TRIGGER_ID = 'queryManagementRespondQuery';
20012
20093
  CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
@@ -20014,75 +20095,72 @@ class QueryCheckYourAnswersComponent {
20014
20095
  formGroup;
20015
20096
  queryItem;
20016
20097
  queryCreateContext;
20098
+ eventData = null;
20017
20099
  backClicked = new EventEmitter();
20018
20100
  querySubmitted = new EventEmitter();
20019
20101
  caseViewTrigger;
20020
20102
  caseDetails;
20021
20103
  queryId;
20022
- getEventTrigger$;
20023
20104
  createEventSubscription;
20024
- searchTasksSubsciption;
20105
+ searchTasksSubscription;
20025
20106
  queryCreateContextEnum = QueryCreateContext;
20026
20107
  eventCompletionParams;
20027
- caseId;
20028
20108
  caseQueriesCollections;
20029
20109
  fieldId;
20030
- constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService) {
20110
+ errorMessages = [];
20111
+ constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, eventTriggerService) {
20031
20112
  this.route = route;
20032
20113
  this.router = router;
20033
20114
  this.casesService = casesService;
20034
20115
  this.caseNotifier = caseNotifier;
20035
20116
  this.workAllocationService = workAllocationService;
20036
20117
  this.sessionStorageService = sessionStorageService;
20118
+ this.eventTriggerService = eventTriggerService;
20037
20119
  }
20038
20120
  ngOnInit() {
20039
20121
  this.queryId = this.route.snapshot.params.qid;
20040
20122
  this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
20041
20123
  this.caseDetails = caseDetails;
20042
- if (this.queryCreateContext !== QueryCreateContext.RESPOND) {
20043
- // Find raise a query event trigger from the list, will be used when submitting the query
20044
- this.caseViewTrigger = this.caseDetails.triggers.find((trigger) => trigger.id === this.RAISE_A_QUERY_EVENT_TRIGGER_ID);
20045
- // Initialise getEventTrigger observable, will be used when submitting the query
20046
- this.getEventTrigger$ = this.casesService.getEventTrigger(undefined, this.RAISE_A_QUERY_EVENT_TRIGGER_ID, this.caseDetails.case_id);
20047
- }
20048
- else {
20049
- // Raise a query and Follow-up query uses the same event trigger id
20050
- // Find raise a query event trigger from the list, will be used when submitting the query
20051
- this.caseViewTrigger = this.caseDetails.triggers.find((trigger) => trigger.id === this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID);
20052
- // Initialise getEventTrigger observable, will be used when submitting the query
20053
- this.getEventTrigger$ = this.casesService.getEventTrigger(undefined, this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID, this.caseDetails.case_id);
20054
- }
20124
+ // Find the appropriate event trigger based on the queryCreateContext
20125
+ this.caseViewTrigger = this.caseDetails.triggers.find((trigger) => this.queryCreateContext !== QueryCreateContext.RESPOND
20126
+ // If the context is not 'RESPOND', find the trigger with the ID for raising a query
20127
+ ? trigger.id === this.RAISE_A_QUERY_EVENT_TRIGGER_ID
20128
+ // If the context is 'RESPOND', find the trigger with the ID for responding to a query
20129
+ : trigger.id === this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID);
20055
20130
  });
20056
- this.isCaseQueriesClollectionDataPresent();
20131
+ this.setCaseQueriesCollectionData();
20057
20132
  }
20058
20133
  ngOnDestroy() {
20059
20134
  this.createEventSubscription?.unsubscribe();
20060
- this.searchTasksSubsciption?.unsubscribe();
20135
+ this.searchTasksSubscription?.unsubscribe();
20061
20136
  }
20062
20137
  goBack() {
20063
20138
  this.backClicked.emit(true);
20064
20139
  }
20065
20140
  submit() {
20066
- // Generate case queries collection data for submission
20141
+ // Check if fieldId is null or undefined
20142
+ if (!this.fieldId) {
20143
+ console.error('Error: Field ID is missing. Cannot proceed with submission.');
20144
+ this.errorMessages = [
20145
+ {
20146
+ title: 'Error',
20147
+ description: 'Something unexpected happened. please try again later.',
20148
+ fieldId: 'field-id'
20149
+ }
20150
+ ];
20151
+ return;
20152
+ }
20067
20153
  const data = this.generateCaseQueriesCollectionData();
20068
- // Actual submission of query
20069
- this.createEventSubscription = this.getEventTrigger$.pipe(switchMap((caseEventTrigger) => {
20070
- // Setup CaseEventData
20071
- const caseEventData = {
20072
- data,
20073
- event: {
20074
- id: this.caseViewTrigger.id,
20075
- summary: '',
20076
- description: this.caseViewTrigger.description
20077
- },
20078
- event_token: caseEventTrigger.event_token,
20079
- ignore_warning: false
20080
- };
20081
- // Complete event
20082
- return this.casesService.createEvent(this.caseDetails, caseEventData);
20083
- })).subscribe(
20084
- // Successful response
20085
- () => {
20154
+ this.createEventSubscription = this.casesService.createEvent(this.caseDetails, {
20155
+ data,
20156
+ event: {
20157
+ id: this.caseViewTrigger?.id,
20158
+ summary: '',
20159
+ description: this.caseViewTrigger?.description
20160
+ },
20161
+ event_token: this.eventData?.event_token,
20162
+ ignore_warning: false
20163
+ }).subscribe(() => {
20086
20164
  // Search and complete task
20087
20165
  this.searchAndCompleteTask();
20088
20166
  // Emit query submitted event
@@ -20094,22 +20172,19 @@ class QueryCheckYourAnswersComponent {
20094
20172
  searchAndCompleteTask() {
20095
20173
  // Search Task
20096
20174
  const searchParameter = { ccdId: this.caseDetails.case_id };
20097
- this.searchTasksSubsciption = this.workAllocationService.searchTasks(searchParameter)
20175
+ this.searchTasksSubscription = this.workAllocationService.searchTasks(searchParameter)
20098
20176
  .subscribe((response) => {
20099
20177
  // Filter task by query id
20100
- const filteredtask = response.tasks?.find((task) => {
20101
- return Object.values(task.additional_properties).some((value) => {
20102
- if (value === this.queryId) {
20103
- return task;
20104
- }
20105
- });
20106
- });
20178
+ const filteredTask = response.tasks?.find((task) => Object.values(task.additional_properties).some((value) => value === this.queryId));
20107
20179
  // Trigger event completion
20108
20180
  this.eventCompletionParams = {
20109
20181
  caseId: this.caseDetails.case_id,
20110
20182
  eventId: this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID,
20111
- task: filteredtask
20183
+ task: filteredTask
20112
20184
  };
20185
+ }, (error) => {
20186
+ console.error('Error in searchTasksSubscription:', error);
20187
+ // Handle error appropriately
20113
20188
  });
20114
20189
  }
20115
20190
  generateCaseQueriesCollectionData() {
@@ -20117,16 +20192,52 @@ class QueryCheckYourAnswersComponent {
20117
20192
  const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
20118
20193
  ? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
20119
20194
  : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
20195
+ const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
20196
+ const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
20120
20197
  // Check if the field ID has been set dynamically
20121
20198
  if (!this.fieldId) {
20122
20199
  console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
20123
20200
  this.router.navigate(['/', 'service-down']);
20124
20201
  }
20125
- // Dynamically determine the field ID
20126
- const dynamicFieldId = this.fieldId;
20127
- // Base data structure for the query with dynamic property name
20128
- const newQueryData = {
20129
- [dynamicFieldId]: {
20202
+ // Initialize new query data structure
20203
+ const newQueryData = {};
20204
+ if (this.caseQueriesCollections?.length) {
20205
+ let matchedCollection;
20206
+ // If it's not a new query, try to find the existing collection with the message ID
20207
+ if (!isNewQuery && messageId) {
20208
+ matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
20209
+ }
20210
+ if (matchedCollection) {
20211
+ // Append the new case message to the matched collection's caseMessages
20212
+ matchedCollection.caseMessages.push({
20213
+ id: null,
20214
+ value: caseMessage
20215
+ });
20216
+ // Add the matched collection to newQueryData
20217
+ newQueryData[this.fieldId] = {
20218
+ ...matchedCollection, // Keep existing data intact
20219
+ caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
20220
+ };
20221
+ }
20222
+ else {
20223
+ // If no collection matches, or it's a new query
20224
+ newQueryData[this.fieldId] = {
20225
+ partyName: '', // Not returned by CCD
20226
+ roleOnCase: '', // Not returned by CCD
20227
+ caseMessages: [
20228
+ {
20229
+ id: null,
20230
+ value: caseMessage
20231
+ }
20232
+ ]
20233
+ };
20234
+ // If caseQueriesCollections is not empty, append its data
20235
+ newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
20236
+ }
20237
+ }
20238
+ else {
20239
+ // If there are no existing collections, create a new one (e.g., for new queries)
20240
+ newQueryData[this.fieldId] = {
20130
20241
  partyName: '', // Not returned by CCD
20131
20242
  roleOnCase: '', // Not returned by CCD
20132
20243
  caseMessages: [
@@ -20135,21 +20246,16 @@ class QueryCheckYourAnswersComponent {
20135
20246
  value: caseMessage
20136
20247
  }
20137
20248
  ]
20138
- }
20139
- };
20140
- // If caseQueriesCollections is not empty, append its data
20141
- if (this.caseQueriesCollections && this.caseQueriesCollections.length > 0) {
20142
- newQueryData[dynamicFieldId].caseMessages.push(...this.caseQueriesCollections.map((collection) => collection.caseMessages).flat());
20249
+ };
20143
20250
  }
20144
20251
  return newQueryData;
20145
20252
  }
20146
- isCaseQueriesClollectionDataPresent() {
20147
- if (this.route.snapshot?.data?.case?.tabs) {
20148
- this.caseQueriesCollections = this.route.snapshot.data.case.tabs
20149
- .filter((tab) => tab?.fields?.some((caseField) => caseField.field_type.id === this.CASE_QUERIES_COLLECTION_ID && caseField.field_type.type === this.FIELD_TYPE_COMPLEX))[0]?.fields?.reduce((acc, caseField) => {
20253
+ setCaseQueriesCollectionData() {
20254
+ if (this.eventData?.case_fields?.length) {
20255
+ this.caseQueriesCollections = this.eventData.case_fields.reduce((acc, caseField) => {
20150
20256
  // Extract the ID based on conditions, updating this.fieldId dynamically
20151
- this.extractIdBasedOnConditions(caseField);
20152
- const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField, caseField.id);
20257
+ this.extractCaseQueryId(caseField);
20258
+ const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
20153
20259
  if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
20154
20260
  acc.push(extractedCaseQueriesFromCaseField);
20155
20261
  }
@@ -20157,112 +20263,128 @@ class QueryCheckYourAnswersComponent {
20157
20263
  }, []);
20158
20264
  }
20159
20265
  }
20160
- extractIdBasedOnConditions(data) {
20161
- // Check if field_type.id is 'CaseQueriesCollection' and field_type.type is 'Complex'
20162
- if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
20163
- data.field_type.type === this.FIELD_TYPE_COMPLEX) {
20164
- // Set the field ID dynamically based on the extracted data
20165
- this.fieldId = data.id; // Store the ID for use in generating newQueryData
20266
+ extractCaseQueryId(data) {
20267
+ const { id, value } = data;
20268
+ const messageId = this.route.snapshot.params.dataid;
20269
+ // Check if the field_type matches CaseQueriesCollection and type is Complex
20270
+ if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID && data.field_type.type === this.FIELD_TYPE_COMPLEX) {
20271
+ if (this.queryCreateContext !== QueryCreateContext.RESPOND) {
20272
+ // Set the field ID dynamically based on the extracted data
20273
+ this.fieldId = id; // Store the ID for use in generating newQueryData
20274
+ }
20275
+ // If messageId is present, find the corresponding case message
20276
+ if (messageId && value?.caseMessages) {
20277
+ // Check for a message that has the specified messageId
20278
+ const matchedMessage = value.caseMessages.find((message) => message.value.id === messageId);
20279
+ // If a matching message is found, set the fieldId to the corresponding id
20280
+ if (matchedMessage) {
20281
+ this.fieldId = id; // This assumes you still want to use the same id
20282
+ }
20283
+ }
20166
20284
  }
20167
20285
  }
20168
- static ɵfac = function QueryCheckYourAnswersComponent_Factory(t) { return new (t || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService)); };
20169
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted" }, decls: 42, vars: 26, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
20286
+ static ɵfac = function QueryCheckYourAnswersComponent_Factory(t) { return new (t || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(EventTriggerService)); };
20287
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted" }, decls: 43, vars: 27, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["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"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
20170
20288
  const _r1 = i0.ɵɵgetCurrentView();
20171
20289
  i0.ɵɵelementStart(0, "div", 2)(1, "div", 3);
20172
- i0.ɵɵtemplate(2, QueryCheckYourAnswersComponent_ng_container_2_Template, 4, 3, "ng-container", 4);
20173
- i0.ɵɵelementStart(3, "h1", 5);
20174
- i0.ɵɵtemplate(4, QueryCheckYourAnswersComponent_ng_container_4_Template, 3, 3, "ng-container", 6)(5, QueryCheckYourAnswersComponent_ng_template_5_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
20290
+ i0.ɵɵtemplate(2, QueryCheckYourAnswersComponent_div_2_Template, 7, 4, "div", 4)(3, QueryCheckYourAnswersComponent_ng_container_3_Template, 4, 3, "ng-container", 5);
20291
+ i0.ɵɵelementStart(4, "h1", 6);
20292
+ i0.ɵɵtemplate(5, QueryCheckYourAnswersComponent_ng_container_5_Template, 3, 3, "ng-container", 7)(6, QueryCheckYourAnswersComponent_ng_template_6_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
20175
20293
  i0.ɵɵelementEnd();
20176
- i0.ɵɵelementStart(7, "div", 7);
20177
- i0.ɵɵelement(8, "ccd-query-case-details-header");
20294
+ i0.ɵɵelementStart(8, "div", 8);
20295
+ i0.ɵɵelement(9, "ccd-query-case-details-header");
20178
20296
  i0.ɵɵelementEnd();
20179
- i0.ɵɵtemplate(9, QueryCheckYourAnswersComponent_dl_9_Template, 9, 5, "dl", 8);
20180
- i0.ɵɵelementStart(10, "dl", 9)(11, "div", 10)(12, "dt", 11);
20181
- i0.ɵɵtext(13);
20182
- i0.ɵɵpipe(14, "rpxTranslate");
20297
+ i0.ɵɵtemplate(10, QueryCheckYourAnswersComponent_dl_10_Template, 9, 5, "dl", 9);
20298
+ i0.ɵɵelementStart(11, "dl", 10)(12, "div", 11)(13, "dt", 12);
20299
+ i0.ɵɵtext(14);
20300
+ i0.ɵɵpipe(15, "rpxTranslate");
20183
20301
  i0.ɵɵelementEnd();
20184
- i0.ɵɵelementStart(15, "dd", 12);
20185
- i0.ɵɵtext(16);
20302
+ i0.ɵɵelementStart(16, "dd", 13);
20303
+ i0.ɵɵtext(17);
20186
20304
  i0.ɵɵelementEnd();
20187
- i0.ɵɵelementStart(17, "dd", 13)(18, "a", 14);
20188
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_18_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20189
- i0.ɵɵtext(19);
20190
- i0.ɵɵpipe(20, "rpxTranslate");
20305
+ i0.ɵɵelementStart(18, "dd", 14)(19, "a", 15);
20306
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_19_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20307
+ i0.ɵɵtext(20);
20308
+ i0.ɵɵpipe(21, "rpxTranslate");
20191
20309
  i0.ɵɵelementEnd()()()();
20192
- i0.ɵɵtemplate(21, QueryCheckYourAnswersComponent_dl_21_Template, 14, 9, "dl", 8);
20193
- i0.ɵɵelementStart(22, "dl", 9)(23, "div", 10)(24, "dt", 11);
20194
- i0.ɵɵtext(25);
20195
- i0.ɵɵpipe(26, "rpxTranslate");
20310
+ i0.ɵɵtemplate(22, QueryCheckYourAnswersComponent_dl_22_Template, 14, 9, "dl", 9);
20311
+ i0.ɵɵelementStart(23, "dl", 10)(24, "div", 11)(25, "dt", 12);
20312
+ i0.ɵɵtext(26);
20313
+ i0.ɵɵpipe(27, "rpxTranslate");
20196
20314
  i0.ɵɵelementEnd();
20197
- i0.ɵɵelementStart(27, "dd", 15);
20198
- i0.ɵɵtemplate(28, QueryCheckYourAnswersComponent_ccd_query_attachments_read_28_Template, 1, 1, "ccd-query-attachments-read", 16);
20315
+ i0.ɵɵelementStart(28, "dd", 16);
20316
+ i0.ɵɵtemplate(29, QueryCheckYourAnswersComponent_ccd_query_attachments_read_29_Template, 1, 1, "ccd-query-attachments-read", 17);
20199
20317
  i0.ɵɵelementEnd();
20200
- i0.ɵɵelementStart(29, "dd", 13)(30, "a", 14);
20201
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_30_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20202
- i0.ɵɵtext(31);
20203
- i0.ɵɵpipe(32, "rpxTranslate");
20318
+ i0.ɵɵelementStart(30, "dd", 14)(31, "a", 15);
20319
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_31_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20320
+ i0.ɵɵtext(32);
20321
+ i0.ɵɵpipe(33, "rpxTranslate");
20204
20322
  i0.ɵɵelementEnd()()()();
20205
- i0.ɵɵelement(33, "br");
20206
- i0.ɵɵelementStart(34, "div")(35, "button", 17);
20207
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_35_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20208
- i0.ɵɵtext(36);
20209
- i0.ɵɵpipe(37, "rpxTranslate");
20323
+ i0.ɵɵelement(34, "br");
20324
+ i0.ɵɵelementStart(35, "div")(36, "button", 18);
20325
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_36_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.goBack()); });
20326
+ i0.ɵɵtext(37);
20327
+ i0.ɵɵpipe(38, "rpxTranslate");
20210
20328
  i0.ɵɵelementEnd();
20211
- i0.ɵɵelementStart(38, "button", 18);
20212
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_38_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.submit()); });
20213
- i0.ɵɵtext(39);
20214
- i0.ɵɵpipe(40, "rpxTranslate");
20329
+ i0.ɵɵelementStart(39, "button", 19);
20330
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_39_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.submit()); });
20331
+ i0.ɵɵtext(40);
20332
+ i0.ɵɵpipe(41, "rpxTranslate");
20215
20333
  i0.ɵɵelementEnd()()();
20216
- i0.ɵɵelement(41, "ccd-query-event-completion", 19);
20334
+ i0.ɵɵelement(42, "ccd-query-event-completion", 20);
20217
20335
  i0.ɵɵelementEnd();
20218
20336
  } if (rf & 2) {
20219
- let tmp_6_0;
20220
- const defaultCheckYourAnswersTitle_r7 = i0.ɵɵreference(6);
20337
+ let tmp_7_0;
20338
+ const defaultCheckYourAnswersTitle_r8 = i0.ɵɵreference(7);
20221
20339
  i0.ɵɵadvance(2);
20340
+ i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
20341
+ i0.ɵɵadvance();
20222
20342
  i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY);
20223
20343
  i0.ɵɵadvance(2);
20224
- i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND)("ngIfElse", defaultCheckYourAnswersTitle_r7);
20344
+ i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND)("ngIfElse", defaultCheckYourAnswersTitle_r8);
20225
20345
  i0.ɵɵadvance(5);
20226
20346
  i0.ɵɵproperty("ngIf", ctx.queryCreateContext !== ctx.queryCreateContextEnum.FOLLOWUP);
20227
20347
  i0.ɵɵadvance(4);
20228
- i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(14, 14, "Query detail"), " ");
20348
+ i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(15, 15, "Query detail"), " ");
20229
20349
  i0.ɵɵadvance(3);
20230
- i0.ɵɵtextInterpolate1(" ", (tmp_6_0 = ctx.formGroup.get("body")) == null ? null : tmp_6_0.value, " ");
20350
+ i0.ɵɵtextInterpolate1(" ", (tmp_7_0 = ctx.formGroup.get("body")) == null ? null : tmp_7_0.value, " ");
20231
20351
  i0.ɵɵadvance(3);
20232
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 16, "Change"), " ");
20352
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(21, 17, "Change"), " ");
20233
20353
  i0.ɵɵadvance(2);
20234
20354
  i0.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY);
20235
20355
  i0.ɵɵadvance(4);
20236
- i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY ? "Upload a file to the query" : i0.ɵɵpipeBind1(26, 18, "Document attached"), " ");
20356
+ i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.NEW_QUERY ? "Upload a file to the query" : i0.ɵɵpipeBind1(27, 19, "Document attached"), " ");
20237
20357
  i0.ɵɵadvance(3);
20238
20358
  i0.ɵɵproperty("ngIf", ctx.formGroup.get("attachments").value);
20239
20359
  i0.ɵɵadvance(3);
20240
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(32, 20, "Change"), " ");
20360
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(33, 21, "Change"), " ");
20241
20361
  i0.ɵɵadvance(5);
20242
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(37, 22, "Previous"), " ");
20362
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(38, 23, "Previous"), " ");
20243
20363
  i0.ɵɵadvance(3);
20244
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(40, 24, "Submit"), " ");
20364
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(41, 25, "Submit"), " ");
20245
20365
  i0.ɵɵadvance(2);
20246
20366
  i0.ɵɵproperty("eventCompletionParams", ctx.eventCompletionParams);
20247
20367
  } }, styles: [".govuk-summary-list__value--documentAttached[_ngcontent-%COMP%]{vertical-align:middle}"] });
20248
20368
  }
20249
20369
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
20250
20370
  type: Component,
20251
- args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds-from-desktop\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n </ng-container>\n\n <h1 class=\"govuk-heading-l\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND; else defaultCheckYourAnswersTitle\">\n {{ 'Review query response details' | rpxTranslate }}\n </ng-container>\n\n <ng-template #defaultCheckYourAnswersTitle>\n {{ 'Review query details' | rpxTranslate }}\n </ng-template>\n </h1>\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header></ccd-query-case-details-header>\n </div>\n\n <dl *ngIf=\"queryCreateContext !== queryCreateContextEnum.FOLLOWUP\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Submitted query' : 'Query subject' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? queryItem.subject : formGroup.get('subject')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" \n href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query detail' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('body')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <ng-container *ngIf=\"formGroup.get('isHearingRelated')?.value === true; else isHearingRelatedFalse\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </ng-container>\n <ng-template #isHearingRelatedFalse>\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </ng-template>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n\n <div *ngIf=\"formGroup.get('isHearingRelated')?.value\" class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY\n ? 'What is the date of the hearing?'\n : 'What is the date of the hearing your query is related to?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('hearingDate')?.value | date: 'dd MMM yyyy' }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY ? 'Upload a file to the query' : 'Document attached' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value govuk-summary-list__value--documentAttached\">\n <ccd-query-attachments-read\n *ngIf=\"this.formGroup.get('attachments').value\"\n [attachments]=\"this.formGroup.get('attachments').value\"\n >\n </ccd-query-attachments-read>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <br>\n\n <div>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-right-3\" data-module=\"govuk-button\"\n (click)=\"goBack()\">\n {{ 'Previous' | rpxTranslate }}\n </button>\n <button class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"submit()\">\n {{ 'Submit' | rpxTranslate }}\n </button>\n </div>\n </div>\n\n <ccd-query-event-completion [eventCompletionParams]=\"eventCompletionParams\"> \n </ccd-query-event-completion>\n</div>\n", styles: [".govuk-summary-list__value--documentAttached{vertical-align:middle}\n"] }]
20252
- }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }], { formGroup: [{
20371
+ args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds-from-desktop\">\n <!-- Error message summary -->\n <div *ngIf=\"errorMessages.length > 0\" class=\"govuk-error-summary\"\n aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\"\n data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{ 'There is a problem' | rpxTranslate }}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a [id]=\"'error-' + errorMessage.fieldId\" href=\"javascript:void(0)\"\n class=\"validation-error\">{{ errorMessage.description | rpxTranslate }}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n </ng-container>\n\n <h1 class=\"govuk-heading-l\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND; else defaultCheckYourAnswersTitle\">\n {{ 'Review query response details' | rpxTranslate }}\n </ng-container>\n\n <ng-template #defaultCheckYourAnswersTitle>\n {{ 'Review query details' | rpxTranslate }}\n </ng-template>\n </h1>\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header></ccd-query-case-details-header>\n </div>\n\n <dl *ngIf=\"queryCreateContext !== queryCreateContextEnum.FOLLOWUP\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Submitted query' : 'Query subject' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? queryItem.subject : formGroup.get('subject')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" \n href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query detail' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('body')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <ng-container *ngIf=\"formGroup.get('isHearingRelated')?.value === true; else isHearingRelatedFalse\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </ng-container>\n <ng-template #isHearingRelatedFalse>\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </ng-template>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n\n <div *ngIf=\"formGroup.get('isHearingRelated')?.value\" class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY\n ? 'What is the date of the hearing?'\n : 'What is the date of the hearing your query is related to?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('hearingDate')?.value | date: 'dd MMM yyyy' }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY ? 'Upload a file to the query' : 'Document attached' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value govuk-summary-list__value--documentAttached\">\n <ccd-query-attachments-read\n *ngIf=\"this.formGroup.get('attachments').value\"\n [attachments]=\"this.formGroup.get('attachments').value\"\n >\n </ccd-query-attachments-read>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <br>\n\n <div>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-right-3\" data-module=\"govuk-button\"\n (click)=\"goBack()\">\n {{ 'Previous' | rpxTranslate }}\n </button>\n <button class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"submit()\">\n {{ 'Submit' | rpxTranslate }}\n </button>\n </div>\n </div>\n\n <ccd-query-event-completion [eventCompletionParams]=\"eventCompletionParams\"> \n </ccd-query-event-completion>\n</div>\n", styles: [".govuk-summary-list__value--documentAttached{vertical-align:middle}\n"] }]
20372
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: EventTriggerService }], { formGroup: [{
20253
20373
  type: Input
20254
20374
  }], queryItem: [{
20255
20375
  type: Input
20256
20376
  }], queryCreateContext: [{
20257
20377
  type: Input
20378
+ }], eventData: [{
20379
+ type: Input
20258
20380
  }], backClicked: [{
20259
20381
  type: Output
20260
20382
  }], querySubmitted: [{
20261
20383
  type: Output
20262
20384
  }] }); })();
20263
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 24 }); })();
20385
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 23 }); })();
20264
20386
 
20265
- function QueryDetailsComponent_ng_container_0_tr_45_Template(rf, ctx) { if (rf & 1) {
20387
+ function QueryDetailsComponent_ng_container_0_tr_46_Template(rf, ctx) { if (rf & 1) {
20266
20388
  i0.ɵɵelementStart(0, "tr", 11)(1, "th", 7);
20267
20389
  i0.ɵɵtext(2);
20268
20390
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -20278,13 +20400,13 @@ function QueryDetailsComponent_ng_container_0_tr_45_Template(rf, ctx) { if (rf &
20278
20400
  i0.ɵɵadvance(3);
20279
20401
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(6, 4, ctx_r1.query.hearingDate, "dd MMM yyyy"));
20280
20402
  } }
20281
- function QueryDetailsComponent_ng_container_0_ccd_query_attachments_read_51_Template(rf, ctx) { if (rf & 1) {
20403
+ function QueryDetailsComponent_ng_container_0_ccd_query_attachments_read_52_Template(rf, ctx) { if (rf & 1) {
20282
20404
  i0.ɵɵelement(0, "ccd-query-attachments-read", 12);
20283
20405
  } if (rf & 2) {
20284
20406
  const ctx_r1 = i0.ɵɵnextContext(2);
20285
20407
  i0.ɵɵproperty("attachments", ctx_r1.query.attachments);
20286
20408
  } }
20287
- function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_container_1_tr_15_Template(rf, ctx) { if (rf & 1) {
20409
+ function QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_container_1_tr_15_Template(rf, ctx) { if (rf & 1) {
20288
20410
  i0.ɵɵelementStart(0, "tr", 6)(1, "th", 7);
20289
20411
  i0.ɵɵtext(2);
20290
20412
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -20299,13 +20421,13 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_
20299
20421
  i0.ɵɵadvance(3);
20300
20422
  i0.ɵɵtextInterpolate(child_r3.name);
20301
20423
  } }
20302
- function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_container_1_ccd_query_attachments_read_27_Template(rf, ctx) { if (rf & 1) {
20424
+ function QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_container_1_ccd_query_attachments_read_27_Template(rf, ctx) { if (rf & 1) {
20303
20425
  i0.ɵɵelement(0, "ccd-query-attachments-read", 12);
20304
20426
  } if (rf & 2) {
20305
20427
  const child_r3 = i0.ɵɵnextContext(2).$implicit;
20306
20428
  i0.ɵɵproperty("attachments", child_r3.attachments);
20307
20429
  } }
20308
- function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20430
+ function QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20309
20431
  i0.ɵɵelementContainerStart(0);
20310
20432
  i0.ɵɵelementStart(1, "table", 3);
20311
20433
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -20321,7 +20443,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_
20321
20443
  i0.ɵɵtext(13);
20322
20444
  i0.ɵɵpipe(14, "date");
20323
20445
  i0.ɵɵelementEnd()();
20324
- i0.ɵɵtemplate(15, QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_container_1_tr_15_Template, 6, 4, "tr", 15);
20446
+ i0.ɵɵtemplate(15, QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_container_1_tr_15_Template, 6, 4, "tr", 15);
20325
20447
  i0.ɵɵelementStart(16, "tr", 6)(17, "th", 7);
20326
20448
  i0.ɵɵtext(18);
20327
20449
  i0.ɵɵpipe(19, "rpxTranslate");
@@ -20334,7 +20456,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_
20334
20456
  i0.ɵɵpipe(25, "rpxTranslate");
20335
20457
  i0.ɵɵelementEnd();
20336
20458
  i0.ɵɵelementStart(26, "td", 8);
20337
- i0.ɵɵtemplate(27, QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_container_1_ccd_query_attachments_read_27_Template, 1, 1, "ccd-query-attachments-read", 10);
20459
+ i0.ɵɵtemplate(27, QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_container_1_ccd_query_attachments_read_27_Template, 1, 1, "ccd-query-attachments-read", 10);
20338
20460
  i0.ɵɵelementEnd()()()();
20339
20461
  i0.ɵɵelementContainerEnd();
20340
20462
  } if (rf & 2) {
@@ -20359,13 +20481,13 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_
20359
20481
  i0.ɵɵadvance(3);
20360
20482
  i0.ɵɵproperty("ngIf", child_r3.attachments);
20361
20483
  } }
20362
- function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_template_2_ccd_query_attachments_read_34_Template(rf, ctx) { if (rf & 1) {
20484
+ function QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_template_2_ccd_query_attachments_read_34_Template(rf, ctx) { if (rf & 1) {
20363
20485
  i0.ɵɵelement(0, "ccd-query-attachments-read", 12);
20364
20486
  } if (rf & 2) {
20365
20487
  const child_r3 = i0.ɵɵnextContext(2).$implicit;
20366
20488
  i0.ɵɵproperty("attachments", child_r3.attachments);
20367
20489
  } }
20368
- function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
20490
+ function QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
20369
20491
  i0.ɵɵelementStart(0, "div", 16);
20370
20492
  i0.ɵɵtext(1);
20371
20493
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -20403,7 +20525,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_
20403
20525
  i0.ɵɵpipe(32, "rpxTranslate");
20404
20526
  i0.ɵɵelementEnd();
20405
20527
  i0.ɵɵelementStart(33, "td", 8);
20406
- i0.ɵɵtemplate(34, QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_template_2_ccd_query_attachments_read_34_Template, 1, 1, "ccd-query-attachments-read", 10);
20528
+ i0.ɵɵtemplate(34, QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_template_2_ccd_query_attachments_read_34_Template, 1, 1, "ccd-query-attachments-read", 10);
20407
20529
  i0.ɵɵelementEnd()()()();
20408
20530
  } if (rf & 2) {
20409
20531
  const child_r3 = i0.ɵɵnextContext().$implicit;
@@ -20430,9 +20552,9 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_
20430
20552
  i0.ɵɵadvance(3);
20431
20553
  i0.ɵɵproperty("ngIf", child_r3.attachments);
20432
20554
  } }
20433
- function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20555
+ function QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_Template(rf, ctx) { if (rf & 1) {
20434
20556
  i0.ɵɵelementContainerStart(0);
20435
- i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_container_1_Template, 28, 22, "ng-container", 14)(2, QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_ng_template_2_Template, 35, 28, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
20557
+ i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_container_1_Template, 28, 22, "ng-container", 14)(2, QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_ng_template_2_Template, 35, 28, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
20436
20558
  i0.ɵɵelementContainerEnd();
20437
20559
  } if (rf & 2) {
20438
20560
  const i_r4 = ctx.index;
@@ -20440,9 +20562,9 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_Tem
20440
20562
  i0.ɵɵadvance();
20441
20563
  i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
20442
20564
  } }
20443
- function QueryDetailsComponent_ng_container_0_ng_container_52_Template(rf, ctx) { if (rf & 1) {
20565
+ function QueryDetailsComponent_ng_container_0_ng_container_53_Template(rf, ctx) { if (rf & 1) {
20444
20566
  i0.ɵɵelementContainerStart(0);
20445
- i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_52_ng_container_1_Template, 4, 2, "ng-container", 13);
20567
+ i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_53_ng_container_1_Template, 4, 2, "ng-container", 13);
20446
20568
  i0.ɵɵelementContainerEnd();
20447
20569
  } if (rf & 2) {
20448
20570
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -20452,100 +20574,101 @@ function QueryDetailsComponent_ng_container_0_ng_container_52_Template(rf, ctx)
20452
20574
  function QueryDetailsComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
20453
20575
  const _r1 = i0.ɵɵgetCurrentView();
20454
20576
  i0.ɵɵelementContainerStart(0);
20455
- i0.ɵɵelementStart(1, "p")(2, "a", 2);
20456
- i0.ɵɵlistener("click", function QueryDetailsComponent_ng_container_0_Template_a_click_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onBack()); });
20457
- i0.ɵɵtext(3);
20458
- i0.ɵɵpipe(4, "rpxTranslate");
20577
+ i0.ɵɵelement(1, "br");
20578
+ i0.ɵɵelementStart(2, "p")(3, "a", 2);
20579
+ i0.ɵɵlistener("click", function QueryDetailsComponent_ng_container_0_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onBack()); });
20580
+ i0.ɵɵtext(4);
20581
+ i0.ɵɵpipe(5, "rpxTranslate");
20459
20582
  i0.ɵɵelementEnd()();
20460
- i0.ɵɵelementStart(5, "div")(6, "table", 3);
20461
- i0.ɵɵpipe(7, "rpxTranslate");
20462
- i0.ɵɵelementStart(8, "caption", 4)(9, "div");
20463
- i0.ɵɵtext(10);
20464
- i0.ɵɵpipe(11, "rpxTranslate");
20583
+ i0.ɵɵelementStart(6, "div")(7, "table", 3);
20584
+ i0.ɵɵpipe(8, "rpxTranslate");
20585
+ i0.ɵɵelementStart(9, "caption", 4)(10, "div");
20586
+ i0.ɵɵtext(11);
20587
+ i0.ɵɵpipe(12, "rpxTranslate");
20465
20588
  i0.ɵɵelementEnd()();
20466
- i0.ɵɵelementStart(12, "tbody", 5)(13, "tr", 6)(14, "th", 7);
20467
- i0.ɵɵtext(15);
20468
- i0.ɵɵpipe(16, "rpxTranslate");
20589
+ i0.ɵɵelementStart(13, "tbody", 5)(14, "tr", 6)(15, "th", 7);
20590
+ i0.ɵɵtext(16);
20591
+ i0.ɵɵpipe(17, "rpxTranslate");
20469
20592
  i0.ɵɵelementEnd();
20470
- i0.ɵɵelementStart(17, "td", 8);
20471
- i0.ɵɵtext(18);
20593
+ i0.ɵɵelementStart(18, "td", 8);
20594
+ i0.ɵɵtext(19);
20472
20595
  i0.ɵɵelementEnd()();
20473
- i0.ɵɵelementStart(19, "tr", 6)(20, "th", 7);
20474
- i0.ɵɵtext(21);
20475
- i0.ɵɵpipe(22, "rpxTranslate");
20596
+ i0.ɵɵelementStart(20, "tr", 6)(21, "th", 7);
20597
+ i0.ɵɵtext(22);
20598
+ i0.ɵɵpipe(23, "rpxTranslate");
20476
20599
  i0.ɵɵelementEnd();
20477
- i0.ɵɵelementStart(23, "td", 8);
20478
- i0.ɵɵtext(24);
20479
- i0.ɵɵpipe(25, "date");
20600
+ i0.ɵɵelementStart(24, "td", 8);
20601
+ i0.ɵɵtext(25);
20602
+ i0.ɵɵpipe(26, "date");
20480
20603
  i0.ɵɵelementEnd()();
20481
- i0.ɵɵelementStart(26, "tr", 6)(27, "th", 7);
20482
- i0.ɵɵtext(28);
20483
- i0.ɵɵpipe(29, "rpxTranslate");
20604
+ i0.ɵɵelementStart(27, "tr", 6)(28, "th", 7);
20605
+ i0.ɵɵtext(29);
20606
+ i0.ɵɵpipe(30, "rpxTranslate");
20484
20607
  i0.ɵɵelementEnd();
20485
- i0.ɵɵelementStart(30, "td", 8);
20486
- i0.ɵɵtext(31);
20608
+ i0.ɵɵelementStart(31, "td", 8);
20609
+ i0.ɵɵtext(32);
20487
20610
  i0.ɵɵelementEnd()();
20488
- i0.ɵɵelementStart(32, "tr", 6)(33, "th", 7);
20489
- i0.ɵɵtext(34);
20490
- i0.ɵɵpipe(35, "rpxTranslate");
20611
+ i0.ɵɵelementStart(33, "tr", 6)(34, "th", 7);
20612
+ i0.ɵɵtext(35);
20613
+ i0.ɵɵpipe(36, "rpxTranslate");
20491
20614
  i0.ɵɵelementEnd();
20492
- i0.ɵɵelementStart(36, "td", 8);
20493
- i0.ɵɵtext(37);
20615
+ i0.ɵɵelementStart(37, "td", 8);
20616
+ i0.ɵɵtext(38);
20494
20617
  i0.ɵɵelementEnd()();
20495
- i0.ɵɵelementStart(38, "tr", 6)(39, "th", 7);
20496
- i0.ɵɵtext(40);
20497
- i0.ɵɵpipe(41, "rpxTranslate");
20618
+ i0.ɵɵelementStart(39, "tr", 6)(40, "th", 7);
20619
+ i0.ɵɵtext(41);
20620
+ i0.ɵɵpipe(42, "rpxTranslate");
20498
20621
  i0.ɵɵelementEnd();
20499
- i0.ɵɵelementStart(42, "td", 8);
20500
- i0.ɵɵtext(43);
20501
- i0.ɵɵpipe(44, "rpxTranslate");
20622
+ i0.ɵɵelementStart(43, "td", 8);
20623
+ i0.ɵɵtext(44);
20624
+ i0.ɵɵpipe(45, "rpxTranslate");
20502
20625
  i0.ɵɵelementEnd()();
20503
- i0.ɵɵtemplate(45, QueryDetailsComponent_ng_container_0_tr_45_Template, 7, 7, "tr", 9);
20504
- i0.ɵɵelementStart(46, "tr", 6)(47, "th", 7);
20505
- i0.ɵɵtext(48);
20506
- i0.ɵɵpipe(49, "rpxTranslate");
20626
+ i0.ɵɵtemplate(46, QueryDetailsComponent_ng_container_0_tr_46_Template, 7, 7, "tr", 9);
20627
+ i0.ɵɵelementStart(47, "tr", 6)(48, "th", 7);
20628
+ i0.ɵɵtext(49);
20629
+ i0.ɵɵpipe(50, "rpxTranslate");
20507
20630
  i0.ɵɵelementEnd();
20508
- i0.ɵɵelementStart(50, "td", 8);
20509
- i0.ɵɵtemplate(51, QueryDetailsComponent_ng_container_0_ccd_query_attachments_read_51_Template, 1, 1, "ccd-query-attachments-read", 10);
20631
+ i0.ɵɵelementStart(51, "td", 8);
20632
+ i0.ɵɵtemplate(52, QueryDetailsComponent_ng_container_0_ccd_query_attachments_read_52_Template, 1, 1, "ccd-query-attachments-read", 10);
20510
20633
  i0.ɵɵelementEnd()()()()();
20511
- i0.ɵɵtemplate(52, QueryDetailsComponent_ng_container_0_ng_container_52_Template, 2, 1, "ng-container", 1);
20634
+ i0.ɵɵtemplate(53, QueryDetailsComponent_ng_container_0_ng_container_53_Template, 2, 1, "ng-container", 1);
20512
20635
  i0.ɵɵelementContainerEnd();
20513
20636
  } if (rf & 2) {
20514
20637
  const ctx_r1 = i0.ɵɵnextContext();
20638
+ i0.ɵɵadvance(4);
20639
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 21, "Back to query list"));
20515
20640
  i0.ɵɵadvance(3);
20516
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 21, "Back to query list"));
20517
- i0.ɵɵadvance(3);
20518
- i0.ɵɵattribute("aria-describedby", i0.ɵɵpipeBind1(7, 23, "Details of the query"));
20641
+ i0.ɵɵattribute("aria-describedby", i0.ɵɵpipeBind1(8, 23, "Details of the query"));
20519
20642
  i0.ɵɵadvance(4);
20520
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 25, "Query details"));
20643
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 25, "Query details"));
20521
20644
  i0.ɵɵadvance(5);
20522
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 27, "Last submitted by"));
20645
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(17, 27, "Last submitted by"));
20523
20646
  i0.ɵɵadvance(3);
20524
20647
  i0.ɵɵtextInterpolate(ctx_r1.query.lastSubmittedBy);
20525
20648
  i0.ɵɵadvance(3);
20526
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 29, "Submission date"));
20649
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 29, "Submission date"));
20527
20650
  i0.ɵɵadvance(3);
20528
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(25, 31, ctx_r1.query.createdOn, "dd MMM yyyy"));
20651
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(26, 31, ctx_r1.query.createdOn, "dd MMM yyyy"));
20529
20652
  i0.ɵɵadvance(4);
20530
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(29, 34, "Query subject"));
20653
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30, 34, "Query subject"));
20531
20654
  i0.ɵɵadvance(3);
20532
20655
  i0.ɵɵtextInterpolate(ctx_r1.query.subject);
20533
20656
  i0.ɵɵadvance(3);
20534
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(35, 36, "Query body"));
20657
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 36, "Query body"));
20535
20658
  i0.ɵɵadvance(3);
20536
20659
  i0.ɵɵtextInterpolate(ctx_r1.query.body);
20537
20660
  i0.ɵɵadvance(2);
20538
20661
  i0.ɵɵclassProp("govuk-table__header--no-border", ctx_r1.query.isHearingRelated);
20539
20662
  i0.ɵɵadvance();
20540
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(41, 38, "Is the query hearing related?"), " ");
20663
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(42, 38, "Is the query hearing related?"), " ");
20541
20664
  i0.ɵɵadvance(2);
20542
20665
  i0.ɵɵclassProp("govuk-table__cell--no-border", ctx_r1.query.isHearingRelated);
20543
20666
  i0.ɵɵadvance();
20544
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(44, 40, "Is the query hearing related?", null, ctx_r1.query.isHearingRelated ? "Yes" : "No"), "");
20667
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(45, 40, "Is the query hearing related?", null, ctx_r1.query.isHearingRelated ? "Yes" : "No"), "");
20545
20668
  i0.ɵɵadvance(2);
20546
20669
  i0.ɵɵproperty("ngIf", ctx_r1.query.isHearingRelated);
20547
20670
  i0.ɵɵadvance(3);
20548
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49, 44, "Attachments"));
20671
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(50, 44, "Attachments"));
20549
20672
  i0.ɵɵadvance(3);
20550
20673
  i0.ɵɵproperty("ngIf", ctx_r1.query.attachments);
20551
20674
  i0.ɵɵadvance();
@@ -20570,14 +20693,14 @@ class QueryDetailsComponent {
20570
20693
  }
20571
20694
  static ɵfac = function QueryDetailsComponent_Factory(t) { return new (t || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService)); };
20572
20695
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryDetailsComponent, selectors: [["ccd-query-details"]], inputs: { query: "query", caseId: "caseId" }, outputs: { backClicked: "backClicked" }, decls: 1, vars: 1, consts: [["followUpMessage", ""], [4, "ngIf"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-table", "query-details-table"], [1, "govuk-table__caption", "govuk-table__caption--l"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row govuk-table__row--isHearingRelated", 4, "ngIf"], [3, "attachments", 4, "ngIf"], [1, "govuk-table__row", "govuk-table__row--isHearingRelated"], [3, "attachments"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"], ["class", "govuk-table__row", 4, "ngIf"], [1, "query_details_caption"]], template: function QueryDetailsComponent_Template(rf, ctx) { if (rf & 1) {
20573
- i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 53, 46, "ng-container", 1);
20696
+ i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 54, 46, "ng-container", 1);
20574
20697
  } if (rf & 2) {
20575
20698
  i0.ɵɵproperty("ngIf", ctx.query);
20576
20699
  } }, styles: [".query-details-table[_ngcontent-%COMP%] .govuk-table__header[_ngcontent-%COMP%]{width:330px}"] });
20577
20700
  }
20578
20701
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
20579
20702
  type: Component,
20580
- args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated ? 'Yes' : 'No') }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr *ngIf=\"isCaseworker()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div>\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
20703
+ args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <br/>\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated ? 'Yes' : 'No') }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr *ngIf=\"isCaseworker()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div>\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
20581
20704
  }], () => [{ type: SessionStorageService }], { query: [{
20582
20705
  type: Input
20583
20706
  }], backClicked: [{
@@ -20896,7 +21019,7 @@ class QueryWriteDateInputComponent {
20896
21019
  useExisting: forwardRef(() => QueryWriteDateInputComponent),
20897
21020
  multi: true
20898
21021
  }
20899
- ])], decls: 19, vars: 24, consts: [[1, "govuk-date-input", 3, "id"], [1, "govuk-date-input__item"], [1, "govuk-form-group"], [1, "govuk-label", "govuk-date-input__label", 3, "for"], ["type", "text", "inputmode", "numeric", 1, "govuk-input", "govuk-date-input__input", "govuk-input--width-2", 3, "ngModelChange", "input", "id", "name", "ngModel", "disabled"], ["id", "formControlName + '-year'", "type", "text", "inputmode", "numeric", 1, "govuk-input", "govuk-date-input__input", "govuk-input--width-4", 3, "ngModelChange", "input", "name", "ngModel", "disabled"]], template: function QueryWriteDateInputComponent_Template(rf, ctx) { if (rf & 1) {
21022
+ ])], decls: 19, vars: 24, consts: [[1, "govuk-date-input", 3, "id"], [1, "govuk-date-input__item"], [1, "govuk-form-group"], [1, "govuk-label", "govuk-date-input__label", 3, "for"], ["type", "text", "inputmode", "numeric", "maxlength", "2", 1, "govuk-input", "govuk-date-input__input", "govuk-input--width-2", 3, "ngModelChange", "input", "id", "name", "ngModel", "disabled"], ["id", "formControlName + '-year'", "type", "text", "inputmode", "numeric", "maxlength", "4", 1, "govuk-input", "govuk-date-input__input", "govuk-input--width-4", 3, "ngModelChange", "input", "name", "ngModel", "disabled"]], template: function QueryWriteDateInputComponent_Template(rf, ctx) { if (rf & 1) {
20900
21023
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "label", 3);
20901
21024
  i0.ɵɵtext(4);
20902
21025
  i0.ɵɵpipe(5, "rpxTranslate");
@@ -20947,7 +21070,7 @@ class QueryWriteDateInputComponent {
20947
21070
  i0.ɵɵproperty("name", ctx.formControlName + "-year");
20948
21071
  i0.ɵɵtwoWayProperty("ngModel", ctx.year);
20949
21072
  i0.ɵɵproperty("disabled", ctx.disabled);
20950
- } }, dependencies: [i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgModel, i1.RpxTranslatePipe], encapsulation: 2 });
21073
+ } }, dependencies: [i4.DefaultValueAccessor, i4.NgControlStatus, i4.MaxLengthValidator, i4.NgModel, i1.RpxTranslatePipe], encapsulation: 2 });
20951
21074
  }
20952
21075
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteDateInputComponent, [{
20953
21076
  type: Component,
@@ -20957,7 +21080,7 @@ class QueryWriteDateInputComponent {
20957
21080
  useExisting: forwardRef(() => QueryWriteDateInputComponent),
20958
21081
  multi: true
20959
21082
  }
20960
- ], template: "<div class=\"govuk-date-input\" [id]=\"formControlName\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"formControlName + '-day'\">\n {{ 'Day' | rpxTranslate }}\n </label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\" [id]=\"formControlName + '-day'\"\n [name]=\"formControlName + '-day'\" type=\"text\" inputmode=\"numeric\"\n [(ngModel)]=\"day\" (input)=\"updateDate()\" [disabled]=\"disabled\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"formControlName + '-month'\">\n {{ 'Month' | rpxTranslate }}\n </label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\" [id]=\"formControlName + '-month'\"\n [name]=\"formControlName + '-month'\" type=\"text\" inputmode=\"numeric\"\n [(ngModel)]=\"month\" (input)=\"updateDate()\" [disabled]=\"disabled\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"formControlName + '-year'\">\n {{ 'Year' | rpxTranslate }}\n </label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-4\" id=\"formControlName + '-year'\"\n [name]=\"formControlName + '-year'\" type=\"text\" inputmode=\"numeric\"\n [(ngModel)]=\"year\" (input)=\"updateDate()\" [disabled]=\"disabled\">\n </div>\n </div>\n</div>\n" }]
21083
+ ], template: "<div class=\"govuk-date-input\" [id]=\"formControlName\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"formControlName + '-day'\">\n {{ 'Day' | rpxTranslate }}\n </label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\" [id]=\"formControlName + '-day'\"\n [name]=\"formControlName + '-day'\" type=\"text\" inputmode=\"numeric\" maxlength=\"2\"\n [(ngModel)]=\"day\" (input)=\"updateDate()\" [disabled]=\"disabled\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"formControlName + '-month'\">\n {{ 'Month' | rpxTranslate }}\n </label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\" [id]=\"formControlName + '-month'\"\n [name]=\"formControlName + '-month'\" type=\"text\" inputmode=\"numeric\" maxlength=\"2\"\n [(ngModel)]=\"month\" (input)=\"updateDate()\" [disabled]=\"disabled\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-date-input__label\" [for]=\"formControlName + '-year'\">\n {{ 'Year' | rpxTranslate }}\n </label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-4\" id=\"formControlName + '-year'\"\n [name]=\"formControlName + '-year'\" type=\"text\" inputmode=\"numeric\" maxlength=\"4\"\n [(ngModel)]=\"year\" (input)=\"updateDate()\" [disabled]=\"disabled\">\n </div>\n </div>\n</div>\n" }]
20961
21084
  }], null, { formControlName: [{
20962
21085
  type: Input
20963
21086
  }] }); })();
@@ -21159,7 +21282,7 @@ class QueryWriteRaiseQueryComponent {
21159
21282
  }], submitted: [{
21160
21283
  type: Input
21161
21284
  }] }); })();
21162
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 9 }); })();
21285
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 8 }); })();
21163
21286
 
21164
21287
  function QueryWriteRespondToQueryComponent_p_23_Template(rf, ctx) { if (rf & 1) {
21165
21288
  i0.ɵɵelementStart(0, "p", 13)(1, "span", 14);
@@ -21386,7 +21509,8 @@ class QueryConfirmationComponent {
21386
21509
  }] }); })();
21387
21510
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryConfirmationComponent, { className: "QueryConfirmationComponent", filePath: "lib/shared/components/palette/query-management/components/query-confirmation/query-confirmation.component.ts", lineNumber: 9 }); })();
21388
21511
 
21389
- const _c0$B = a0 => ["/query-management", "query", a0, "4"];
21512
+ const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
21513
+ const _c1$e = (a0, a1) => ["/query-management", "query", a0, "3", a1];
21390
21514
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
21391
21515
  const _r1 = i0.ɵɵgetCurrentView();
21392
21516
  i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
@@ -21415,7 +21539,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
21415
21539
  i0.ɵɵadvance();
21416
21540
  i0.ɵɵproperty("ngForOf", ctx_r1.caseQueriesCollections);
21417
21541
  } }
21418
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template(rf, ctx) { if (rf & 1) {
21542
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
21419
21543
  i0.ɵɵelementContainerStart(0);
21420
21544
  i0.ɵɵelementStart(1, "button", 9);
21421
21545
  i0.ɵɵtext(2);
@@ -21423,13 +21547,13 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template
21423
21547
  i0.ɵɵelementEnd();
21424
21548
  i0.ɵɵelementContainerEnd();
21425
21549
  } if (rf & 2) {
21426
- const ctx_r1 = i0.ɵɵnextContext(2);
21550
+ const ctx_r1 = i0.ɵɵnextContext(3);
21427
21551
  i0.ɵɵadvance();
21428
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(4, _c0$B, ctx_r1.caseId));
21552
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
21429
21553
  i0.ɵɵadvance();
21430
21554
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
21431
21555
  } }
21432
- function ReadQueryManagementFieldComponent_ng_template_1_ng_template_7_Template(rf, ctx) { if (rf & 1) {
21556
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
21433
21557
  i0.ɵɵelementStart(0, "div")(1, "p", 10);
21434
21558
  i0.ɵɵtext(2);
21435
21559
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -21444,37 +21568,55 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_template_7_Template(
21444
21568
  i0.ɵɵadvance(3);
21445
21569
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and will respond. Do not submit the same query more than once."));
21446
21570
  } }
21571
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
21572
+ i0.ɵɵelementContainerStart(0);
21573
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 2)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 7, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
21574
+ i0.ɵɵelementContainerEnd();
21575
+ } if (rf & 2) {
21576
+ const queryIsInReview_r5 = i0.ɵɵreference(3);
21577
+ const ctx_r1 = i0.ɵɵnextContext(2);
21578
+ i0.ɵɵadvance();
21579
+ i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) > 0 && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) % 2 === 1)("ngIfElse", queryIsInReview_r5);
21580
+ } }
21581
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
21582
+ i0.ɵɵelementContainerStart(0);
21583
+ i0.ɵɵelementStart(1, "button", 9);
21584
+ i0.ɵɵtext(2);
21585
+ i0.ɵɵpipe(3, "rpxTranslate");
21586
+ i0.ɵɵelementEnd();
21587
+ i0.ɵɵelementContainerEnd();
21588
+ } if (rf & 2) {
21589
+ const ctx_r1 = i0.ɵɵnextContext(2);
21590
+ i0.ɵɵadvance();
21591
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c1$e, ctx_r1.caseId, ctx_r1.query.id));
21592
+ i0.ɵɵadvance();
21593
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Response to a query"), " ");
21594
+ } }
21447
21595
  function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
21448
21596
  const _r4 = i0.ɵɵgetCurrentView();
21449
- i0.ɵɵelement(0, "br");
21450
- i0.ɵɵelementStart(1, "p")(2, "a", 7);
21451
- i0.ɵɵlistener("click", function ReadQueryManagementFieldComponent_ng_template_1_Template_a_click_2_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.backToQueryListPage()); });
21452
- i0.ɵɵtext(3);
21453
- i0.ɵɵpipe(4, "rpxTranslate");
21454
- i0.ɵɵelementEnd()();
21455
- i0.ɵɵelementStart(5, "ccd-query-details", 8);
21456
- i0.ɵɵlistener("backClicked", function ReadQueryManagementFieldComponent_ng_template_1_Template_ccd_query_details_backClicked_5_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showQueryList = true); });
21597
+ i0.ɵɵelementStart(0, "ccd-query-details", 7);
21598
+ i0.ɵɵlistener("backClicked", function ReadQueryManagementFieldComponent_ng_template_1_Template_ccd_query_details_backClicked_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showQueryList = true); });
21457
21599
  i0.ɵɵelementEnd();
21458
- i0.ɵɵtemplate(6, ReadQueryManagementFieldComponent_ng_template_1_ng_container_6_Template, 4, 6, "ng-container", 2)(7, ReadQueryManagementFieldComponent_ng_template_1_ng_template_7_Template, 7, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
21600
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 8)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template, 4, 7, "ng-container", 8);
21459
21601
  } if (rf & 2) {
21460
- const queryIsInReview_r5 = i0.ɵɵreference(8);
21461
21602
  const ctx_r1 = i0.ɵɵnextContext();
21462
- i0.ɵɵadvance(3);
21463
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "Back to queries"));
21464
- i0.ɵɵadvance(2);
21465
21603
  i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
21466
21604
  i0.ɵɵadvance();
21467
- i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) > 0)("ngIfElse", queryIsInReview_r5);
21605
+ i0.ɵɵproperty("ngIf", !ctx_r1.isCaseworker());
21606
+ i0.ɵɵadvance();
21607
+ i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) >= 0 && ctx_r1.isCaseworker() && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) % 2 === 0);
21468
21608
  } }
21469
21609
  class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
21470
21610
  route;
21611
+ sessionStorageService;
21471
21612
  caseQueriesCollections;
21472
21613
  query;
21473
21614
  showQueryList = true;
21474
21615
  caseId;
21475
- constructor(route) {
21616
+ constructor(route, sessionStorageService) {
21476
21617
  super();
21477
21618
  this.route = route;
21619
+ this.sessionStorageService = sessionStorageService;
21478
21620
  }
21479
21621
  ngOnInit() {
21480
21622
  this.caseId = this.route.snapshot.params.cid;
@@ -21487,7 +21629,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
21487
21629
  if (this.route.snapshot.data.case?.tabs) {
21488
21630
  this.caseQueriesCollections = this.route.snapshot.data.case.tabs
21489
21631
  .filter((tab) => tab.fields?.some((caseField) => caseField.field_type.type === 'ComponentLauncher' && caseField.id === this.caseField.id))[0].fields?.reduce((acc, caseField) => {
21490
- const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField, caseField.id);
21632
+ const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
21491
21633
  if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
21492
21634
  acc.push(extractedCaseQueriesFromCaseField);
21493
21635
  }
@@ -21506,9 +21648,15 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
21506
21648
  this.showQueryList = true;
21507
21649
  this.query = null;
21508
21650
  }
21509
- static ɵfac = function ReadQueryManagementFieldComponent_Factory(t) { return new (t || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
21510
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [3, "backClicked", "query", "caseId"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
21511
- i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 2)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 9, 7, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
21651
+ isCaseworker() {
21652
+ const userDetails = JSON.parse(this.sessionStorageService?.getItem('userDetails'));
21653
+ return userDetails && userDetails.roles
21654
+ && !(userDetails.roles.includes('pui-case-manager')
21655
+ || userDetails.roles.some((role) => role.toLowerCase().includes('judge')));
21656
+ }
21657
+ static ɵfac = function ReadQueryManagementFieldComponent_Factory(t) { return new (t || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService)); };
21658
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
21659
+ i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 2)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
21512
21660
  } if (rf & 2) {
21513
21661
  const singleQueryDetails_r6 = i0.ɵɵreference(2);
21514
21662
  i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
@@ -21516,9 +21664,9 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
21516
21664
  }
21517
21665
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
21518
21666
  type: Component,
21519
- args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <br>\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"backToQueryListPage()\">{{ 'Back to queries' | rpxTranslate }}</a>\n </p>\n\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"query?.children?.length > 0; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4']\"\n >\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and will respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n</ng-template>\n" }]
21520
- }], () => [{ type: i1$1.ActivatedRoute }], null); })();
21521
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 12 }); })();
21667
+ args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isCaseworker()\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and will respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"query?.children?.length >= 0 && isCaseworker() && query?.children?.length % 2 === 0\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '3', query.id]\"\n >\n {{ 'Response to a query' | rpxTranslate }}\n </button>\n </ng-container>\n</ng-template>\n" }]
21668
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }], null); })();
21669
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 13 }); })();
21522
21670
 
21523
21671
  class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
21524
21672
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(t) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(t || ReadTextAreaFieldComponent); }; })();
@@ -22760,10 +22908,11 @@ function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template(rf, c
22760
22908
  i0.ɵɵelement(6, "br");
22761
22909
  i0.ɵɵelementStart(7, "span", 17);
22762
22910
  i0.ɵɵtext(8);
22763
- i0.ɵɵpipe(9, "date");
22911
+ i0.ɵɵpipe(9, "ccdDate");
22912
+ i0.ɵɵpipe(10, "date");
22764
22913
  i0.ɵɵelementEnd()();
22765
- i0.ɵɵelementStart(10, "div", 18)(11, "ccd-case-file-view-folder-document-actions", 19);
22766
- i0.ɵɵlistener("changeFolderAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_changeFolderAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("changeFolder", node_r2)); })("openInANewTabAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_openInANewTabAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("openInANewTab", node_r2)); })("downloadAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_downloadAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("download", node_r2)); })("printAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_printAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("print", node_r2)); });
22914
+ i0.ɵɵelementStart(11, "div", 18)(12, "ccd-case-file-view-folder-document-actions", 19);
22915
+ i0.ɵɵlistener("changeFolderAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_changeFolderAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("changeFolder", node_r2)); })("openInANewTabAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_openInANewTabAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("openInANewTab", node_r2)); })("downloadAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_downloadAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("download", node_r2)); })("printAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_printAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("print", node_r2)); });
22767
22916
  i0.ɵɵelementEnd()()()();
22768
22917
  } if (rf & 2) {
22769
22918
  const node_r2 = ctx.$implicit;
@@ -22773,8 +22922,8 @@ function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template(rf, c
22773
22922
  i0.ɵɵadvance(4);
22774
22923
  i0.ɵɵtextInterpolate1(" ", node_r2.name, " ");
22775
22924
  i0.ɵɵadvance(3);
22776
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(9, 5, node_r2.upload_timestamp, "dd MMM YYYY HH:mm"));
22777
- i0.ɵɵadvance(3);
22925
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(10, 8, i0.ɵɵpipeBind2(9, 5, node_r2.upload_timestamp, "local"), "dd MMM YYYY HH:mm"));
22926
+ i0.ɵɵadvance(4);
22778
22927
  i0.ɵɵproperty("allowMoving", ctx_r2.allowMoving);
22779
22928
  } }
22780
22929
  function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template(rf, ctx) { if (rf & 1) {
@@ -22807,7 +22956,7 @@ function CaseFileViewFolderComponent_div_8_Template(rf, ctx) { if (rf & 1) {
22807
22956
  i0.ɵɵelementStart(0, "div", 7);
22808
22957
  i0.ɵɵtemplate(1, CaseFileViewFolderComponent_div_8_div_1_Template, 2, 0, "div", 8);
22809
22958
  i0.ɵɵelementStart(2, "div")(3, "cdk-tree", 9);
22810
- i0.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 12, 8, "cdk-nested-tree-node", 10)(5, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template, 10, 6, "cdk-nested-tree-node", 11);
22959
+ i0.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 13, 11, "cdk-nested-tree-node", 10)(5, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template, 10, 6, "cdk-nested-tree-node", 11);
22811
22960
  i0.ɵɵelementEnd()()();
22812
22961
  } if (rf & 2) {
22813
22962
  const ctx_r2 = i0.ɵɵnextContext();
@@ -22914,7 +23063,7 @@ class CaseFileViewFolderComponent {
22914
23063
  documentTreeNode.document_binary_url = document.document_binary_url;
22915
23064
  documentTreeNode.attribute_path = document.attribute_path;
22916
23065
  documentTreeNode.upload_timestamp = this.appConfig.getEnableCaseFileViewVersion1_1()
22917
- && document.upload_timestamp ? moment$1(document.upload_timestamp).format('DD MMM YYYY HH:mm:ss') : '';
23066
+ && document.upload_timestamp ? document.upload_timestamp.toString() : '';
22918
23067
  documentsToReturn.push(documentTreeNode);
22919
23068
  });
22920
23069
  return documentsToReturn;
@@ -22929,7 +23078,7 @@ class CaseFileViewFolderComponent {
22929
23078
  documentTreeNode.document_binary_url = document.document_binary_url;
22930
23079
  documentTreeNode.attribute_path = document.attribute_path;
22931
23080
  documentTreeNode.upload_timestamp = this.appConfig.getEnableCaseFileViewVersion1_1()
22932
- && document.upload_timestamp ? moment$1(document.upload_timestamp).format('DD MMM YYYY HH:mm:ss') : '';
23081
+ && document.upload_timestamp ? document.upload_timestamp.toString() : '';
22933
23082
  documents.push(documentTreeNode);
22934
23083
  });
22935
23084
  const uncategorisedNode = new DocumentTreeNode();
@@ -23063,11 +23212,11 @@ class CaseFileViewFolderComponent {
23063
23212
  i0.ɵɵtextInterpolate1("Documents (", ctx.documentCount, ")");
23064
23213
  i0.ɵɵadvance(3);
23065
23214
  i0.ɵɵproperty("ngIf", ctx.documentTreeData);
23066
- } }, dependencies: [i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i7.CdkNestedTreeNode, i7.CdkTreeNodeDef, i7.CdkTreeNodeToggle, i7.CdkTree, i7.CdkTreeNodeOutlet, CaseFileViewFolderSortComponent, CaseFileViewFolderDocumentActionsComponent, i5.DatePipe], styles: ["[_nghost-%COMP%]{display:flex;height:100%;flex-direction:column}[_nghost-%COMP%] .document-tree-container[_ngcontent-%COMP%]{flex:1 0}.document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #C9C9C9}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{padding:10px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%] .document-search[_ngcontent-%COMP%]{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node[_ngcontent-%COMP%]{display:block}.document-tree-container__node[_ngcontent-%COMP%] .document-tree-container__node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title[_ngcontent-%COMP%]{font-weight:700}.node[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected[_ngcontent-%COMP%]{background:#fff2cc}.node__icon[_ngcontent-%COMP%]{position:relative;display:inline-block}.node__count[_ngcontent-%COMP%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg[_ngcontent-%COMP%]{display:block;height:30px;width:30px}.node__name[_ngcontent-%COMP%]{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options[_ngcontent-%COMP%]{margin-left:auto;margin-right:0}.node__document-upload-timestamp[_ngcontent-%COMP%]{font-size:.8rem;float:left;padding-left:10px}"] });
23215
+ } }, dependencies: [i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i7.CdkNestedTreeNode, i7.CdkTreeNodeDef, i7.CdkTreeNodeToggle, i7.CdkTree, i7.CdkTreeNodeOutlet, CaseFileViewFolderSortComponent, CaseFileViewFolderDocumentActionsComponent, i5.DatePipe, DatePipe], styles: ["[_nghost-%COMP%]{display:flex;height:100%;flex-direction:column}[_nghost-%COMP%] .document-tree-container[_ngcontent-%COMP%]{flex:1 0}.document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #C9C9C9}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{padding:10px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%] .document-search[_ngcontent-%COMP%]{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node[_ngcontent-%COMP%]{display:block}.document-tree-container__node[_ngcontent-%COMP%] .document-tree-container__node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title[_ngcontent-%COMP%]{font-weight:700}.node[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected[_ngcontent-%COMP%]{background:#fff2cc}.node__icon[_ngcontent-%COMP%]{position:relative;display:inline-block}.node__count[_ngcontent-%COMP%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg[_ngcontent-%COMP%]{display:block;height:30px;width:30px}.node__name[_ngcontent-%COMP%]{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options[_ngcontent-%COMP%]{margin-left:auto;margin-right:0}.node__document-upload-timestamp[_ngcontent-%COMP%]{font-size:.8rem;float:left;padding-left:10px}"] });
23067
23216
  }
23068
23217
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
23069
23218
  type: Component,
23070
- args: [{ selector: 'ccd-case-file-view-folder', template: "<div class=\"document-filter-container\">\n <div class=\"form-group document-filter\" [formGroup]=\"documentFilterFormGroup\">\n <input class=\"form-control document-search\"\n type=\"search\"\n id=\"document-search\"\n name=\"documentSearchFormControl\"\n formControlName=\"documentSearchFormControl\"\n placeholder=\"Search by document name\"\n aria-label=\"Search by document name\">\n </div>\n</div>\n\n<div class=\"document-folders-header\">\n <div class=\"document-folders-header__title\">Documents ({{ documentCount }})</div>\n <div>\n <ccd-case-file-view-folder-sort\n (sortAscending)=\"sortDataSourceAscending($event)\"\n (sortDescending)=\"sortDataSourceDescending($event)\"\n ></ccd-case-file-view-folder-sort>\n </div>\n</div>\n\n<div class=\"document-tree-container\" *ngIf=\"documentTreeData\">\n <div *ngIf=\"!nestedDataSource || nestedDataSource.length === 0\">\n No results found\n </div>\n <div>\n <cdk-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\">\n <!-- document -->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__node--document\" *cdkTreeNodeDef=\"let node\">\n <button class=\"node\" (click)=\"selectedNodeItem = node; clickedDocument.emit(node)\"\n [class.node--selected]=\"selectedNodeItem?.name === node.name\">\n <div class=\"node__icon\" disabled>\n <img src=\"/assets/img/case-file-view/case-file-view-document.svg\" class=\"node__iconImg\" alt=\"Document icon\">\n </div>\n <span class=\"node__name node-name-document\">\n {{node.name}}\n <br>\n <span class=\"node__document-upload-timestamp\">{{node.upload_timestamp | date:\"dd MMM YYYY HH:mm\"}}</span>\n </span>\n <div class=\"node__document-options\">\n <ccd-case-file-view-folder-document-actions\n (changeFolderAction)=\"triggerDocumentAction('changeFolder', node)\"\n (openInANewTabAction)=\"triggerDocumentAction('openInANewTab', node)\"\n (downloadAction)=\"triggerDocumentAction('download', node)\"\n (printAction)=\"triggerDocumentAction('print', node)\"\n [allowMoving]=\"allowMoving\"\n >\n </ccd-case-file-view-folder-document-actions>\n </div>\n </button>\n </cdk-nested-tree-node>\n <!-- folder-->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__folder\" *cdkTreeNodeDef=\"let node; when: nestedChildren\">\n <button class=\"node\" cdkTreeNodeToggle>\n <div class=\"node__icon\" [attr.aria-label]=\"'toggle ' + node.name\" >\n <img class=\"node__iconImg\"\n [src]=\"nestedTreeControl.isExpanded(node) ? '/assets/images/folder-open.png' : '/assets/images/folder.png'\" alt=\"Folder icon\">\n <span class=\"node__count\">{{node.childDocumentCount}}</span>\n </div>\n <span class=\"node__name node__name--folder\">{{node.name}}</span>\n </button>\n\n <div [class.document-tree-invisible]=\"!nestedTreeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n </cdk-tree>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column}:host .document-tree-container{flex:1 0}.document-filter-container{border-bottom:2px solid #C9C9C9}.document-filter-container .document-filter{padding:10px}.document-filter-container .document-filter .document-search{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container .documents-title{height:30%;margin-left:8px;font-weight:700}.document-tree-container{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node{display:block}.document-tree-container__node .document-tree-container__node{padding-left:40px}.document-tree-container .document-tree-invisible{display:none}.document-tree-container::-webkit-scrollbar{width:7px}.document-tree-container::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container::-webkit-scrollbar-button{display:none}.document-tree-container::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title{font-weight:700}.node{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected{background:#fff2cc}.node__icon{position:relative;display:inline-block}.node__count{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg{display:block;height:30px;width:30px}.node__name{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options{margin-left:auto;margin-right:0}.node__document-upload-timestamp{font-size:.8rem;float:left;padding-left:10px}\n"] }]
23219
+ args: [{ selector: 'ccd-case-file-view-folder', template: "<div class=\"document-filter-container\">\n <div class=\"form-group document-filter\" [formGroup]=\"documentFilterFormGroup\">\n <input class=\"form-control document-search\"\n type=\"search\"\n id=\"document-search\"\n name=\"documentSearchFormControl\"\n formControlName=\"documentSearchFormControl\"\n placeholder=\"Search by document name\"\n aria-label=\"Search by document name\">\n </div>\n</div>\n\n<div class=\"document-folders-header\">\n <div class=\"document-folders-header__title\">Documents ({{ documentCount }})</div>\n <div>\n <ccd-case-file-view-folder-sort\n (sortAscending)=\"sortDataSourceAscending($event)\"\n (sortDescending)=\"sortDataSourceDescending($event)\"\n ></ccd-case-file-view-folder-sort>\n </div>\n</div>\n\n<div class=\"document-tree-container\" *ngIf=\"documentTreeData\">\n <div *ngIf=\"!nestedDataSource || nestedDataSource.length === 0\">\n No results found\n </div>\n <div>\n <cdk-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\">\n <!-- document -->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__node--document\" *cdkTreeNodeDef=\"let node\">\n <button class=\"node\" (click)=\"selectedNodeItem = node; clickedDocument.emit(node)\"\n [class.node--selected]=\"selectedNodeItem?.name === node.name\">\n <div class=\"node__icon\" disabled>\n <img src=\"/assets/img/case-file-view/case-file-view-document.svg\" class=\"node__iconImg\" alt=\"Document icon\">\n </div>\n <span class=\"node__name node-name-document\">\n {{node.name}}\n <br>\n <span class=\"node__document-upload-timestamp\">{{node.upload_timestamp | ccdDate : 'local' | date:\"dd MMM YYYY HH:mm\"}}</span>\n </span>\n <div class=\"node__document-options\">\n <ccd-case-file-view-folder-document-actions\n (changeFolderAction)=\"triggerDocumentAction('changeFolder', node)\"\n (openInANewTabAction)=\"triggerDocumentAction('openInANewTab', node)\"\n (downloadAction)=\"triggerDocumentAction('download', node)\"\n (printAction)=\"triggerDocumentAction('print', node)\"\n [allowMoving]=\"allowMoving\"\n >\n </ccd-case-file-view-folder-document-actions>\n </div>\n </button>\n </cdk-nested-tree-node>\n <!-- folder-->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__folder\" *cdkTreeNodeDef=\"let node; when: nestedChildren\">\n <button class=\"node\" cdkTreeNodeToggle>\n <div class=\"node__icon\" [attr.aria-label]=\"'toggle ' + node.name\" >\n <img class=\"node__iconImg\"\n [src]=\"nestedTreeControl.isExpanded(node) ? '/assets/images/folder-open.png' : '/assets/images/folder.png'\" alt=\"Folder icon\">\n <span class=\"node__count\">{{node.childDocumentCount}}</span>\n </div>\n <span class=\"node__name node__name--folder\">{{node.name}}</span>\n </button>\n\n <div [class.document-tree-invisible]=\"!nestedTreeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n </cdk-tree>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column}:host .document-tree-container{flex:1 0}.document-filter-container{border-bottom:2px solid #C9C9C9}.document-filter-container .document-filter{padding:10px}.document-filter-container .document-filter .document-search{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container .documents-title{height:30%;margin-left:8px;font-weight:700}.document-tree-container{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node{display:block}.document-tree-container__node .document-tree-container__node{padding-left:40px}.document-tree-container .document-tree-invisible{display:none}.document-tree-container::-webkit-scrollbar{width:7px}.document-tree-container::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container::-webkit-scrollbar-button{display:none}.document-tree-container::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title{font-weight:700}.node{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected{background:#fff2cc}.node__icon{position:relative;display:inline-block}.node__count{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg{display:block;height:30px;width:30px}.node__name{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options{margin-left:auto;margin-right:0}.node__document-upload-timestamp{font-size:.8rem;float:left;padding-left:10px}\n"] }]
23071
23220
  }], () => [{ type: WindowService }, { type: i1$1.Router }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: AbstractAppConfig }], { categoriesAndDocuments: [{
23072
23221
  type: Input
23073
23222
  }], allowMoving: [{
@@ -23077,7 +23226,7 @@ class CaseFileViewFolderComponent {
23077
23226
  }], moveDocument: [{
23078
23227
  type: Output
23079
23228
  }] }); })();
23080
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFileViewFolderComponent, { className: "CaseFileViewFolderComponent", filePath: "lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.ts", lineNumber: 28 }); })();
23229
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFileViewFolderComponent, { className: "CaseFileViewFolderComponent", filePath: "lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.ts", lineNumber: 27 }); })();
23081
23230
 
23082
23231
  const _c0$s = a0 => ({ "form-group-error": a0 });
23083
23232
  function AddCommentsComponent_span_7_Template(rf, ctx) { if (rf & 1) {
@@ -28872,7 +29021,7 @@ i0.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, function () { return
28872
29021
  QueryCaseDetailsHeaderComponent]; }, function () { return [i1.RpxTranslatePipe]; });
28873
29022
  i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryCaseDetailsHeaderComponent,
28874
29023
  QueryWriteDateInputComponent]; }, function () { return [i1.RpxTranslatePipe]; });
28875
- i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgIf, QueryCaseDetailsHeaderComponent,
29024
+ i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgForOf, i5.NgIf, QueryCaseDetailsHeaderComponent,
28876
29025
  QueryAttachmentsReadComponent,
28877
29026
  QueryEventCompletionComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
28878
29027
  i0.ɵɵsetComponentScope(QueryWriteAddDocumentsComponent, function () { return [i4.NgControlStatusGroup, i4.FormGroupDirective, WriteCollectionFieldComponent]; }, []);
@@ -28880,6 +29029,10 @@ i0.ɵɵsetComponentScope(QueryAttachmentsReadComponent, function () { return [i5
28880
29029
  i0.ɵɵsetComponentScope(QueryEventCompletionComponent, function () { return [
28881
29030
  // Case event completion
28882
29031
  CaseEventCompletionComponent]; }, []);
29032
+ i0.ɵɵsetComponentScope(
29033
+ // Case event completion
29034
+ CaseEventCompletionComponent, function () { return [i5.NgIf, CaseEventCompletionTaskCancelledComponent,
29035
+ CaseEventCompletionTaskReassignedComponent]; }, []);
28883
29036
 
28884
29037
  var CaseEditSubmitTitles;
28885
29038
  (function (CaseEditSubmitTitles) {
@@ -33942,24 +34095,38 @@ class EventStartGuard {
33942
34095
  workAllocationService;
33943
34096
  router;
33944
34097
  sessionStorageService;
34098
+ abstractConfig;
33945
34099
  static CLIENT_CONTEXT = 'clientContext';
33946
- constructor(workAllocationService, router, sessionStorageService) {
34100
+ constructor(workAllocationService, router, sessionStorageService, abstractConfig) {
33947
34101
  this.workAllocationService = workAllocationService;
33948
34102
  this.router = router;
33949
34103
  this.sessionStorageService = sessionStorageService;
34104
+ this.abstractConfig = abstractConfig;
33950
34105
  }
33951
34106
  canActivate(route) {
33952
34107
  const caseId = route.params['cid'];
33953
34108
  const eventId = route.params['eid'];
33954
34109
  const taskId = route.queryParams['tid'];
34110
+ let userId;
34111
+ const userInfoStr = this.sessionStorageService.getItem('userDetails');
34112
+ if (userInfoStr) {
34113
+ const userInfo = JSON.parse(userInfoStr);
34114
+ userId = userInfo.id ? userInfo.id : userInfo.uid;
34115
+ }
33955
34116
  const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
33956
34117
  if (caseInfoStr) {
33957
34118
  const caseInfo = JSON.parse(caseInfoStr);
33958
34119
  if (caseInfo && caseInfo.cid === caseId) {
33959
34120
  return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction)
33960
- .pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId)));
34121
+ .pipe(switchMap((payload) => this.checkForTasks(payload, caseId, eventId, taskId, userId)));
34122
+ }
34123
+ else {
34124
+ this.abstractConfig.logMessage(`EventStartGuard: caseId ${caseInfo.cid} in caseInfo not matched with the route parameter caseId ${caseId}`);
33961
34125
  }
33962
34126
  }
34127
+ else {
34128
+ this.abstractConfig.logMessage(`EventStartGuard: caseInfo details not available in session storage for ${caseId}`);
34129
+ }
33963
34130
  return of(false);
33964
34131
  }
33965
34132
  checkTaskInEventNotRequired(payload, caseId, taskId) {
@@ -34008,11 +34175,28 @@ class EventStartGuard {
34008
34175
  removeTaskFromSessionStorage() {
34009
34176
  this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
34010
34177
  }
34011
- checkForTasks(payload, caseId, eventId, taskId) {
34178
+ checkForTasks(payload, caseId, eventId, taskId, userId) {
34012
34179
  if (taskId && payload?.tasks?.length > 0) {
34013
34180
  const task = payload.tasks.find((t) => t.id == taskId);
34014
34181
  if (task) {
34015
- this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(task));
34182
+ // Store task to session
34183
+ const taskEventCompletionInfo = {
34184
+ caseId: caseId,
34185
+ eventId: eventId,
34186
+ userId: userId,
34187
+ taskId: task.id,
34188
+ createdTimestamp: Date.now()
34189
+ };
34190
+ const storeClientContext = {
34191
+ client_context: {
34192
+ user_task: {
34193
+ task_data: task,
34194
+ complete_task: true
34195
+ }
34196
+ }
34197
+ };
34198
+ this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
34199
+ this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34016
34200
  }
34017
34201
  else {
34018
34202
  this.removeTaskFromSessionStorage();
@@ -34033,12 +34217,12 @@ class EventStartGuard {
34033
34217
  return of(this.checkTaskInEventNotRequired(payload, caseId, taskId));
34034
34218
  }
34035
34219
  }
34036
- static ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
34220
+ static ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(AbstractAppConfig)); };
34037
34221
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
34038
34222
  }
34039
34223
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartGuard, [{
34040
34224
  type: Injectable
34041
- }], () => [{ type: WorkAllocationService }, { type: i1$1.Router }, { type: SessionStorageService }], null); })();
34225
+ }], () => [{ type: WorkAllocationService }, { type: i1$1.Router }, { type: SessionStorageService }, { type: AbstractAppConfig }], null); })();
34042
34226
 
34043
34227
  var EventStartStates;
34044
34228
  (function (EventStartStates) {
@@ -34191,6 +34375,20 @@ class EventStartStateMachineService {
34191
34375
  }
34192
34376
  };
34193
34377
  context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
34378
+ let userInfo;
34379
+ const userInfoStr = context.sessionStorageService.getItem('userDetails');
34380
+ if (userInfoStr) {
34381
+ userInfo = JSON.parse(userInfoStr);
34382
+ }
34383
+ // Store task to session
34384
+ const taskEventCompletionInfo = {
34385
+ caseId: context.caseId,
34386
+ eventId: context.eventId,
34387
+ userId: userInfo.id ? userInfo.id : userInfo.uid,
34388
+ taskId: task.id,
34389
+ createdTimestamp: Date.now()
34390
+ };
34391
+ context.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
34194
34392
  // Allow user to perform the event
34195
34393
  context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
34196
34394
  }
@@ -34290,9 +34488,11 @@ class EventStartComponent {
34290
34488
  class EventTasksResolverService {
34291
34489
  service;
34292
34490
  sessionStorageService;
34293
- constructor(service, sessionStorageService) {
34491
+ abstractConfig;
34492
+ constructor(service, sessionStorageService, abstractConfig) {
34294
34493
  this.service = service;
34295
34494
  this.sessionStorageService = sessionStorageService;
34495
+ this.abstractConfig = abstractConfig;
34296
34496
  }
34297
34497
  resolve(route) {
34298
34498
  const eventId = route.queryParamMap.get('eventId');
@@ -34303,13 +34503,16 @@ class EventTasksResolverService {
34303
34503
  return this.service.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction)
34304
34504
  .pipe(map((payload) => payload.tasks));
34305
34505
  }
34506
+ else {
34507
+ this.abstractConfig.logMessage(`EventTasksResolverService: caseInfo details not available in session storage for ${caseId}`);
34508
+ }
34306
34509
  }
34307
- static ɵfac = function EventTasksResolverService_Factory(t) { return new (t || EventTasksResolverService)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(SessionStorageService)); };
34510
+ static ɵfac = function EventTasksResolverService_Factory(t) { return new (t || EventTasksResolverService)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(AbstractAppConfig)); };
34308
34511
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTasksResolverService, factory: EventTasksResolverService.ɵfac });
34309
34512
  }
34310
34513
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTasksResolverService, [{
34311
34514
  type: Injectable
34312
- }], () => [{ type: WorkAllocationService }, { type: SessionStorageService }], null); })();
34515
+ }], () => [{ type: WorkAllocationService }, { type: SessionStorageService }, { type: AbstractAppConfig }], null); })();
34313
34516
 
34314
34517
  class EventStartModule {
34315
34518
  static ɵfac = function EventStartModule_Factory(t) { return new (t || EventStartModule)(); };