@hmcts/ccd-case-ui-toolkit 7.2.15-multiple-followup → 7.2.15

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 (34) hide show
  1. package/esm2022/lib/app.config.mjs +1 -3
  2. package/esm2022/lib/shared/components/palette/palette.module.mjs +10 -5
  3. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +142 -87
  4. package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +8 -52
  5. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.mjs +3 -2
  6. package/esm2022/lib/shared/components/palette/query-management/enums/query-item-response-status.enum.mjs +1 -2
  7. package/esm2022/lib/shared/components/palette/query-management/models/case-queries-collection.model.mjs +1 -1
  8. package/esm2022/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.mjs +2 -22
  9. package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +22 -74
  10. package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +3 -12
  11. package/esm2022/lib/shared/utils.mjs +1 -1
  12. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +205 -266
  13. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  14. package/lib/app.config.d.ts +0 -3
  15. package/lib/app.config.d.ts.map +1 -1
  16. package/lib/shared/components/palette/palette.module.d.ts +2 -1
  17. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  18. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +5 -2
  19. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  20. package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts +3 -15
  21. package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts.map +1 -1
  22. package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts.map +1 -1
  23. package/lib/shared/components/palette/query-management/enums/query-item-response-status.enum.d.ts +1 -2
  24. package/lib/shared/components/palette/query-management/enums/query-item-response-status.enum.d.ts.map +1 -1
  25. package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts +0 -2
  26. package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts.map +1 -1
  27. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts +0 -2
  28. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts.map +1 -1
  29. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts +3 -16
  30. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
  31. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
  32. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
  33. package/lib/shared/utils.d.ts +1 -1
  34. package/package.json +1 -1
@@ -1326,8 +1326,6 @@ class CaseEditorConfig {
1326
1326
  icp_enabled;
1327
1327
  icp_jurisdictions;
1328
1328
  events_to_hide;
1329
- enable_service_specific_multi_followups;
1330
- multiple_follow_up_enabled;
1331
1329
  }
1332
1330
 
1333
1331
  class HttpError {
@@ -20599,7 +20597,6 @@ var QueryItemResponseStatus;
20599
20597
  QueryItemResponseStatus["NEW"] = "New";
20600
20598
  QueryItemResponseStatus["RESPONDED"] = "Responded";
20601
20599
  QueryItemResponseStatus["AWAITING"] = "Awaiting Response";
20602
- QueryItemResponseStatus["CLOSED"] = "Closed";
20603
20600
  })(QueryItemResponseStatus || (QueryItemResponseStatus = {}));
20604
20601
 
20605
20602
  var RespondToQueryErrorMessages;
@@ -20900,8 +20897,6 @@ class QueryListItem {
20900
20897
  createdOn;
20901
20898
  createdBy;
20902
20899
  parentId;
20903
- isClosed;
20904
- messageType;
20905
20900
  children = [];
20906
20901
  messageIndexInParent = null;
20907
20902
  get lastSubmittedMessage() {
@@ -20962,24 +20957,7 @@ class QueryListItem {
20962
20957
  return new Date(this.children[index].createdOn);
20963
20958
  }
20964
20959
  get responseStatus() {
20965
- const isThreadClosed = (item) => {
20966
- if (item.isClosed === 'Yes') {
20967
- return true;
20968
- }
20969
- return item.children?.some((child) => isThreadClosed(child)) || false;
20970
- };
20971
- if (isThreadClosed(this)) {
20972
- return QueryItemResponseStatus.CLOSED;
20973
- }
20974
- const lastMessageType = this.children?.length
20975
- ? this.children[this.children.length - 1]?.messageType
20976
- : undefined;
20977
- if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
20978
- return QueryItemResponseStatus.RESPONDED;
20979
- }
20980
- else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
20981
- return QueryItemResponseStatus.AWAITING;
20982
- }
20960
+ // Child logic (position-based)
20983
20961
  if (this.messageIndexInParent !== null) {
20984
20962
  return this.messageIndexInParent % 2 === 0
20985
20963
  ? QueryItemResponseStatus.RESPONDED
@@ -21071,18 +21049,12 @@ class QueryManagementUtils {
21071
21049
  createdBy: currentUserId
21072
21050
  };
21073
21051
  }
21074
- static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
21052
+ static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
21075
21053
  const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
21076
21054
  const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
21077
21055
  const body = formGroup.get('body').value;
21078
21056
  const attachments = formGroup.get('attachments').value;
21079
21057
  const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
21080
- const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
21081
- const messageType = messageTypeParam === QueryCreateContext.RESPOND
21082
- ? QueryCreateContext.RESPOND
21083
- : messageTypeParam === QueryCreateContext.FOLLOWUP
21084
- ? QueryCreateContext.FOLLOWUP
21085
- : undefined;
21086
21058
  return {
21087
21059
  id: v4(),
21088
21060
  subject: queryItem.subject,
@@ -21093,9 +21065,7 @@ class QueryManagementUtils {
21093
21065
  hearingDate: queryItem.hearingDate,
21094
21066
  createdOn: new Date(),
21095
21067
  createdBy: currentUserId,
21096
- parentId: queryItem.id,
21097
- isClosed,
21098
- messageType
21068
+ parentId: queryItem.id
21099
21069
  };
21100
21070
  }
21101
21071
  static isObject(elem) {
@@ -21116,7 +21086,7 @@ class QueryManagementUtils {
21116
21086
  }], null, null); })();
21117
21087
 
21118
21088
  function QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template(rf, ctx) { if (rf & 1) {
21119
- i0.ɵɵelementStart(0, "li")(1, "a", 26);
21089
+ i0.ɵɵelementStart(0, "li")(1, "a", 28);
21120
21090
  i0.ɵɵtext(2);
21121
21091
  i0.ɵɵpipe(3, "rpxTranslate");
21122
21092
  i0.ɵɵelementEnd()();
@@ -21128,12 +21098,12 @@ function QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template(rf, ctx) { if
21128
21098
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, errorMessage_r2.description));
21129
21099
  } }
21130
21100
  function QueryCheckYourAnswersComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
21131
- i0.ɵɵelementStart(0, "div", 21)(1, "h2", 22);
21101
+ i0.ɵɵelementStart(0, "div", 23)(1, "h2", 24);
21132
21102
  i0.ɵɵtext(2);
21133
21103
  i0.ɵɵpipe(3, "rpxTranslate");
21134
21104
  i0.ɵɵelementEnd();
21135
- i0.ɵɵelementStart(4, "div", 23)(5, "ul", 24);
21136
- i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template, 4, 4, "li", 25);
21105
+ i0.ɵɵelementStart(4, "div", 25)(5, "ul", 26);
21106
+ i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template, 4, 4, "li", 27);
21137
21107
  i0.ɵɵelementEnd()()();
