@hmcts/ccd-case-ui-toolkit 7.2.37-remove-feature-flag → 7.2.38

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 (35) hide show
  1. package/esm2022/lib/app.config.mjs +3 -1
  2. package/esm2022/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder-sort/case-file-view-folder-sort.component.mjs +10 -8
  3. package/esm2022/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.mjs +5 -3
  4. package/esm2022/lib/shared/components/palette/document/write-document-field.component.mjs +11 -7
  5. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +5 -2
  6. package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +55 -8
  7. package/esm2022/lib/shared/components/palette/query-management/models/case-queries-collection.model.mjs +1 -1
  8. package/esm2022/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.mjs +43 -7
  9. package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +77 -24
  10. package/esm2022/lib/shared/components/palette/query-management/services/query-management.service.mjs +2 -2
  11. package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +12 -4
  12. package/esm2022/lib/shared/services/document-management/document-management.service.mjs +7 -2
  13. package/esm2022/lib/shared/utils.mjs +1 -1
  14. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +209 -56
  15. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  16. package/lib/app.config.d.ts +5 -0
  17. package/lib/app.config.d.ts.map +1 -1
  18. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder-sort/case-file-view-folder-sort.component.d.ts.map +1 -1
  19. package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
  20. package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
  21. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +2 -1
  22. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  23. package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts +15 -3
  24. package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts.map +1 -1
  25. package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts +1 -0
  26. package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts.map +1 -1
  27. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts +1 -0
  28. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts.map +1 -1
  29. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts +15 -3
  30. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
  31. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
  32. package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
  33. package/lib/shared/services/document-management/document-management.service.d.ts.map +1 -1
  34. package/lib/shared/utils.d.ts +1 -1
  35. package/package.json +1 -1
@@ -1322,9 +1322,11 @@ class CaseEditorConfig {
1322
1322
  case_flags_refdata_api_url;
1323
1323
  rd_common_data_api_url;
1324
1324
  case_data_store_api_url;
1325
+ enable_case_file_view_version_1_1;
1325
1326
  icp_enabled;
1326
1327
  icp_jurisdictions;
1327
1328
  events_to_hide;
1329
+ enable_service_specific_multi_followups;
1328
1330
  }
1329
1331
 
