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

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 (27) hide show
  1. package/esm2022/lib/app.config.mjs +1 -2
  2. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +3 -6
  3. package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +8 -55
  4. package/esm2022/lib/shared/components/palette/query-management/models/case-queries-collection.model.mjs +1 -1
  5. package/esm2022/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.mjs +7 -43
  6. package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +24 -77
  7. package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +4 -12
  8. package/esm2022/lib/shared/services/draft/draft.service.mjs +2 -2
  9. package/esm2022/lib/shared/utils.mjs +1 -1
  10. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +41 -180
  11. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  12. package/lib/app.config.d.ts +0 -2
  13. package/lib/app.config.d.ts.map +1 -1
  14. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +1 -2
  15. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  16. package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts +3 -15
  17. package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts.map +1 -1
  18. package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts +0 -1
  19. package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts.map +1 -1
  20. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts +0 -1
  21. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts.map +1 -1
  22. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts +3 -15
  23. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
  24. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
  25. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
  26. package/lib/shared/utils.d.ts +1 -1
  27. package/package.json +1 -1
@@ -1326,7 +1326,6 @@ class CaseEditorConfig {
1326
1326
  icp_enabled;
1327
1327
  icp_jurisdictions;
1328
1328
  events_to_hide;
1329
- enable_service_specific_multi_followups;
1330
1329
  }
1331
1330
 
1332
1331
  class HttpError {
@@ -2231,7 +2230,7 @@ class DraftService {
2231
2230
  }));
2232
2231
  }
