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

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/document/write-document-field.component.mjs +11 -11
  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 -52
  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 -74
  8. package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +3 -10
  9. package/esm2022/lib/shared/utils.mjs +1 -1
  10. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +44 -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 {
@@ -15105,17 +15103,17 @@ class FileUploadStateService {
15105
15103
  const _c0$R = ["fileInput"];
15106
15104
  const _c1$l = a0 => ({ "form-group-error bottom-30": a0 });
15107
15105
  function WriteDocumentFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
15108
- i0.ɵɵelementStart(0, "span", 12)(1, "markdown");
15109
- i0.ɵɵtext(2);
15110
- i0.ɵɵpipe(3, "rpxTranslate");
15111
- i0.ɵɵelementEnd()();
15106
+ i0.ɵɵelementStart(0, "span", 12);
15107
+ i0.ɵɵelement(1, "markdown", 13);
15108
+ i0.ɵɵpipe(2, "rpxTranslate");
15109
+ i0.ɵɵelementEnd();
15112
15110
  } if (rf & 2) {
15113
15111
  const ctx_r1 = i0.ɵɵnextContext();
15114
- i0.ɵɵadvance(2);
15115
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, ctx_r1.caseField.hint_text));
15112
+ i0.ɵɵadvance();
15113
+ i0.ɵɵproperty("data", i0.ɵɵpipeBind1(2, 1, ctx_r1.caseField.hint_text));
15116
15114
  } }