1330
1332
  class HttpError {
@@ -7405,8 +7407,13 @@ class DocumentManagementService {
7405
7407
  isDocumentSecureModeEnabled() {
7406
7408
  const documentSecureModeCaseTypeExclusions = this.appConfig.getCdamExclusionList()?.split(',');
7407
7409
  const isDocumentOnExclusionList = documentSecureModeCaseTypeExclusions?.includes(this.caseTypeId);
7410
+ const documentSecureModeEnabled = this.appConfig.getDocumentSecureMode();
7411
+ // if the documentSecureModeEnabled is false, return false
7412
+ if (!documentSecureModeEnabled) {
7413
+ return false;
7414
+ }
7408
7415
  // if the documentSecureModeEnabled is true, and the case is not in the exclusion list, return true
7409
- if (!isDocumentOnExclusionList) {
7416
+ if (documentSecureModeEnabled && !isDocumentOnExclusionList) {
7410
7417
  return true;
7411
7418
  }
7412
7419
  // if documentSecureModeEnabled is true, and case is in the exclusion list, return false
@@ -15405,7 +15412,9 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
15405
15412
  if (this.uploadedDocument) {
15406
15413
  return this.uploadedDocument.get(WriteDocumentFieldComponent.DOCUMENT_FILENAME).value;
15407
15414
  }
15408
- return undefined;
15415
+ else {
15416
+ return undefined;
15417
+ }
15409
15418
  }
15410
15419
  resetUpload() {
15411
15420
  this.selectedFile = null;
@@ -15426,7 +15435,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
15426
15435
  }
15427
15436
  openDialog(dialogConfig) {
15428
15437
  const dialogRef = this.dialog.open(DocumentDialogComponent, dialogConfig);
15429
- this.dialogSubscription = dialogRef.beforeClosed().subscribe((result) => {
15438
+ this.dialogSubscription = dialogRef.beforeClosed().subscribe(result => {
15430
15439
  this.confirmReplaceResult = result;
15431
15440
  this.triggerReplace();
15432
15441
  });
@@ -15537,10 +15546,12 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
15537
15546
  const documentUpload = new FormData();
15538
15547
  documentUpload.append('files', selectedFile, selectedFile.name);
15539
15548
  documentUpload.append('classification', 'PUBLIC');
15540
- const caseTypeId = this.caseTypeId ? this.caseTypeId : null;
15541
- const caseTypeJurisdictionId = this.jurisdictionId ? this.jurisdictionId : null;
15542
- documentUpload.append('caseTypeId', caseTypeId);
15543
- documentUpload.append('jurisdictionId', caseTypeJurisdictionId);
15549
+ if (this.appConfig.getDocumentSecureMode()) {
15550
+ const caseTypeId = this.caseTypeId ? this.caseTypeId : null;
15551
+ const caseTypeJurisdictionId = this.jurisdictionId ? this.jurisdictionId : null;
15552
+ documentUpload.append('caseTypeId', caseTypeId);
15553
+ documentUpload.append('jurisdictionId', caseTypeJurisdictionId);
15554
+ }
15544
15555
  return documentUpload;
15545
15556
  }
15546
15557
  handleDocumentUploadResult(result) {
@@ -20784,6 +20795,7 @@ class QueryListItem {
20784
20795
  createdBy;
20785
20796
  parentId;
20786
20797
  isClosed;
20798
+ messageType;
20787
20799
  children = [];
20788
20800
  messageIndexInParent = null;
20789
20801
  get lastSubmittedMessage() {
@@ -20810,14 +20822,34 @@ class QueryListItem {
20810
20822
  }
20811
20823
  get lastSubmittedDate() {
20812
20824
  const childrenCount = this.children.length;
20813
- if (childrenCount <= 1) {
20825
+ const lastChild = this.children[childrenCount - 1];
20826
+ // 1. Check for legacy: <= 1 child with no messageType
20827
+ const allChildrenLackMessageType = this.children.every((child) => !child.messageType);
20828
+ if (childrenCount <= 1 && allChildrenLackMessageType) {
20814
20829
  return new Date(this.lastSubmittedMessage.createdOn);
20815
20830
  }
20816
- let index;
20817
- if (childrenCount > 1) {
20818
- index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
20831
+ // 2. Check if any RESPOND exists
20832
+ const hasRespond = this.children.some((child) => child.messageType === QueryCreateContext.RESPOND);
20833
+ // 3. Check if all children are FOLLOWUPs and none are RESPONDs
20834
+ const onlyFollowUps = this.children.every((child) => child.messageType === QueryCreateContext.FOLLOWUP);
20835
+ if (onlyFollowUps && !hasRespond) {
20836
+ return new Date(lastChild.createdOn);
20819
20837
  }
20820
- return new Date(this.children[index].createdOn);
20838
+ // 4. If RESPOND exists, get latest FOLLOWUP
20839
+ // If no RESPOND, but there is at least one FOLLOWUP, return the last FOLLOWUP
20840
+ const lastFollowUp = [...this.children]
20841
+ .reverse()
20842
+ .find((child) => child.messageType === QueryCreateContext.FOLLOWUP);
20843
+ if (lastFollowUp) {
20844
+ return new Date(lastFollowUp.createdOn);
20845
+ }
20846
+ // 5. Legacy fallback: no messageType at all
20847
+ if (allChildrenLackMessageType) {
20848
+ const index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
20849
+ return new Date(this.children[index]?.createdOn);
20850
+ }
20851
+ // 6. Final fallback: return last child's date
20852
+ return new Date(this.lastSubmittedMessage.createdOn);
20821
20853
  }
20822
20854
  get lastResponseBy() {
20823
20855
  return this.children?.length > 0 ? this.lastSubmittedMessage.name : '';
@@ -20827,6 +20859,11 @@ class QueryListItem {
20827
20859
  if (childrenCount === 0) {
20828
20860
  return null;
20829
20861
  }
20862
+ const lastChild = this.children[childrenCount - 1];
20863
+ if (lastChild?.messageType === QueryCreateContext.FOLLOWUP &&
20864
+ !this.children.some((child) => child.messageType === QueryCreateContext.RESPOND)) {
20865
+ return null;
20866
+ }
20830
20867
  let index;
20831
20868
  if (childrenCount === 1) {
20832
20869
  index = 0;
@@ -20841,11 +20878,20 @@ class QueryListItem {
20841
20878
  if (item.isClosed === 'Yes') {
20842
20879
  return true;
20843
20880
  }
20844
- return item.children?.some(child => isThreadClosed(child)) || false;
20881
+ return item.children?.some((child) => isThreadClosed(child)) || false;
20845
20882
  };
20846
20883
  if (isThreadClosed(this)) {
20847
20884
  return QueryItemResponseStatus.CLOSED;
20848
20885
  }
20886
+ const lastMessageType = this.children?.length
20887
+ ? this.children[this.children.length - 1]?.messageType
20888
+ : undefined;
20889
+ if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
20890
+ return QueryItemResponseStatus.RESPONDED;
20891
+ }
20892
+ else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
20893
+ return QueryItemResponseStatus.AWAITING;
20894
+ }
20849
20895
  if (this.messageIndexInParent !== null) {
20850
20896
  return this.messageIndexInParent % 2 === 0
20851
20897
  ? QueryItemResponseStatus.RESPONDED
@@ -20934,16 +20980,22 @@ class QueryManagementUtils {
20934
20980
  isHearingRelated,
20935
20981
  hearingDate,
20936
20982
  createdOn: new Date(),
20937
- createdBy: currentUserId
20983
+ createdBy: currentUserId,
20984
+ messageType: QueryCreateContext.FOLLOWUP // Default to value new queries will be FOLLOWUP
20938
20985
  };
20939
20986
  }
20940
- static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
20987
+ static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
20941
20988
  const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
20942
20989
  const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
20943
20990
  const body = formGroup.get('body').value.trim();
20944
20991
  const attachments = formGroup.get('attachments').value;
20945
20992
  const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
20946
20993
  const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
20994
+ const messageType = messageTypeParam === QueryCreateContext.RESPOND
20995
+ ? QueryCreateContext.RESPOND
20996
+ : messageTypeParam === QueryCreateContext.FOLLOWUP
20997
+ ? QueryCreateContext.FOLLOWUP
20998
+ : undefined;
20947
20999
  return {
20948
21000
  id: v4(),
20949
21001
  subject: queryItem.subject.trim(),
@@ -20955,7 +21007,8 @@ class QueryManagementUtils {
20955
21007
  createdOn: new Date(),
20956
21008
  createdBy: currentUserId,
20957
21009
  parentId: queryItem.id,
20958
- isClosed
21010
+ isClosed,
21011
+ messageType
20959
21012
  };
20960
21013
  }
20961
21014
  static isObject(elem) {
@@ -21003,7 +21056,7 @@ class QueryManagementService {
21003
21056
  }
21004
21057
  const caseMessage = queryCreateContext === QueryCreateContext.NEW_QUERY
21005
21058
  ? QueryManagementUtils.getNewQueryData(formGroup, currentUserDetails)
21006
- : QueryManagementUtils.getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails);
21059
+ : QueryManagementUtils.getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, queryCreateContext);
21007
21060
  const isNewQuery = queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
21008
21061
  // Check if the field ID has been set dynamically
21009
21062
  if (!this.fieldId) {
@@ -21742,6 +21795,7 @@ class QueryCheckYourAnswersComponent {
21742
21795
  queryItem;
21743
21796
  queryCreateContext;
21744
21797
  eventData = null;
21798
+ multipleFollowUpFeature;
21745
21799
  qmCaseQueriesCollectionData;
21746
21800
  backClicked = new EventEmitter();
21747
21801
  querySubmitted = new EventEmitter();
@@ -21935,7 +21989,7 @@ class QueryCheckYourAnswersComponent {
21935
21989
  this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messageId);
21936
21990
  }
21937
21991
  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(QualifyingQuestionService), i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(AlertService)); };
21938
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", qmCaseQueriesCollectionData: "qmCaseQueriesCollectionData" }, 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) {
21992
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", multipleFollowUpFeature: "multipleFollowUpFeature", qmCaseQueriesCollectionData: "qmCaseQueriesCollectionData" }, 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) {
21939
21993
  i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
21940
21994
  } if (rf & 2) {
21941
21995
  i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
@@ -21952,6 +22006,8 @@ class QueryCheckYourAnswersComponent {
21952
22006
  type: Input
21953
22007
  }], eventData: [{
21954
22008
  type: Input
22009
+ }], multipleFollowUpFeature: [{
22010
+ type: Input
21955
22011
  }], qmCaseQueriesCollectionData: [{
21956
22012
  type: Input
21957
22013
  }], backClicked: [{
@@ -22173,10 +22229,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
22173
22229
  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);
22174
22230
  i0.ɵɵelementContainerEnd();
22175
22231
  } if (rf & 2) {
22232
+ const child_r3 = ctx.$implicit;
22176
22233
  const i_r4 = ctx.index;
22177
22234
  const followUpMessage_r5 = i0.ɵɵreference(3);
22235
+ const ctx_r1 = i0.ɵɵnextContext(3);
22178
22236
  i0.ɵɵadvance();
22179
- i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
22237
+ 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);
22180
22238
  } }
22181
22239
  function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
22182
22240
  i0.ɵɵelementContainerStart(0);
@@ -22280,6 +22338,8 @@ class QueryDetailsComponent {
22280
22338
  sessionStorageService;
22281
22339
  route;
22282
22340
  router;
22341
+ abstractConfig;
22342
+ caseNotifier;
22283
22343
  query;
22284
22344
  caseId;
22285
22345
  queryResponseStatus;
@@ -22289,10 +22349,18 @@ class QueryDetailsComponent {
22289
22349
  static QUERY_ITEM_RESPOND = '3';
22290
22350
  static QUERY_ITEM_FOLLOW_UP = '4';
22291
22351
  queryItemId;
22292
- constructor(sessionStorageService, route, router) {
22352
+ followUpQuery = QueryCreateContext.FOLLOWUP;
22353
+ respondToQuery = QueryCreateContext.RESPOND;
22354
+ enableServiceSpecificMultiFollowups;
22355
+ currentJurisdictionId;
22356
+ isMultipleFollowUpEnabled = false;
22357
+ caseSubscription;
22358
+ constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
22293
22359
  this.sessionStorageService = sessionStorageService;
22294
22360
  this.route = route;
22295
22361
  this.router = router;
22362
+ this.abstractConfig = abstractConfig;
22363
+ this.caseNotifier = caseNotifier;
22296
22364
  }
22297
22365
  onBack() {
22298
22366
  this.backClicked.emit(true);
@@ -22300,10 +22368,23 @@ class QueryDetailsComponent {
22300
22368
  isInternalUser() {
22301
22369
  return isInternalUser(this.sessionStorageService);
22302
22370
  }
22371
+ ngOnInit() {
22372
+ this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
22373
+ this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
22374
+ if (caseView?.case_type?.jurisdiction?.id) {
22375
+ this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
22376
+ this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
22377
+ this.hasRespondedToQuery();
22378
+ }
22379
+ });
22380
+ }
22303
22381
  ngOnChanges() {
22304
22382
  this.toggleLinkVisibility();
22305
22383
  this.hasRespondedToQuery();
22306
22384
  }
22385
+ ngOnDestroy() {
22386
+ this.caseSubscription?.unsubscribe();
22387
+ }
22307
22388
  toggleLinkVisibility() {
22308
22389
  this.queryItemId = this.route.snapshot.params.qid;
22309
22390
  if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
@@ -22316,6 +22397,24 @@ class QueryDetailsComponent {
22316
22397
  this.hasResponded.emit(true);
22317
22398
  return true;
22318
22399
  }
22400
+ const lastChild = this.query?.children?.[this.query.children.length - 1];
22401
+ const lastMessageType = this.query?.children?.length
22402
+ ? this.query.children[this.query.children.length - 1]?.messageType
22403
+ : this.query?.messageType;
22404
+ const isFollowUp = lastMessageType === this.followUpQuery;
22405
+ const isRespond = lastChild?.messageType === this.respondToQuery;
22406
+ if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
22407
+ this.hasResponded.emit(true);
22408
+ return true;
22409
+ }
22410
+ if (isFollowUp && this.isMultipleFollowUpEnabled) {
22411
+ this.hasResponded.emit(false);
22412
+ return false;
22413
+ }
22414
+ if (isRespond) {
22415
+ this.hasResponded.emit(false);
22416
+ return false;
22417
+ }
22319
22418
  if (this.isInternalUser()) {
22320
22419
  if (isAwaiting) {
22321
22420
  this.hasResponded.emit(false);
@@ -22331,7 +22430,7 @@ class QueryDetailsComponent {
22331
22430
  this.hasResponded.emit(false);
22332
22431
  return false;
22333
22432
  }
22334
- static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
22433
+ 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)); };
22335
22434
  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) {
22336
22435
  i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
22337
22436
  } if (rf & 2) {
@@ -22340,8 +22439,8 @@ class QueryDetailsComponent {
22340
22439
  }
22341
22440
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
22342
22441
  type: Component,
22343
- 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"] }]
22344
- }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
22442
+ 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"] }]
22443
+ }], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
22345
22444
  type: Input
22346
22445
  }], caseId: [{
22347
22446
  type: Input
@@ -22352,7 +22451,7 @@ class QueryDetailsComponent {
22352
22451
  }], hasResponded: [{
22353
22452
  type: Output
22354
22453
  }] }); })();