2233
2232
  updateDraft(ctid, draftId, eventData) {
2234
- const saveDraftEndpoint = this.appConfig.getCreateOrUpdateDraftsUrl(ctid) + draftId;
2233
+ const saveDraftEndpoint = `${this.appConfig.getCreateOrUpdateDraftsUrl(ctid)}/${draftId}`;
2235
2234
  const headers = new HttpHeaders()
2236
2235
  .set('experimental', 'true')
2237
2236
  .set('Accept', DraftService.V2_MEDIATYPE_DRAFT_UPDATE)
@@ -20913,7 +20912,6 @@ class QueryListItem {
20913
20912
  createdBy;
20914
20913
  parentId;
20915
20914
  isClosed;
20916
- messageType;
20917
20915
  children = [];
20918
20916
  messageIndexInParent = null;
20919
20917
  get lastSubmittedMessage() {
@@ -20940,34 +20938,14 @@ class QueryListItem {
20940
20938
  }
20941
20939
  get lastSubmittedDate() {
20942
20940
  const childrenCount = this.children.length;
20943
- const lastChild = this.children[childrenCount - 1];
20944
- // 1. Check for legacy: <= 1 child with no messageType
20945
- const allChildrenLackMessageType = this.children.every((child) => !child.messageType);
20946
- if (childrenCount <= 1 && allChildrenLackMessageType) {
20941
+ if (childrenCount <= 1) {
20947
20942
  return new Date(this.lastSubmittedMessage.createdOn);
20948
20943
  }
20949
- // 2. Check if any RESPOND exists
20950
- const hasRespond = this.children.some((child) => child.messageType === QueryCreateContext.RESPOND);
20951
- // 3. Check if all children are FOLLOWUPs and none are RESPONDs
20952
- const onlyFollowUps = this.children.every((child) => child.messageType === QueryCreateContext.FOLLOWUP);
20953
- if (onlyFollowUps && !hasRespond) {
20954
- return new Date(lastChild.createdOn);
20955
- }
20956
- // 4. If RESPOND exists, get latest FOLLOWUP
20957
- // If no RESPOND, but there is at least one FOLLOWUP, return the last FOLLOWUP
20958
- const lastFollowUp = [...this.children]
20959
- .reverse()
20960
- .find((child) => child.messageType === QueryCreateContext.FOLLOWUP);
20961
- if (lastFollowUp) {
20962
- return new Date(lastFollowUp.createdOn);
20963
- }
20964
- // 5. Legacy fallback: no messageType at all
20965
- if (allChildrenLackMessageType) {
20966
- const index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
20967
- return new Date(this.children[index]?.createdOn);
20944
+ let index;
20945
+ if (childrenCount > 1) {
20946
+ index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
20968
20947
  }
20969
- // 6. Final fallback: return last child's date
20970
- return new Date(this.lastSubmittedMessage.createdOn);
20948
+ return new Date(this.children[index].createdOn);
20971
20949
  }
20972
20950
  get lastResponseBy() {
20973
20951
  return this.children?.length > 0 ? this.lastSubmittedMessage.name : '';
@@ -20977,11 +20955,6 @@ class QueryListItem {
20977
20955
  if (childrenCount === 0) {
20978
20956
  return null;
20979
20957
  }
20980
- const lastChild = this.children[childrenCount - 1];
20981
- if (lastChild?.messageType === QueryCreateContext.FOLLOWUP &&
20982
- !this.children.some((child) => child.messageType === QueryCreateContext.RESPOND)) {
20983
- return null;
20984
- }
20985
20958
  let index;
20986
20959
  if (childrenCount === 1) {
20987
20960
  index = 0;
@@ -20996,20 +20969,11 @@ class QueryListItem {
20996
20969
  if (item.isClosed === 'Yes') {
20997
20970
  return true;
20998
20971
  }
20999
- return item.children?.some((child) => isThreadClosed(child)) || false;
20972
+ return item.children?.some(child => isThreadClosed(child)) || false;
21000
20973
  };
21001
20974
  if (isThreadClosed(this)) {
21002
20975
  return QueryItemResponseStatus.CLOSED;
21003
20976
  }
21004
- const lastMessageType = this.children?.length
21005
- ? this.children[this.children.length - 1]?.messageType
21006
- : undefined;
21007
- if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
21008
- return QueryItemResponseStatus.RESPONDED;
21009
- }
21010
- else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
21011
- return QueryItemResponseStatus.AWAITING;
21012
- }
21013
20977
  if (this.messageIndexInParent !== null) {
21014
20978
  return this.messageIndexInParent % 2 === 0
21015
20979
  ? QueryItemResponseStatus.RESPONDED
@@ -21098,22 +21062,16 @@ class QueryManagementUtils {
21098
21062
  isHearingRelated,
21099
21063
  hearingDate,
21100
21064
  createdOn: new Date(),
21101
- createdBy: currentUserId,
21102
- messageType: QueryCreateContext.FOLLOWUP // Default to value new queries will be FOLLOWUP
21065
+ createdBy: currentUserId
21103
21066
  };
21104
21067
  }
21105
- static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
21068
+ static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
21106
21069
  const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
21107
21070
  const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
21108
21071
  const body = formGroup.get('body').value;
21109
21072
  const attachments = formGroup.get('attachments').value;
21110
21073
  const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
21111
21074
  const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
21112
- const messageType = messageTypeParam === QueryCreateContext.RESPOND
21113
- ? QueryCreateContext.RESPOND
21114
- : messageTypeParam === QueryCreateContext.FOLLOWUP
21115
- ? QueryCreateContext.FOLLOWUP
21116
- : undefined;
21117
21075
  return {
21118
21076
  id: v4(),
21119
21077
  subject: queryItem.subject,
@@ -21125,8 +21083,7 @@ class QueryManagementUtils {
21125
21083
  createdOn: new Date(),
21126
21084
  createdBy: currentUserId,
21127
21085
  parentId: queryItem.id,
21128
- isClosed,
21129
- messageType
21086
+ isClosed
21130
21087
  };
21131
21088
  }
21132
21089
  static isObject(elem) {
@@ -21485,7 +21442,6 @@ class QueryCheckYourAnswersComponent {
21485
21442
  queryItem;
21486
21443
  queryCreateContext;
21487
21444
  eventData = null;
21488
- multipleFollowUpFeature;
21489
21445
  backClicked = new EventEmitter();
21490
21446
  querySubmitted = new EventEmitter();
21491
21447
  callbackConfirmationMessage = new EventEmitter();
@@ -21658,7 +21614,7 @@ class QueryCheckYourAnswersComponent {
21658
21614
  const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
21659
21615
  const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
21660
21616
  ? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
21661
- : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
21617
+ : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
21662
21618
  const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
21663
21619
  const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
21664
21620
  // Check if the field ID has been set dynamically
@@ -21818,7 +21774,7 @@ class QueryCheckYourAnswersComponent {
21818
21774
  return !!(error?.callbackErrors?.length);
21819
21775
  }
21820
21776
  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)); };
21821
- 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"], ["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) {
21777
+ 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) {
21822
21778
  i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
21823
21779
  } if (rf & 2) {
21824
21780
  i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
@@ -21835,8 +21791,6 @@ class QueryCheckYourAnswersComponent {
21835
21791
  type: Input
21836
21792
  }], eventData: [{
21837
21793
  type: Input
21838
- }], multipleFollowUpFeature: [{
21839
- type: Input
21840
21794
  }], backClicked: [{
21841
21795
  type: Output
21842
21796
  }], querySubmitted: [{
@@ -22056,12 +22010,10 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
22056
22010
  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);
22057
22011
  i0.ɵɵelementContainerEnd();
22058
22012
  } if (rf & 2) {
22059
- const child_r3 = ctx.$implicit;
22060
22013
  const i_r4 = ctx.index;
22061
22014
  const followUpMessage_r5 = i0.ɵɵreference(3);
22062
- const ctx_r1 = i0.ɵɵnextContext(3);
22063
22015
  i0.ɵɵadvance();
22064
- 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);
22016
+ i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
22065
22017
  } }
22066
22018
  function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
22067
22019
  i0.ɵɵelementContainerStart(0);
@@ -22165,8 +22117,6 @@ class QueryDetailsComponent {
22165
22117
  sessionStorageService;
22166
22118
  route;
22167
22119
  router;
22168
- abstractConfig;
22169
- caseNotifier;
22170
22120
  query;
22171
22121
  caseId;
22172
22122
  queryResponseStatus;
@@ -22176,18 +22126,10 @@ class QueryDetailsComponent {
22176
22126
  static QUERY_ITEM_RESPOND = '3';
22177
22127
  static QUERY_ITEM_FOLLOW_UP = '4';
22178
22128
  queryItemId;
22179
- followUpQuery = QueryCreateContext.FOLLOWUP;
22180
- respondToQuery = QueryCreateContext.RESPOND;
22181
- enableServiceSpecificMultiFollowups;
22182
- currentJurisdictionId;
22183
- isMultipleFollowUpEnabled = false;
22184
- caseSubscription;
22185
- constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
22129
+ constructor(sessionStorageService, route, router) {
22186
22130
  this.sessionStorageService = sessionStorageService;
22187
22131
  this.route = route;
22188
22132
  this.router = router;
22189
- this.abstractConfig = abstractConfig;
22190
- this.caseNotifier = caseNotifier;
22191
22133
  }
22192
22134
  onBack() {
22193
22135
  this.backClicked.emit(true);
@@ -22195,23 +22137,10 @@ class QueryDetailsComponent {
22195
22137
  isInternalUser() {
22196
22138
  return isInternalUser(this.sessionStorageService);
22197
22139
  }
22198
- ngOnInit() {
22199
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
22200
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
22201
- if (caseView?.case_type?.jurisdiction?.id) {
22202
- this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
22203
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
22204
- this.hasRespondedToQuery();
22205
- }
22206
- });
22207
- }
22208
22140
  ngOnChanges() {
22209
22141
  this.toggleLinkVisibility();
22210
22142
  this.hasRespondedToQuery();
22211
22143
  }
22212
- ngOnDestroy() {
22213
- this.caseSubscription?.unsubscribe();
22214
- }
22215
22144
  toggleLinkVisibility() {
22216
22145
  this.queryItemId = this.route.snapshot.params.qid;
22217
22146
  if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
@@ -22224,24 +22153,6 @@ class QueryDetailsComponent {
22224
22153
  this.hasResponded.emit(true);
22225
22154
  return true;
22226
22155
  }
22227
- const lastChild = this.query?.children?.[this.query.children.length - 1];
22228
- const lastMessageType = this.query?.children?.length
22229
- ? this.query.children[this.query.children.length - 1]?.messageType
22230
- : this.query?.messageType;
22231
- const isFollowUp = lastMessageType === this.followUpQuery;
22232
- const isRespond = lastChild?.messageType === this.respondToQuery;
22233
- if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
22234
- this.hasResponded.emit(true);
22235
- return true;
22236
- }
22237
- if (isFollowUp && this.isMultipleFollowUpEnabled) {
22238
- this.hasResponded.emit(false);
22239
- return false;
22240
- }
22241
- if (isRespond) {
22242
- this.hasResponded.emit(false);
22243
- return false;
22244
- }
22245
22156
  if (this.isInternalUser()) {
22246
22157
  if (isAwaiting) {
22247
22158
  this.hasResponded.emit(false);
@@ -22257,7 +22168,7 @@ class QueryDetailsComponent {
22257
22168
  this.hasResponded.emit(false);
22258
22169
  return false;
22259
22170
  }
22260
- 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)); };
22171
+ static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
22261
22172
  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) {
22262
22173
  i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
22263
22174
  } if (rf & 2) {
@@ -22266,8 +22177,8 @@ class QueryDetailsComponent {
22266
22177
  }
22267
22178
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
22268
22179
  type: Component,
22269
- args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\n <br />\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"] }]
22270
- }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
22180
+ args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\n <br />\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"] }]
22181
+ }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
22271
22182
  type: Input
22272
22183
  }], caseId: [{
22273
22184
  type: Input
@@ -22278,7 +22189,7 @@ class QueryDetailsComponent {
22278
22189
  }], hasResponded: [{
22279
22190
  type: Output
22280
22191
  }] }); })();
