@hmcts/ccd-case-ui-toolkit 7.2.14 → 7.2.15-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 +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 {
|
|
@@ -20597,6 +20599,7 @@ var QueryItemResponseStatus;
|
|
|
20597
20599
|
QueryItemResponseStatus["NEW"] = "New";
|
|
20598
20600
|
QueryItemResponseStatus["RESPONDED"] = "Responded";
|
|
20599
20601
|
QueryItemResponseStatus["AWAITING"] = "Awaiting Response";
|
|
20602
|
+
QueryItemResponseStatus["CLOSED"] = "Closed";
|
|
20600
20603
|
})(QueryItemResponseStatus || (QueryItemResponseStatus = {}));
|
|
20601
20604
|
|
|
20602
20605
|
var RespondToQueryErrorMessages;
|
|
@@ -20897,6 +20900,8 @@ class QueryListItem {
|
|
|
20897
20900
|
createdOn;
|
|
20898
20901
|
createdBy;
|
|
20899
20902
|
parentId;
|
|
20903
|
+
isClosed;
|
|
20904
|
+
messageType;
|
|
20900
20905
|
children = [];
|
|
20901
20906
|
messageIndexInParent = null;
|
|
20902
20907
|
get lastSubmittedMessage() {
|
|
@@ -20957,7 +20962,24 @@ class QueryListItem {
|
|
|
20957
20962
|
return new Date(this.children[index].createdOn);
|
|
20958
20963
|
}
|
|
20959
20964
|
get responseStatus() {
|
|
20960
|
-
|
|
20965
|
+
const isThreadClosed = (item) => {
|
|
20966
|
+
if (item.isClosed === 'Yes') {
|
|
20967
|
+
return true;
|
|
20968
|
+
}
|
|
20969
|
+
return item.children?.some((child) => isThreadClosed(child)) || false;
|
|
20970
|
+
};
|
|
20971
|
+
if (isThreadClosed(this)) {
|
|
20972
|
+
return QueryItemResponseStatus.CLOSED;
|
|
20973
|
+
}
|
|
20974
|
+
const lastMessageType = this.children?.length
|
|
20975
|
+
? this.children[this.children.length - 1]?.messageType
|
|
20976
|
+
: undefined;
|
|
20977
|
+
if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
|
|
20978
|
+
return QueryItemResponseStatus.RESPONDED;
|
|
20979
|
+
}
|
|
20980
|
+
else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
|
|
20981
|
+
return QueryItemResponseStatus.AWAITING;
|
|
20982
|
+
}
|
|
20961
20983
|
if (this.messageIndexInParent !== null) {
|
|
20962
20984
|
return this.messageIndexInParent % 2 === 0
|
|
20963
20985
|
? QueryItemResponseStatus.RESPONDED
|
|
@@ -21049,12 +21071,18 @@ class QueryManagementUtils {
|
|
|
21049
21071
|
createdBy: currentUserId
|
|
21050
21072
|
};
|
|
21051
21073
|
}
|
|
21052
|
-
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
|
|
21074
|
+
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
|
|
21053
21075
|
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21054
21076
|
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21055
21077
|
const body = formGroup.get('body').value;
|
|
21056
21078
|
const attachments = formGroup.get('attachments').value;
|
|
21057
21079
|
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21080
|
+
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
21081
|
+
const messageType = messageTypeParam === QueryCreateContext.RESPOND
|
|
21082
|
+
? QueryCreateContext.RESPOND
|
|
21083
|
+
: messageTypeParam === QueryCreateContext.FOLLOWUP
|
|
21084
|
+
? QueryCreateContext.FOLLOWUP
|
|
21085
|
+
: undefined;
|
|
21058
21086
|
return {
|
|
21059
21087
|
id: v4(),
|
|
21060
21088
|
subject: queryItem.subject,
|
|
@@ -21065,7 +21093,9 @@ class QueryManagementUtils {
|
|
|
21065
21093
|
hearingDate: queryItem.hearingDate,
|
|
21066
21094
|
createdOn: new Date(),
|
|
21067
21095
|
createdBy: currentUserId,
|
|
21068
|
-
parentId: queryItem.id
|
|
21096
|
+
parentId: queryItem.id,
|
|
21097
|
+
isClosed,
|
|
21098
|
+
messageType
|
|
21069
21099
|
};
|
|
21070
21100
|
}
|
|
21071
21101
|
static isObject(elem) {
|
|
@@ -21357,6 +21387,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21357
21387
|
queryItem;
|
|
21358
21388
|
queryCreateContext;
|
|
21359
21389
|
eventData = null;
|
|
21390
|
+
multipleFollowUpFeature;
|
|
21360
21391
|
backClicked = new EventEmitter();
|
|
21361
21392
|
querySubmitted = new EventEmitter();
|
|
21362
21393
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21515,7 +21546,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21515
21546
|
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21516
21547
|
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21517
21548
|
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21518
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
|
|
21549
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
|
|
21519
21550
|
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21520
21551
|
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21521
21552
|
// Check if the field ID has been set dynamically
|
|
@@ -21672,7 +21703,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21672
21703
|
}
|
|
21673
21704
|
}
|
|
21674
21705
|
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)); };
|
|
21675
|
-
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) {
|
|
21706
|
+
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) {
|
|
21676
21707
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 33, 22, "div", 2);
|
|
21677
21708
|
} if (rf & 2) {
|
|
21678
21709
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21689,6 +21720,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21689
21720
|
type: Input
|
|
21690
21721
|
}], eventData: [{
|
|
21691
21722
|
type: Input
|
|
21723
|
+
}], multipleFollowUpFeature: [{
|
|
21724
|
+
type: Input
|
|
21692
21725
|
}], backClicked: [{
|
|
21693
21726
|
type: Output
|
|
21694
21727
|
}], querySubmitted: [{
|
|
@@ -21906,10 +21939,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
|
|
|
21906
21939
|
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);
|
|
21907
21940
|
i0.ɵɵelementContainerEnd();
|
|
21908
21941
|
} if (rf & 2) {
|
|
21942
|
+
const child_r3 = ctx.$implicit;
|
|
21909
21943
|
const i_r4 = ctx.index;
|
|
21910
21944
|
const followUpMessage_r5 = i0.ɵɵreference(3);
|
|
21945
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
21911
21946
|
i0.ɵɵadvance();
|
|
21912
|
-
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
21947
|
+
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);
|
|
21913
21948
|
} }
|
|
21914
21949
|
function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
|
|
21915
21950
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22013,6 +22048,8 @@ class QueryDetailsComponent {
|
|
|
22013
22048
|
sessionStorageService;
|
|
22014
22049
|
route;
|
|
22015
22050
|
router;
|
|
22051
|
+
abstractConfig;
|
|
22052
|
+
caseNotifier;
|
|
22016
22053
|
query;
|
|
22017
22054
|
caseId;
|
|
22018
22055
|
queryResponseStatus;
|
|
@@ -22022,10 +22059,18 @@ class QueryDetailsComponent {
|
|
|
22022
22059
|
static QUERY_ITEM_RESPOND = '3';
|
|
22023
22060
|
static QUERY_ITEM_FOLLOW_UP = '4';
|
|
22024
22061
|
queryItemId;
|
|
22025
|
-
|
|
22062
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
22063
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
22064
|
+
enableServiceSpecificMultiFollowups;
|
|
22065
|
+
currentJurisdictionId;
|
|
22066
|
+
isMultipleFollowUpEnabled = false;
|
|
22067
|
+
caseSubscription;
|
|
22068
|
+
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22026
22069
|
this.sessionStorageService = sessionStorageService;
|
|
22027
22070
|
this.route = route;
|
|
22028
22071
|
this.router = router;
|
|
22072
|
+
this.abstractConfig = abstractConfig;
|
|
22073
|
+
this.caseNotifier = caseNotifier;
|
|
22029
22074
|
}
|
|
22030
22075
|
onBack() {
|
|
22031
22076
|
this.backClicked.emit(true);
|
|
@@ -22033,10 +22078,23 @@ class QueryDetailsComponent {
|
|
|
22033
22078
|
isInternalUser() {
|
|
22034
22079
|
return isInternalUser(this.sessionStorageService);
|
|
22035
22080
|
}
|
|
22081
|
+
ngOnInit() {
|
|
22082
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22083
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
|
|
22084
|
+
if (caseView?.case_type?.jurisdiction?.id) {
|
|
22085
|
+
this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
|
|
22086
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
22087
|
+
this.hasRespondedToQuery();
|
|
22088
|
+
}
|
|
22089
|
+
});
|
|
22090
|
+
}
|
|
22036
22091
|
ngOnChanges() {
|
|
22037
22092
|
this.toggleLinkVisibility();
|
|
22038
22093
|
this.hasRespondedToQuery();
|
|
22039
22094
|
}
|
|
22095
|
+
ngOnDestroy() {
|
|
22096
|
+
this.caseSubscription?.unsubscribe();
|
|
22097
|
+
}
|
|
22040
22098
|
toggleLinkVisibility() {
|
|
22041
22099
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
22042
22100
|
if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
|
|
@@ -22045,6 +22103,21 @@ class QueryDetailsComponent {
|
|
|
22045
22103
|
}
|
|
22046
22104
|
hasRespondedToQuery() {
|
|
22047
22105
|
const isAwaiting = this.queryResponseStatus === undefined || this.queryResponseStatus === QueryItemResponseStatus.AWAITING;
|
|
22106
|
+
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22107
|
+
const isFollowUp = lastChild?.messageType === this.followUpQuery;
|
|
22108
|
+
const isRespond = lastChild?.messageType === this.respondToQuery;
|
|
22109
|
+
if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
|
|
22110
|
+
this.hasResponded.emit(true);
|
|
22111
|
+
return true;
|
|
22112
|
+
}
|
|
22113
|
+
if (isFollowUp && this.isMultipleFollowUpEnabled) {
|
|
22114
|
+
this.hasResponded.emit(false);
|
|
22115
|
+
return false;
|
|
22116
|
+
}
|
|
22117
|
+
if (isRespond) {
|
|
22118
|
+
this.hasResponded.emit(false);
|
|
22119
|
+
return false;
|
|
22120
|
+
}
|
|
22048
22121
|
if (this.isInternalUser()) {
|
|
22049
22122
|
if (isAwaiting) {
|
|
22050
22123
|
this.hasResponded.emit(false);
|
|
@@ -22060,7 +22133,7 @@ class QueryDetailsComponent {
|
|
|
22060
22133
|
this.hasResponded.emit(false);
|
|
22061
22134
|
return false;
|
|
22062
22135
|
}
|
|
22063
|
-
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
22136
|
+
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)); };
|
|
22064
22137
|
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) {
|
|
22065
22138
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22066
22139
|
} if (rf & 2) {
|
|
@@ -22069,8 +22142,8 @@ class QueryDetailsComponent {
|
|
|
22069
22142
|
}
|
|
22070
22143
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22071
22144
|
type: Component,
|
|
22072
|
-
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"] }]
|
|
22073
|
-
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
22145
|
+
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"] }]
|
|
22146
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
|
|
22074
22147
|
type: Input
|
|
22075
22148
|
}], caseId: [{
|
|
22076
22149
|
type: Input
|
|
@@ -22081,7 +22154,7 @@ class QueryDetailsComponent {
|
|
|
22081
22154
|
}], hasResponded: [{
|
|
22082
22155
|
type: Output
|
|
22083
22156
|
}] }); })();
|
|
22084
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
22157
|
+
(() => { (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 }); })();
|
|
22085
22158
|
|
|
22086
22159
|
class QueryEventCompletionComponent {
|
|
22087
22160
|
eventCompletionParams;
|
|
@@ -23006,7 +23079,7 @@ class QueryConfirmationComponent {
|
|
|
23006
23079
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
23007
23080
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
23008
23081
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
23009
|
-
i0.ɵɵelementStart(0, "div",
|
|
23082
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
|
|
23010
23083
|
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)); });
|
|
23011
23084
|
i0.ɵɵelementEnd()();
|
|
23012
23085
|
} if (rf & 2) {
|
|
@@ -23016,7 +23089,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23016
23089
|
} }
|
|
23017
23090
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23018
23091
|
i0.ɵɵelementContainerStart(0);
|
|
23019
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23092
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
|
|
23020
23093
|
i0.ɵɵelementContainerEnd();
|
|
23021
23094
|
} if (rf & 2) {
|
|
23022
23095
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23025,7 +23098,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23025
23098
|
} }
|
|
23026
23099
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23027
23100
|
i0.ɵɵelementContainerStart(0);
|
|
23028
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23101
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
|
|
23029
23102
|
i0.ɵɵelementContainerEnd();
|
|
23030
23103
|
} if (rf & 2) {
|
|
23031
23104
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23034,7 +23107,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23034
23107
|
} }
|
|
23035
23108
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23036
23109
|
i0.ɵɵelementContainerStart(0);
|
|
23037
|
-
i0.ɵɵelementStart(1, "button",
|
|
23110
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23038
23111
|
i0.ɵɵtext(2);
|
|
23039
23112
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23040
23113
|
i0.ɵɵelementEnd();
|
|
@@ -23046,8 +23119,22 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23046
23119
|
i0.ɵɵadvance();
|
|
23047
23120
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23048
23121
|
} }
|
|
23049
|
-
function
|
|
23050
|
-
i0.ɵɵ
|
|
23122
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23123
|
+
i0.ɵɵelementContainerStart(0);
|
|
23124
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23125
|
+
i0.ɵɵtext(2);
|
|
23126
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23127
|
+
i0.ɵɵelementEnd();
|
|
23128
|
+
i0.ɵɵelementContainerEnd();
|
|
23129
|
+
} if (rf & 2) {
|
|
23130
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23131
|
+
i0.ɵɵadvance();
|
|
23132
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23133
|
+
i0.ɵɵadvance();
|
|
23134
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23135
|
+
} }
|
|
23136
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23137
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23051
23138
|
i0.ɵɵtext(2);
|
|
23052
23139
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23053
23140
|
i0.ɵɵelementEnd();
|
|
@@ -23061,44 +23148,69 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
23061
23148
|
i0.ɵɵadvance(3);
|
|
23062
23149
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23063
23150
|
} }
|
|
23151
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23152
|
+
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);
|
|
23153
|
+
} if (rf & 2) {
|
|
23154
|
+
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23155
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23156
|
+
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);
|
|
23157
|
+
} }
|
|
23064
23158
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23065
23159
|
i0.ɵɵelementContainerStart(0);
|
|
23066
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23160
|
+
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);
|
|
23067
23161
|
i0.ɵɵelementContainerEnd();
|
|
23068
23162
|
} if (rf & 2) {
|
|
23069
|
-
const
|
|
23163
|
+
const sequentialQuery_r6 = i0.ɵɵreference(3);
|
|
23070
23164
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23071
23165
|
i0.ɵɵadvance();
|
|
23072
|
-
i0.ɵɵproperty("ngIf",
|
|
23166
|
+
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);
|
|
23073
23167
|
} }
|
|
23074
23168
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23075
23169
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23076
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23170
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 8);
|
|
23077
23171
|
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); });
|
|
23078
23172
|
i0.ɵɵelementEnd();
|
|
23079
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23173
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 9);
|
|
23080
23174
|
} if (rf & 2) {
|
|
23081
23175
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23082
23176
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
23083
23177
|
i0.ɵɵadvance();
|
|
23084
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser());
|
|
23178
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
|
|
23085
23179
|
} }
|
|
23086
23180
|
class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
23087
23181
|
route;
|
|
23088
23182
|
sessionStorageService;
|
|
23089
23183
|
caseNotifier;
|
|
23184
|
+
abstractConfig;
|
|
23090
23185
|
caseQueriesCollections;
|
|
23091
23186
|
query;
|
|
23092
23187
|
showQueryList = true;
|
|
23093
23188
|
caseId;
|
|
23094
|
-
|
|
23189
|
+
messageType;
|
|
23190
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23191
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
23192
|
+
isQueryClosed = false;
|
|
23193
|
+
value;
|
|
23194
|
+
isMultipleFollowUpEnabled = false;
|
|
23195
|
+
currentJurisdictionId;
|
|
23196
|
+
enableServiceSpecificMultiFollowups = [];
|
|
23197
|
+
caseSubscription;
|
|
23198
|
+
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23095
23199
|
super();
|
|
23096
23200
|
this.route = route;
|
|
23097
23201
|
this.sessionStorageService = sessionStorageService;
|
|
23098
23202
|
this.caseNotifier = caseNotifier;
|
|
23203
|
+
this.abstractConfig = abstractConfig;
|
|
23099
23204
|
}
|
|
23100
23205
|
ngOnInit() {
|
|
23101
23206
|
this.caseId = this.route.snapshot.params.cid;
|
|
23207
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23208
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
|
|
23209
|
+
if (caseDetails?.case_type?.jurisdiction?.id) {
|
|
23210
|
+
this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
|
|
23211
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
23212
|
+
}
|
|
23213
|
+
});
|
|
23102
23214
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23103
23215
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
23104
23216
|
// this.caseQueriesCollections = caseMessagesMockData;
|
|
@@ -23124,9 +23236,14 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23124
23236
|
// QueryManagementUtils.extractCaseQueriesFromCaseField();
|
|
23125
23237
|
}
|
|
23126
23238
|
}
|
|
23239
|
+
ngOnDestroy() {
|
|
23240
|
+
this.caseSubscription?.unsubscribe();
|
|
23241
|
+
}
|
|
23127
23242
|
setQuery(query) {
|
|
23128
23243
|
this.showQueryList = false;
|
|
23129
23244
|
this.query = query;
|
|
23245
|
+
this.messageType = this.getMessageType(query);
|
|
23246
|
+
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23130
23247
|
}
|
|
23131
23248
|
backToQueryListPage() {
|
|
23132
23249
|
this.showQueryList = true;
|
|
@@ -23135,19 +23252,24 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23135
23252
|
isInternalUser() {
|
|
23136
23253
|
return isInternalUser(this.sessionStorageService);
|
|
23137
23254
|
}
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23255
|
+
getMessageType(query) {
|
|
23256
|
+
return query?.children?.length
|
|
23257
|
+
? query.children[query.children.length - 1]?.messageType
|
|
23258
|
+
: undefined;
|
|
23259
|
+
}
|
|
23260
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23261
|
+
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) {
|
|
23262
|
+
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);
|
|
23141
23263
|
} if (rf & 2) {
|
|
23142
|
-
const
|
|
23143
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23264
|
+
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
23265
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
|
|
23144
23266
|
} }, encapsulation: 2 });
|
|
23145
23267
|
}
|
|
23146
23268
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23147
23269
|
type: Component,
|
|
23148
|
-
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
|
|
23149
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23150
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
23270
|
+
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" }]
|
|
23271
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
23272
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
|
|
23151
23273
|
|
|
23152
23274
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23153
23275
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|