21138
21108
  } if (rf & 2) {
21139
21109
  const ctx_r2 = i0.ɵɵnextContext(2);
@@ -21142,9 +21112,43 @@ function QueryCheckYourAnswersComponent_div_0_div_2_Template(rf, ctx) { if (rf &
21142
21112
  i0.ɵɵadvance(4);
21143
21113
  i0.ɵɵproperty("ngForOf", ctx_r2.errorMessages);
21144
21114
  } }
21145
- function QueryCheckYourAnswersComponent_div_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
21115
+ function QueryCheckYourAnswersComponent_div_0_div_3_ul_5_li_1_Template(rf, ctx) { if (rf & 1) {
21116
+ i0.ɵɵelementStart(0, "li", 34);
21117
+ i0.ɵɵtext(1);
21118
+ i0.ɵɵelementEnd();
21119
+ } if (rf & 2) {
21120
+ const fieldError_r4 = ctx.$implicit;
21121
+ i0.ɵɵadvance();
21122
+ i0.ɵɵtextInterpolate(fieldError_r4.message);
21123
+ } }
21124
+ function QueryCheckYourAnswersComponent_div_0_div_3_ul_5_Template(rf, ctx) { if (rf & 1) {
21125
+ i0.ɵɵelementStart(0, "ul", 32);
21126
+ i0.ɵɵtemplate(1, QueryCheckYourAnswersComponent_div_0_div_3_ul_5_li_1_Template, 2, 1, "li", 33);
21127
+ i0.ɵɵelementEnd();
21128
+ } if (rf & 2) {
21129
+ const ctx_r2 = i0.ɵɵnextContext(3);
21130
+ i0.ɵɵadvance();
21131
+ i0.ɵɵproperty("ngForOf", ctx_r2.error.details.field_errors);
21132
+ } }
21133
+ function QueryCheckYourAnswersComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
21134
+ i0.ɵɵelementStart(0, "div", 29)(1, "h3", 30);
21135
+ i0.ɵɵtext(2, " The event could not be created ");
21136
+ i0.ɵɵelementEnd();
21137
+ i0.ɵɵelementStart(3, "p");
21138
+ i0.ɵɵtext(4);
21139
+ i0.ɵɵelementEnd();
21140
+ i0.ɵɵtemplate(5, QueryCheckYourAnswersComponent_div_0_div_3_ul_5_Template, 2, 1, "ul", 31);
21141
+ i0.ɵɵelementEnd();
21142
+ } if (rf & 2) {
21143
+ const ctx_r2 = i0.ɵɵnextContext(2);
21144
+ i0.ɵɵadvance(4);
21145
+ i0.ɵɵtextInterpolate(ctx_r2.error.message);
21146
+ i0.ɵɵadvance();
21147
+ i0.ɵɵproperty("ngIf", ctx_r2.error.details == null ? null : ctx_r2.error.details.field_errors);
21148
+ } }
21149
+ function QueryCheckYourAnswersComponent_div_0_ng_container_5_Template(rf, ctx) { if (rf & 1) {
21146
21150
  i0.ɵɵelementContainerStart(0);
21147
- i0.ɵɵelementStart(1, "div", 27);
21151
+ i0.ɵɵelementStart(1, "div", 35);
21148
21152
  i0.ɵɵtext(2);
21149
21153
  i0.ɵɵpipe(3, "rpxTranslate");
21150
21154
  i0.ɵɵelementEnd();
@@ -21153,7 +21157,7 @@ function QueryCheckYourAnswersComponent_div_0_ng_container_3_Template(rf, ctx) {
21153
21157
  i0.ɵɵadvance(2);
21154
21158
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Raise a query"));
21155
21159
  } }
21156
- function QueryCheckYourAnswersComponent_div_0_ng_container_5_Template(rf, ctx) { if (rf & 1) {
21160
+ function QueryCheckYourAnswersComponent_div_0_ng_container_7_Template(rf, ctx) { if (rf & 1) {
21157
21161
  i0.ɵɵelementContainerStart(0);
21158
21162
  i0.ɵɵtext(1);
21159
21163
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -21162,16 +21166,16 @@ function QueryCheckYourAnswersComponent_div_0_ng_container_5_Template(rf, ctx) {
21162
21166
  i0.ɵɵadvance();
21163
21167
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Review query response details"), " ");
21164
21168
  } }
21165
- function QueryCheckYourAnswersComponent_div_0_ng_template_6_Template(rf, ctx) { if (rf & 1) {
21169
+ function QueryCheckYourAnswersComponent_div_0_ng_template_8_Template(rf, ctx) { if (rf & 1) {
21166
21170
  i0.ɵɵtext(0);
21167
21171
  i0.ɵɵpipe(1, "rpxTranslate");
21168
21172
  } if (rf & 2) {
21169
21173
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(1, 1, "Review query details"), " ");
21170
21174
  } }
21171
- function QueryCheckYourAnswersComponent_div_0_dl_10_a_8_Template(rf, ctx) { if (rf & 1) {
21172
- const _r4 = i0.ɵɵgetCurrentView();
21173
- i0.ɵɵelementStart(0, "a", 17);
21174
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_10_a_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.goBack()); });
21175
+ function QueryCheckYourAnswersComponent_div_0_dl_12_a_8_Template(rf, ctx) { if (rf & 1) {
21176
+ const _r5 = i0.ɵɵgetCurrentView();
21177
+ i0.ɵɵelementStart(0, "a", 19);
21178
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_12_a_8_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.goBack()); });
21175
21179
  i0.ɵɵtext(1);
21176
21180
  i0.ɵɵpipe(2, "rpxTranslate");
21177
21181
  i0.ɵɵelementEnd();
@@ -21179,16 +21183,16 @@ function QueryCheckYourAnswersComponent_div_0_dl_10_a_8_Template(rf, ctx) { if (
21179
21183
  i0.ɵɵadvance();
21180
21184
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "Change"), " ");
21181
21185
  } }
21182
- function QueryCheckYourAnswersComponent_div_0_dl_10_Template(rf, ctx) { if (rf & 1) {
21183
- i0.ɵɵelementStart(0, "dl", 12)(1, "div", 13)(2, "dt", 14);
21186
+ function QueryCheckYourAnswersComponent_div_0_dl_12_Template(rf, ctx) { if (rf & 1) {
21187
+ i0.ɵɵelementStart(0, "dl", 14)(1, "div", 15)(2, "dt", 16);
21184
21188
  i0.ɵɵtext(3);
21185
21189
  i0.ɵɵpipe(4, "rpxTranslate");
21186
21190
  i0.ɵɵelementEnd();
21187
- i0.ɵɵelementStart(5, "dd", 15);
21191
+ i0.ɵɵelementStart(5, "dd", 17);
21188
21192
  i0.ɵɵtext(6);
21189
21193
  i0.ɵɵelementEnd();
21190
- i0.ɵɵelementStart(7, "dd", 16);
21191
- i0.ɵɵtemplate(8, QueryCheckYourAnswersComponent_div_0_dl_10_a_8_Template, 3, 3, "a", 28);
21194
+ i0.ɵɵelementStart(7, "dd", 18);
21195
+ i0.ɵɵtemplate(8, QueryCheckYourAnswersComponent_div_0_dl_12_a_8_Template, 3, 3, "a", 36);
21192
21196
  i0.ɵɵelementEnd()()();
21193
21197
  } if (rf & 2) {
21194
21198
  let tmp_4_0;
@@ -21200,7 +21204,7 @@ function QueryCheckYourAnswersComponent_div_0_dl_10_Template(rf, ctx) { if (rf &
21200
21204
  i0.ɵɵadvance(2);
21201
21205
  i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.NEW_QUERY);
21202
21206
  } }
21203
- function QueryCheckYourAnswersComponent_div_0_dl_22_ng_container_6_Template(rf, ctx) { if (rf & 1) {
21207
+ function QueryCheckYourAnswersComponent_div_0_dl_24_ng_container_6_Template(rf, ctx) { if (rf & 1) {
21204
21208
  i0.ɵɵelementContainerStart(0);
21205
21209
  i0.ɵɵtext(1);
21206
21210
  i0.ɵɵpipe(2, "rpxTranslate");
@@ -21209,24 +21213,24 @@ function QueryCheckYourAnswersComponent_div_0_dl_22_ng_container_6_Template(rf,
21209
21213
  i0.ɵɵadvance();
21210
21214
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(2, 1, "Is the query hearing related?", null, "Yes"), " ");
21211
21215
  } }
21212
- function QueryCheckYourAnswersComponent_div_0_dl_22_ng_template_7_Template(rf, ctx) { if (rf & 1) {
21216
+ function QueryCheckYourAnswersComponent_div_0_dl_24_ng_template_7_Template(rf, ctx) { if (rf & 1) {
21213
21217
  i0.ɵɵtext(0);
21214
21218
  i0.ɵɵpipe(1, "rpxTranslate");
21215
21219
  } if (rf & 2) {
21216
21220
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(1, 1, "Is the query hearing related?", null, "No"), " ");
21217
21221
  } }
21218
- function QueryCheckYourAnswersComponent_div_0_dl_22_div_13_Template(rf, ctx) { if (rf & 1) {
21219
- const _r6 = i0.ɵɵgetCurrentView();
21220
- i0.ɵɵelementStart(0, "div", 13)(1, "dt", 14);
21222
+ function QueryCheckYourAnswersComponent_div_0_dl_24_div_13_Template(rf, ctx) { if (rf & 1) {
21223
+ const _r7 = i0.ɵɵgetCurrentView();
21224
+ i0.ɵɵelementStart(0, "div", 15)(1, "dt", 16);
21221
21225
  i0.ɵɵtext(2);
21222
21226
  i0.ɵɵpipe(3, "rpxTranslate");
21223
21227
  i0.ɵɵelementEnd();
21224
- i0.ɵɵelementStart(4, "dd", 15);
21228
+ i0.ɵɵelementStart(4, "dd", 17);
21225
21229
  i0.ɵɵtext(5);
21226
21230
  i0.ɵɵpipe(6, "date");
21227
21231
  i0.ɵɵelementEnd();
21228
- i0.ɵɵelementStart(7, "dd", 16)(8, "a", 17);
21229
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_22_div_13_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.goBack()); });
21232
+ i0.ɵɵelementStart(7, "dd", 18)(8, "a", 19);
21233
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_24_div_13_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.goBack()); });
21230
21234
  i0.ɵɵtext(9);
21231
21235
  i0.ɵɵpipe(10, "rpxTranslate");
21232
21236
  i0.ɵɵelementEnd()()();
@@ -21240,53 +21244,53 @@ function QueryCheckYourAnswersComponent_div_0_dl_22_div_13_Template(rf, ctx) { i
21240
21244
  i0.ɵɵadvance(4);
21241
21245
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 8, "Change"), " ");
21242
21246
  } }
21243
- function QueryCheckYourAnswersComponent_div_0_dl_22_Template(rf, ctx) { if (rf & 1) {
21244
- const _r5 = i0.ɵɵgetCurrentView();
21245
- i0.ɵɵelementStart(0, "dl", 12)(1, "div", 13)(2, "dt", 14);
21247
+ function QueryCheckYourAnswersComponent_div_0_dl_24_Template(rf, ctx) { if (rf & 1) {
21248
+ const _r6 = i0.ɵɵgetCurrentView();
21249
+ i0.ɵɵelementStart(0, "dl", 14)(1, "div", 15)(2, "dt", 16);
21246
21250
  i0.ɵɵtext(3);
21247
21251
  i0.ɵɵpipe(4, "rpxTranslate");
21248
21252
  i0.ɵɵelementEnd();
21249
- i0.ɵɵelementStart(5, "dd", 15);
21250
- i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_0_dl_22_ng_container_6_Template, 3, 5, "ng-container", 8)(7, QueryCheckYourAnswersComponent_div_0_dl_22_ng_template_7_Template, 2, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
21253
+ i0.ɵɵelementStart(5, "dd", 17);
21254
+ i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_0_dl_24_ng_container_6_Template, 3, 5, "ng-container", 10)(7, QueryCheckYourAnswersComponent_div_0_dl_24_ng_template_7_Template, 2, 5, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
21251
21255
  i0.ɵɵelementEnd();
21252
- i0.ɵɵelementStart(9, "dd", 16)(10, "a", 17);
21253
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_22_Template_a_click_10_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
21256
+ i0.ɵɵelementStart(9, "dd", 18)(10, "a", 19);
21257
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_24_Template_a_click_10_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
21254
21258
  i0.ɵɵtext(11);
21255
21259
  i0.ɵɵpipe(12, "rpxTranslate");
21256
21260
  i0.ɵɵelementEnd()()();
21257
- i0.ɵɵtemplate(13, QueryCheckYourAnswersComponent_div_0_dl_22_div_13_Template, 11, 10, "div", 29);
21261
+ i0.ɵɵtemplate(13, QueryCheckYourAnswersComponent_div_0_dl_24_div_13_Template, 11, 10, "div", 37);
21258
21262
  i0.ɵɵelementEnd();
21259
21263
  } if (rf & 2) {
21260
21264
  let tmp_5_0;
21261
21265
  let tmp_8_0;
21262
- const isHearingRelatedFalse_r7 = i0.ɵɵreference(8);
21266
+ const isHearingRelatedFalse_r8 = i0.ɵɵreference(8);
21263
21267
  const ctx_r2 = i0.ɵɵnextContext(2);
21264
21268
  i0.ɵɵadvance(3);
21265
21269
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, "Is the query hearing related?"), " ");
21266
21270
  i0.ɵɵadvance(3);
21267
- i0.ɵɵproperty("ngIf", ((tmp_5_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_5_0.value) === true)("ngIfElse", isHearingRelatedFalse_r7);
21271
+ i0.ɵɵproperty("ngIf", ((tmp_5_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_5_0.value) === true)("ngIfElse", isHearingRelatedFalse_r8);
21268
21272
  i0.ɵɵadvance(5);
21269
21273
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 7, "Change"), " ");
21270
21274
  i0.ɵɵadvance(2);
21271
21275
  i0.ɵɵproperty("ngIf", (tmp_8_0 = ctx_r2.formGroup.get("isHearingRelated")) == null ? null : tmp_8_0.value);
21272
21276
  } }
21273
- function QueryCheckYourAnswersComponent_div_0_dl_23_ccd_query_attachments_read_6_Template(rf, ctx) { if (rf & 1) {
21274
- i0.ɵɵelement(0, "ccd-query-attachments-read", 32);
21277
+ function QueryCheckYourAnswersComponent_div_0_dl_25_ccd_query_attachments_read_6_Template(rf, ctx) { if (rf & 1) {
21278
+ i0.ɵɵelement(0, "ccd-query-attachments-read", 40);
21275
21279
  } if (rf & 2) {
21276
21280
  const ctx_r2 = i0.ɵɵnextContext(3);
21277
21281
  i0.ɵɵproperty("attachments", ctx_r2.attachments);
21278
21282
  } }
21279
- function QueryCheckYourAnswersComponent_div_0_dl_23_Template(rf, ctx) { if (rf & 1) {
21280
- const _r8 = i0.ɵɵgetCurrentView();
21281
- i0.ɵɵelementStart(0, "dl", 12)(1, "div", 13)(2, "dt", 14);
21283
+ function QueryCheckYourAnswersComponent_div_0_dl_25_Template(rf, ctx) { if (rf & 1) {
21284
+ const _r9 = i0.ɵɵgetCurrentView();
21285
+ i0.ɵɵelementStart(0, "dl", 14)(1, "div", 15)(2, "dt", 16);
21282
21286
  i0.ɵɵtext(3);
21283
21287
  i0.ɵɵpipe(4, "rpxTranslate");
21284
21288
  i0.ɵɵelementEnd();
21285
- i0.ɵɵelementStart(5, "dd", 30);
21286
- i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_0_dl_23_ccd_query_attachments_read_6_Template, 1, 1, "ccd-query-attachments-read", 31);
21289
+ i0.ɵɵelementStart(5, "dd", 38);
21290
+ i0.ɵɵtemplate(6, QueryCheckYourAnswersComponent_div_0_dl_25_ccd_query_attachments_read_6_Template, 1, 1, "ccd-query-attachments-read", 39);
21287
21291
  i0.ɵɵelementEnd();
21288
- i0.ɵɵelementStart(7, "dd", 16)(8, "a", 17);
21289
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_23_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
21292
+ i0.ɵɵelementStart(7, "dd", 18)(8, "a", 19);
21293
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_dl_25_Template_a_click_8_listener() { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.goBack()); });
21290
21294
  i0.ɵɵtext(9);
21291
21295
  i0.ɵɵpipe(10, "rpxTranslate");
21292
21296
  i0.ɵɵelementEnd()()()();
@@ -21302,68 +21306,74 @@ function QueryCheckYourAnswersComponent_div_0_dl_23_Template(rf, ctx) { if (rf &
21302
21306
  function QueryCheckYourAnswersComponent_div_0_Template(rf, ctx) { if (rf & 1) {
21303
21307
  const _r1 = i0.ɵɵgetCurrentView();
21304
21308
  i0.ɵɵelementStart(0, "div", 3)(1, "div", 4);
21305
- i0.ɵɵtemplate(2, QueryCheckYourAnswersComponent_div_0_div_2_Template, 7, 4, "div", 5)(3, QueryCheckYourAnswersComponent_div_0_ng_container_3_Template, 4, 3, "ng-container", 6);
21306
- i0.ɵɵelementStart(4, "h1", 7);
21307
- i0.ɵɵtemplate(5, QueryCheckYourAnswersComponent_div_0_ng_container_5_Template, 3, 3, "ng-container", 8)(6, QueryCheckYourAnswersComponent_div_0_ng_template_6_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
21309
+ i0.ɵɵtemplate(2, QueryCheckYourAnswersComponent_div_0_div_2_Template, 7, 4, "div", 5)(3, QueryCheckYourAnswersComponent_div_0_div_3_Template, 6, 2, "div", 6);
21310
+ i0.ɵɵelement(4, "ccd-callback-errors", 7);
21311
+ i0.ɵɵtemplate(5, QueryCheckYourAnswersComponent_div_0_ng_container_5_Template, 4, 3, "ng-container", 8);
21312
+ i0.ɵɵelementStart(6, "h1", 9);
21313
+ i0.ɵɵtemplate(7, QueryCheckYourAnswersComponent_div_0_ng_container_7_Template, 3, 3, "ng-container", 10)(8, QueryCheckYourAnswersComponent_div_0_ng_template_8_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
21308
21314
  i0.ɵɵelementEnd();
21309
- i0.ɵɵelementStart(8, "div", 9);
21310
- i0.ɵɵelement(9, "ccd-query-case-details-header", 10);
21315
+ i0.ɵɵelementStart(10, "div", 11);
21316
+ i0.ɵɵelement(11, "ccd-query-case-details-header", 12);
21311
21317
  i0.ɵɵelementEnd();
21312
- i0.ɵɵtemplate(10, QueryCheckYourAnswersComponent_div_0_dl_10_Template, 9, 5, "dl", 11);
21313
- i0.ɵɵelementStart(11, "dl", 12)(12, "div", 13)(13, "dt", 14);
21314
- i0.ɵɵtext(14);
21315
- i0.ɵɵpipe(15, "rpxTranslate");
21318
+ i0.ɵɵtemplate(12, QueryCheckYourAnswersComponent_div_0_dl_12_Template, 9, 5, "dl", 13);
21319
+ i0.ɵɵelementStart(13, "dl", 14)(14, "div", 15)(15, "dt", 16);
21320
+ i0.ɵɵtext(16);
21321
+ i0.ɵɵpipe(17, "rpxTranslate");
21316
21322
  i0.ɵɵelementEnd();
21317
- i0.ɵɵelementStart(16, "dd", 15);
21318
- i0.ɵɵtext(17);
21323
+ i0.ɵɵelementStart(18, "dd", 17);
21324
+ i0.ɵɵtext(19);
21319
21325
  i0.ɵɵelementEnd();
21320
- i0.ɵɵelementStart(18, "dd", 16)(19, "a", 17);
21321
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_Template_a_click_19_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
21322
- i0.ɵɵtext(20);
21323
- i0.ɵɵpipe(21, "rpxTranslate");
21326
+ i0.ɵɵelementStart(20, "dd", 18)(21, "a", 19);
21327
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
21328
+ i0.ɵɵtext(22);
21329
+ i0.ɵɵpipe(23, "rpxTranslate");
21324
21330
  i0.ɵɵelementEnd()()()();
21325
- i0.ɵɵtemplate(22, QueryCheckYourAnswersComponent_div_0_dl_22_Template, 14, 9, "dl", 11)(23, QueryCheckYourAnswersComponent_div_0_dl_23_Template, 11, 7, "dl", 11);
21326
- i0.ɵɵelement(24, "br");
21327
- i0.ɵɵelementStart(25, "div")(26, "button", 18);
21328
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_Template_button_click_26_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
21329
- i0.ɵɵtext(27);
21330
- i0.ɵɵpipe(28, "rpxTranslate");
21331
+ i0.ɵɵtemplate(24, QueryCheckYourAnswersComponent_div_0_dl_24_Template, 14, 9, "dl", 13)(25, QueryCheckYourAnswersComponent_div_0_dl_25_Template, 11, 7, "dl", 13);
21332
+ i0.ɵɵelement(26, "br");
21333
+ i0.ɵɵelementStart(27, "div")(28, "button", 20);
21334
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_Template_button_click_28_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goBack()); });
21335
+ i0.ɵɵtext(29);
21336
+ i0.ɵɵpipe(30, "rpxTranslate");
21331
21337
  i0.ɵɵelementEnd();
21332
- i0.ɵɵelementStart(29, "button", 19);
21333
- i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_Template_button_click_29_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.submit()); });
21334
- i0.ɵɵtext(30);
21335
- i0.ɵɵpipe(31, "rpxTranslate");
21338
+ i0.ɵɵelementStart(31, "button", 21);
21339
+ i0.ɵɵlistener("click", function QueryCheckYourAnswersComponent_div_0_Template_button_click_31_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.submit()); });
21340
+ i0.ɵɵtext(32);
21341
+ i0.ɵɵpipe(33, "rpxTranslate");
21336
21342
  i0.ɵɵelementEnd()()();
21337
- i0.ɵɵelement(32, "ccd-query-event-completion", 20);
21343
+ i0.ɵɵelement(34, "ccd-query-event-completion", 22);
21338
21344
  i0.ɵɵelementEnd();
21339
21345
  } if (rf & 2) {
21340
- let tmp_9_0;
21341
- const defaultCheckYourAnswersTitle_r9 = i0.ɵɵreference(7);
21346
+ let tmp_11_0;
21347
+ const defaultCheckYourAnswersTitle_r10 = i0.ɵɵreference(9);
21342
21348
  const ctx_r2 = i0.ɵɵnextContext();
21343
21349
  i0.ɵɵadvance(2);
21344
21350
  i0.ɵɵproperty("ngIf", ctx_r2.errorMessages.length > 0);
21345
21351
  i0.ɵɵadvance();
21352
+ i0.ɵɵproperty("ngIf", ctx_r2.error && (ctx_r2.error.details || ctx_r2.error.message));
21353
+ i0.ɵɵadvance();
21354
+ i0.ɵɵproperty("callbackErrorsSubject", ctx_r2.callbackErrorsSubject);
21355
+ i0.ɵɵadvance();
21346
21356
  i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.NEW_QUERY);
21347
21357
  i0.ɵɵadvance(2);
21348
- i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.RESPOND)("ngIfElse", defaultCheckYourAnswersTitle_r9);
21358
+ i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.RESPOND)("ngIfElse", defaultCheckYourAnswersTitle_r10);
21349
21359
  i0.ɵɵadvance(4);
