@hmcts/ccd-case-ui-toolkit 7.2.13 → 7.2.14-multiple-followup-1
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 +52 -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 +74 -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 +154 -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 +15 -3
- 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 +16 -3
- 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,18 @@ 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
|
+
currentJurisdictionId;
|
|
22052
|
+
isMultipleFollowUpEnabled = false;
|
|
22053
|
+
caseSubscription;
|
|
22054
|
+
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22012
22055
|
this.sessionStorageService = sessionStorageService;
|
|
22013
22056
|
this.route = route;
|
|
22014
22057
|
this.router = router;
|
|
22058
|
+
this.abstractConfig = abstractConfig;
|
|
22059
|
+
this.caseNotifier = caseNotifier;
|
|
22015
22060
|
}
|
|
22016
22061
|
onBack() {
|
|
22017
22062
|
this.backClicked.emit(true);
|
|
@@ -22019,10 +22064,23 @@ class QueryDetailsComponent {
|
|
|
22019
22064
|
isInternalUser() {
|
|
22020
22065
|
return isInternalUser(this.sessionStorageService);
|
|
22021
22066
|
}
|
|
22067
|
+
ngOnInit() {
|
|
22068
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22069
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
|
|
22070
|
+
if (caseView?.case_type?.jurisdiction?.id) {
|
|
22071
|
+
this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
|
|
22072
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
22073
|
+
this.hasRespondedToQuery();
|
|
22074
|
+
}
|
|
22075
|
+
});
|
|
22076
|
+
}
|
|
22022
22077
|
ngOnChanges() {
|
|
22023
22078
|
this.toggleLinkVisibility();
|
|
22024
22079
|
this.hasRespondedToQuery();
|
|
22025
22080
|
}
|
|
22081
|
+
ngOnDestroy() {
|
|
22082
|
+
this.caseSubscription?.unsubscribe();
|
|
22083
|
+
}
|
|
22026
22084
|
toggleLinkVisibility() {
|
|
22027
22085
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
22028
22086
|
if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
|
|
@@ -22031,6 +22089,21 @@ class QueryDetailsComponent {
|
|
|
22031
22089
|
}
|
|
22032
22090
|
hasRespondedToQuery() {
|
|
22033
22091
|
const isAwaiting = this.queryResponseStatus === undefined || this.queryResponseStatus === QueryItemResponseStatus.AWAITING;
|
|
22092
|
+
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22093
|
+
const isFollowUp = lastChild?.messageType === this.followUpQuery;
|
|
22094
|
+
const isRespond = lastChild?.messageType === this.respondToQuery;
|
|
22095
|
+
if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
|
|
22096
|
+
this.hasResponded.emit(true);
|
|
22097
|
+
return true;
|
|
22098
|
+
}
|
|
22099
|
+
if (isFollowUp && this.isMultipleFollowUpEnabled) {
|
|
22100
|
+
this.hasResponded.emit(false);
|
|
22101
|
+
return false;
|
|
22102
|
+
}
|
|
22103
|
+
if (isRespond) {
|
|
22104
|
+
this.hasResponded.emit(false);
|
|
22105
|
+
return false;
|
|
22106
|
+
}
|
|
22034
22107
|
if (this.isInternalUser()) {
|
|
22035
22108
|
if (isAwaiting) {
|
|
22036
22109
|
this.hasResponded.emit(false);
|
|
@@ -22046,7 +22119,7 @@ class QueryDetailsComponent {
|
|
|
22046
22119
|
this.hasResponded.emit(false);
|
|
22047
22120
|
return false;
|
|
22048
22121
|
}
|
|
22049
|
-
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
22122
|
+
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
22123
|
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
22124
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22052
22125
|
} if (rf & 2) {
|
|
@@ -22055,8 +22128,8 @@ class QueryDetailsComponent {
|
|
|
22055
22128
|
}
|
|
22056
22129
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22057
22130
|
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: [{
|
|
22131
|
+
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"] }]
|
|
22132
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
|
|
22060
22133
|
type: Input
|
|
22061
22134
|
}], caseId: [{
|
|
22062
22135
|
type: Input
|
|
@@ -22067,7 +22140,7 @@ class QueryDetailsComponent {
|
|
|
22067
22140
|
}], hasResponded: [{
|
|
22068
22141
|
type: Output
|
|
22069
22142
|
}] }); })();
|
|
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:
|
|
22143
|
+
(() => { (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 }); })();
|
|
22071
22144
|
|
|
22072
22145
|
class QueryEventCompletionComponent {
|
|
22073
22146
|
eventCompletionParams;
|
|
@@ -22992,7 +23065,7 @@ class QueryConfirmationComponent {
|
|
|
22992
23065
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
22993
23066
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
22994
23067
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
22995
|
-
i0.ɵɵelementStart(0, "div",
|
|
23068
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
|
|
22996
23069
|
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
23070
|
i0.ɵɵelementEnd()();
|
|
22998
23071
|
} if (rf & 2) {
|
|
@@ -23002,7 +23075,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23002
23075
|
} }
|
|
23003
23076
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23004
23077
|
i0.ɵɵelementContainerStart(0);
|
|
23005
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23078
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
|
|
23006
23079
|
i0.ɵɵelementContainerEnd();
|
|
23007
23080
|
} if (rf & 2) {
|
|
23008
23081
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23011,7 +23084,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23011
23084
|
} }
|
|
23012
23085
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23013
23086
|
i0.ɵɵelementContainerStart(0);
|
|
23014
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23087
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
|
|
23015
23088
|
i0.ɵɵelementContainerEnd();
|
|
23016
23089
|
} if (rf & 2) {
|
|
23017
23090
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23020,7 +23093,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23020
23093
|
} }
|
|
23021
23094
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23022
23095
|
i0.ɵɵelementContainerStart(0);
|
|
23023
|
-
i0.ɵɵelementStart(1, "button",
|
|
23096
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23024
23097
|
i0.ɵɵtext(2);
|
|
23025
23098
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23026
23099
|
i0.ɵɵelementEnd();
|
|
@@ -23032,8 +23105,22 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23032
23105
|
i0.ɵɵadvance();
|
|
23033
23106
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23034
23107
|
} }
|
|
23035
|
-
function
|
|
23036
|
-
i0.ɵɵ
|
|
23108
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23109
|
+
i0.ɵɵelementContainerStart(0);
|
|
23110
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23111
|
+
i0.ɵɵtext(2);
|
|
23112
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23113
|
+
i0.ɵɵelementEnd();
|
|
23114
|
+
i0.ɵɵelementContainerEnd();
|
|
23115
|
+
} if (rf & 2) {
|
|
23116
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23117
|
+
i0.ɵɵadvance();
|
|
23118
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23119
|
+
i0.ɵɵadvance();
|
|
23120
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23121
|
+
} }
|
|
23122
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23123
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23037
23124
|
i0.ɵɵtext(2);
|
|
23038
23125
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23039
23126
|
i0.ɵɵelementEnd();
|
|
@@ -23047,44 +23134,69 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
23047
23134
|
i0.ɵɵadvance(3);
|
|
23048
23135
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23049
23136
|
} }
|
|
23137
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23138
|
+
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);
|
|
23139
|
+
} if (rf & 2) {
|
|
23140
|
+
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23141
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23142
|
+
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);
|
|
23143
|
+
} }
|
|
23050
23144
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23051
23145
|
i0.ɵɵelementContainerStart(0);
|
|
23052
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23146
|
+
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
23147
|
i0.ɵɵelementContainerEnd();
|
|
23054
23148
|
} if (rf & 2) {
|
|
23055
|
-
const
|
|
23149
|
+
const sequentialQuery_r6 = i0.ɵɵreference(3);
|
|
23056
23150
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23057
23151
|
i0.ɵɵadvance();
|
|
23058
|
-
i0.ɵɵproperty("ngIf",
|
|
23152
|
+
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
23153
|
} }
|
|
23060
23154
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23061
23155
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23062
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23156
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 8);
|
|
23063
23157
|
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
23158
|
i0.ɵɵelementEnd();
|
|
23065
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23159
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 9);
|
|
23066
23160
|
} if (rf & 2) {
|
|
23067
23161
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23068
23162
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
23069
23163
|
i0.ɵɵadvance();
|
|
23070
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser());
|
|
23164
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
|
|
23071
23165
|
} }
|
|
23072
23166
|
class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
23073
23167
|
route;
|
|
23074
23168
|
sessionStorageService;
|
|
23075
23169
|
caseNotifier;
|
|
23170
|
+
abstractConfig;
|
|
23076
23171
|
caseQueriesCollections;
|
|
23077
23172
|
query;
|
|
23078
23173
|
showQueryList = true;
|
|
23079
23174
|
caseId;
|
|
23080
|
-
|
|
23175
|
+
messageType;
|
|
23176
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23177
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
23178
|
+
isQueryClosed = false;
|
|
23179
|
+
value;
|
|
23180
|
+
isMultipleFollowUpEnabled = false;
|
|
23181
|
+
currentJurisdictionId;
|
|
23182
|
+
enableServiceSpecificMultiFollowups = [];
|
|
23183
|
+
caseSubscription;
|
|
23184
|
+
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23081
23185
|
super();
|
|
23082
23186
|
this.route = route;
|
|
23083
23187
|
this.sessionStorageService = sessionStorageService;
|
|
23084
23188
|
this.caseNotifier = caseNotifier;
|
|
23189
|
+
this.abstractConfig = abstractConfig;
|
|
23085
23190
|
}
|
|
23086
23191
|
ngOnInit() {
|
|
23087
23192
|
this.caseId = this.route.snapshot.params.cid;
|
|
23193
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23194
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
|
|
23195
|
+
if (caseDetails?.case_type?.jurisdiction?.id) {
|
|
23196
|
+
this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
|
|
23197
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
23198
|
+
}
|
|
23199
|
+
});
|
|
23088
23200
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23089
23201
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
23090
23202
|
// this.caseQueriesCollections = caseMessagesMockData;
|
|
@@ -23110,9 +23222,14 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23110
23222
|
// QueryManagementUtils.extractCaseQueriesFromCaseField();
|
|
23111
23223
|
}
|
|
23112
23224
|
}
|
|
23225
|
+
ngOnDestroy() {
|
|
23226
|
+
this.caseSubscription?.unsubscribe();
|
|
23227
|
+
}
|
|
23113
23228
|
setQuery(query) {
|
|
23114
23229
|
this.showQueryList = false;
|
|
23115
23230
|
this.query = query;
|
|
23231
|
+
this.messageType = this.getMessageType(query);
|
|
23232
|
+
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23116
23233
|
}
|
|
23117
23234
|
backToQueryListPage() {
|
|
23118
23235
|
this.showQueryList = true;
|
|
@@ -23121,19 +23238,24 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23121
23238
|
isInternalUser() {
|
|
23122
23239
|
return isInternalUser(this.sessionStorageService);
|
|
23123
23240
|
}
|
|
23124
|
-
|
|
23125
|
-
|
|
23126
|
-
|
|
23241
|
+
getMessageType(query) {
|
|
23242
|
+
return query?.children?.length
|
|
23243
|
+
? query.children[query.children.length - 1]?.messageType
|
|
23244
|
+
: undefined;
|
|
23245
|
+
}
|
|
23246
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23247
|
+
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) {
|
|
23248
|
+
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
23249
|
} if (rf & 2) {
|
|
23128
|
-
const
|
|
23129
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23250
|
+
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
23251
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
|
|
23130
23252
|
} }, encapsulation: 2 });
|
|
23131
23253
|
}
|
|
23132
23254
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23133
23255
|
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:
|
|
23256
|
+
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" }]
|
|
23257
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
23258
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
|
|
23137
23259
|
|
|
23138
23260
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23139
23261
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|