22355
- (() => { (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 }); })();
22454
+ (() => { (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 }); })();
22356
22455
 
22357
22456
  class QueryEventCompletionComponent {
22358
22457
  eventCompletionParams;
@@ -23428,7 +23527,7 @@ class CloseQueryComponent {
23428
23527
  const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
23429
23528
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
23430
23529
  const _r1 = i0.ɵɵgetCurrentView();
23431
- i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
23530
+ i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
23432
23531
  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)); });
23433
23532
  i0.ɵɵelementEnd()();
23434
23533
  } if (rf & 2) {
@@ -23438,7 +23537,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
23438
23537
  } }
23439
23538
  function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23440
23539
  i0.ɵɵelementContainerStart(0);
23441
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 4);
23540
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
23442
23541
  i0.ɵɵelementContainerEnd();
23443
23542
  } if (rf & 2) {
23444
23543
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -23447,7 +23546,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
23447
23546
  } }
23448
23547
  function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23449
23548
  i0.ɵɵelementContainerStart(0);
23450
- i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 3);
23549
+ i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
23451
23550
  i0.ɵɵelementContainerEnd();
23452
23551
  } if (rf & 2) {
23453
23552
  const ctx_r1 = i0.ɵɵnextContext();
@@ -23456,7 +23555,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
23456
23555
  } }