21350
21360
  i0.ɵɵproperty("caseDetails", ctx_r2.caseDetails);
21351
21361
  i0.ɵɵadvance();
21352
21362
  i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext !== ctx_r2.queryCreateContextEnum.FOLLOWUP);
21353
21363
  i0.ɵɵadvance(4);
21354
- i0.ɵɵtextInterpolate1(" ", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(15, 14, "Query detail"), " ");
21364
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(17, 16, "Query detail"), " ");
21355
21365
  i0.ɵɵadvance(3);
21356
- i0.ɵɵtextInterpolate1(" ", (tmp_9_0 = ctx_r2.formGroup.get("body")) == null ? null : tmp_9_0.value, " ");
21366
+ i0.ɵɵtextInterpolate1(" ", (tmp_11_0 = ctx_r2.formGroup.get("body")) == null ? null : tmp_11_0.value, " ");
21357
21367
  i0.ɵɵadvance(3);
21358
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(21, 16, "Change"), " ");
21368
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(23, 18, "Change"), " ");
21359
21369
  i0.ɵɵadvance(2);
21360
21370
  i0.ɵɵproperty("ngIf", ctx_r2.queryCreateContext === ctx_r2.queryCreateContextEnum.NEW_QUERY);
21361
21371
  i0.ɵɵadvance();
