@hmcts/ccd-case-ui-toolkit 7.2.23-multiple-followup → 7.2.24

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 -3
  2. package/esm2022/lib/shared/components/palette/number/write-number-field.component.mjs +3 -3
  3. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +3 -6
  4. package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +8 -55
  5. package/esm2022/lib/shared/components/palette/query-management/models/case-queries-collection.model.mjs +1 -1
  6. package/esm2022/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.mjs +2 -13
  7. package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +24 -77
  8. package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +4 -12
  9. package/esm2022/lib/shared/utils.mjs +1 -1
  10. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +37 -152
  11. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  12. package/lib/app.config.d.ts +0 -3
  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,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 {
@@ -19633,7 +19631,7 @@ class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
19633
19631
  this.numberControl = this.registerControl(new FormControl(this.caseField.value));
19634
19632
  }
19635
19633
  static ɵfac = /*@__PURE__*/ (() => { let ɵWriteNumberFieldComponent_BaseFactory; return function WriteNumberFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteNumberFieldComponent_BaseFactory || (ɵWriteNumberFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteNumberFieldComponent)))(__ngFactoryType__ || WriteNumberFieldComponent); }; })();
19636
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteNumberFieldComponent, selectors: [["ccd-write-number-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 12, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", "inputmode", "numeric", "pattern", "[0-9]*", 1, "form-control", "bottom-30", 3, "ngClass", "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteNumberFieldComponent_Template(rf, ctx) { if (rf & 1) {
19634
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteNumberFieldComponent, selectors: [["ccd-write-number-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 12, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", "inputmode", "decimal", "pattern", "^[-+]?[0-9]+(?:\\.?[0-9]+)?$", 1, "form-control", "bottom-30", 3, "ngClass", "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteNumberFieldComponent_Template(rf, ctx) { if (rf & 1) {
19637
19635
  i0.ɵɵelementStart(0, "div", 0)(1, "label", 1);
19638
19636
  i0.ɵɵtemplate(2, WriteNumberFieldComponent_span_2_Template, 3, 3, "span", 2);
19639
19637
  i0.ɵɵelementEnd();
@@ -19656,7 +19654,7 @@ class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
19656
19654
  }
19657
19655
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
19658
19656
  type: Component,
19659
- args: [{ selector: 'ccd-write-number-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error': !numberControl.valid && numberControl.dirty}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"numberControl.errors && numberControl.dirty\">\n {{numberControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <input class=\"form-control bottom-30\" [ngClass]=\"{'govuk-input--error': numberControl.errors && numberControl.dirty}\"\n [id]=\"id()\" type=\"text\" inputmode=\"numeric\" pattern=\"[0-9]*\" [formControl]=\"numberControl\">\n</div>\n" }]
19657
+ args: [{ selector: 'ccd-write-number-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error': !numberControl.valid && numberControl.dirty}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"numberControl.errors && numberControl.dirty\">\n {{numberControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <input class=\"form-control bottom-30\" [ngClass]=\"{'govuk-input--error': numberControl.errors && numberControl.dirty}\"\n [id]=\"id()\" type=\"text\" inputmode=\"decimal\" pattern=\"^[-+]?[0-9]+(?:\\.?[0-9]+)?$\" [formControl]=\"numberControl\">\n</div>\n" }]
19660
19658
  }], null, null); })();
19661
19659
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteNumberFieldComponent, { className: "WriteNumberFieldComponent", filePath: "lib/shared/components/palette/number/write-number-field.component.ts", lineNumber: 9 }); })();
19662
19660
 