15117
15115
  function WriteDocumentFieldComponent_ccd_read_document_field_11_Template(rf, ctx) { if (rf & 1) {
15118
- i0.ɵɵelement(0, "ccd-read-document-field", 13);
15116
+ i0.ɵɵelement(0, "ccd-read-document-field", 14);
15119
15117
  } if (rf & 2) {
15120
15118
  const ctx_r1 = i0.ɵɵnextContext();
15121
15119
  i0.ɵɵproperty("caseField", ctx_r1.caseField);
@@ -15463,14 +15461,14 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
15463
15461
  } if (rf & 2) {
15464
15462
  let _t;
15465
15463
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileInput = _t.first);
15466
- } }, features: [i0.ɵɵInheritDefinitionFeature], decls: 20, vars: 23, consts: [["fileInput", ""], [1, "form-group", 3, "ngClass"], [3, "for"], [1, "form-label"], ["class", "form-hint", 4, "ngIf"], ["role", "alert", "tabindex", "0", 1, "error-message", 3, "hidden"], [3, "caseField", 4, "ngIf"], [2, "position", "relative"], [3, "click", "keyup", "id"], ["type", "file", 1, "form-control", "bottom-30", 3, "keydown.Tab", "change", "id", "accept"], [1, "form-group", "bottom-30"], ["type", "button", "aria-label", "Cancel upload", 1, "button", "button-secondary", 3, "click", "disabled"], [1, "form-hint"], [3, "caseField"]], template: function WriteDocumentFieldComponent_Template(rf, ctx) { if (rf & 1) {
15464
+ } }, features: [i0.ɵɵInheritDefinitionFeature], decls: 20, vars: 23, consts: [["fileInput", ""], [1, "form-group", 3, "ngClass"], [3, "for"], [1, "form-label"], ["class", "form-hint", 4, "ngIf"], ["role", "alert", "tabindex", "0", 1, "error-message", 3, "hidden"], [3, "caseField", 4, "ngIf"], [2, "position", "relative"], [3, "click", "keyup", "id"], ["type", "file", 1, "form-control", "bottom-30", 3, "keydown.Tab", "change", "id", "accept"], [1, "form-group", "bottom-30"], ["type", "button", "aria-label", "Cancel upload", 1, "button", "button-secondary", 3, "click", "disabled"], [1, "form-hint"], [3, "data"], [3, "caseField"]], template: function WriteDocumentFieldComponent_Template(rf, ctx) { if (rf & 1) {
15467
15465
  const _r1 = i0.ɵɵgetCurrentView();
15468
15466
  i0.ɵɵelementStart(0, "div", 1)(1, "label", 2)(2, "span", 3);
15469
15467
  i0.ɵɵpipe(3, "ccdFieldLabel");
15470
15468
  i0.ɵɵtext(4);
15471
15469
  i0.ɵɵpipe(5, "ccdFieldLabel");
15472
15470
  i0.ɵɵelementEnd()();
15473
- i0.ɵɵtemplate(6, WriteDocumentFieldComponent_span_6_Template, 4, 3, "span", 4);
15471
+ i0.ɵɵtemplate(6, WriteDocumentFieldComponent_span_6_Template, 3, 3, "span", 4);
15474
15472
  i0.ɵɵelementStart(7, "span", 5);
15475
15473
  i0.ɵɵtext(8);
15476
15474
  i0.ɵɵpipe(9, "rpxTranslate");
@@ -15518,7 +15516,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
15518
15516
  }
15519
15517
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
15520
15518
  type: Component,
15521
- args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">\n <markdown>{{ caseField.hint_text | rpxTranslate }}</markdown>\n </span>\n <span class=\"error-message\"\n role=\"alert\"\n tabindex=\"0\"\n [hidden]=\"!(fileUploadMessages && !valid)\">\n {{ fileUploadMessages | rpxTranslate }}\n </span>\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event, caseField.field_type.regular_expression)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
15519
+ args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">\n <markdown [data]=\"caseField.hint_text | rpxTranslate\"></markdown>\n </span>\n <span class=\"error-message\"\n role=\"alert\"\n tabindex=\"0\"\n [hidden]=\"!(fileUploadMessages && !valid)\">\n {{ fileUploadMessages | rpxTranslate }}\n </span>\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event, caseField.field_type.regular_expression)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
15522
15520
  }], () => [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }], { fileInput: [{
15523
15521
  type: ViewChild,
15524
15522
  args: ['fileInput', { static: false }]
@@ -20901,7 +20899,6 @@ class QueryListItem {
20901
20899
  createdBy;
20902
20900
  parentId;
20903
20901
  isClosed;
20904
- messageType;
20905
20902
  children = [];
20906
20903
  messageIndexInParent = null;
20907
20904
  get lastSubmittedMessage() {
@@ -20966,20 +20963,11 @@ class QueryListItem {
20966
20963
  if (item.isClosed === 'Yes') {
20967
20964
  return true;
20968
20965
  }
20969
- return item.children?.some((child) => isThreadClosed(child)) || false;
20966
+ return item.children?.some(child => isThreadClosed(child)) || false;
20970
20967
  };
20971
20968
  if (isThreadClosed(this)) {
20972
20969
  return QueryItemResponseStatus.CLOSED;
20973
20970
  }
20974
- const lastMessageType = this.children?.length
20975
- ? this.children[this.children.length - 1]?.messageType
20976
- : undefined;
20977
- if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
20978
- return QueryItemResponseStatus.RESPONDED;
20979
- }
20980
- else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
20981
- return QueryItemResponseStatus.AWAITING;
20982
- }
20983
20971
  if (this.messageIndexInParent !== null) {
20984
20972
  return this.messageIndexInParent % 2 === 0
20985
20973
  ? QueryItemResponseStatus.RESPONDED
@@ -21071,18 +21059,13 @@ class QueryManagementUtils {
21071
21059
  createdBy: currentUserId
21072
21060
  };
21073
21061
  }
21074
- static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
21062
+ static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
21075
21063
  const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
21076
21064
  const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
21077
21065
  const body = formGroup.get('body').value;
21078
21066
  const attachments = formGroup.get('attachments').value;
21079
21067
  const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
21080
21068
  const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
21081
- const messageType = messageTypeParam === QueryCreateContext.RESPOND
21082
- ? QueryCreateContext.RESPOND
21083
- : messageTypeParam === QueryCreateContext.FOLLOWUP
21084
- ? QueryCreateContext.FOLLOWUP
21085
- : undefined;
21086
21069
  return {
21087
21070
  id: v4(),
21088
21071
  subject: queryItem.subject,
@@ -21094,8 +21077,7 @@ class QueryManagementUtils {
21094
21077
  createdOn: new Date(),
21095
21078
  createdBy: currentUserId,
21096
21079
  parentId: queryItem.id,
21097
- isClosed,
21098
- messageType
21080
+ isClosed
21099
21081
  };
21100
21082
  }
21101
21083
  static isObject(elem) {
@@ -21455,7 +21437,6 @@ class QueryCheckYourAnswersComponent {
21455
21437
  queryItem;
21456
21438
  queryCreateContext;
21457
21439
  eventData = null;
21458
- multipleFollowUpFeature;
21459
21440
  backClicked = new EventEmitter();
21460
21441
  querySubmitted = new EventEmitter();
21461
21442
  callbackConfirmationMessage = new EventEmitter();
@@ -21628,7 +21609,7 @@ class QueryCheckYourAnswersComponent {
21628
21609
  const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
21629
21610
  const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
21630
21611
  ? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
21631
- : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
21612
+ : QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
21632
21613
  const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
21633
21614
  const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
21634
21615
  // Check if the field ID has been set dynamically
@@ -21788,7 +21769,7 @@ class QueryCheckYourAnswersComponent {
21788
21769
  return !!(error?.callbackErrors?.length);
21789
21770
  }
21790
21771
  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)); };
21791
- 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) {
21772
+ 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) {
21792
21773
  i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
21793
21774
  } if (rf & 2) {
21794
21775
  i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
@@ -21805,8 +21786,6 @@ class QueryCheckYourAnswersComponent {
21805
21786
  type: Input
21806
21787
  }], eventData: [{
21807
21788
  type: Input
21808
- }], multipleFollowUpFeature: [{
21809
- type: Input
21810
21789
  }], backClicked: [{
21811
21790
  type: Output
21812
21791
  }], querySubmitted: [{
@@ -22026,12 +22005,10 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
22026
22005
  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);
22027
22006
  i0.ɵɵelementContainerEnd();
22028
22007
  } if (rf & 2) {
22029
- const child_r3 = ctx.$implicit;
22030
22008
  const i_r4 = ctx.index;
22031
22009
  const followUpMessage_r5 = i0.ɵɵreference(3);
22032
- const ctx_r1 = i0.ɵɵnextContext(3);
22033
22010
  i0.ɵɵadvance();
22034
- 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);
22011
+ i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
22035
22012
  } }