21362
21372
  i0.ɵɵproperty("ngIf", ctx_r2.formGroup.get("attachments").value.length > 0);
21363
21373
  i0.ɵɵadvance(4);
21364
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(28, 18, "Previous"), " ");
21374
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(30, 20, "Previous"), " ");
21365
21375
  i0.ɵɵadvance(3);
21366
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(31, 20, "Submit"), " ");
21376
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(33, 22, "Submit"), " ");
21367
21377
  i0.ɵɵadvance(2);
21368
21378
  i0.ɵɵproperty("eventCompletionParams", ctx_r2.eventCompletionParams);
21369
21379
  } }
@@ -21387,7 +21397,6 @@ class QueryCheckYourAnswersComponent {
21387
21397
  queryItem;
21388
21398
  queryCreateContext;
21389
21399
  eventData = null;
21390
- multipleFollowUpFeature;
21391
21400
  backClicked = new EventEmitter();
21392
21401
  querySubmitted = new EventEmitter();
21393
21402
  callbackConfirmationMessage = new EventEmitter();
@@ -21406,6 +21415,8 @@ class QueryCheckYourAnswersComponent {
21406
21415
  filteredTasks = [];
21407
21416
  readyToSubmit;
21408
21417
  isSubmitting = false;
21418
+ callbackErrorsSubject = new Subject();
21419
+ error;
21409
21420
  constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, qualifyingQuestionService) {
21410
21421
  this.route = route;
21411
21422
  this.router = router;
@@ -21540,13 +21551,25 @@ class QueryCheckYourAnswersComponent {
21540
21551
  handleError(error) {
21541
21552
  console.error('Error in API calls:', error);
21542
21553
  this.isSubmitting = false;
21543
- this.router.navigate(['/', 'service-down']);
21554
+ if (this.isServiceErrorFound(error)) {
21555
+ this.error = null;
21556
+ this.callbackErrorsSubject.next(error);
21557
+ }
21558
+ else {
21559
+ if (error && error.status !== 401 && error.status !== 403) {
21560
+ this.error = error;
21561
+ }
21562
+ else {
21563
+ this.router.navigate(['/', 'service-down']);
21564
+ }
21565
+ }
21566
+ window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
21544
21567
  }
21545
21568
  generateCaseQueriesCollectionData() {
21546
21569
  const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
21547
21570
  const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
21548
21571
  ? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
21549
- : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
21572
+ : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
21550
21573
  const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
21551
21574
  const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
21552
21575
  // Check if the field ID has been set dynamically
@@ -21702,16 +21725,19 @@ class QueryCheckYourAnswersComponent {
21702
21725
  this.attachments = documents.map(QueryManagementUtils.documentToCollectionFormDocument);
21703
21726
  }
21704
21727
  }
21728
+ isServiceErrorFound(error) {
21729
+ return !!(error?.callbackErrors?.length);
21730
+ }
21705
21731
  static ɵfac = function QueryCheckYourAnswersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || 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(QualifyingQuestionService)); };
21706
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", multipleFollowUpFeature: "multipleFollowUpFeature" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [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"], [3, "caseDetails"], ["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"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 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"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
21707
- i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 33, 22, "div", 2);
21732
+ 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", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [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"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["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"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 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"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
21733
+ i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 35, 24, "div", 2);
21708
21734
  } if (rf & 2) {
21709
21735
  i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
21710
21736
  } }, styles: [".govuk-summary-list__value--documentAttached[_ngcontent-%COMP%]{vertical-align:middle}"] });