@@ -20906,7 +20904,6 @@ class QueryListItem {
20906
20904
  createdBy;
20907
20905
  parentId;
20908
20906
  isClosed;
20909
- messageType;
20910
20907
  children = [];
20911
20908
  messageIndexInParent = null;
20912
20909
  get lastSubmittedMessage() {
@@ -20971,20 +20968,11 @@ class QueryListItem {
20971
20968
  if (item.isClosed === 'Yes') {
20972
20969
  return true;
20973
20970
  }
20974
- return item.children?.some((child) => isThreadClosed(child)) || false;
20971
+ return item.children?.some(child => isThreadClosed(child)) || false;
20975
20972
  };
20976
20973
  if (isThreadClosed(this)) {
20977
20974
  return QueryItemResponseStatus.CLOSED;
20978
20975
  }
20979
- const lastMessageType = this.children?.length
20980
- ? this.children[this.children.length - 1]?.messageType
20981
- : undefined;
20982
- if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
20983
- return QueryItemResponseStatus.RESPONDED;
20984
- }
20985
- else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
20986
- return QueryItemResponseStatus.AWAITING;
20987
- }
20988
20976
  if (this.messageIndexInParent !== null) {
20989
20977
  return this.messageIndexInParent % 2 === 0
20990
20978
  ? QueryItemResponseStatus.RESPONDED
@@ -21073,22 +21061,16 @@ class QueryManagementUtils {
21073
21061
  isHearingRelated,
21074
21062
  hearingDate,
21075
21063
  createdOn: new Date(),
21076
- createdBy: currentUserId,
21077
- messageType: QueryCreateContext.FOLLOWUP // Default to value new queries will be FOLLOWUP
21064
+ createdBy: currentUserId
21078
21065
  };
21079
21066
  }
21080
- static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
21067
+ static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
21081
21068
  const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
21082
21069
  const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
21083
21070
  const body = formGroup.get('body').value;
21084
21071
  const attachments = formGroup.get('attachments').value;
21085
21072
  const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
21086
21073
  const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
21087
- const messageType = messageTypeParam === QueryCreateContext.RESPOND
21088
- ? QueryCreateContext.RESPOND
21089
- : messageTypeParam === QueryCreateContext.FOLLOWUP
21090
- ? QueryCreateContext.FOLLOWUP
21091
- : undefined;
21092
21074
  return {
21093
21075
  id: v4(),
21094
21076
  subject: queryItem.subject,
@@ -21100,8 +21082,7 @@ class QueryManagementUtils {
21100
21082
  createdOn: new Date(),
21101
21083
  createdBy: currentUserId,
21102
21084
  parentId: queryItem.id,
21103
- isClosed,
21104
- messageType
21085
+ isClosed
21105
21086
  };
21106
21087
  }
21107
21088
  static isObject(elem) {
@@ -21460,7 +21441,6 @@ class QueryCheckYourAnswersComponent {
21460
21441
  queryItem;
21461
21442
  queryCreateContext;
21462
21443
  eventData = null;
21463
- multipleFollowUpFeature;
21464
21444
  backClicked = new EventEmitter();
21465
21445
  querySubmitted = new EventEmitter();
21466
21446
  callbackConfirmationMessage = new EventEmitter();
@@ -21633,7 +21613,7 @@ class QueryCheckYourAnswersComponent {
21633
21613
  const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
21634
21614
  const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
21635
21615
  ? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
21636
- : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
21616
+ : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
21637
21617
  const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
21638
21618
  const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
21639
21619
  // Check if the field ID has been set dynamically
@@ -21793,7 +21773,7 @@ class QueryCheckYourAnswersComponent {
21793
21773
  return !!(error?.callbackErrors?.length);
21794
21774
  }
21795
21775
  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)); };
21796
- 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) {
21776
+ 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) {
21797
21777
  i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
21798
21778
  } if (rf & 2) {
21799
21779
  i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
@@ -21810,8 +21790,6 @@ class QueryCheckYourAnswersComponent {
21810
21790
  type: Input
21811
21791
  }], eventData: [{
21812
21792
  type: Input
21813
- }], multipleFollowUpFeature: [{
21814
- type: Input
21815
21793
  }], backClicked: [{
21816
21794
  type: Output
21817
21795
  }], querySubmitted: [{
@@ -22031,12 +22009,10 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
22031
22009
  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);
22032
22010
  i0.ɵɵelementContainerEnd();
22033
22011
  } if (rf & 2) {
22034
- const child_r3 = ctx.$implicit;
22035
22012
  const i_r4 = ctx.index;
22036
22013
  const followUpMessage_r5 = i0.ɵɵreference(3);
22037
- const ctx_r1 = i0.ɵɵnextContext(3);
22038
22014
  i0.ɵɵadvance();
22039
- 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);
22015
+ i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
22040
22016
  } }
22041
22017
  function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
22042
22018
  i0.ɵɵelementContainerStart(0);