22281
- (() => { (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 }); })();
22192
+ (() => { (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 }); })();
22282
22193
 
22283
22194
  class QueryEventCompletionComponent {
22284
22195
  eventCompletionParams;
@@ -23277,7 +23188,7 @@ class CloseQueryComponent {
23277
23188
  const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
23278
23189
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
23279
23190
  const _r1 = i0.ɵɵgetCurrentView();
23280
- i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
23191
+ i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
23281
23192
  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)); });
23282
23193
  i0.ɵɵelementEnd()();
23283
23194
  } if (rf & 2) {
@@ -23287,7 +23198,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
23287
23198
  } }
23288
23199
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23289
23200
  i0.ɵɵelementContainerStart(0);
23290
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
23201
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 4);
23291
23202
  i0.ɵɵelementContainerEnd();
23292
23203
  } if (rf & 2) {
23293
23204
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -23296,7 +23207,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
23296
23207
  } }
23297
23208
  function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23298
23209
  i0.ɵɵelementContainerStart(0);
23299
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
23210
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 3);
23300
23211
  i0.ɵɵelementContainerEnd();
23301
23212
  } if (rf & 2) {
23302
23213
  const ctx_r1 = i0.ɵɵnextContext();
@@ -23305,7 +23216,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
23305
23216
  } }