21711
21737
  }
21712
21738
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
21713
21739
  type: Component,
21714
- args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\" *ngIf=\"readyToSubmit\">\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 [caseDetails]=\"caseDetails\"></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 <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\" *ngIf=\"this.formGroup.get('attachments').value.length > 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]=\"attachments\"\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\" type=\"submit\" (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"] }]
21740
+ args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\" *ngIf=\"readyToSubmit\">\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 <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"callbackErrorsSubject\"></ccd-callback-errors>\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 [caseDetails]=\"caseDetails\"></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 <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\" *ngIf=\"this.formGroup.get('attachments').value.length > 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]=\"attachments\"\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\" type=\"submit\" (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"] }]
21715
21741
  }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: QualifyingQuestionService }], { formGroup: [{
21716
21742
  type: Input
21717
21743
  }], queryItem: [{
@@ -21720,8 +21746,6 @@ class QueryCheckYourAnswersComponent {
21720
21746
  type: Input
21721
21747
  }], eventData: [{
21722
21748
  type: Input
21723
- }], multipleFollowUpFeature: [{
21724
- type: Input
21725
21749
  }], backClicked: [{
21726
21750
  type: Output
21727
21751
  }], querySubmitted: [{
@@ -21939,12 +21963,10 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
21939
21963
  i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_ng_container_1_Template, 23, 19, "ng-container", 15)(2, QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_ng_template_2_Template, 27, 22, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
21940
21964
  i0.ɵɵelementContainerEnd();
21941
21965
  } if (rf & 2) {
21942
- const child_r3 = ctx.$implicit;
21943
21966
  const i_r4 = ctx.index;
21944
21967
  const followUpMessage_r5 = i0.ɵɵreference(3);
21945
- const ctx_r1 = i0.ɵɵnextContext(3);
21946
21968
  i0.ɵɵadvance();
21947
- i0.ɵɵproperty("ngIf", i_r4 % 2 === 0 && !(child_r3 == null ? null : child_r3.messageType) || child_r3 && (child_r3 == null ? null : child_r3.messageType) === ctx_r1.respondToQuery)("ngIfElse", followUpMessage_r5);
21969
+ i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
21948
21970
  } }
21949
21971
  function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
21950
21972
  i0.ɵɵelementContainerStart(0);
@@ -22048,8 +22070,6 @@ class QueryDetailsComponent {
22048
22070
  sessionStorageService;
22049
22071
  route;
22050
22072
  router;
22051
- abstractConfig;
22052
- caseNotifier;
22053
22073
  query;
22054
22074
  caseId;
22055
22075
  queryResponseStatus;
@@ -22059,18 +22079,10 @@ class QueryDetailsComponent {
22059
22079
  static QUERY_ITEM_RESPOND = '3';
22060
22080
  static QUERY_ITEM_FOLLOW_UP = '4';
22061
22081
  queryItemId;
22062
- followUpQuery = QueryCreateContext.FOLLOWUP;
22063
- respondToQuery = QueryCreateContext.RESPOND;
22064
- enableServiceSpecificMultiFollowups;
22065
- currentJurisdictionId;
22066
- isMultipleFollowUpEnabled = false;
22067
- caseSubscription;
22068
- constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
22082
+ constructor(sessionStorageService, route, router) {
22069
22083
  this.sessionStorageService = sessionStorageService;
22070
22084
  this.route = route;
22071
22085
  this.router = router;
22072
- this.abstractConfig = abstractConfig;
22073
- this.caseNotifier = caseNotifier;
22074
22086
  }
22075
22087
  onBack() {
22076
22088
  this.backClicked.emit(true);
@@ -22078,23 +22090,10 @@ class QueryDetailsComponent {
22078
22090
  isInternalUser() {
22079
22091
  return isInternalUser(this.sessionStorageService);
22080
22092
  }
22081
- ngOnInit() {
22082
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
22083
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
22084
- if (caseView?.case_type?.jurisdiction?.id) {
22085
- this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
22086
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
22087
- this.hasRespondedToQuery();
22088
- }
22089
- });
22090
- }
22091
22093
  ngOnChanges() {
22092
22094
  this.toggleLinkVisibility();
22093
22095
  this.hasRespondedToQuery();
22094
22096
  }
22095
- ngOnDestroy() {
22096
- this.caseSubscription?.unsubscribe();
22097
- }
22098
22097
  toggleLinkVisibility() {
22099
22098
  this.queryItemId = this.route.snapshot.params.qid;
22100
22099
  if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
@@ -22103,21 +22102,6 @@ class QueryDetailsComponent {
22103
22102
  }
22104
22103
  hasRespondedToQuery() {
22105
22104
  const isAwaiting = this.queryResponseStatus === undefined || this.queryResponseStatus === QueryItemResponseStatus.AWAITING;
22106
- const lastChild = this.query?.children?.[this.query.children.length - 1];
22107
- const isFollowUp = lastChild?.messageType === this.followUpQuery;
22108
- const isRespond = lastChild?.messageType === this.respondToQuery;
22109
- if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
22110
- this.hasResponded.emit(true);
22111
- return true;
22112
- }
22113
- if (isFollowUp && this.isMultipleFollowUpEnabled) {
22114
- this.hasResponded.emit(false);
22115
- return false;
22116
- }
22117
- if (isRespond) {
22118
- this.hasResponded.emit(false);
22119
- return false;
22120
- }
22121
22105
  if (this.isInternalUser()) {
22122
22106
  if (isAwaiting) {
22123
22107
  this.hasResponded.emit(false);
@@ -22133,7 +22117,7 @@ class QueryDetailsComponent {
22133
22117
  this.hasResponded.emit(false);
22134
22118
  return false;
22135
22119
  }
22136
- static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier)); };
22120
+ static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
22137
22121
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryDetailsComponent, selectors: [["ccd-query-details"]], inputs: { query: "query", caseId: "caseId", queryResponseStatus: "queryResponseStatus" }, outputs: { backClicked: "backClicked", hasResponded: "hasResponded" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["followUpMessage", ""], [4, "ngIf"], [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"], ["class", "govuk-table__row", 4, "ngIf"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-table__row", "govuk-table__row--isHearingRelated"], [3, "attachments", 4, "ngIf"], [3, "attachments"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"]], template: function QueryDetailsComponent_Template(rf, ctx) { if (rf & 1) {
22138
22122
  i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
22139
22123
  } if (rf & 2) {
@@ -22142,8 +22126,8 @@ class QueryDetailsComponent {
22142
22126
  }
22143
22127
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
22144
22128
  type: Component,
22145
- args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\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 MMMM YYYY HH:mm' }}</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) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\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\" *ngIf=\"query.attachments.length > 0\">\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 && !child?.messageType) || (child && child?.messageType === respondToQuery); 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 MMMM YYYY HH:mm' }}</td>\n </tr>\n\n <tr *ngIf=\"isInternalUser()\" 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\" *ngIf=\"child.attachments.length > 0\">\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 MMMM YYYY HH:mm'}}</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\" *ngIf=\"child.attachments.length > 0\">\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"] }]
22146
- }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
22129
+ args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\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 MMMM YYYY HH:mm' }}</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) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\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\" *ngIf=\"query.attachments.length > 0\">\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 MMMM YYYY HH:mm' }}</td>\n </tr>\n\n <tr *ngIf=\"isInternalUser()\" 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\" *ngIf=\"child.attachments.length > 0\">\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 MMMM YYYY HH:mm'}}</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\" *ngIf=\"child.attachments.length > 0\">\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"] }]
22130
+ }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
22147
22131
  type: Input