@@ -22140,8 +22116,6 @@ class QueryDetailsComponent {
22140
22116
  sessionStorageService;
22141
22117
  route;
22142
22118
  router;
22143
- abstractConfig;
22144
- caseNotifier;
22145
22119
  query;
22146
22120
  caseId;
22147
22121
  queryResponseStatus;
@@ -22151,18 +22125,10 @@ class QueryDetailsComponent {
22151
22125
  static QUERY_ITEM_RESPOND = '3';
22152
22126
  static QUERY_ITEM_FOLLOW_UP = '4';
22153
22127
  queryItemId;
22154
- followUpQuery = QueryCreateContext.FOLLOWUP;
22155
- respondToQuery = QueryCreateContext.RESPOND;
22156
- enableServiceSpecificMultiFollowups;
22157
- currentJurisdictionId;
22158
- isMultipleFollowUpEnabled = false;
22159
- caseSubscription;
22160
- constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
22128
+ constructor(sessionStorageService, route, router) {
22161
22129
  this.sessionStorageService = sessionStorageService;
22162
22130
  this.route = route;
22163
22131
  this.router = router;
22164
- this.abstractConfig = abstractConfig;
22165
- this.caseNotifier = caseNotifier;
22166
22132
  }
22167
22133
  onBack() {
22168
22134
  this.backClicked.emit(true);
@@ -22170,23 +22136,10 @@ class QueryDetailsComponent {
22170
22136
  isInternalUser() {
22171
22137
  return isInternalUser(this.sessionStorageService);
22172
22138
  }
22173
- ngOnInit() {
22174
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
22175
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
22176
- if (caseView?.case_type?.jurisdiction?.id) {
22177
- this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
22178
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
22179
- this.hasRespondedToQuery();
22180
- }
22181
- });
22182
- }
22183
22139
  ngOnChanges() {
22184
22140
  this.toggleLinkVisibility();
22185
22141
  this.hasRespondedToQuery();
22186
22142
  }
22187
- ngOnDestroy() {
22188
- this.caseSubscription?.unsubscribe();
22189
- }
22190
22143
  toggleLinkVisibility() {
22191
22144
  this.queryItemId = this.route.snapshot.params.qid;
22192
22145
  if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
@@ -22199,24 +22152,6 @@ class QueryDetailsComponent {
22199
22152
  this.hasResponded.emit(true);
22200
22153
  return true;
22201
22154
  }
22202
- const lastChild = this.query?.children?.[this.query.children.length - 1];
22203
- const lastMessageType = this.query?.children?.length
22204
- ? this.query.children[this.query.children.length - 1]?.messageType
22205
- : this.query?.messageType;
22206
- const isFollowUp = lastMessageType === this.followUpQuery;
22207
- const isRespond = lastChild?.messageType === this.respondToQuery;
22208
- if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
22209
- this.hasResponded.emit(true);
22210
- return true;
22211
- }
22212
- if (isFollowUp && this.isMultipleFollowUpEnabled) {
22213
- this.hasResponded.emit(false);
22214
- return false;
22215
- }
22216
- if (isRespond) {
22217
- this.hasResponded.emit(false);
22218
- return false;
22219
- }
22220
22155
  if (this.isInternalUser()) {
22221
22156
  if (isAwaiting) {
22222
22157
  this.hasResponded.emit(false);
@@ -22232,7 +22167,7 @@ class QueryDetailsComponent {
22232
22167
  this.hasResponded.emit(false);
22233
22168
  return false;
22234
22169
  }
22235
- 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)); };
22170
+ static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
22236
22171
  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) {
22237
22172
  i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
22238
22173
  } if (rf & 2) {
@@ -22241,8 +22176,8 @@ class QueryDetailsComponent {
22241
22176
  }
22242
22177
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
22243
22178
  type: Component,
22244
- 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"] }]
22245
- }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
22179
+ 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"] }]
22180
+ }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
22246
22181
  type: Input
22247
22182
  }], caseId: [{
22248
22183
  type: Input
@@ -22253,7 +22188,7 @@ class QueryDetailsComponent {
22253
22188
  }], hasResponded: [{
22254
22189
  type: Output
22255
22190
  }] }); })();