22036
22013
  function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
22037
22014
  i0.ɵɵelementContainerStart(0);
@@ -22135,8 +22112,6 @@ class QueryDetailsComponent {
22135
22112
  sessionStorageService;
22136
22113
  route;
22137
22114
  router;
22138
- abstractConfig;
22139
- caseNotifier;
22140
22115
  query;
22141
22116
  caseId;
22142
22117
  queryResponseStatus;
@@ -22146,18 +22121,10 @@ class QueryDetailsComponent {
22146
22121
  static QUERY_ITEM_RESPOND = '3';
22147
22122
  static QUERY_ITEM_FOLLOW_UP = '4';
22148
22123
  queryItemId;
22149
- followUpQuery = QueryCreateContext.FOLLOWUP;
22150
- respondToQuery = QueryCreateContext.RESPOND;
22151
- enableServiceSpecificMultiFollowups;
22152
- currentJurisdictionId;
22153
- isMultipleFollowUpEnabled = false;
22154
- caseSubscription;
22155
- constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
22124
+ constructor(sessionStorageService, route, router) {
22156
22125
  this.sessionStorageService = sessionStorageService;
22157
22126
  this.route = route;
22158
22127
  this.router = router;
22159
- this.abstractConfig = abstractConfig;
22160
- this.caseNotifier = caseNotifier;
22161
22128
  }
22162
22129
  onBack() {
22163
22130
  this.backClicked.emit(true);
@@ -22165,23 +22132,10 @@ class QueryDetailsComponent {
22165
22132
  isInternalUser() {
22166
22133
  return isInternalUser(this.sessionStorageService);
22167
22134
  }
22168
- ngOnInit() {
22169
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
22170
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
22171
- if (caseView?.case_type?.jurisdiction?.id) {
22172
- this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
22173
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
22174
- this.hasRespondedToQuery();
22175
- }
22176
- });
22177
- }
22178
22135
  ngOnChanges() {
22179
22136
  this.toggleLinkVisibility();
22180
22137
  this.hasRespondedToQuery();
22181
22138
  }
22182
- ngOnDestroy() {
22183
- this.caseSubscription?.unsubscribe();
22184
- }
22185
22139
  toggleLinkVisibility() {
22186
22140
  this.queryItemId = this.route.snapshot.params.qid;
22187
22141
  if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
@@ -22194,21 +22148,6 @@ class QueryDetailsComponent {
22194
22148
  this.hasResponded.emit(true);
22195
22149
  return true;
22196
22150
  }
22197
- const lastChild = this.query?.children?.[this.query.children.length - 1];
22198
- const isFollowUp = lastChild?.messageType === this.followUpQuery;
22199
- const isRespond = lastChild?.messageType === this.respondToQuery;
22200
- if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
22201
- this.hasResponded.emit(true);
22202
- return true;
22203
- }
22204
- if (isFollowUp && this.isMultipleFollowUpEnabled) {
22205
- this.hasResponded.emit(false);
22206
- return false;
22207
- }
22208
- if (isRespond) {
22209
- this.hasResponded.emit(false);
22210
- return false;
22211
- }
22212
22151
  if (this.isInternalUser()) {
22213
22152
  if (isAwaiting) {
22214
22153
  this.hasResponded.emit(false);
@@ -22224,7 +22163,7 @@ class QueryDetailsComponent {
22224
22163
  this.hasResponded.emit(false);
22225
22164
  return false;
22226
22165
  }
22227
- 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)); };
22166
+ static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
22228
22167
  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) {
22229
22168
  i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
22230
22169
  } if (rf & 2) {
@@ -22233,8 +22172,8 @@ class QueryDetailsComponent {
22233
22172
  }
22234
22173
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
22235
22174
  type: Component,
22236
- 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"] }]
22237
- }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
22175
+ 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"] }]
22176
+ }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
22238
22177
  type: Input