22148
22132
  }], caseId: [{
22149
22133
  type: Input
@@ -22154,7 +22138,7 @@ class QueryDetailsComponent {
22154
22138
  }], hasResponded: [{
22155
22139
  type: Output
22156
22140
  }] }); })();
22157
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 17 }); })();
22141
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 14 }); })();
22158
22142
 
22159
22143
  class QueryEventCompletionComponent {
22160
22144
  eventCompletionParams;
@@ -22888,7 +22872,8 @@ class QueryWriteRespondToQueryComponent {
22888
22872
  console.warn('No matching message found for ID:', messageId);
22889
22873
  return;
22890
22874
  }
22891
- const queryWithChildren = new QueryListData(this.caseQueriesCollections[0]);
22875
+ const caseQueriesCollections = this.caseQueriesCollections.find((collection) => collection?.caseMessages.find((c) => c.value.id === messageId));
22876
+ const queryWithChildren = new QueryListData(caseQueriesCollections);
22892
22877
  const targetId = this.queryItemId === QueryWriteRespondToQueryComponent.QUERY_ITEM_RESPOND
22893
22878
  ? (matchingMessage?.parentId || matchingMessage?.id)
22894
22879
  : matchingMessage?.id;
@@ -23079,7 +23064,7 @@ class QueryConfirmationComponent {
23079
23064
  const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
23080
23065
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
23081
23066
  const _r1 = i0.ɵɵgetCurrentView();
23082
- i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
23067
+ i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
23083
23068
  i0.ɵɵlistener("selectedQuery", function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template_ccd_query_list_selectedQuery_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.setQuery($event)); });
