@hmcts/ccd-case-ui-toolkit 7.2.25 → 7.2.26-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 +2 -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 +55 -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 +77 -24
- package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +12 -4
- package/esm2022/lib/shared/utils.mjs +1 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +149 -35
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/app.config.d.ts +2 -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,7 @@ class CaseEditorConfig {
|
|
|
1326
1326
|
icp_enabled;
|
|
1327
1327
|
icp_jurisdictions;
|
|
1328
1328
|
events_to_hide;
|
|
1329
|
+
enable_service_specific_multi_followups;
|
|
1329
1330
|
}
|
|
1330
1331
|
|
|
1331
1332
|
class HttpError {
|
|
@@ -20904,6 +20905,7 @@ class QueryListItem {
|
|
|
20904
20905
|
createdBy;
|
|
20905
20906
|
parentId;
|
|
20906
20907
|
isClosed;
|
|
20908
|
+
messageType;
|
|
20907
20909
|
children = [];
|
|
20908
20910
|
messageIndexInParent = null;
|
|
20909
20911
|
get lastSubmittedMessage() {
|
|
@@ -20961,11 +20963,20 @@ class QueryListItem {
|
|
|
20961
20963
|
if (item.isClosed === 'Yes') {
|
|
20962
20964
|
return true;
|
|
20963
20965
|
}
|
|
20964
|
-
return item.children?.some(child => isThreadClosed(child)) || false;
|
|
20966
|
+
return item.children?.some((child) => isThreadClosed(child)) || false;
|
|
20965
20967
|
};
|
|
20966
20968
|
if (isThreadClosed(this)) {
|
|
20967
20969
|
return QueryItemResponseStatus.CLOSED;
|
|
20968
20970
|
}
|
|
20971
|
+
const lastMessageType = this.children?.length
|
|
20972
|
+
? this.children[this.children.length - 1]?.messageType
|
|
20973
|
+
: undefined;
|
|
20974
|
+
if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
|
|
20975
|
+
return QueryItemResponseStatus.RESPONDED;
|
|
20976
|
+
}
|
|
20977
|
+
else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
|
|
20978
|
+
return QueryItemResponseStatus.AWAITING;
|
|
20979
|
+
}
|
|
20969
20980
|
if (this.messageIndexInParent !== null) {
|
|
20970
20981
|
return this.messageIndexInParent % 2 === 0
|
|
20971
20982
|
? QueryItemResponseStatus.RESPONDED
|
|
@@ -21054,16 +21065,22 @@ class QueryManagementUtils {
|
|
|
21054
21065
|
isHearingRelated,
|
|
21055
21066
|
hearingDate,
|
|
21056
21067
|
createdOn: new Date(),
|
|
21057
|
-
createdBy: currentUserId
|
|
21068
|
+
createdBy: currentUserId,
|
|
21069
|
+
messageType: QueryCreateContext.FOLLOWUP // Default to value new queries will be FOLLOWUP
|
|
21058
21070
|
};
|
|
21059
21071
|
}
|
|
21060
|
-
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
|
|
21072
|
+
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
|
|
21061
21073
|
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21062
21074
|
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21063
21075
|
const body = formGroup.get('body').value;
|
|
21064
21076
|
const attachments = formGroup.get('attachments').value;
|
|
21065
21077
|
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21066
21078
|
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
21079
|
+
const messageType = messageTypeParam === QueryCreateContext.RESPOND
|
|
21080
|
+
? QueryCreateContext.RESPOND
|
|
21081
|
+
: messageTypeParam === QueryCreateContext.FOLLOWUP
|
|
21082
|
+
? QueryCreateContext.FOLLOWUP
|
|
21083
|
+
: undefined;
|
|
21067
21084
|
return {
|
|
21068
21085
|
id: v4(),
|
|
21069
21086
|
subject: queryItem.subject,
|
|
@@ -21075,7 +21092,8 @@ class QueryManagementUtils {
|
|
|
21075
21092
|
createdOn: new Date(),
|
|
21076
21093
|
createdBy: currentUserId,
|
|
21077
21094
|
parentId: queryItem.id,
|
|
21078
|
-
isClosed
|
|
21095
|
+
isClosed,
|
|
21096
|
+
messageType
|
|
21079
21097
|
};
|
|
21080
21098
|
}
|
|
21081
21099
|
static isObject(elem) {
|
|
@@ -21434,6 +21452,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21434
21452
|
queryItem;
|
|
21435
21453
|
queryCreateContext;
|
|
21436
21454
|
eventData = null;
|
|
21455
|
+
multipleFollowUpFeature;
|
|
21437
21456
|
backClicked = new EventEmitter();
|
|
21438
21457
|
querySubmitted = new EventEmitter();
|
|
21439
21458
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21606,7 +21625,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21606
21625
|
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21607
21626
|
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21608
21627
|
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21609
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
|
|
21628
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
|
|
21610
21629
|
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21611
21630
|
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21612
21631
|
// Check if the field ID has been set dynamically
|
|
@@ -21766,7 +21785,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21766
21785
|
return !!(error?.callbackErrors?.length);
|
|
21767
21786
|
}
|
|
21768
21787
|
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)); };
|
|
21769
|
-
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) {
|
|
21788
|
+
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) {
|
|
21770
21789
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
|
|
21771
21790
|
} if (rf & 2) {
|
|
21772
21791
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21783,6 +21802,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21783
21802
|
type: Input
|
|
21784
21803
|
}], eventData: [{
|
|
21785
21804
|
type: Input
|
|
21805
|
+
}], multipleFollowUpFeature: [{
|
|
21806
|
+
type: Input
|
|
21786
21807
|
}], backClicked: [{
|
|
21787
21808
|
type: Output
|
|
21788
21809
|
}], querySubmitted: [{
|
|
@@ -22002,10 +22023,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
|
|
|
22002
22023
|
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);
|
|
22003
22024
|
i0.ɵɵelementContainerEnd();
|
|
22004
22025
|
} if (rf & 2) {
|
|
22026
|
+
const child_r3 = ctx.$implicit;
|
|
22005
22027
|
const i_r4 = ctx.index;
|
|
22006
22028
|
const followUpMessage_r5 = i0.ɵɵreference(3);
|
|
22029
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
22007
22030
|
i0.ɵɵadvance();
|
|
22008
|
-
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
22031
|
+
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);
|
|
22009
22032
|
} }
|
|
22010
22033
|
function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
|
|
22011
22034
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22109,6 +22132,8 @@ class QueryDetailsComponent {
|
|
|
22109
22132
|
sessionStorageService;
|
|
22110
22133
|
route;
|
|
22111
22134
|
router;
|
|
22135
|
+
abstractConfig;
|
|
22136
|
+
caseNotifier;
|
|
22112
22137
|
query;
|
|
22113
22138
|
caseId;
|
|
22114
22139
|
queryResponseStatus;
|
|
@@ -22118,10 +22143,18 @@ class QueryDetailsComponent {
|
|
|
22118
22143
|
static QUERY_ITEM_RESPOND = '3';
|
|
22119
22144
|
static QUERY_ITEM_FOLLOW_UP = '4';
|
|
22120
22145
|
queryItemId;
|
|
22121
|
-
|
|
22146
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
22147
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
22148
|
+
enableServiceSpecificMultiFollowups;
|
|
22149
|
+
currentJurisdictionId;
|
|
22150
|
+
isMultipleFollowUpEnabled = false;
|
|
22151
|
+
caseSubscription;
|
|
22152
|
+
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22122
22153
|
this.sessionStorageService = sessionStorageService;
|
|
22123
22154
|
this.route = route;
|
|
22124
22155
|
this.router = router;
|
|
22156
|
+
this.abstractConfig = abstractConfig;
|
|
22157
|
+
this.caseNotifier = caseNotifier;
|
|
22125
22158
|
}
|
|
22126
22159
|
onBack() {
|
|
22127
22160
|
this.backClicked.emit(true);
|
|
@@ -22129,10 +22162,23 @@ class QueryDetailsComponent {
|
|
|
22129
22162
|
isInternalUser() {
|
|
22130
22163
|
return isInternalUser(this.sessionStorageService);
|
|
22131
22164
|
}
|
|
22165
|
+
ngOnInit() {
|
|
22166
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22167
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
|
|
22168
|
+
if (caseView?.case_type?.jurisdiction?.id) {
|
|
22169
|
+
this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
|
|
22170
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
22171
|
+
this.hasRespondedToQuery();
|
|
22172
|
+
}
|
|
22173
|
+
});
|
|
22174
|
+
}
|
|
22132
22175
|
ngOnChanges() {
|
|
22133
22176
|
this.toggleLinkVisibility();
|
|
22134
22177
|
this.hasRespondedToQuery();
|
|
22135
22178
|
}
|
|
22179
|
+
ngOnDestroy() {
|
|
22180
|
+
this.caseSubscription?.unsubscribe();
|
|
22181
|
+
}
|
|
22136
22182
|
toggleLinkVisibility() {
|
|
22137
22183
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
22138
22184
|
if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
|
|
@@ -22145,6 +22191,24 @@ class QueryDetailsComponent {
|
|
|
22145
22191
|
this.hasResponded.emit(true);
|
|
22146
22192
|
return true;
|
|
22147
22193
|
}
|
|
22194
|
+
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22195
|
+
const lastMessageType = this.query?.children?.length
|
|
22196
|
+
? this.query.children[this.query.children.length - 1]?.messageType
|
|
22197
|
+
: this.query?.messageType;
|
|
22198
|
+
const isFollowUp = lastMessageType === 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
|
+
}
|
|
22148
22212
|
if (this.isInternalUser()) {
|
|
22149
22213
|
if (isAwaiting) {
|
|
22150
22214
|
this.hasResponded.emit(false);
|
|
@@ -22160,7 +22224,7 @@ class QueryDetailsComponent {
|
|
|
22160
22224
|
this.hasResponded.emit(false);
|
|
22161
22225
|
return false;
|
|
22162
22226
|
}
|
|
22163
|
-
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)); };
|
|
22164
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) {
|
|
22165
22229
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22166
22230
|
} if (rf & 2) {
|
|
@@ -22169,8 +22233,8 @@ class QueryDetailsComponent {
|
|
|
22169
22233
|
}
|
|
22170
22234
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22171
22235
|
type: Component,
|
|
22172
|
-
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"] }]
|
|
22173
|
-
}], () => [{ 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: [{
|
|
22174
22238
|
type: Input
|
|
22175
22239
|
}], caseId: [{
|
|
22176
22240
|
type: Input
|
|
@@ -22181,7 +22245,7 @@ class QueryDetailsComponent {
|
|
|
22181
22245
|
}], hasResponded: [{
|
|
22182
22246
|
type: Output
|
|
22183
22247
|
}] }); })();
|
|
22184
|
-
(() => { (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 }); })();
|
|
22185
22249
|
|
|
22186
22250
|
class QueryEventCompletionComponent {
|
|
22187
22251
|
eventCompletionParams;
|
|
@@ -23180,7 +23244,7 @@ class CloseQueryComponent {
|
|
|
23180
23244
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
23181
23245
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
23182
23246
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
23183
|
-
i0.ɵɵelementStart(0, "div",
|
|
23247
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
|
|
23184
23248
|
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)); });
|
|
23185
23249
|
i0.ɵɵelementEnd()();
|
|
23186
23250
|
} if (rf & 2) {
|
|
@@ -23190,7 +23254,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23190
23254
|
} }
|
|
23191
23255
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23192
23256
|
i0.ɵɵelementContainerStart(0);
|
|
23193
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23257
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
|
|
23194
23258
|
i0.ɵɵelementContainerEnd();
|
|
23195
23259
|
} if (rf & 2) {
|
|
23196
23260
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23199,7 +23263,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23199
23263
|
} }
|
|
23200
23264
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23201
23265
|
i0.ɵɵelementContainerStart(0);
|
|
23202
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23266
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
|
|
23203
23267
|
i0.ɵɵelementContainerEnd();
|
|
23204
23268
|
} if (rf & 2) {
|
|
23205
23269
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23208,7 +23272,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23208
23272
|
} }
|
|
23209
23273
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23210
23274
|
i0.ɵɵelementContainerStart(0);
|
|
23211
|
-
i0.ɵɵelementStart(1, "button",
|
|
23275
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23212
23276
|
i0.ɵɵtext(2);
|
|
23213
23277
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23214
23278
|
i0.ɵɵelementEnd();
|
|
@@ -23220,8 +23284,22 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23220
23284
|
i0.ɵɵadvance();
|
|
23221
23285
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23222
23286
|
} }
|
|
23223
|
-
function
|
|
23224
|
-
i0.ɵɵ
|
|
23287
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23288
|
+
i0.ɵɵelementContainerStart(0);
|
|
23289
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23290
|
+
i0.ɵɵtext(2);
|
|
23291
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23292
|
+
i0.ɵɵelementEnd();
|
|
23293
|
+
i0.ɵɵelementContainerEnd();
|
|
23294
|
+
} if (rf & 2) {
|
|
23295
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23296
|
+
i0.ɵɵadvance();
|
|
23297
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23298
|
+
i0.ɵɵadvance();
|
|
23299
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23300
|
+
} }
|
|
23301
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23302
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23225
23303
|
i0.ɵɵtext(2);
|
|
23226
23304
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23227
23305
|
i0.ɵɵelementEnd();
|
|
@@ -23235,25 +23313,32 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
23235
23313
|
i0.ɵɵadvance(3);
|
|
23236
23314
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23237
23315
|
} }
|
|
23316
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23317
|
+
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);
|
|
23318
|
+
} if (rf & 2) {
|
|
23319
|
+
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23320
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23321
|
+
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);
|
|
23322
|
+
} }
|
|
23238
23323
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23239
23324
|
i0.ɵɵelementContainerStart(0);
|
|
23240
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23325
|
+
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);
|
|
23241
23326
|
i0.ɵɵelementContainerEnd();
|
|
23242
23327
|
} if (rf & 2) {
|
|
23243
|
-
const
|
|
23328
|
+
const sequentialQuery_r6 = i0.ɵɵreference(3);
|
|
23244
23329
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23245
23330
|
i0.ɵɵadvance();
|
|
23246
|
-
i0.ɵɵproperty("ngIf",
|
|
23331
|
+
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);
|
|
23247
23332
|
} }
|
|
23248
23333
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
23249
23334
|
i0.ɵɵelementContainerStart(0);
|
|
23250
|
-
i0.ɵɵelementStart(1, "div",
|
|
23335
|
+
i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
|
|
23251
23336
|
i0.ɵɵtext(3, "!");
|
|
23252
23337
|
i0.ɵɵelementEnd();
|
|
23253
|
-
i0.ɵɵelementStart(4, "strong",
|
|
23338
|
+
i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
|
|
23254
23339
|
i0.ɵɵtext(6, "Warning");
|
|
23255
23340
|
i0.ɵɵelementEnd();
|
|
23256
|
-
i0.ɵɵelementStart(7, "p",
|
|
23341
|
+
i0.ɵɵelementStart(7, "p", 16);
|
|
23257
23342
|
i0.ɵɵtext(8);
|
|
23258
23343
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23259
23344
|
i0.ɵɵelementEnd()()();
|
|
@@ -23264,10 +23349,10 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
|
|
|
23264
23349
|
} }
|
|
23265
23350
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23266
23351
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23267
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23352
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 8);
|
|
23268
23353
|
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); });
|
|
23269
23354
|
i0.ɵɵelementEnd();
|
|
23270
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23355
|
+
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);
|
|
23271
23356
|
} if (rf & 2) {
|
|
23272
23357
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23273
23358
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
@@ -23280,19 +23365,36 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23280
23365
|
route;
|
|
23281
23366
|
sessionStorageService;
|
|
23282
23367
|
caseNotifier;
|
|
23368
|
+
abstractConfig;
|
|
23283
23369
|
caseQueriesCollections;
|
|
23284
23370
|
query;
|
|
23285
23371
|
showQueryList = true;
|
|
23286
23372
|
caseId;
|
|
23373
|
+
messageType;
|
|
23374
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23375
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
23287
23376
|
isQueryClosed = false;
|
|
23288
|
-
|
|
23377
|
+
value;
|
|
23378
|
+
isMultipleFollowUpEnabled = false;
|
|
23379
|
+
currentJurisdictionId;
|
|
23380
|
+
enableServiceSpecificMultiFollowups = [];
|
|
23381
|
+
caseSubscription;
|
|
23382
|
+
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23289
23383
|
super();
|
|
23290
23384
|
this.route = route;
|
|
23291
23385
|
this.sessionStorageService = sessionStorageService;
|
|
23292
23386
|
this.caseNotifier = caseNotifier;
|
|
23387
|
+
this.abstractConfig = abstractConfig;
|
|
23293
23388
|
}
|
|
23294
23389
|
ngOnInit() {
|
|
23295
23390
|
this.caseId = this.route.snapshot.params.cid;
|
|
23391
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23392
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
|
|
23393
|
+
if (caseDetails?.case_type?.jurisdiction?.id) {
|
|
23394
|
+
this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
|
|
23395
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
23396
|
+
}
|
|
23397
|
+
});
|
|
23296
23398
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23297
23399
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
23298
23400
|
// this.caseQueriesCollections = caseMessagesMockData;
|
|
@@ -23318,9 +23420,13 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23318
23420
|
// QueryManagementUtils.extractCaseQueriesFromCaseField();
|
|
23319
23421
|
}
|
|
23320
23422
|
}
|
|
23423
|
+
ngOnDestroy() {
|
|
23424
|
+
this.caseSubscription?.unsubscribe();
|
|
23425
|
+
}
|
|
23321
23426
|
setQuery(query) {
|
|
23322
23427
|
this.showQueryList = false;
|
|
23323
23428
|
this.query = query;
|
|
23429
|
+
this.messageType = this.getMessageType(query);
|
|
23324
23430
|
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23325
23431
|
}
|
|
23326
23432
|
backToQueryListPage() {
|
|
@@ -23330,19 +23436,27 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23330
23436
|
isInternalUser() {
|
|
23331
23437
|
return isInternalUser(this.sessionStorageService);
|
|
23332
23438
|
}
|
|
23333
|
-
|
|
23334
|
-
|
|
23335
|
-
|
|
23439
|
+
getMessageType(query) {
|
|
23440
|
+
if (!query) {
|
|
23441
|
+
return undefined;
|
|
23442
|
+
}
|
|
23443
|
+
return query.children?.length
|
|
23444
|
+
? query.children[query.children.length - 1]?.messageType
|
|
23445
|
+
: query?.messageType;
|
|
23446
|
+
}
|
|
23447
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23448
|
+
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) {
|
|
23449
|
+
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);
|
|
23336
23450
|
} if (rf & 2) {
|
|
23337
|
-
const
|
|
23338
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23451
|
+
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
23452
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
|
|
23339
23453
|
} }, encapsulation: 2 });
|
|
23340
23454
|
}
|
|
23341
23455
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23342
23456
|
type: Component,
|
|
23343
|
-
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
|
|
23344
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23345
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
23457
|
+
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" }]
|
|
23458
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
23459
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
|
|
23346
23460
|
|
|
23347
23461
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23348
23462
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|