@hmcts/ccd-case-ui-toolkit 7.2.19 → 7.2.20-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/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 +13 -2
- package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +74 -24
- package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +10 -3
- package/esm2022/lib/shared/utils.mjs +1 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +142 -34
- 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/models/case-queries-collection.model.d.ts +1 -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 +1 -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 +15 -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 {
|
|
@@ -20899,6 +20901,7 @@ class QueryListItem {
|
|
|
20899
20901
|
createdBy;
|
|
20900
20902
|
parentId;
|
|
20901
20903
|
isClosed;
|
|
20904
|
+
messageType;
|
|
20902
20905
|
children = [];
|
|
20903
20906
|
messageIndexInParent = null;
|
|
20904
20907
|
get lastSubmittedMessage() {
|
|
@@ -20963,11 +20966,20 @@ class QueryListItem {
|
|
|
20963
20966
|
if (item.isClosed === 'Yes') {
|
|
20964
20967
|
return true;
|
|
20965
20968
|
}
|
|
20966
|
-
return item.children?.some(child => isThreadClosed(child)) || false;
|
|
20969
|
+
return item.children?.some((child) => isThreadClosed(child)) || false;
|
|
20967
20970
|
};
|
|
20968
20971
|
if (isThreadClosed(this)) {
|
|
20969
20972
|
return QueryItemResponseStatus.CLOSED;
|
|
20970
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
|
+
}
|
|
20971
20983
|
if (this.messageIndexInParent !== null) {
|
|
20972
20984
|
return this.messageIndexInParent % 2 === 0
|
|
20973
20985
|
? QueryItemResponseStatus.RESPONDED
|
|
@@ -21059,13 +21071,18 @@ class QueryManagementUtils {
|
|
|
21059
21071
|
createdBy: currentUserId
|
|
21060
21072
|
};
|
|
21061
21073
|
}
|
|
21062
|
-
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
|
|
21074
|
+
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
|
|
21063
21075
|
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21064
21076
|
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21065
21077
|
const body = formGroup.get('body').value;
|
|
21066
21078
|
const attachments = formGroup.get('attachments').value;
|
|
21067
21079
|
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21068
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;
|
|
21069
21086
|
return {
|
|
21070
21087
|
id: v4(),
|
|
21071
21088
|
subject: queryItem.subject,
|
|
@@ -21077,7 +21094,8 @@ class QueryManagementUtils {
|
|
|
21077
21094
|
createdOn: new Date(),
|
|
21078
21095
|
createdBy: currentUserId,
|
|
21079
21096
|
parentId: queryItem.id,
|
|
21080
|
-
isClosed
|
|
21097
|
+
isClosed,
|
|
21098
|
+
messageType
|
|
21081
21099
|
};
|
|
21082
21100
|
}
|
|
21083
21101
|
static isObject(elem) {
|
|
@@ -21437,6 +21455,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21437
21455
|
queryItem;
|
|
21438
21456
|
queryCreateContext;
|
|
21439
21457
|
eventData = null;
|
|
21458
|
+
multipleFollowUpFeature;
|
|
21440
21459
|
backClicked = new EventEmitter();
|
|
21441
21460
|
querySubmitted = new EventEmitter();
|
|
21442
21461
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21609,7 +21628,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21609
21628
|
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21610
21629
|
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21611
21630
|
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21612
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
|
|
21631
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
|
|
21613
21632
|
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21614
21633
|
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21615
21634
|
// Check if the field ID has been set dynamically
|
|
@@ -21769,7 +21788,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21769
21788
|
return !!(error?.callbackErrors?.length);
|
|
21770
21789
|
}
|
|
21771
21790
|
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)); };
|
|
21772
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21791
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", multipleFollowUpFeature: "multipleFollowUpFeature" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21773
21792
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
|
|
21774
21793
|
} if (rf & 2) {
|
|
21775
21794
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21786,6 +21805,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21786
21805
|
type: Input
|
|
21787
21806
|
}], eventData: [{
|
|
21788
21807
|
type: Input
|
|
21808
|
+
}], multipleFollowUpFeature: [{
|
|
21809
|
+
type: Input
|
|
21789
21810
|
}], backClicked: [{
|
|
21790
21811
|
type: Output
|
|
21791
21812
|
}], querySubmitted: [{
|
|
@@ -22005,10 +22026,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
|
|
|
22005
22026
|
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);
|
|
22006
22027
|
i0.ɵɵelementContainerEnd();
|
|
22007
22028
|
} if (rf & 2) {
|
|
22029
|
+
const child_r3 = ctx.$implicit;
|
|
22008
22030
|
const i_r4 = ctx.index;
|
|
22009
22031
|
const followUpMessage_r5 = i0.ɵɵreference(3);
|
|
22032
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
22010
22033
|
i0.ɵɵadvance();
|
|
22011
|
-
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
22034
|
+
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0 && !(child_r3 == null ? null : child_r3.messageType) || child_r3 && (child_r3 == null ? null : child_r3.messageType) === ctx_r1.respondToQuery)("ngIfElse", followUpMessage_r5);
|
|
22012
22035
|
} }
|
|
22013
22036
|
function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
|
|
22014
22037
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22112,6 +22135,8 @@ class QueryDetailsComponent {
|
|
|
22112
22135
|
sessionStorageService;
|
|
22113
22136
|
route;
|
|
22114
22137
|
router;
|
|
22138
|
+
abstractConfig;
|
|
22139
|
+
caseNotifier;
|
|
22115
22140
|
query;
|
|
22116
22141
|
caseId;
|
|
22117
22142
|
queryResponseStatus;
|
|
@@ -22121,10 +22146,18 @@ class QueryDetailsComponent {
|
|
|
22121
22146
|
static QUERY_ITEM_RESPOND = '3';
|
|
22122
22147
|
static QUERY_ITEM_FOLLOW_UP = '4';
|
|
22123
22148
|
queryItemId;
|
|
22124
|
-
|
|
22149
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
22150
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
22151
|
+
enableServiceSpecificMultiFollowups;
|
|
22152
|
+
currentJurisdictionId;
|
|
22153
|
+
isMultipleFollowUpEnabled = false;
|
|
22154
|
+
caseSubscription;
|
|
22155
|
+
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22125
22156
|
this.sessionStorageService = sessionStorageService;
|
|
22126
22157
|
this.route = route;
|
|
22127
22158
|
this.router = router;
|
|
22159
|
+
this.abstractConfig = abstractConfig;
|
|
22160
|
+
this.caseNotifier = caseNotifier;
|
|
22128
22161
|
}
|
|
22129
22162
|
onBack() {
|
|
22130
22163
|
this.backClicked.emit(true);
|
|
@@ -22132,10 +22165,23 @@ class QueryDetailsComponent {
|
|
|
22132
22165
|
isInternalUser() {
|
|
22133
22166
|
return isInternalUser(this.sessionStorageService);
|
|
22134
22167
|
}
|
|
22168
|
+
ngOnInit() {
|
|
22169
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22170
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
|
|
22171
|
+
if (caseView?.case_type?.jurisdiction?.id) {
|
|
22172
|
+
this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
|
|
22173
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
22174
|
+
this.hasRespondedToQuery();
|
|
22175
|
+
}
|
|
22176
|
+
});
|
|
22177
|
+
}
|
|
22135
22178
|
ngOnChanges() {
|
|
22136
22179
|
this.toggleLinkVisibility();
|
|
22137
22180
|
this.hasRespondedToQuery();
|
|
22138
22181
|
}
|
|
22182
|
+
ngOnDestroy() {
|
|
22183
|
+
this.caseSubscription?.unsubscribe();
|
|
22184
|
+
}
|
|
22139
22185
|
toggleLinkVisibility() {
|
|
22140
22186
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
22141
22187
|
if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
|
|
@@ -22148,6 +22194,21 @@ class QueryDetailsComponent {
|
|
|
22148
22194
|
this.hasResponded.emit(true);
|
|
22149
22195
|
return true;
|
|
22150
22196
|
}
|
|
22197
|
+
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22198
|
+
const isFollowUp = lastChild?.messageType === this.followUpQuery;
|
|
22199
|
+
const isRespond = lastChild?.messageType === this.respondToQuery;
|
|
22200
|
+
if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
|
|
22201
|
+
this.hasResponded.emit(true);
|
|
22202
|
+
return true;
|
|
22203
|
+
}
|
|
22204
|
+
if (isFollowUp && this.isMultipleFollowUpEnabled) {
|
|
22205
|
+
this.hasResponded.emit(false);
|
|
22206
|
+
return false;
|
|
22207
|
+
}
|
|
22208
|
+
if (isRespond) {
|
|
22209
|
+
this.hasResponded.emit(false);
|
|
22210
|
+
return false;
|
|
22211
|
+
}
|
|
22151
22212
|
if (this.isInternalUser()) {
|
|
22152
22213
|
if (isAwaiting) {
|
|
22153
22214
|
this.hasResponded.emit(false);
|
|
@@ -22163,7 +22224,7 @@ class QueryDetailsComponent {
|
|
|
22163
22224
|
this.hasResponded.emit(false);
|
|
22164
22225
|
return false;
|
|
22165
22226
|
}
|
|
22166
|
-
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
22227
|
+
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier)); };
|
|
22167
22228
|
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) {
|
|
22168
22229
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22169
22230
|
} if (rf & 2) {
|
|
@@ -22172,8 +22233,8 @@ class QueryDetailsComponent {
|
|
|
22172
22233
|
}
|
|
22173
22234
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22174
22235
|
type: Component,
|
|
22175
|
-
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\n <br />\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"query.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n\n <tr *ngIf=\"isInternalUser()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <!-- <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div> -->\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm'}}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
|
|
22176
|
-
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
22236
|
+
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\n <br />\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"query.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"(i % 2 === 0 && !child?.messageType) || (child && child?.messageType === respondToQuery); else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n\n <tr *ngIf=\"isInternalUser()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <!-- <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div> -->\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm'}}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
|
|
22237
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
|
|
22177
22238
|
type: Input
|
|
22178
22239
|
}], caseId: [{
|
|
22179
22240
|
type: Input
|
|
@@ -22184,7 +22245,7 @@ class QueryDetailsComponent {
|
|
|
22184
22245
|
}], hasResponded: [{
|
|
22185
22246
|
type: Output
|
|
22186
22247
|
}] }); })();
|
|
22187
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
22248
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 17 }); })();
|
|
22188
22249
|
|
|
22189
22250
|
class QueryEventCompletionComponent {
|
|
22190
22251
|
eventCompletionParams;
|
|
@@ -23171,7 +23232,7 @@ class CloseQueryComponent {
|
|
|
23171
23232
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
23172
23233
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
23173
23234
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
23174
|
-
i0.ɵɵelementStart(0, "div",
|
|
23235
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
|
|
23175
23236
|
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)); });
|
|
23176
23237
|
i0.ɵɵelementEnd()();
|
|
23177
23238
|
} if (rf & 2) {
|
|
@@ -23181,7 +23242,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23181
23242
|
} }
|
|
23182
23243
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23183
23244
|
i0.ɵɵelementContainerStart(0);
|
|
23184
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23245
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
|
|
23185
23246
|
i0.ɵɵelementContainerEnd();
|
|
23186
23247
|
} if (rf & 2) {
|
|
23187
23248
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23190,7 +23251,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23190
23251
|
} }
|
|
23191
23252
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23192
23253
|
i0.ɵɵelementContainerStart(0);
|
|
23193
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23254
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
|
|
23194
23255
|
i0.ɵɵelementContainerEnd();
|
|
23195
23256
|
} if (rf & 2) {
|
|
23196
23257
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23199,7 +23260,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23199
23260
|
} }
|
|
23200
23261
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23201
23262
|
i0.ɵɵelementContainerStart(0);
|
|
23202
|
-
i0.ɵɵelementStart(1, "button",
|
|
23263
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23203
23264
|
i0.ɵɵtext(2);
|
|
23204
23265
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23205
23266
|
i0.ɵɵelementEnd();
|
|
@@ -23211,8 +23272,22 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23211
23272
|
i0.ɵɵadvance();
|
|
23212
23273
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23213
23274
|
} }
|
|
23214
|
-
function
|
|
23215
|
-
i0.ɵɵ
|
|
23275
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23276
|
+
i0.ɵɵelementContainerStart(0);
|
|
23277
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23278
|
+
i0.ɵɵtext(2);
|
|
23279
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23280
|
+
i0.ɵɵelementEnd();
|
|
23281
|
+
i0.ɵɵelementContainerEnd();
|
|
23282
|
+
} if (rf & 2) {
|
|
23283
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23284
|
+
i0.ɵɵadvance();
|
|
23285
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23286
|
+
i0.ɵɵadvance();
|
|
23287
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23288
|
+
} }
|
|
23289
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23290
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23216
23291
|
i0.ɵɵtext(2);
|
|
23217
23292
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23218
23293
|
i0.ɵɵelementEnd();
|
|
@@ -23226,25 +23301,32 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
23226
23301
|
i0.ɵɵadvance(3);
|
|
23227
23302
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23228
23303
|
} }
|
|
23304
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23305
|
+
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template, 4, 7, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template, 7, 6, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
|
|
23306
|
+
} if (rf & 2) {
|
|
23307
|
+
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23308
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23309
|
+
i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) > 0 && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) % 2 === 1)("ngIfElse", queryIsInReview_r5);
|
|
23310
|
+
} }
|
|
23229
23311
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23230
23312
|
i0.ɵɵelementContainerStart(0);
|
|
23231
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23313
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 3)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 3, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
23232
23314
|
i0.ɵɵelementContainerEnd();
|
|
23233
23315
|
} if (rf & 2) {
|
|
23234
|
-
const
|
|
23316
|
+
const sequentialQuery_r6 = i0.ɵɵreference(3);
|
|
23235
23317
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23236
23318
|
i0.ɵɵadvance();
|
|
23237
|
-
i0.ɵɵproperty("ngIf",
|
|
23319
|
+
i0.ɵɵproperty("ngIf", ctx_r1.messageType && ctx_r1.messageType === ctx_r1.followUpQuery && ctx_r1.isMultipleFollowUpEnabled || ctx_r1.messageType && ctx_r1.messageType === ctx_r1.respondToQuery)("ngIfElse", sequentialQuery_r6);
|
|
23238
23320
|
} }
|
|
23239
23321
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
23240
23322
|
i0.ɵɵelementContainerStart(0);
|
|
23241
|
-
i0.ɵɵelementStart(1, "div",
|
|
23323
|
+
i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
|
|
23242
23324
|
i0.ɵɵtext(3, "!");
|
|
23243
23325
|
i0.ɵɵelementEnd();
|
|
23244
|
-
i0.ɵɵelementStart(4, "strong",
|
|
23326
|
+
i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
|
|
23245
23327
|
i0.ɵɵtext(6, "Warning");
|
|
23246
23328
|
i0.ɵɵelementEnd();
|
|
23247
|
-
i0.ɵɵelementStart(7, "p",
|
|
23329
|
+
i0.ɵɵelementStart(7, "p", 16);
|
|
23248
23330
|
i0.ɵɵtext(8);
|
|
23249
23331
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23250
23332
|
i0.ɵɵelementEnd()()();
|
|
@@ -23255,10 +23337,10 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
|
|
|
23255
23337
|
} }
|
|
23256
23338
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23257
23339
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23258
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23340
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 8);
|
|
23259
23341
|
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); });
|
|
23260
23342
|
i0.ɵɵelementEnd();
|
|
23261
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23343
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 9)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template, 10, 3, "ng-container", 9);
|
|
23262
23344
|
} if (rf & 2) {
|
|
23263
23345
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23264
23346
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
@@ -23271,19 +23353,36 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23271
23353
|
route;
|
|
23272
23354
|
sessionStorageService;
|
|
23273
23355
|
caseNotifier;
|
|
23356
|
+
abstractConfig;
|
|
23274
23357
|
caseQueriesCollections;
|
|
23275
23358
|
query;
|
|
23276
23359
|
showQueryList = true;
|
|
23277
23360
|
caseId;
|
|
23361
|
+
messageType;
|
|
23362
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23363
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
23278
23364
|
isQueryClosed = false;
|
|
23279
|
-
|
|
23365
|
+
value;
|
|
23366
|
+
isMultipleFollowUpEnabled = false;
|
|
23367
|
+
currentJurisdictionId;
|
|
23368
|
+
enableServiceSpecificMultiFollowups = [];
|
|
23369
|
+
caseSubscription;
|
|
23370
|
+
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23280
23371
|
super();
|
|
23281
23372
|
this.route = route;
|
|
23282
23373
|
this.sessionStorageService = sessionStorageService;
|
|
23283
23374
|
this.caseNotifier = caseNotifier;
|
|
23375
|
+
this.abstractConfig = abstractConfig;
|
|
23284
23376
|
}
|
|
23285
23377
|
ngOnInit() {
|
|
23286
23378
|
this.caseId = this.route.snapshot.params.cid;
|
|
23379
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23380
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
|
|
23381
|
+
if (caseDetails?.case_type?.jurisdiction?.id) {
|
|
23382
|
+
this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
|
|
23383
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
23384
|
+
}
|
|
23385
|
+
});
|
|
23287
23386
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23288
23387
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
23289
23388
|
// this.caseQueriesCollections = caseMessagesMockData;
|
|
@@ -23309,9 +23408,13 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23309
23408
|
// QueryManagementUtils.extractCaseQueriesFromCaseField();
|
|
23310
23409
|
}
|
|
23311
23410
|
}
|
|
23411
|
+
ngOnDestroy() {
|
|
23412
|
+
this.caseSubscription?.unsubscribe();
|
|
23413
|
+
}
|
|
23312
23414
|
setQuery(query) {
|
|
23313
23415
|
this.showQueryList = false;
|
|
23314
23416
|
this.query = query;
|
|
23417
|
+
this.messageType = this.getMessageType(query);
|
|
23315
23418
|
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23316
23419
|
}
|
|
23317
23420
|
backToQueryListPage() {
|
|
@@ -23321,19 +23424,24 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23321
23424
|
isInternalUser() {
|
|
23322
23425
|
return isInternalUser(this.sessionStorageService);
|
|
23323
23426
|
}
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23427
|
+
getMessageType(query) {
|
|
23428
|
+
return query?.children?.length
|
|
23429
|
+
? query.children[query.children.length - 1]?.messageType
|
|
23430
|
+
: undefined;
|
|
23431
|
+
}
|
|
23432
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23433
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23434
|
+
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
23327
23435
|
} if (rf & 2) {
|
|
23328
|
-
const
|
|
23329
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23436
|
+
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
23437
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
|
|
23330
23438
|
} }, encapsulation: 2 });
|
|
23331
23439
|
}
|
|
23332
23440
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23333
23441
|
type: Component,
|
|
23334
|
-
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n
|
|
23335
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23336
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
23442
|
+
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) || (messageType && messageType === respondToQuery); else sequentialQuery\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n <ng-template #sequentialQuery>\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n\n </ng-container>\n <ng-container *ngIf=\"!isInternalUser() && isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by court staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
|
|
23443
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
23444
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
|
|
23337
23445
|
|
|
23338
23446
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23339
23447
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|