22239
22178
  }], caseId: [{
22240
22179
  type: Input
@@ -22245,7 +22184,7 @@ class QueryDetailsComponent {
22245
22184
  }], hasResponded: [{
22246
22185
  type: Output
22247
22186
  }] }); })();
22248
- (() => { (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 }); })();
22187
+ (() => { (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 }); })();
22249
22188
 
22250
22189
  class QueryEventCompletionComponent {
22251
22190
  eventCompletionParams;
@@ -23232,7 +23171,7 @@ class CloseQueryComponent {
23232
23171
  const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
23233
23172
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
23234
23173
  const _r1 = i0.ɵɵgetCurrentView();
23235
- i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
23174
+ i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
23236
23175
  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)); });
23237
23176
  i0.ɵɵelementEnd()();
23238
23177
  } if (rf & 2) {
@@ -23242,7 +23181,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
23242
23181
  } }
23243
23182
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23244
23183
  i0.ɵɵelementContainerStart(0);
23245
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
23184
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 4);
23246
23185
  i0.ɵɵelementContainerEnd();
23247
23186
  } if (rf & 2) {
23248
23187
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -23251,7 +23190,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
23251
23190
  } }
23252
23191
  function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23253
23192
  i0.ɵɵelementContainerStart(0);
23254
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
23193
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 3);
23255
23194
  i0.ɵɵelementContainerEnd();
23256
23195
  } if (rf & 2) {
23257
23196
  const ctx_r1 = i0.ɵɵnextContext();
@@ -23260,7 +23199,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
23260
23199
  } }
23261
23200
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23262
23201
  i0.ɵɵelementContainerStart(0);
23263
- i0.ɵɵelementStart(1, "button", 10);
23202
+ i0.ɵɵelementStart(1, "button", 9);
23264
23203
  i0.ɵɵtext(2);
23265
23204
  i0.ɵɵpipe(3, "rpxTranslate");
23266
23205
  i0.ɵɵelementEnd();
@@ -23272,22 +23211,8 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
23272
23211
  i0.ɵɵadvance();
23273
23212
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23274
23213
  } }
23275
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23276
- i0.ɵɵelementContainerStart(0);
23277
- i0.ɵɵelementStart(1, "button", 10);
23278
- i0.ɵɵtext(2);
23279
- i0.ɵɵpipe(3, "rpxTranslate");
23280
- i0.ɵɵelementEnd();
23281
- i0.ɵɵelementContainerEnd();
23282
- } if (rf & 2) {
23283
- const ctx_r1 = i0.ɵɵnextContext(4);
23284
- i0.ɵɵadvance();
23285
- i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
23286
- i0.ɵɵadvance();
23287
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23288
- } }
23289
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23290
- i0.ɵɵelementStart(0, "div")(1, "p", 11);
23214
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23215
+ i0.ɵɵelementStart(0, "div")(1, "p", 10);
23291
23216
  i0.ɵɵtext(2);
23292
23217
  i0.ɵɵpipe(3, "rpxTranslate");
23293
23218
  i0.ɵɵelementEnd();
@@ -23301,32 +23226,25 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
23301
23226
  i0.ɵɵadvance(3);
23302
23227
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
23303
23228
  } }
23304
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23305
- 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);
23306
- } if (rf & 2) {
23307
- const queryIsInReview_r5 = i0.ɵɵreference(2);
23308
- const ctx_r1 = i0.ɵɵnextContext(3);
23309
- 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);
23310
- } }
23311
23229
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23312
23230
  i0.ɵɵelementContainerStart(0);
23313
- 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);
23231
+ 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);
23314
23232
  i0.ɵɵelementContainerEnd();
23315
23233
  } if (rf & 2) {
23316
- const sequentialQuery_r6 = i0.ɵɵreference(3);
23234
+ const queryIsInReview_r5 = i0.ɵɵreference(3);
23317
23235
  const ctx_r1 = i0.ɵɵnextContext(2);
23318
23236
  i0.ɵɵadvance();
23319
- 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);
23237
+ 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);
23320
23238
  } }