22256
- (() => { (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 }); })();
22191
+ (() => { (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 }); })();
22257
22192
 
22258
22193
  class QueryEventCompletionComponent {
22259
22194
  eventCompletionParams;
@@ -23252,7 +23187,7 @@ class CloseQueryComponent {
23252
23187
  const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
23253
23188
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
23254
23189
  const _r1 = i0.ɵɵgetCurrentView();
23255
- i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
23190
+ i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
23256
23191
  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)); });
23257
23192
  i0.ɵɵelementEnd()();
23258
23193
  } if (rf & 2) {
@@ -23262,7 +23197,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
23262
23197
  } }
23263
23198
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23264
23199
  i0.ɵɵelementContainerStart(0);
23265
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
23200
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 4);
23266
23201
  i0.ɵɵelementContainerEnd();
23267
23202
  } if (rf & 2) {
23268
23203
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -23271,7 +23206,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
23271
23206
  } }
23272
23207
  function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23273
23208
  i0.ɵɵelementContainerStart(0);
23274
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
23209
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 3);
23275
23210
  i0.ɵɵelementContainerEnd();
23276
23211
  } if (rf & 2) {
23277
23212
  const ctx_r1 = i0.ɵɵnextContext();
@@ -23280,7 +23215,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
23280
23215
  } }
23281
23216
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23282
23217
  i0.ɵɵelementContainerStart(0);
23283
- i0.ɵɵelementStart(1, "button", 10);
23218
+ i0.ɵɵelementStart(1, "button", 9);
23284
23219
  i0.ɵɵtext(2);
23285
23220
  i0.ɵɵpipe(3, "rpxTranslate");
23286
23221
  i0.ɵɵelementEnd();
@@ -23292,22 +23227,8 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
23292
23227
  i0.ɵɵadvance();
23293
23228
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23294
23229
  } }
23295
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23296
- i0.ɵɵelementContainerStart(0);
23297
- i0.ɵɵelementStart(1, "button", 10);
23298
- i0.ɵɵtext(2);
23299
- i0.ɵɵpipe(3, "rpxTranslate");
23300
- i0.ɵɵelementEnd();
23301
- i0.ɵɵelementContainerEnd();
23302
- } if (rf & 2) {
23303
- const ctx_r1 = i0.ɵɵnextContext(4);
23304
- i0.ɵɵadvance();
23305
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
23306
- i0.ɵɵadvance();
23307
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23308
- } }
23309
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23310
- i0.ɵɵelementStart(0, "div")(1, "p", 11);
23230
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23231
+ i0.ɵɵelementStart(0, "div")(1, "p", 10);
23311
23232
  i0.ɵɵtext(2);
23312
23233
  i0.ɵɵpipe(3, "rpxTranslate");
23313
23234
  i0.ɵɵelementEnd();
@@ -23321,32 +23242,25 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
23321
23242
  i0.ɵɵadvance(3);
23322
23243
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
23323
23244
  } }
23324
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23325
- 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);
23326
- } if (rf & 2) {
23327
- const queryIsInReview_r5 = i0.ɵɵreference(2);
23328
- const ctx_r1 = i0.ɵɵnextContext(3);
23329
- 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);
23330
- } }
23331
23245
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23332
23246
  i0.ɵɵelementContainerStart(0);
23333
- 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);
23247
+ 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);
23334
23248
  i0.ɵɵelementContainerEnd();
23335
23249
  } if (rf & 2) {
23336
- const sequentialQuery_r6 = i0.ɵɵreference(3);
23250
+ const queryIsInReview_r5 = i0.ɵɵreference(3);
23337
23251
  const ctx_r1 = i0.ɵɵnextContext(2);
23338
23252
  i0.ɵɵadvance();
23339
- 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);
23253
+ 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);
23340
23254
  } }
23341
23255
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
23342
23256
  i0.ɵɵelementContainerStart(0);
23343
- i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
23257
+ i0.ɵɵelementStart(1, "div", 11)(2, "span", 12);
23344
23258
  i0.ɵɵtext(3, "!");
23345
23259
  i0.ɵɵelementEnd();
23346
- i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
23260
+ i0.ɵɵelementStart(4, "strong", 13)(5, "span", 14);
23347
23261
  i0.ɵɵtext(6, "Warning");