23457
23556
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23458
23557
  i0.ɵɵelementContainerStart(0);
23459
- i0.ɵɵelementStart(1, "button", 9);
23558
+ i0.ɵɵelementStart(1, "button", 10);
23460
23559
  i0.ɵɵtext(2);
23461
23560
  i0.ɵɵpipe(3, "rpxTranslate");
23462
23561
  i0.ɵɵelementEnd();
@@ -23468,8 +23567,22 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
23468
23567
  i0.ɵɵadvance();
23469
23568
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23470
23569
  } }
23471
- function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23472
- i0.ɵɵelementStart(0, "div")(1, "p", 10);
23570
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
23571
+ i0.ɵɵelementContainerStart(0);
23572
+ i0.ɵɵelementStart(1, "button", 10);
23573
+ i0.ɵɵtext(2);
23574
+ i0.ɵɵpipe(3, "rpxTranslate");
23575
+ i0.ɵɵelementEnd();
23576
+ i0.ɵɵelementContainerEnd();
23577
+ } if (rf & 2) {
23578
+ const ctx_r1 = i0.ɵɵnextContext(4);
23579
+ i0.ɵɵadvance();
23580
+ i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
23581
+ i0.ɵɵadvance();
23582
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
23583
+ } }
23584
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23585
+ i0.ɵɵelementStart(0, "div")(1, "p", 11);
23473
23586
  i0.ɵɵtext(2);