23321
23239
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
23322
23240
  i0.ɵɵelementContainerStart(0);
23323
- i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
23241
+ i0.ɵɵelementStart(1, "div", 11)(2, "span", 12);
23324
23242
  i0.ɵɵtext(3, "!");
23325
23243
  i0.ɵɵelementEnd();
23326
- i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
23244
+ i0.ɵɵelementStart(4, "strong", 13)(5, "span", 14);
23327
23245
  i0.ɵɵtext(6, "Warning");
23328
23246
  i0.ɵɵelementEnd();
23329
- i0.ɵɵelementStart(7, "p", 16);
23247
+ i0.ɵɵelementStart(7, "p", 15);
23330
23248
  i0.ɵɵtext(8);
23331
23249
  i0.ɵɵpipe(9, "rpxTranslate");
23332
23250
  i0.ɵɵelementEnd()()();
@@ -23337,10 +23255,10 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
23337
23255
  } }
23338
23256
  function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23339
23257
  const _r4 = i0.ɵɵgetCurrentView();
23340
- i0.ɵɵelementStart(0, "ccd-query-details", 8);
23258
+ i0.ɵɵelementStart(0, "ccd-query-details", 7);
23341
23259
  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); });
23342
23260
  i0.ɵɵelementEnd();
23343
- 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);
23261
+ 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);
23344
23262
  } if (rf & 2) {
23345
23263
  const ctx_r1 = i0.ɵɵnextContext();
23346
23264
  i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
@@ -23353,36 +23271,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23353
23271
  route;
23354
23272
  sessionStorageService;
23355
23273
  caseNotifier;
23356
- abstractConfig;
23357
23274
  caseQueriesCollections;
23358
23275
  query;
23359
23276
  showQueryList = true;
23360
23277
  caseId;
23361
- messageType;
23362
- followUpQuery = QueryCreateContext.FOLLOWUP;
23363
- respondToQuery = QueryCreateContext.RESPOND;
23364
23278
  isQueryClosed = false;
23365
- value;
23366
- isMultipleFollowUpEnabled = false;
23367
- currentJurisdictionId;
23368
- enableServiceSpecificMultiFollowups = [];
23369
- caseSubscription;
23370
- constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
23279
+ constructor(route, sessionStorageService, caseNotifier) {
23371
23280
  super();
23372
23281
  this.route = route;
23373
23282
  this.sessionStorageService = sessionStorageService;
23374
23283
  this.caseNotifier = caseNotifier;
23375
- this.abstractConfig = abstractConfig;
23376
23284
  }
23377
23285
  ngOnInit() {
23378
23286
  this.caseId = this.route.snapshot.params.cid;
23379
- this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
23380
- this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
23381
- if (caseDetails?.case_type?.jurisdiction?.id) {
23382
- this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
23383
- this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
23384
- }
23385
- });
23386
23287
  if (this.context === PaletteContext.DEFAULT) {
23387
23288
  // EUI-8303 Using mock data until CCD is ready with the API and data contract
23388
23289
  // this.caseQueriesCollections = caseMessagesMockData;
@@ -23408,13 +23309,9 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23408
23309
  // QueryManagementUtils.extractCaseQueriesFromCaseField();
23409
23310
  }
23410
23311
  }
23411
- ngOnDestroy() {
23412
- this.caseSubscription?.unsubscribe();
23413
- }
23414
23312
  setQuery(query) {
23415
23313
  this.showQueryList = false;
23416
23314
  this.query = query;
23417
- this.messageType = this.getMessageType(query);
23418
23315
  this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
23419
23316
  }
23420
23317
  backToQueryListPage() {
@@ -23424,24 +23321,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23424
23321
  isInternalUser() {
23425
23322
  return isInternalUser(this.sessionStorageService);
23426
23323
  }
23427
- getMessageType(query) {
23428
- return query?.children?.length
23429
- ? query.children[query.children.length - 1]?.messageType
23430
- : undefined;
23431
- }
23432
- static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
23433
- 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) {
23434
- 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);
23324
+ static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
23325
+ 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) {
23326
+ 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);
23435
23327
  } if (rf & 2) {
23436
- const singleQueryDetails_r7 = i0.ɵɵreference(2);
23437
- i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
23328
+ const singleQueryDetails_r6 = i0.ɵɵreference(2);
23329
+ i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
23438
23330
  } }, encapsulation: 2 });
23439
23331
  }
23440
23332
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
23441
23333
  type: Component,
23442
- 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" }]
23443
- }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
23444
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
23334
+ 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" }]
23335
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
23336
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
23445
23337
 
23446
23338
  class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
23447
23339
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();