@hmcts/ccd-case-ui-toolkit 7.2.13 → 7.2.14-multiple-followup
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.
- package/esm2022/lib/app.config.mjs +3 -1
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +6 -3
- package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +38 -8
- package/esm2022/lib/shared/components/palette/query-management/enums/query-item-response-status.enum.mjs +2 -1
- package/esm2022/lib/shared/components/palette/query-management/models/case-queries-collection.model.mjs +1 -1
- package/esm2022/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.mjs +22 -2
- package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +64 -22
- package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +12 -3
- package/esm2022/lib/shared/utils.mjs +1 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +130 -32
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/app.config.d.ts +3 -0
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +2 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts +8 -1
- package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/enums/query-item-response-status.enum.d.ts +2 -1
- package/lib/shared/components/palette/query-management/enums/query-item-response-status.enum.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts +2 -0
- package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts +2 -0
- package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts +11 -1
- package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
- package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
- package/lib/shared/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1326,6 +1326,8 @@ 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;
|
|
1329
1331
|
}
|
|
1330
1332
|
|
|
1331
1333
|
class HttpError {
|
|
@@ -20583,6 +20585,7 @@ var QueryItemResponseStatus;
|
|
|
20583
20585
|
QueryItemResponseStatus["NEW"] = "New";
|
|
20584
20586
|
QueryItemResponseStatus["RESPONDED"] = "Responded";
|
|
20585
20587
|
QueryItemResponseStatus["AWAITING"] = "Awaiting Response";
|
|
20588
|
+
QueryItemResponseStatus["CLOSED"] = "Closed";
|
|
20586
20589
|
})(QueryItemResponseStatus || (QueryItemResponseStatus = {}));
|
|
20587
20590
|
|
|
20588
20591
|
var RespondToQueryErrorMessages;
|
|
@@ -20883,6 +20886,8 @@ class QueryListItem {
|
|
|
20883
20886
|
createdOn;
|
|
20884
20887
|
createdBy;
|
|
20885
20888
|
parentId;
|
|
20889
|
+
isClosed;
|
|
20890
|
+
messageType;
|
|
20886
20891
|
children = [];
|
|
20887
20892
|
messageIndexInParent = null;
|
|
20888
20893
|
get lastSubmittedMessage() {
|
|
@@ -20943,7 +20948,24 @@ class QueryListItem {
|
|
|
20943
20948
|
return new Date(this.children[index].createdOn);
|
|
20944
20949
|
}
|
|
20945
20950
|
get responseStatus() {
|
|
20946
|
-
|
|
20951
|
+
const isThreadClosed = (item) => {
|
|
20952
|
+
if (item.isClosed === 'Yes') {
|
|
20953
|
+
return true;
|
|
20954
|
+
}
|
|
20955
|
+
return item.children?.some((child) => isThreadClosed(child)) || false;
|
|
20956
|
+
};
|
|
20957
|
+
if (isThreadClosed(this)) {
|
|
20958
|
+
return QueryItemResponseStatus.CLOSED;
|
|
20959
|
+
}
|
|
20960
|
+
const lastMessageType = this.children?.length
|
|
20961
|
+
? this.children[this.children.length - 1]?.messageType
|
|
20962
|
+
: undefined;
|
|
20963
|
+
if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
|
|
20964
|
+
return QueryItemResponseStatus.RESPONDED;
|
|
20965
|
+
}
|
|
20966
|
+
else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
|
|
20967
|
+
return QueryItemResponseStatus.AWAITING;
|
|
20968
|
+
}
|
|
20947
20969
|
if (this.messageIndexInParent !== null) {
|
|
20948
20970
|
return this.messageIndexInParent % 2 === 0
|
|
20949
20971
|
? QueryItemResponseStatus.RESPONDED
|
|
@@ -21035,12 +21057,18 @@ class QueryManagementUtils {
|
|
|
21035
21057
|
createdBy: currentUserId
|
|
21036
21058
|
};
|
|
21037
21059
|
}
|
|
21038
|
-
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
|
|
21060
|
+
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
|
|
21039
21061
|
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21040
21062
|
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21041
21063
|
const body = formGroup.get('body').value;
|
|
21042
21064
|
const attachments = formGroup.get('attachments').value;
|
|
21043
21065
|
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21066
|
+
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
21067
|
+
const messageType = messageTypeParam === QueryCreateContext.RESPOND
|
|
21068
|
+
? QueryCreateContext.RESPOND
|
|
21069
|
+
: messageTypeParam === QueryCreateContext.FOLLOWUP
|
|
21070
|
+
? QueryCreateContext.FOLLOWUP
|
|
21071
|
+
: undefined;
|
|
21044
21072
|
return {
|
|
21045
21073
|
id: v4(),
|
|
21046
21074
|
subject: queryItem.subject,
|
|
@@ -21051,7 +21079,9 @@ class QueryManagementUtils {
|
|
|
21051
21079
|
hearingDate: queryItem.hearingDate,
|
|
21052
21080
|
createdOn: new Date(),
|
|
21053
21081
|
createdBy: currentUserId,
|
|
21054
|
-
parentId: queryItem.id
|
|
21082
|
+
parentId: queryItem.id,
|
|
21083
|
+
isClosed,
|
|
21084
|
+
messageType
|
|
21055
21085
|
};
|
|
21056
21086
|
}
|
|
21057
21087
|
static isObject(elem) {
|
|
@@ -21343,6 +21373,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21343
21373
|
queryItem;
|
|
21344
21374
|
queryCreateContext;
|
|
21345
21375
|
eventData = null;
|
|
21376
|
+
multipleFollowUpFeature;
|
|
21346
21377
|
backClicked = new EventEmitter();
|
|
21347
21378
|
querySubmitted = new EventEmitter();
|
|
21348
21379
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21501,7 +21532,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21501
21532
|
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21502
21533
|
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21503
21534
|
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21504
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
|
|
21535
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
|
|
21505
21536
|
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21506
21537
|
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21507
21538
|
// Check if the field ID has been set dynamically
|
|
@@ -21658,7 +21689,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21658
21689
|
}
|
|
21659
21690
|
}
|
|
21660
21691
|
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)); };
|
|
21661
|
-
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"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21692
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", multipleFollowUpFeature: "multipleFollowUpFeature" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21662
21693
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 33, 22, "div", 2);
|
|
21663
21694
|
} if (rf & 2) {
|
|
21664
21695
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21675,6 +21706,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21675
21706
|
type: Input
|
|
21676
21707
|
}], eventData: [{
|
|
21677
21708
|
type: Input
|
|
21709
|
+
}], multipleFollowUpFeature: [{
|
|
21710
|
+
type: Input
|
|
21678
21711
|
}], backClicked: [{
|
|
21679
21712
|
type: Output
|
|
21680
21713
|
}], querySubmitted: [{
|
|
@@ -21892,10 +21925,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
|
|
|
21892
21925
|
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);
|
|
21893
21926
|
i0.ɵɵelementContainerEnd();
|
|
21894
21927
|
} if (rf & 2) {
|
|
21928
|
+
const child_r3 = ctx.$implicit;
|
|
21895
21929
|
const i_r4 = ctx.index;
|
|
21896
21930
|
const followUpMessage_r5 = i0.ɵɵreference(3);
|
|
21931
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
21897
21932
|
i0.ɵɵadvance();
|
|
21898
|
-
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
21933
|
+
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);
|
|
21899
21934
|
} }
|
|
21900
21935
|
function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
|
|
21901
21936
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -21999,6 +22034,8 @@ class QueryDetailsComponent {
|
|
|
21999
22034
|
sessionStorageService;
|
|
22000
22035
|
route;
|
|
22001
22036
|
router;
|
|
22037
|
+
abstractConfig;
|
|
22038
|
+
caseNotifier;
|
|
22002
22039
|
query;
|
|
22003
22040
|
caseId;
|
|
22004
22041
|
queryResponseStatus;
|
|
@@ -22008,10 +22045,15 @@ class QueryDetailsComponent {
|
|
|
22008
22045
|
static QUERY_ITEM_RESPOND = '3';
|
|
22009
22046
|
static QUERY_ITEM_FOLLOW_UP = '4';
|
|
22010
22047
|
queryItemId;
|
|
22011
|
-
|
|
22048
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
22049
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
22050
|
+
enableServiceSpecificMultiFollowups;
|
|
22051
|
+
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22012
22052
|
this.sessionStorageService = sessionStorageService;
|
|
22013
22053
|
this.route = route;
|
|
22014
22054
|
this.router = router;
|
|
22055
|
+
this.abstractConfig = abstractConfig;
|
|
22056
|
+
this.caseNotifier = caseNotifier;
|
|
22015
22057
|
}
|
|
22016
22058
|
onBack() {
|
|
22017
22059
|
this.backClicked.emit(true);
|
|
@@ -22031,6 +22073,23 @@ class QueryDetailsComponent {
|
|
|
22031
22073
|
}
|
|
22032
22074
|
hasRespondedToQuery() {
|
|
22033
22075
|
const isAwaiting = this.queryResponseStatus === undefined || this.queryResponseStatus === QueryItemResponseStatus.AWAITING;
|
|
22076
|
+
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22077
|
+
const isFollowUp = lastChild?.messageType === this.followUpQuery;
|
|
22078
|
+
const isRespond = lastChild?.messageType === this.respondToQuery;
|
|
22079
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22080
|
+
const isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.some((jurisdiction) => jurisdiction === this.caseNotifier?.cachedCaseView?.case_type?.jurisdiction.id);
|
|
22081
|
+
if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
|
|
22082
|
+
this.hasResponded.emit(true);
|
|
22083
|
+
return true;
|
|
22084
|
+
}
|
|
22085
|
+
if (isFollowUp && isMultipleFollowUpEnabled) {
|
|
22086
|
+
this.hasResponded.emit(false);
|
|
22087
|
+
return false;
|
|
22088
|
+
}
|
|
22089
|
+
if (isRespond) {
|
|
22090
|
+
this.hasResponded.emit(false);
|
|
22091
|
+
return false;
|
|
22092
|
+
}
|
|
22034
22093
|
if (this.isInternalUser()) {
|
|
22035
22094
|
if (isAwaiting) {
|
|
22036
22095
|
this.hasResponded.emit(false);
|
|
@@ -22046,7 +22105,7 @@ class QueryDetailsComponent {
|
|
|
22046
22105
|
this.hasResponded.emit(false);
|
|
22047
22106
|
return false;
|
|
22048
22107
|
}
|
|
22049
|
-
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
22108
|
+
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)); };
|
|
22050
22109
|
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) {
|
|
22051
22110
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22052
22111
|
} if (rf & 2) {
|
|
@@ -22055,8 +22114,8 @@ class QueryDetailsComponent {
|
|
|
22055
22114
|
}
|
|
22056
22115
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22057
22116
|
type: Component,
|
|
22058
|
-
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"query.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n\n <tr *ngIf=\"isInternalUser()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <!-- <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div> -->\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm'}}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
|
|
22059
|
-
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
22117
|
+
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"query.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"(i % 2 === 0 && !child?.messageType) || (child && child?.messageType === respondToQuery); else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n\n <tr *ngIf=\"isInternalUser()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <!-- <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div> -->\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm'}}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
|
|
22118
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
|
|
22060
22119
|
type: Input
|
|
22061
22120
|
}], caseId: [{
|
|
22062
22121
|
type: Input
|
|
@@ -22067,7 +22126,7 @@ class QueryDetailsComponent {
|
|
|
22067
22126
|
}], hasResponded: [{
|
|
22068
22127
|
type: Output
|
|
22069
22128
|
}] }); })();
|
|
22070
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
22129
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 16 }); })();
|
|
22071
22130
|
|
|
22072
22131
|
class QueryEventCompletionComponent {
|
|
22073
22132
|
eventCompletionParams;
|
|
@@ -22992,7 +23051,7 @@ class QueryConfirmationComponent {
|
|
|
22992
23051
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
22993
23052
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
22994
23053
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
22995
|
-
i0.ɵɵelementStart(0, "div",
|
|
23054
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
|
|
22996
23055
|
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)); });
|
|
22997
23056
|
i0.ɵɵelementEnd()();
|
|
22998
23057
|
} if (rf & 2) {
|
|
@@ -23002,7 +23061,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23002
23061
|
} }
|
|
23003
23062
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23004
23063
|
i0.ɵɵelementContainerStart(0);
|
|
23005
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23064
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
|
|
23006
23065
|
i0.ɵɵelementContainerEnd();
|
|
23007
23066
|
} if (rf & 2) {
|
|
23008
23067
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23011,7 +23070,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23011
23070
|
} }
|
|
23012
23071
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23013
23072
|
i0.ɵɵelementContainerStart(0);
|
|
23014
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23073
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
|
|
23015
23074
|
i0.ɵɵelementContainerEnd();
|
|
23016
23075
|
} if (rf & 2) {
|
|
23017
23076
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23020,7 +23079,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23020
23079
|
} }
|
|
23021
23080
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23022
23081
|
i0.ɵɵelementContainerStart(0);
|
|
23023
|
-
i0.ɵɵelementStart(1, "button",
|
|
23082
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23024
23083
|
i0.ɵɵtext(2);
|
|
23025
23084
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23026
23085
|
i0.ɵɵelementEnd();
|
|
@@ -23032,8 +23091,22 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23032
23091
|
i0.ɵɵadvance();
|
|
23033
23092
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23034
23093
|
} }
|
|
23035
|
-
function
|
|
23036
|
-
i0.ɵɵ
|
|
23094
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23095
|
+
i0.ɵɵelementContainerStart(0);
|
|
23096
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23097
|
+
i0.ɵɵtext(2);
|
|
23098
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23099
|
+
i0.ɵɵelementEnd();
|
|
23100
|
+
i0.ɵɵelementContainerEnd();
|
|
23101
|
+
} if (rf & 2) {
|
|
23102
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23103
|
+
i0.ɵɵadvance();
|
|
23104
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23105
|
+
i0.ɵɵadvance();
|
|
23106
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23107
|
+
} }
|
|
23108
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23109
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23037
23110
|
i0.ɵɵtext(2);
|
|
23038
23111
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23039
23112
|
i0.ɵɵelementEnd();
|
|
@@ -23047,43 +23120,61 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
23047
23120
|
i0.ɵɵadvance(3);
|
|
23048
23121
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23049
23122
|
} }
|
|
23123
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23124
|
+
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);
|
|
23125
|
+
} if (rf & 2) {
|
|
23126
|
+
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23127
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23128
|
+
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);
|
|
23129
|
+
} }
|
|
23050
23130
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23051
23131
|
i0.ɵɵelementContainerStart(0);
|
|
23052
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23132
|
+
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);
|
|
23053
23133
|
i0.ɵɵelementContainerEnd();
|
|
23054
23134
|
} if (rf & 2) {
|
|
23055
|
-
const
|
|
23135
|
+
const sequentialQuery_r6 = i0.ɵɵreference(3);
|
|
23056
23136
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23057
23137
|
i0.ɵɵadvance();
|
|
23058
|
-
i0.ɵɵproperty("ngIf",
|
|
23138
|
+
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);
|
|
23059
23139
|
} }
|
|
23060
23140
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23061
23141
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23062
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23142
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 8);
|
|
23063
23143
|
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); });
|
|
23064
23144
|
i0.ɵɵelementEnd();
|
|
23065
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23145
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 9);
|
|
23066
23146
|
} if (rf & 2) {
|
|
23067
23147
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23068
23148
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
23069
23149
|
i0.ɵɵadvance();
|
|
23070
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser());
|
|
23150
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
|
|
23071
23151
|
} }
|
|
23072
23152
|
class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
23073
23153
|
route;
|
|
23074
23154
|
sessionStorageService;
|
|
23075
23155
|
caseNotifier;
|
|
23156
|
+
abstractConfig;
|
|
23076
23157
|
caseQueriesCollections;
|
|
23077
23158
|
query;
|
|
23078
23159
|
showQueryList = true;
|
|
23079
23160
|
caseId;
|
|
23080
|
-
|
|
23161
|
+
messageType;
|
|
23162
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23163
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
23164
|
+
isQueryClosed = false;
|
|
23165
|
+
value;
|
|
23166
|
+
isMultipleFollowUpEnabled;
|
|
23167
|
+
enableServiceSpecificMultiFollowups;
|
|
23168
|
+
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23081
23169
|
super();
|
|
23082
23170
|
this.route = route;
|
|
23083
23171
|
this.sessionStorageService = sessionStorageService;
|
|
23084
23172
|
this.caseNotifier = caseNotifier;
|
|
23173
|
+
this.abstractConfig = abstractConfig;
|
|
23085
23174
|
}
|
|
23086
23175
|
ngOnInit() {
|
|
23176
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23177
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.some((jurisdiction) => jurisdiction === this.caseNotifier?.cachedCaseView?.case_type?.jurisdiction.id);
|
|
23087
23178
|
this.caseId = this.route.snapshot.params.cid;
|
|
23088
23179
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23089
23180
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
@@ -23113,6 +23204,8 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23113
23204
|
setQuery(query) {
|
|
23114
23205
|
this.showQueryList = false;
|
|
23115
23206
|
this.query = query;
|
|
23207
|
+
this.messageType = this.getMessageType(query);
|
|
23208
|
+
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23116
23209
|
}
|
|
23117
23210
|
backToQueryListPage() {
|
|
23118
23211
|
this.showQueryList = true;
|
|
@@ -23121,19 +23214,24 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23121
23214
|
isInternalUser() {
|
|
23122
23215
|
return isInternalUser(this.sessionStorageService);
|
|
23123
23216
|
}
|
|
23124
|
-
|
|
23125
|
-
|
|
23126
|
-
|
|
23217
|
+
getMessageType(query) {
|
|
23218
|
+
return query?.children?.length
|
|
23219
|
+
? query.children[query.children.length - 1]?.messageType
|
|
23220
|
+
: undefined;
|
|
23221
|
+
}
|
|
23222
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23223
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23224
|
+
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
23127
23225
|
} if (rf & 2) {
|
|
23128
|
-
const
|
|
23129
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23226
|
+
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
23227
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
|
|
23130
23228
|
} }, encapsulation: 2 });
|
|
23131
23229
|
}
|
|
23132
23230
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23133
23231
|
type: Component,
|
|
23134
|
-
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser()\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n
|
|
23135
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23136
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
23232
|
+
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) || (messageType && messageType === respondToQuery); else sequentialQuery\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n <ng-template #sequentialQuery>\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n \n </ng-container>\n</ng-template>\n" }]
|
|
23233
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
23234
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 17 }); })();
|
|
23137
23235
|
|
|
23138
23236
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23139
23237
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|