23474
23587
  i0.ɵɵpipe(3, "rpxTranslate");
23475
23588
  i0.ɵɵelementEnd();
@@ -23483,25 +23596,32 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
23483
23596
  i0.ɵɵadvance(3);
23484
23597
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
23485
23598
  } }
23599
+ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
23600
+ 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);
23601
+ } if (rf & 2) {
23602
+ const queryIsInReview_r5 = i0.ɵɵreference(2);
23603
+ const ctx_r1 = i0.ɵɵnextContext(3);
23604
+ 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);
23605
+ } }
23486
23606
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
23487
23607
  i0.ɵɵelementContainerStart(0);
23488
- 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);
23608
+ 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);
23489
23609
  i0.ɵɵelementContainerEnd();
23490
23610
  } if (rf & 2) {
23491
- const queryIsInReview_r5 = i0.ɵɵreference(3);
23611
+ const sequentialQuery_r6 = i0.ɵɵreference(3);
23492
23612
  const ctx_r1 = i0.ɵɵnextContext(2);
23493
23613
  i0.ɵɵadvance();
23494
- 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);
23614
+ 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);
23495
23615
  } }
23496
23616
  function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
23497
23617
  i0.ɵɵelementContainerStart(0);
23498
- i0.ɵɵelementStart(1, "div", 11)(2, "span", 12);
23618
+ i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
23499
23619
  i0.ɵɵtext(3, "!");