23084
23069
  i0.ɵɵelementEnd()();
23085
23070
  } if (rf & 2) {
@@ -23089,7 +23074,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
23089
23074
  } }
23090
23075
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23091
23076
  i0.ɵɵelementContainerStart(0);
23092
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
23077
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 4);
23093
23078
  i0.ɵɵelementContainerEnd();
23094
23079
  } if (rf & 2) {
23095
23080
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -23098,7 +23083,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
23098
23083
  } }
23099
23084
  function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23100
23085
  i0.ɵɵelementContainerStart(0);
23101
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
23086
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 3);
23102
23087
  i0.ɵɵelementContainerEnd();
23103
23088
  } if (rf & 2) {
23104
23089
  const ctx_r1 = i0.ɵɵnextContext();
@@ -23107,7 +23092,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
23107
23092
  } }
23108
23093
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23109
23094
  i0.ɵɵelementContainerStart(0);
23110
- i0.ɵɵelementStart(1, "button", 10);
23095
+ i0.ɵɵelementStart(1, "button", 9);
23111
23096
  i0.ɵɵtext(2);
23112
23097
  i0.ɵɵpipe(3, "rpxTranslate");
23113
23098
  i0.ɵɵelementEnd();
@@ -23119,22 +23104,8 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
23119
23104
  i0.ɵɵadvance();
23120
23105
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23121
23106
  } }
23122
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23123
- i0.ɵɵelementContainerStart(0);
23124
- i0.ɵɵelementStart(1, "button", 10);
23125
- i0.ɵɵtext(2);
23126
- i0.ɵɵpipe(3, "rpxTranslate");
23127
- i0.ɵɵelementEnd();
23128
- i0.ɵɵelementContainerEnd();
23129
- } if (rf & 2) {
23130
- const ctx_r1 = i0.ɵɵnextContext(4);
23131
- i0.ɵɵadvance();
23132
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
23133
- i0.ɵɵadvance();
23134
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23135
- } }
23136
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23137
- i0.ɵɵelementStart(0, "div")(1, "p", 11);
23107
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23108
+ i0.ɵɵelementStart(0, "div")(1, "p", 10);
23138
23109
  i0.ɵɵtext(2);
23139
23110
  i0.ɵɵpipe(3, "rpxTranslate");
23140
23111
  i0.ɵɵelementEnd();
@@ -23148,69 +23119,44 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
23148
23119
  i0.ɵɵadvance(3);
23149
23120
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
23150
23121
  } }
23151
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23152
- i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template, 4, 7, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template, 7, 6, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
23153
- } if (rf & 2) {
23154
- const queryIsInReview_r5 = i0.ɵɵreference(2);
23155
- const ctx_r1 = i0.ɵɵnextContext(3);
23156
- 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);
23157
- } }
23158
23122
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23159
23123
  i0.ɵɵelementContainerStart(0);
23160
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 3)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 3, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
23124
+ 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);
23161
23125
  i0.ɵɵelementContainerEnd();
23162
23126
  } if (rf & 2) {
23163
- const sequentialQuery_r6 = i0.ɵɵreference(3);
23127
+ const queryIsInReview_r5 = i0.ɵɵreference(3);
23164
23128
  const ctx_r1 = i0.ɵɵnextContext(2);
23165
23129
  i0.ɵɵadvance();
23166
- i0.ɵɵproperty("ngIf", ctx_r1.messageType && ctx_r1.messageType === ctx_r1.followUpQuery && ctx_r1.isMultipleFollowUpEnabled || ctx_r1.messageType && ctx_r1.messageType === ctx_r1.respondToQuery)("ngIfElse", sequentialQuery_r6);
23130
+ 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);
23167
23131
  } }
23168
23132
  function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23169
23133
  const _r4 = i0.ɵɵgetCurrentView();
23170
- i0.ɵɵelementStart(0, "ccd-query-details", 8);
23134
+ i0.ɵɵelementStart(0, "ccd-query-details", 7);
23171
23135
  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); });
23172
23136
  i0.ɵɵelementEnd();
23173
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 9);
23137
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 8);
23174
23138
  } if (rf & 2) {
23175
23139
  const ctx_r1 = i0.ɵɵnextContext();
23176
23140
  i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
23177
23141
  i0.ɵɵadvance();
23178
- i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
23142
+ i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser());
23179
23143
  } }
23180
23144
  class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23181
23145
  route;
23182
23146
  sessionStorageService;
23183
23147
  caseNotifier;
23184
- abstractConfig;
23185
23148
  caseQueriesCollections;
23186
23149
  query;
23187
23150
  showQueryList = true;
23188
23151
  caseId;
23189
- messageType;
23190
- followUpQuery = QueryCreateContext.FOLLOWUP;
23191
- respondToQuery = QueryCreateContext.RESPOND;
23192
- isQueryClosed = false;
23193
- value;
23194
- isMultipleFollowUpEnabled = false;
23195
- currentJurisdictionId;
23196
- enableServiceSpecificMultiFollowups = [];
23197
- caseSubscription;
23198
- constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
23152
+ constructor(route, sessionStorageService, caseNotifier) {
23199
23153
  super();
23200
23154
  this.route = route;
23201
23155
  this.sessionStorageService = sessionStorageService;
23202
23156
  this.caseNotifier = caseNotifier;
23203
- this.abstractConfig = abstractConfig;
23204
23157
  }
23205
23158
  ngOnInit() {
23206
23159
  this.caseId = this.route.snapshot.params.cid;
23207
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
23208
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
23209
- if (caseDetails?.case_type?.jurisdiction?.id) {
23210
- this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
23211
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
23212
- }
23213
- });
23214
23160
  if (this.context === PaletteContext.DEFAULT) {
23215
23161
  // EUI-8303 Using mock data until CCD is ready with the API and data contract
23216
23162
  // this.caseQueriesCollections = caseMessagesMockData;
@@ -23236,14 +23182,9 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23236
23182
  // QueryManagementUtils.extractCaseQueriesFromCaseField();
23237
23183
  }