23306
23217
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23307
23218
  i0.ɵɵelementContainerStart(0);
23308
- i0.ɵɵelementStart(1, "button", 10);
23219
+ i0.ɵɵelementStart(1, "button", 9);
23309
23220
  i0.ɵɵtext(2);
23310
23221
  i0.ɵɵpipe(3, "rpxTranslate");
23311
23222
  i0.ɵɵelementEnd();
@@ -23317,22 +23228,8 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
23317
23228
  i0.ɵɵadvance();
23318
23229
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23319
23230
  } }
23320
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23321
- i0.ɵɵelementContainerStart(0);
23322
- i0.ɵɵelementStart(1, "button", 10);
23323
- i0.ɵɵtext(2);
23324
- i0.ɵɵpipe(3, "rpxTranslate");
23325
- i0.ɵɵelementEnd();
23326
- i0.ɵɵelementContainerEnd();
23327
- } if (rf & 2) {
23328
- const ctx_r1 = i0.ɵɵnextContext(4);
23329
- i0.ɵɵadvance();
23330
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
23331
- i0.ɵɵadvance();
23332
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23333
- } }
23334
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23335
- i0.ɵɵelementStart(0, "div")(1, "p", 11);
23231
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23232
+ i0.ɵɵelementStart(0, "div")(1, "p", 10);
23336
23233
  i0.ɵɵtext(2);
23337
23234
  i0.ɵɵpipe(3, "rpxTranslate");
23338
23235
  i0.ɵɵelementEnd();
@@ -23346,32 +23243,25 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
23346
23243
  i0.ɵɵadvance(3);
23347
23244
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
23348
23245
  } }
23349
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23350
- 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);
23351
- } if (rf & 2) {
23352
- const queryIsInReview_r5 = i0.ɵɵreference(2);
23353
- const ctx_r1 = i0.ɵɵnextContext(3);
23354
- 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);
23355
- } }
23356
23246
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23357
23247
  i0.ɵɵelementContainerStart(0);
23358
- 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);
23248
+ 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);
23359
23249
  i0.ɵɵelementContainerEnd();
23360
23250
  } if (rf & 2) {
23361
- const sequentialQuery_r6 = i0.ɵɵreference(3);
23251
+ const queryIsInReview_r5 = i0.ɵɵreference(3);
23362
23252
  const ctx_r1 = i0.ɵɵnextContext(2);
23363
23253
  i0.ɵɵadvance();
23364
- 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);
23254
+ 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);
23365
23255
  } }
23366
23256
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
23367
23257
  i0.ɵɵelementContainerStart(0);
23368
- i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
23258
+ i0.ɵɵelementStart(1, "div", 11)(2, "span", 12);
23369
23259
  i0.ɵɵtext(3, "!");
23370
23260
  i0.ɵɵelementEnd();