23500
23620
  i0.ɵɵelementEnd();
23501
- i0.ɵɵelementStart(4, "strong", 13)(5, "span", 14);
23621
+ i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
23502
23622
  i0.ɵɵtext(6, "Warning");
23503
23623
  i0.ɵɵelementEnd();
23504
- i0.ɵɵelementStart(7, "p", 15);
23624
+ i0.ɵɵelementStart(7, "p", 16);
23505
23625
  i0.ɵɵtext(8);
23506
23626
  i0.ɵɵpipe(9, "rpxTranslate");
23507
23627
  i0.ɵɵelementEnd()()();
@@ -23512,10 +23632,10 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
23512
23632
  } }
23513
23633
  function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
23514
23634
  const _r4 = i0.ɵɵgetCurrentView();
23515
- i0.ɵɵelementStart(0, "ccd-query-details", 7);
23635
+ i0.ɵɵelementStart(0, "ccd-query-details", 8);
23516
23636
  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); });
23517
23637
  i0.ɵɵelementEnd();
23518
- 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);
23638
+ 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);
23519
23639
  } if (rf & 2) {
23520
23640
  const ctx_r1 = i0.ɵɵnextContext();
23521
23641
  i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
@@ -23528,19 +23648,36 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23528
23648
  route;
23529
23649
  sessionStorageService;
23530
23650
  caseNotifier;
23651
+ abstractConfig;
23531
23652
  caseQueriesCollections;
23532
23653
  query;
23533
23654
  showQueryList = true;
23534
23655
  caseId;
23656
+ messageType;
23657
+ followUpQuery = QueryCreateContext.FOLLOWUP;
23658
+ respondToQuery = QueryCreateContext.RESPOND;
23535
23659
  isQueryClosed = false;
23536
- constructor(route, sessionStorageService, caseNotifier) {
23660
+ value;
23661
+ isMultipleFollowUpEnabled = false;
23662
+ currentJurisdictionId;
23663
+ enableServiceSpecificMultiFollowups = [];
23664
+ caseSubscription;
23665
+ constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
23537
23666
  super();
23538
23667
  this.route = route;
23539
23668
  this.sessionStorageService = sessionStorageService;
23540
23669
  this.caseNotifier = caseNotifier;
23670
+ this.abstractConfig = abstractConfig;
23541
23671
  }
23542
23672
  ngOnInit() {
23543
23673
  this.caseId = this.route.snapshot.params.cid;
23674
+ this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
23675
+ this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
23676
+ if (caseDetails?.case_type?.jurisdiction?.id) {
23677
+ this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
23678
+ this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
23679
+ }
23680
+ });
23544
23681
  if (this.context === PaletteContext.DEFAULT) {
23545
23682
  // EUI-8303 Using mock data until CCD is ready with the API and data contract
23546
23683
  // this.caseQueriesCollections = caseMessagesMockData;
@@ -23566,9 +23703,13 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23566
23703
  // QueryManagementUtils.extractCaseQueriesFromCaseField();
23567
23704
  }
23568
23705
  }
23706
+ ngOnDestroy() {
23707
+ this.caseSubscription?.unsubscribe();
23708
+ }
23569
23709
  setQuery(query) {
23570
23710
  this.showQueryList = false;
23571
23711
  this.query = query;
23712
+ this.messageType = this.getMessageType(query);
23572
23713
  this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
23573
23714
  }
23574
23715
  backToQueryListPage() {
@@ -23578,19 +23719,27 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
23578
23719
  isInternalUser() {
23579
23720
  return isInternalUser(this.sessionStorageService);
23580
23721
  }
23581
- static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
23582
- 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) {
23583
- 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);
23722
+ getMessageType(query) {
23723
+ if (!query) {
23724
+ return undefined;
23725
+ }
23726
+ return query.children?.length
23727
+ ? query.children[query.children.length - 1]?.messageType
23728
+ : query?.messageType;
23729
+ }
23730
+ static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
23731
+ 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) {
23732
+ 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);
23584
23733
  } if (rf & 2) {
23585
- const singleQueryDetails_r6 = i0.ɵɵreference(2);
23586
- i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
23734
+ const singleQueryDetails_r7 = i0.ɵɵreference(2);
23735
+ i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
23587
23736
  } }, encapsulation: 2 });