23238
23184
  }
23239
- ngOnDestroy() {
23240
- this.caseSubscription?.unsubscribe();
23241
- }
23242
23185
  setQuery(query) {
23243
23186
  this.showQueryList = false;
23244
23187
  this.query = query;
23245
- this.messageType = this.getMessageType(query);
23246
- this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
23247
23188
  }
23248
23189
  backToQueryListPage() {
23249
23190
  this.showQueryList = true;
@@ -23252,24 +23193,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23252
23193
  isInternalUser() {
23253
23194
  return isInternalUser(this.sessionStorageService);
23254
23195
  }
23255
- getMessageType(query) {
23256
- return query?.children?.length
23257
- ? query.children[query.children.length - 1]?.messageType
23258
- : undefined;
23259
- }
23260
- static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
23261
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["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) {
23262
- i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
23196
+ static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
23197
+ 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) {
23198
+ i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 2)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
23263
23199
  } if (rf & 2) {
23264
- const singleQueryDetails_r7 = i0.ɵɵreference(2);
23265
- i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
23200
+ const singleQueryDetails_r6 = i0.ɵɵreference(2);
23201
+ i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
23266
23202
  } }, encapsulation: 2 });
23267
23203
  }
23268
23204
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
23269
23205
  type: Component,
23270
- 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=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) || (messageType && messageType === respondToQuery); else sequentialQuery\">\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 <ng-template #sequentialQuery>\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 respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n \n </ng-container>\n</ng-template>\n" }]
23271
- }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
23272
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
23206
+ 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=\"!isInternalUser()\">\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 respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n</ng-template>\n" }]
23207
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
23208
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
23273
23209
 
23274
23210
  class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
23275
23211
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
@@ -30363,6 +30299,32 @@ class FileUploadProgressGuard {
30363
30299
  type: Injectable
30364
30300
  }], () => [{ type: FileUploadStateService }, { type: WindowService }], null); })();
30365
30301
 
30302
+ class ErrorsModule {
30303
+ static ɵfac = function ErrorsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ErrorsModule)(); };
30304
+ static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ErrorsModule });
30305
+ static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
30306
+ RouterModule,
30307
+ RpxTranslationModule.forChild()] });
30308
+ }
30309
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorsModule, [{
30310
+ type: NgModule,
30311
+ args: [{
30312
+ imports: [
30313
+ CommonModule,
30314
+ RouterModule,
30315
+ RpxTranslationModule.forChild()
30316
+ ],
30317
+ declarations: [
30318
+ CallbackErrorsComponent
30319
+ ],
30320
+ exports: [
30321
+ CallbackErrorsComponent,
30322
+ ]
30323
+ }]
30324
+ }], null, null); })();
30325
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ErrorsModule, { declarations: [CallbackErrorsComponent], imports: [CommonModule,
30326
+ RouterModule, i1.RpxTranslationModule], exports: [CallbackErrorsComponent] }); })();
30327
+
30366
30328
  const PALETTE_COMPONENTS = [
30367
30329
  UnsupportedFieldComponent,
30368
30330
  DatetimePickerComponent,
@@ -30540,7 +30502,8 @@ class PaletteModule {
30540
30502
  MatLegacyDialogModule,
30541
30503
  MediaViewerModule,
30542
30504
  LoadingModule,
30543
- MarkdownComponentModule, NgxMatDatetimePickerModule,
30505
+ MarkdownComponentModule,
30506
+ ErrorsModule, NgxMatDatetimePickerModule,
30544
30507
  NgxMatNativeDateModule,
30545
30508
  NgxMatTimepickerModule,
30546
30509
  TabsModule,
@@ -30584,7 +30547,8 @@ class PaletteModule {
30584
30547
  MatLegacyDialogModule,
30585
30548
  MediaViewerModule,
30586
30549
  LoadingModule,
30587
- MarkdownComponentModule
30550
+ MarkdownComponentModule,
30551
+ ErrorsModule
30588
30552
  ],
30589
30553
  declarations: [
30590
30554
  FixedListPipe,
@@ -30786,7 +30750,8 @@ class PaletteModule {
30786
30750
  MatLegacyDialogModule,
30787
30751
  MediaViewerModule,
30788
30752
  LoadingModule,
30789
- MarkdownComponentModule], exports: [NgxMatDatetimePickerModule,
30753
+ MarkdownComponentModule,
30754
+ ErrorsModule], exports: [NgxMatDatetimePickerModule,
30790
30755
  NgxMatNativeDateModule,
30791
30756
  NgxMatTimepickerModule,
30792
30757
  TabsModule,
@@ -30993,7 +30958,7 @@ i0.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, function () { return
30993
30958
  QueryCaseDetailsHeaderComponent]; }, function () { return [i1.RpxTranslatePipe]; });
30994
30959
  i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.MaxLengthValidator, i4.FormGroupDirective, i4.FormControlName, MarkdownComponent, QueryCaseDetailsHeaderComponent,
30995
30960
  QueryWriteDateInputComponent]; }, function () { return [i1.RpxTranslatePipe]; });
30996
- i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgForOf, i5.NgIf, QueryCaseDetailsHeaderComponent,
30961
+ i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgForOf, i5.NgIf, CallbackErrorsComponent, QueryCaseDetailsHeaderComponent,
30997
30962
  QueryAttachmentsReadComponent,
30998
30963
  QueryEventCompletionComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
30999
30964
  i0.ɵɵsetComponentScope(QueryWriteAddDocumentsComponent, function () { return [i4.NgControlStatusGroup, i4.FormGroupDirective, WriteCollectionFieldComponent]; }, []);
@@ -31739,32 +31704,6 @@ class CaseProgressComponent {
31739
31704
  }] }); })();
31740
31705
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseProgressComponent, { className: "CaseProgressComponent", filePath: "lib/shared/components/case-editor/case-progress/case-progress.component.ts", lineNumber: 17 }); })();
31741
31706
 
31742
- class ErrorsModule {
31743
- static ɵfac = function ErrorsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ErrorsModule)(); };
31744
- static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ErrorsModule });
31745
- static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
31746
- RouterModule,
31747
- RpxTranslationModule.forChild()] });
31748
- }
31749
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorsModule, [{
31750
- type: NgModule,
31751
- args: [{
31752
- imports: [
31753
- CommonModule,
31754
- RouterModule,
31755
- RpxTranslationModule.forChild()
31756
- ],
31757
- declarations: [
31758
- CallbackErrorsComponent
31759
- ],
31760
- exports: [
31761
- CallbackErrorsComponent,
31762
- ]
31763
- }]
31764
- }], null, null); })();
31765
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ErrorsModule, { declarations: [CallbackErrorsComponent], imports: [CommonModule,
31766
- RouterModule, i1.RpxTranslationModule], exports: [CallbackErrorsComponent] }); })();
31767
-
31768
31707
  class LoadingSpinnerComponent {
31769
31708
  loadingText = 'Loading';
31770
31709
  static ɵfac = function LoadingSpinnerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LoadingSpinnerComponent)(); };