23371
- i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
23261
+ i0.ɵɵelementStart(4, "strong", 13)(5, "span", 14);
23372
23262
  i0.ɵɵtext(6, "Warning");
23373
23263
  i0.ɵɵelementEnd();
23374
- i0.ɵɵelementStart(7, "p", 16);
23264
+ i0.ɵɵelementStart(7, "p", 15);
23375
23265
  i0.ɵɵtext(8);
23376
23266
  i0.ɵɵpipe(9, "rpxTranslate");
23377
23267
  i0.ɵɵelementEnd()()();
@@ -23382,10 +23272,10 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
23382
23272
  } }
23383
23273
  function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23384
23274
  const _r4 = i0.ɵɵgetCurrentView();
23385
- i0.ɵɵelementStart(0, "ccd-query-details", 8);
23275
+ i0.ɵɵelementStart(0, "ccd-query-details", 7);
23386
23276
  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); });
23387
23277
  i0.ɵɵelementEnd();
23388
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 9)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template, 10, 3, "ng-container", 9);
23278
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 8)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template, 10, 3, "ng-container", 8);
23389
23279
  } if (rf & 2) {
23390
23280
  const ctx_r1 = i0.ɵɵnextContext();
23391
23281
  i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
@@ -23398,36 +23288,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23398
23288
  route;
23399
23289
  sessionStorageService;
23400
23290
  caseNotifier;
23401
- abstractConfig;
23402
23291
  caseQueriesCollections;
23403
23292
  query;
23404
23293
  showQueryList = true;
23405
23294
  caseId;
23406
- messageType;
23407
- followUpQuery = QueryCreateContext.FOLLOWUP;
23408
- respondToQuery = QueryCreateContext.RESPOND;
23409
23295
  isQueryClosed = false;
23410
- value;
23411
- isMultipleFollowUpEnabled = false;
23412
- currentJurisdictionId;
23413
- enableServiceSpecificMultiFollowups = [];
23414
- caseSubscription;
23415
- constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
23296
+ constructor(route, sessionStorageService, caseNotifier) {
23416
23297
  super();
23417
23298
  this.route = route;
23418
23299
  this.sessionStorageService = sessionStorageService;
23419
23300
  this.caseNotifier = caseNotifier;
23420
- this.abstractConfig = abstractConfig;
23421
23301
  }
23422
23302
  ngOnInit() {
23423
23303
  this.caseId = this.route.snapshot.params.cid;
23424
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
23425
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
23426
- if (caseDetails?.case_type?.jurisdiction?.id) {
23427
- this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
23428
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
23429
- }
23430
- });
23431
23304
  if (this.context === PaletteContext.DEFAULT) {
23432
23305
  // EUI-8303 Using mock data until CCD is ready with the API and data contract
23433
23306
  // this.caseQueriesCollections = caseMessagesMockData;
@@ -23453,13 +23326,9 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23453
23326
  // QueryManagementUtils.extractCaseQueriesFromCaseField();
23454
23327
  }
23455
23328
  }
23456
- ngOnDestroy() {
23457
- this.caseSubscription?.unsubscribe();
23458
- }
23459
23329
  setQuery(query) {
23460
23330
  this.showQueryList = false;
23461
23331
  this.query = query;
23462
- this.messageType = this.getMessageType(query);
23463
23332
  this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
23464
23333
  }
23465
23334
  backToQueryListPage() {
@@ -23469,27 +23338,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23469
23338
  isInternalUser() {
23470
23339
  return isInternalUser(this.sessionStorageService);
23471
23340
  }
23472
- getMessageType(query) {
23473
- if (!query) {
23474
- return undefined;
23475
- }
23476
- return query.children?.length
23477
- ? query.children[query.children.length - 1]?.messageType
23478
- : query?.messageType;
23479
- }
23480
- static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
23481
- 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"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
23482
- i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
23341
+ static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
23342
+ 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"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
23343
+ i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 2)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
23483
23344
  } if (rf & 2) {
23484
- const singleQueryDetails_r7 = i0.ɵɵreference(2);
23485
- i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
23345
+ const singleQueryDetails_r6 = i0.ɵɵreference(2);
23346
+ i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
23486
23347
  } }, encapsulation: 2 });
23487
23348
  }
23488
23349
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
23489
23350
  type: Component,
23490
- 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-container *ngIf=\"!isInternalUser() && isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by court staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
23491
- }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
23492
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
23351
+ 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=\"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-container *ngIf=\"!isInternalUser() && isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by court staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
23352
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
23353
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
23493
23354
 
23494
23355
  class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
23495
23356
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();