23588
23737
  }
23589
23738
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
23590
23739
  type: Component,
23591
- 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=\"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 HMCTS staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
23592
- }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
23593
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
23740
+ 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=\"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 HMCTS staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
23741
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
23742
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
23594
23743
 
23595
23744
  class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
23596
23745
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
@@ -24629,18 +24778,20 @@ class CaseFileViewFolderSortComponent {
24629
24778
  sortDescending = new EventEmitter();
24630
24779
  overlayMenuItems = [
24631
24780
  { actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: () => this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME) },
24632
- { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: () => this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME) }
24781
+ { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: () => this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME) },
24633
24782
  ];
24634
24783
  constructor(appConfig) {
24635
24784
  this.appConfig = appConfig;
24636
24785
  }
24637
24786
  ngOnInit() {
24638
- this.overlayMenuItems = [
24639
- { actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: () => this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME) },
24640
- { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: () => this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME) },
24641
- { actionText: 'Recent first', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: () => this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP) },
24642
- { actionText: 'Oldest first', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: () => this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP) }
24643
- ];
24787
+ if (this.appConfig.getEnableCaseFileViewVersion1_1()) {
24788
+ this.overlayMenuItems = [
24789
+ { actionText: 'A to Z ascending', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: () => this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_NAME) },
24790
+ { actionText: 'Z to A descending', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: () => this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_NAME) },
24791
+ { actionText: 'Recent first', iconSrc: '/assets/img/sort/sort-down-arrow.svg', actionFn: () => this.sortDescending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP) },
24792
+ { actionText: 'Oldest first', iconSrc: '/assets/img/sort/sort-up-arrow.svg', actionFn: () => this.sortAscending.emit(CaseFileViewSortColumns.DOCUMENT_UPLOAD_TIMESTAMP) },
24793
+ ];
24794
+ }
24644
24795
  }
24645
24796
  static ɵfac = function CaseFileViewFolderSortComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFileViewFolderSortComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig)); };
24646
24797
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFolderSortComponent, selectors: [["ccd-case-file-view-folder-sort"]], outputs: { sortAscending: "sortAscending", sortDescending: "sortDescending" }, decls: 3, vars: 3, consts: [[3, "isOpenChange", "title", "menuItems", "isOpen"], ["trigger", ""], ["src", "/assets/img/sort/sort-arrows.svg", "alt", "Sort Arrows", 1, "sort-button-icon"]], template: function CaseFileViewFolderSortComponent_Template(rf, ctx) { if (rf & 1) {
@@ -25039,7 +25190,8 @@ class CaseFileViewFolderComponent {
25039
25190
  documentTreeNode.document_filename = document.document_filename;
25040
25191
  documentTreeNode.document_binary_url = document.document_binary_url;
25041
25192
  documentTreeNode.attribute_path = document.attribute_path;
25042
- documentTreeNode.upload_timestamp = document.upload_timestamp ? document.upload_timestamp.toString() : '';
25193
+ documentTreeNode.upload_timestamp = this.appConfig.getEnableCaseFileViewVersion1_1()
25194
+ && document.upload_timestamp ? document.upload_timestamp.toString() : '';
25043
25195
  documentsToReturn.push(documentTreeNode);
25044
25196
  });
25045
25197
  return documentsToReturn;
@@ -25053,7 +25205,8 @@ class CaseFileViewFolderComponent {
25053
25205
  documentTreeNode.document_filename = document.document_filename;
25054
25206
  documentTreeNode.document_binary_url = document.document_binary_url;
25055
25207
  documentTreeNode.attribute_path = document.attribute_path;
25056
- documentTreeNode.upload_timestamp = document.upload_timestamp ? document.upload_timestamp.toString() : '';
25208
+ documentTreeNode.upload_timestamp = this.appConfig.getEnableCaseFileViewVersion1_1()
25209
+ && document.upload_timestamp ? document.upload_timestamp.toString() : '';
25057
25210
  documents.push(documentTreeNode);
25058
25211
  });
25059
25212
  const uncategorisedNode = new DocumentTreeNode();