23348
23262
  i0.ɵɵelementEnd();
23349
- i0.ɵɵelementStart(7, "p", 16);
23263
+ i0.ɵɵelementStart(7, "p", 15);
23350
23264
  i0.ɵɵtext(8);
23351
23265
  i0.ɵɵpipe(9, "rpxTranslate");
23352
23266
  i0.ɵɵelementEnd()()();
@@ -23357,10 +23271,10 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
23357
23271
  } }
23358
23272
  function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23359
23273
  const _r4 = i0.ɵɵgetCurrentView();
23360
- i0.ɵɵelementStart(0, "ccd-query-details", 8);
23274
+ i0.ɵɵelementStart(0, "ccd-query-details", 7);
23361
23275
  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); });
23362
23276
  i0.ɵɵelementEnd();
23363
- 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);
23277
+ 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);
23364
23278
  } if (rf & 2) {
23365
23279
  const ctx_r1 = i0.ɵɵnextContext();
23366
23280
  i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
@@ -23373,36 +23287,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23373
23287
  route;
23374
23288
  sessionStorageService;
23375
23289
  caseNotifier;
23376
- abstractConfig;
23377
23290
  caseQueriesCollections;
23378
23291
  query;
23379
23292
  showQueryList = true;
23380
23293
  caseId;
23381
- messageType;
23382
- followUpQuery = QueryCreateContext.FOLLOWUP;
23383
- respondToQuery = QueryCreateContext.RESPOND;
23384
23294
  isQueryClosed = false;
23385
- value;
23386
- isMultipleFollowUpEnabled = false;
23387
- currentJurisdictionId;
23388
- enableServiceSpecificMultiFollowups = [];
23389
- caseSubscription;
23390
- constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
23295
+ constructor(route, sessionStorageService, caseNotifier) {
23391
23296
  super();
23392
23297
  this.route = route;
23393
23298
  this.sessionStorageService = sessionStorageService;
23394
23299
  this.caseNotifier = caseNotifier;
23395
- this.abstractConfig = abstractConfig;
23396
23300
  }
23397
23301
  ngOnInit() {
23398
23302
  this.caseId = this.route.snapshot.params.cid;
23399
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
23400
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
23401
- if (caseDetails?.case_type?.jurisdiction?.id) {
23402
- this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
23403
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
23404
- }
23405
- });
23406
23303
  if (this.context === PaletteContext.DEFAULT) {
23407
23304
  // EUI-8303 Using mock data until CCD is ready with the API and data contract
23408
23305
  // this.caseQueriesCollections = caseMessagesMockData;
@@ -23428,13 +23325,9 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23428
23325
  // QueryManagementUtils.extractCaseQueriesFromCaseField();
23429
23326
  }
23430
23327
  }
23431
- ngOnDestroy() {
23432
- this.caseSubscription?.unsubscribe();
23433
- }
23434
23328
  setQuery(query) {
23435
23329
  this.showQueryList = false;
23436
23330
  this.query = query;
23437
- this.messageType = this.getMessageType(query);
23438
23331
  this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
23439
23332
  }
23440
23333
  backToQueryListPage() {
@@ -23444,27 +23337,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23444
23337
  isInternalUser() {
23445
23338
  return isInternalUser(this.sessionStorageService);
23446
23339
  }
23447
- getMessageType(query) {
23448
- if (!query) {
23449
- return undefined;
23450
- }
23451
- return query.children?.length
23452
- ? query.children[query.children.length - 1]?.messageType
23453
- : query?.messageType;
23454
- }
23455
- static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
23456
- 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) {
23457
- 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);
23340
+ static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
23341
+ 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) {
23342
+ 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);
23458
23343
  } if (rf & 2) {
23459
- const singleQueryDetails_r7 = i0.ɵɵreference(2);
23460
- i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
23344
+ const singleQueryDetails_r6 = i0.ɵɵreference(2);
23345
+ i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
23461
23346
  } }, encapsulation: 2 });
23462
23347
  }
23463
23348
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
23464
23349
  type: Component,
23465
- 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" }]
23466
- }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
23467
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
23350
+ 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" }]
23351
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
23352
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
23468
23353
 
23469
23354
  class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
23470
23355
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();