@hmcts/ccd-case-ui-toolkit 7.2.23-mid-event-callback → 7.2.23-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/palette.module.mjs +2 -7
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +195 -50
- 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/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +6 -59
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.mjs +6 -39
- 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 +82 -38
- package/esm2022/lib/shared/components/palette/query-management/services/index.mjs +1 -2
- 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 +565 -573
- 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/palette.module.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +14 -15
- 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/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts +3 -24
- package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts +3 -12
- package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.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/services/index.d.ts +0 -1
- package/lib/shared/components/palette/query-management/services/index.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
- package/esm2022/lib/shared/components/palette/query-management/constants/query-management.constants.mjs +0 -7
- package/esm2022/lib/shared/components/palette/query-management/services/query-management.service.mjs +0 -179
- package/lib/shared/components/palette/query-management/constants/query-management.constants.d.ts +0 -7
- package/lib/shared/components/palette/query-management/constants/query-management.constants.d.ts.map +0 -1
- package/lib/shared/components/palette/query-management/services/query-management.service.d.ts +0 -21
- package/lib/shared/components/palette/query-management/services/query-management.service.d.ts.map +0 -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 {
|
|
@@ -20637,401 +20639,6 @@ class QualifyingQuestionService {
|
|
|
20637
20639
|
type: Injectable
|
|
20638
20640
|
}], null, null); })();
|
|
20639
20641
|
|
|
20640
|
-
var QueryCreateContext;
|
|
20641
|
-
(function (QueryCreateContext) {
|
|
20642
|
-
QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_OPTIONS"] = "NewQueryQualifyingQuestionOptions";
|
|
20643
|
-
QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_DETAIL"] = "NewQueryQualifyingQuestionDetail";
|
|
20644
|
-
QueryCreateContext["NEW_QUERY"] = "NewQuery";
|
|
20645
|
-
QueryCreateContext["RESPOND"] = "Respond";
|
|
20646
|
-
QueryCreateContext["FOLLOWUP"] = "Followup";
|
|
20647
|
-
})(QueryCreateContext || (QueryCreateContext = {}));
|
|
20648
|
-
|
|
20649
|
-
class QueryListItem {
|
|
20650
|
-
id;
|
|
20651
|
-
subject;
|
|
20652
|
-
name;
|
|
20653
|
-
body;
|
|
20654
|
-
attachments = [];
|
|
20655
|
-
isHearingRelated;
|
|
20656
|
-
hearingDate;
|
|
20657
|
-
createdOn;
|
|
20658
|
-
createdBy;
|
|
20659
|
-
parentId;
|
|
20660
|
-
isClosed;
|
|
20661
|
-
children = [];
|
|
20662
|
-
messageIndexInParent = null;
|
|
20663
|
-
get lastSubmittedMessage() {
|
|
20664
|
-
const getLastSubmittedMessage = (item) => {
|
|
20665
|
-
let lastSubmittedMessage = item;
|
|
20666
|
-
if (item.children && item.children.length > 1) {
|
|
20667
|
-
for (const child of item.children) {
|
|
20668
|
-
const childLastSubmittedMessage = getLastSubmittedMessage(child);
|
|
20669
|
-
if (childLastSubmittedMessage.createdOn > lastSubmittedMessage.createdOn) {
|
|
20670
|
-
lastSubmittedMessage = childLastSubmittedMessage;
|
|
20671
|
-
}
|
|
20672
|
-
}
|
|
20673
|
-
}
|
|
20674
|
-
return lastSubmittedMessage;
|
|
20675
|
-
};
|
|
20676
|
-
return getLastSubmittedMessage(this);
|
|
20677
|
-
}
|
|
20678
|
-
get lastSubmittedBy() {
|
|
20679
|
-
const childrenCount = this.children.length;
|
|
20680
|
-
if (childrenCount === 0) {
|
|
20681
|
-
return this.lastSubmittedMessage.name;
|
|
20682
|
-
}
|
|
20683
|
-
let index;
|
|
20684
|
-
if (childrenCount === 1) {
|
|
20685
|
-
index = 0;
|
|
20686
|
-
}
|
|
20687
|
-
else {
|
|
20688
|
-
index = childrenCount % 2 === 1 ? childrenCount - 1 : childrenCount - 2;
|
|
20689
|
-
}
|
|
20690
|
-
return this.children[index].name;
|
|
20691
|
-
}
|
|
20692
|
-
get lastSubmittedDate() {
|
|
20693
|
-
const childrenCount = this.children.length;
|
|
20694
|
-
if (childrenCount <= 1) {
|
|
20695
|
-
return new Date(this.lastSubmittedMessage.createdOn);
|
|
20696
|
-
}
|
|
20697
|
-
let index;
|
|
20698
|
-
if (childrenCount > 1) {
|
|
20699
|
-
index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
|
|
20700
|
-
}
|
|
20701
|
-
return new Date(this.children[index].createdOn);
|
|
20702
|
-
}
|
|
20703
|
-
get lastResponseBy() {
|
|
20704
|
-
return this.children?.length > 0 ? this.lastSubmittedMessage.name : '';
|
|
20705
|
-
}
|
|
20706
|
-
get lastResponseDate() {
|
|
20707
|
-
const childrenCount = this.children.length;
|
|
20708
|
-
if (childrenCount === 0) {
|
|
20709
|
-
return null;
|
|
20710
|
-
}
|
|
20711
|
-
let index;
|
|
20712
|
-
if (childrenCount === 1) {
|
|
20713
|
-
index = 0;
|
|
20714
|
-
}
|
|
20715
|
-
else {
|
|
20716
|
-
index = childrenCount % 2 === 1 ? childrenCount - 1 : childrenCount - 2;
|
|
20717
|
-
}
|
|
20718
|
-
return new Date(this.children[index].createdOn);
|
|
20719
|
-
}
|
|
20720
|
-
get responseStatus() {
|
|
20721
|
-
const isThreadClosed = (item) => {
|
|
20722
|
-
if (item.isClosed === 'Yes') {
|
|
20723
|
-
return true;
|
|
20724
|
-
}
|
|
20725
|
-
return item.children?.some(child => isThreadClosed(child)) || false;
|
|
20726
|
-
};
|
|
20727
|
-
if (isThreadClosed(this)) {
|
|
20728
|
-
return QueryItemResponseStatus.CLOSED;
|
|
20729
|
-
}
|
|
20730
|
-
if (this.messageIndexInParent !== null) {
|
|
20731
|
-
return this.messageIndexInParent % 2 === 0
|
|
20732
|
-
? QueryItemResponseStatus.RESPONDED
|
|
20733
|
-
: QueryItemResponseStatus.AWAITING;
|
|
20734
|
-
}
|
|
20735
|
-
// Parent logic (children count)
|
|
20736
|
-
if (this.children && this.children.length > 0) {
|
|
20737
|
-
return this.children.length % 2 === 1
|
|
20738
|
-
? QueryItemResponseStatus.RESPONDED
|
|
20739
|
-
: QueryItemResponseStatus.AWAITING;
|
|
20740
|
-
}
|
|
20741
|
-
// No children — still awaiting
|
|
20742
|
-
return QueryItemResponseStatus.AWAITING;
|
|
20743
|
-
}
|
|
20744
|
-
}
|
|
20745
|
-
|
|
20746
|
-
class QueryListData {
|
|
20747
|
-
partyName;
|
|
20748
|
-
roleOnCase;
|
|
20749
|
-
queries;
|
|
20750
|
-
constructor(caseQueriesCollection) {
|
|
20751
|
-
this.partyName = caseQueriesCollection.partyName;
|
|
20752
|
-
this.roleOnCase = caseQueriesCollection.roleOnCase;
|
|
20753
|
-
// get the parent messages (messages without parentId) and add the children to them
|
|
20754
|
-
const parentMessages = caseQueriesCollection.caseMessages.filter((message) => !message.value.parentId);
|
|
20755
|
-
this.queries = parentMessages.map((message) => this.buildQueryListItem(message, caseQueriesCollection.caseMessages));
|
|
20756
|
-
}
|
|
20757
|
-
buildQueryListItem(message, allMessages) {
|
|
20758
|
-
const childrenMessages = allMessages.filter((childMessage) => childMessage.value.parentId === message.value.id);
|
|
20759
|
-
const children = childrenMessages.map((childMessage, index) => {
|
|
20760
|
-
const childItem = this.buildQueryListItem(childMessage, allMessages);
|
|
20761
|
-
childItem.messageIndexInParent = index; // Assign index for status logic
|
|
20762
|
-
return childItem;
|
|
20763
|
-
});
|
|
20764
|
-
const queryListItem = new QueryListItem();
|
|
20765
|
-
Object.assign(queryListItem, {
|
|
20766
|
-
...message.value,
|
|
20767
|
-
children
|
|
20768
|
-
});
|
|
20769
|
-
return queryListItem;
|
|
20770
|
-
}
|
|
20771
|
-
}
|
|
20772
|
-
|
|
20773
|
-
class QueryManagementUtils {
|
|
20774
|
-
static caseLevelCaseFieldId = 'CaseQueriesCollection';
|
|
20775
|
-
static FIELD_TYPE_COLLECTION = 'Collection';
|
|
20776
|
-
static FIELD_TYPE_COMPLEX = 'Complex';
|
|
20777
|
-
static DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
20778
|
-
static extractCaseQueriesFromCaseField(caseField) {
|
|
20779
|
-
const { field_type, value, display_context } = caseField;
|
|
20780
|
-
// Handle Complex type fields
|
|
20781
|
-
if (field_type.type === QueryManagementUtils.FIELD_TYPE_COMPLEX) {
|
|
20782
|
-
if (field_type.id === QueryManagementUtils.caseLevelCaseFieldId && display_context !== QueryManagementUtils.DISPLAY_CONTEXT_READONLY && QueryManagementUtils.isNonEmptyObject(value)) {
|
|
20783
|
-
return value;
|
|
20784
|
-
}
|
|
20785
|
-
return null;
|
|
20786
|
-
}
|
|
20787
|
-
}
|
|
20788
|
-
static documentToCollectionFormDocument(document) {
|
|
20789
|
-
return {
|
|
20790
|
-
id: null,
|
|
20791
|
-
value: {
|
|
20792
|
-
document_filename: document?.originalDocumentName,
|
|
20793
|
-
document_url: document?._links?.self?.href,
|
|
20794
|
-
document_binary_url: document?._links?.binary?.href
|
|
20795
|
-
}
|
|
20796
|
-
};
|
|
20797
|
-
}
|
|
20798
|
-
static getNewQueryData(formGroup, currentUserDetails) {
|
|
20799
|
-
const attachments = formGroup.get('attachments').value;
|
|
20800
|
-
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
20801
|
-
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
20802
|
-
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
20803
|
-
const subject = formGroup.get('subject').value;
|
|
20804
|
-
const body = formGroup.get('body').value;
|
|
20805
|
-
const isHearingRelated = formGroup.get('isHearingRelated').value ? 'Yes' : 'No';
|
|
20806
|
-
const hearingDate = (isHearingRelated === 'Yes')
|
|
20807
|
-
? this.formattedDate(formGroup.get('hearingDate').value)
|
|
20808
|
-
: null;
|
|
20809
|
-
return {
|
|
20810
|
-
id: v4(),
|
|
20811
|
-
subject,
|
|
20812
|
-
name: currentUserName,
|
|
20813
|
-
body,
|
|
20814
|
-
attachments: formDocument,
|
|
20815
|
-
isHearingRelated,
|
|
20816
|
-
hearingDate,
|
|
20817
|
-
createdOn: new Date(),
|
|
20818
|
-
createdBy: currentUserId
|
|
20819
|
-
};
|
|
20820
|
-
}
|
|
20821
|
-
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
|
|
20822
|
-
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
20823
|
-
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
20824
|
-
const body = formGroup.get('body').value;
|
|
20825
|
-
const attachments = formGroup.get('attachments').value;
|
|
20826
|
-
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
20827
|
-
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
20828
|
-
return {
|
|
20829
|
-
id: v4(),
|
|
20830
|
-
subject: queryItem.subject,
|
|
20831
|
-
name: currentUserName,
|
|
20832
|
-
body,
|
|
20833
|
-
attachments: formDocument,
|
|
20834
|
-
isHearingRelated: queryItem.isHearingRelated,
|
|
20835
|
-
hearingDate: queryItem.hearingDate,
|
|
20836
|
-
createdOn: new Date(),
|
|
20837
|
-
createdBy: currentUserId,
|
|
20838
|
-
parentId: queryItem.id,
|
|
20839
|
-
isClosed
|
|
20840
|
-
};
|
|
20841
|
-
}
|
|
20842
|
-
static isObject(elem) {
|
|
20843
|
-
return typeof elem === 'object' && elem !== null;
|
|
20844
|
-
}
|
|
20845
|
-
static isNonEmptyObject(elem) {
|
|
20846
|
-
return this.isObject(elem) && Object.keys(elem).length !== 0;
|
|
20847
|
-
}
|
|
20848
|
-
static formattedDate(date) {
|
|
20849
|
-
const formattedDate = moment(date).format('YYYY-MM-DD');
|
|
20850
|
-
return formattedDate;
|
|
20851
|
-
}
|
|
20852
|
-
static ɵfac = function QueryManagementUtils_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementUtils)(); };
|
|
20853
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
|
|
20854
|
-
}
|
|
20855
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementUtils, [{
|
|
20856
|
-
type: Injectable
|
|
20857
|
-
}], null, null); })();
|
|
20858
|
-
|
|
20859
|
-
const CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
|
|
20860
|
-
const FIELD_TYPE_COMPLEX = 'Complex';
|
|
20861
|
-
const DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
20862
|
-
const QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
|
|
20863
|
-
const QM_COLLECTION_PROMPT = 'promptQmCollection';
|
|
20864
|
-
const CIVIL_JURISDICTION = 'CIVIL';
|
|
20865
|
-
|
|
20866
|
-
class QueryManagementService {
|
|
20867
|
-
router;
|
|
20868
|
-
sessionStorageService;
|
|
20869
|
-
caseQueriesCollections;
|
|
20870
|
-
fieldId;
|
|
20871
|
-
constructor(router, sessionStorageService) {
|
|
20872
|
-
this.router = router;
|
|
20873
|
-
this.sessionStorageService = sessionStorageService;
|
|
20874
|
-
}
|
|
20875
|
-
generateCaseQueriesCollectionData(formGroup, queryCreateContext, queryItem, messageId // Get the message ID from route params (if present)
|
|
20876
|
-
) {
|
|
20877
|
-
let currentUserDetails;
|
|
20878
|
-
try {
|
|
20879
|
-
currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
20880
|
-
}
|
|
20881
|
-
catch (e) {
|
|
20882
|
-
console.error('Could not parse USER_DETAILS from session storage:', e);
|
|
20883
|
-
currentUserDetails = {};
|
|
20884
|
-
}
|
|
20885
|
-
const caseMessage = queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
20886
|
-
? QueryManagementUtils.getNewQueryData(formGroup, currentUserDetails)
|
|
20887
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails);
|
|
20888
|
-
const isNewQuery = queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
20889
|
-
// Check if the field ID has been set dynamically
|
|
20890
|
-
if (!this.fieldId) {
|
|
20891
|
-
console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
|
|
20892
|
-
this.router.navigate(['/', 'service-down']);
|
|
20893
|
-
throw new Error('Field ID for CaseQueriesCollection not found. Aborting query data generation.');
|
|
20894
|
-
}
|
|
20895
|
-
// Initialize new query data structure
|
|
20896
|
-
const newQueryData = {};
|
|
20897
|
-
if (this.caseQueriesCollections?.length) {
|
|
20898
|
-
let matchedCollection;
|
|
20899
|
-
// If it's not a new query, try to find the existing collection with the message ID
|
|
20900
|
-
if (!isNewQuery && messageId) {
|
|
20901
|
-
matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
|
|
20902
|
-
}
|
|
20903
|
-
if (matchedCollection) {
|
|
20904
|
-
// Append the new case message to the matched collection's caseMessages
|
|
20905
|
-
matchedCollection.caseMessages.push({
|
|
20906
|
-
id: null,
|
|
20907
|
-
value: caseMessage
|
|
20908
|
-
});
|
|
20909
|
-
// Add the matched collection to newQueryData
|
|
20910
|
-
newQueryData[this.fieldId] = {
|
|
20911
|
-
...matchedCollection, // Keep existing data intact
|
|
20912
|
-
caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
|
|
20913
|
-
};
|
|
20914
|
-
}
|
|
20915
|
-
else {
|
|
20916
|
-
// Use partyName from the first collection (assumption: all share the same party)
|
|
20917
|
-
const originalPartyName = this.caseQueriesCollections?.[0]?.partyName ?? currentUserDetails?.name;
|
|
20918
|
-
// If no collection matches, or it's a new query
|
|
20919
|
-
newQueryData[this.fieldId] = {
|
|
20920
|
-
partyName: originalPartyName,
|
|
20921
|
-
roleOnCase: '', // Not returned by CCD
|
|
20922
|
-
caseMessages: [
|
|
20923
|
-
{
|
|
20924
|
-
id: null,
|
|
20925
|
-
value: caseMessage
|
|
20926
|
-
}
|
|
20927
|
-
]
|
|
20928
|
-
};
|
|
20929
|
-
// If caseQueriesCollections is not empty, append its data
|
|
20930
|
-
newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
|
|
20931
|
-
}
|
|
20932
|
-
}
|
|
20933
|
-
else {
|
|
20934
|
-
// If there are no existing collections, create a new one (e.g., for new queries)
|
|
20935
|
-
newQueryData[this.fieldId] = {
|
|
20936
|
-
partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
|
|
20937
|
-
roleOnCase: '', // Not returned by CCD
|
|
20938
|
-
caseMessages: [
|
|
20939
|
-
{
|
|
20940
|
-
id: null,
|
|
20941
|
-
value: caseMessage
|
|
20942
|
-
}
|
|
20943
|
-
]
|
|
20944
|
-
};
|
|
20945
|
-
}
|
|
20946
|
-
return newQueryData;
|
|
20947
|
-
}
|
|
20948
|
-
setCaseQueriesCollectionData(eventData, queryCreateContext, caseDetails, messageId) {
|
|
20949
|
-
const resolvedFieldId = this.resolveFieldId(eventData, queryCreateContext, caseDetails, messageId);
|
|
20950
|
-
if (!resolvedFieldId) {
|
|
20951
|
-
console.error('Failed to resolve fieldId for CaseQueriesCollection. Cannot proceed.');
|
|
20952
|
-
return;
|
|
20953
|
-
}
|
|
20954
|
-
this.fieldId = resolvedFieldId;
|
|
20955
|
-
this.caseQueriesCollections = eventData.case_fields.reduce((acc, field) => {
|
|
20956
|
-
if (field.id === this.fieldId) {
|
|
20957
|
-
const extracted = QueryManagementUtils.extractCaseQueriesFromCaseField(field);
|
|
20958
|
-
if (extracted && typeof extracted === 'object') {
|
|
20959
|
-
acc.push(extracted);
|
|
20960
|
-
}
|
|
20961
|
-
}
|
|
20962
|
-
return acc;
|
|
20963
|
-
}, []);
|
|
20964
|
-
}
|
|
20965
|
-
resolveFieldId(eventData, queryCreateContext, caseDetails, messageId) {
|
|
20966
|
-
// Step 1: Filter candidate fields (must be editable CaseQueriesCollection fields)
|
|
20967
|
-
const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
|
|
20968
|
-
field.field_type.type === FIELD_TYPE_COMPLEX &&
|
|
20969
|
-
field.display_context !== DISPLAY_CONTEXT_READONLY);
|
|
20970
|
-
if (!candidateFields?.length) {
|
|
20971
|
-
console.warn('No editable CaseQueriesCollection fields found.');
|
|
20972
|
-
return null;
|
|
20973
|
-
}
|
|
20974
|
-
const numberOfCollections = candidateFields.length;
|
|
20975
|
-
const jurisdictionId = caseDetails?.case_type?.jurisdiction?.id ?? '';
|
|
20976
|
-
// Step 2: If messageId is present, try to locate the field containing that message
|
|
20977
|
-
if (messageId) {
|
|
20978
|
-
const fieldByMessage = candidateFields.find((field) => field?.value?.caseMessages?.some((msg) => msg?.value?.id === messageId));
|
|
20979
|
-
if (fieldByMessage) {
|
|
20980
|
-
return fieldByMessage.id; // Found the matching field by message ID
|
|
20981
|
-
}
|
|
20982
|
-
}
|
|
20983
|
-
// Step 3: Handle new queries
|
|
20984
|
-
if (queryCreateContext === QueryCreateContext.NEW_QUERY) {
|
|
20985
|
-
// If there's only one collection, use it
|
|
20986
|
-
if (numberOfCollections === 1) {
|
|
20987
|
-
return candidateFields[0].id;
|
|
20988
|
-
}
|
|
20989
|
-
// For multiple collections, use jurisdiction-based resolution strategy
|
|
20990
|
-
if (this.getCollectionSelectionMethod(jurisdictionId) === QM_SELECT_FIRST_COLLECTION) {
|
|
20991
|
-
// Choose the one with the lowest order from the first wizard page
|
|
20992
|
-
const firstOrdered = this.getCaseQueriesCollectionFieldOrderFromWizardPages(eventData);
|
|
20993
|
-
if (firstOrdered) {
|
|
20994
|
-
return firstOrdered.id;
|
|
20995
|
-
}
|
|
20996
|
-
}
|
|
20997
|
-
else {
|
|
20998
|
-
console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
|
|
20999
|
-
return null;
|
|
21000
|
-
}
|
|
21001
|
-
}
|
|
21002
|
-
// Step 4: Fallback — if none of the above succeeded
|
|
21003
|
-
console.warn('Could not determine fieldId for context:', queryCreateContext);
|
|
21004
|
-
return null;
|
|
21005
|
-
}
|
|
21006
|
-
getCaseQueriesCollectionFieldOrderFromWizardPages(eventData) {
|
|
21007
|
-
const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
|
|
21008
|
-
field.field_type.type === FIELD_TYPE_COMPLEX &&
|
|
21009
|
-
field.display_context !== DISPLAY_CONTEXT_READONLY);
|
|
21010
|
-
if (!candidateFields?.length) {
|
|
21011
|
-
return undefined;
|
|
21012
|
-
}
|
|
21013
|
-
const firstPageFields = eventData?.wizard_pages?.[0]?.wizard_page_fields;
|
|
21014
|
-
if (!firstPageFields) {
|
|
21015
|
-
return undefined;
|
|
21016
|
-
}
|
|
21017
|
-
return candidateFields
|
|
21018
|
-
.map((field) => {
|
|
21019
|
-
const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
|
|
21020
|
-
return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
|
|
21021
|
-
})
|
|
21022
|
-
.sort((a, b) => a.order - b.order)[0]?.field;
|
|
21023
|
-
}
|
|
21024
|
-
getCollectionSelectionMethod(jurisdiction) {
|
|
21025
|
-
return jurisdiction.toUpperCase() === CIVIL_JURISDICTION ? QM_SELECT_FIRST_COLLECTION : QM_COLLECTION_PROMPT;
|
|
21026
|
-
}
|
|
21027
|
-
static ɵfac = function QueryManagementService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementService)(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
21028
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementService, factory: QueryManagementService.ɵfac, providedIn: 'root' });
|
|
21029
|
-
}
|
|
21030
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementService, [{
|
|
21031
|
-
type: Injectable,
|
|
21032
|
-
args: [{ providedIn: 'root' }]
|
|
21033
|
-
}], () => [{ type: i1$1.Router }, { type: SessionStorageService }], null); })();
|
|
21034
|
-
|
|
21035
20642
|
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
|
|
21036
20643
|
i0.ɵɵelementContainerStart(0);
|
|
21037
20644
|
i0.ɵɵelementStart(1, "p", 8)(2, "span", 9);
|
|
@@ -21278,6 +20885,242 @@ class QueryCaseDetailsHeaderComponent {
|
|
|
21278
20885
|
}] }); })();
|
|
21279
20886
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCaseDetailsHeaderComponent, { className: "QueryCaseDetailsHeaderComponent", filePath: "lib/shared/components/palette/query-management/components/query-case-details-header/query-case-details-header.component.ts", lineNumber: 10 }); })();
|
|
21280
20887
|
|
|
20888
|
+
var QueryCreateContext;
|
|
20889
|
+
(function (QueryCreateContext) {
|
|
20890
|
+
QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_OPTIONS"] = "NewQueryQualifyingQuestionOptions";
|
|
20891
|
+
QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_DETAIL"] = "NewQueryQualifyingQuestionDetail";
|
|
20892
|
+
QueryCreateContext["NEW_QUERY"] = "NewQuery";
|
|
20893
|
+
QueryCreateContext["RESPOND"] = "Respond";
|
|
20894
|
+
QueryCreateContext["FOLLOWUP"] = "Followup";
|
|
20895
|
+
})(QueryCreateContext || (QueryCreateContext = {}));
|
|
20896
|
+
|
|
20897
|
+
class QueryListItem {
|
|
20898
|
+
id;
|
|
20899
|
+
subject;
|
|
20900
|
+
name;
|
|
20901
|
+
body;
|
|
20902
|
+
attachments = [];
|
|
20903
|
+
isHearingRelated;
|
|
20904
|
+
hearingDate;
|
|
20905
|
+
createdOn;
|
|
20906
|
+
createdBy;
|
|
20907
|
+
parentId;
|
|
20908
|
+
isClosed;
|
|
20909
|
+
messageType;
|
|
20910
|
+
children = [];
|
|
20911
|
+
messageIndexInParent = null;
|
|
20912
|
+
get lastSubmittedMessage() {
|
|
20913
|
+
const getLastSubmittedMessage = (item) => {
|
|
20914
|
+
let lastSubmittedMessage = item;
|
|
20915
|
+
if (item.children && item.children.length > 1) {
|
|
20916
|
+
for (const child of item.children) {
|
|
20917
|
+
const childLastSubmittedMessage = getLastSubmittedMessage(child);
|
|
20918
|
+
if (childLastSubmittedMessage.createdOn > lastSubmittedMessage.createdOn) {
|
|
20919
|
+
lastSubmittedMessage = childLastSubmittedMessage;
|
|
20920
|
+
}
|
|
20921
|
+
}
|
|
20922
|
+
}
|
|
20923
|
+
return lastSubmittedMessage;
|
|
20924
|
+
};
|
|
20925
|
+
return getLastSubmittedMessage(this);
|
|
20926
|
+
}
|
|
20927
|
+
get lastSubmittedBy() {
|
|
20928
|
+
const childrenCount = this.children.length;
|
|
20929
|
+
if (childrenCount === 0) {
|
|
20930
|
+
return this.lastSubmittedMessage.name;
|
|
20931
|
+
}
|
|
20932
|
+
let index;
|
|
20933
|
+
if (childrenCount === 1) {
|
|
20934
|
+
index = 0;
|
|
20935
|
+
}
|
|
20936
|
+
else {
|
|
20937
|
+
index = childrenCount % 2 === 1 ? childrenCount - 1 : childrenCount - 2;
|
|
20938
|
+
}
|
|
20939
|
+
return this.children[index].name;
|
|
20940
|
+
}
|
|
20941
|
+
get lastSubmittedDate() {
|
|
20942
|
+
const childrenCount = this.children.length;
|
|
20943
|
+
if (childrenCount <= 1) {
|
|
20944
|
+
return new Date(this.lastSubmittedMessage.createdOn);
|
|
20945
|
+
}
|
|
20946
|
+
let index;
|
|
20947
|
+
if (childrenCount > 1) {
|
|
20948
|
+
index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
|
|
20949
|
+
}
|
|
20950
|
+
return new Date(this.children[index].createdOn);
|
|
20951
|
+
}
|
|
20952
|
+
get lastResponseBy() {
|
|
20953
|
+
return this.children?.length > 0 ? this.lastSubmittedMessage.name : '';
|
|
20954
|
+
}
|
|
20955
|
+
get lastResponseDate() {
|
|
20956
|
+
const childrenCount = this.children.length;
|
|
20957
|
+
if (childrenCount === 0) {
|
|
20958
|
+
return null;
|
|
20959
|
+
}
|
|
20960
|
+
let index;
|
|
20961
|
+
if (childrenCount === 1) {
|
|
20962
|
+
index = 0;
|
|
20963
|
+
}
|
|
20964
|
+
else {
|
|
20965
|
+
index = childrenCount % 2 === 1 ? childrenCount - 1 : childrenCount - 2;
|
|
20966
|
+
}
|
|
20967
|
+
return new Date(this.children[index].createdOn);
|
|
20968
|
+
}
|
|
20969
|
+
get responseStatus() {
|
|
20970
|
+
const isThreadClosed = (item) => {
|
|
20971
|
+
if (item.isClosed === 'Yes') {
|
|
20972
|
+
return true;
|
|
20973
|
+
}
|
|
20974
|
+
return item.children?.some((child) => isThreadClosed(child)) || false;
|
|
20975
|
+
};
|
|
20976
|
+
if (isThreadClosed(this)) {
|
|
20977
|
+
return QueryItemResponseStatus.CLOSED;
|
|
20978
|
+
}
|
|
20979
|
+
const lastMessageType = this.children?.length
|
|
20980
|
+
? this.children[this.children.length - 1]?.messageType
|
|
20981
|
+
: undefined;
|
|
20982
|
+
if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
|
|
20983
|
+
return QueryItemResponseStatus.RESPONDED;
|
|
20984
|
+
}
|
|
20985
|
+
else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
|
|
20986
|
+
return QueryItemResponseStatus.AWAITING;
|
|
20987
|
+
}
|
|
20988
|
+
if (this.messageIndexInParent !== null) {
|
|
20989
|
+
return this.messageIndexInParent % 2 === 0
|
|
20990
|
+
? QueryItemResponseStatus.RESPONDED
|
|
20991
|
+
: QueryItemResponseStatus.AWAITING;
|
|
20992
|
+
}
|
|
20993
|
+
// Parent logic (children count)
|
|
20994
|
+
if (this.children && this.children.length > 0) {
|
|
20995
|
+
return this.children.length % 2 === 1
|
|
20996
|
+
? QueryItemResponseStatus.RESPONDED
|
|
20997
|
+
: QueryItemResponseStatus.AWAITING;
|
|
20998
|
+
}
|
|
20999
|
+
// No children — still awaiting
|
|
21000
|
+
return QueryItemResponseStatus.AWAITING;
|
|
21001
|
+
}
|
|
21002
|
+
}
|
|
21003
|
+
|
|
21004
|
+
class QueryListData {
|
|
21005
|
+
partyName;
|
|
21006
|
+
roleOnCase;
|
|
21007
|
+
queries;
|
|
21008
|
+
constructor(caseQueriesCollection) {
|
|
21009
|
+
this.partyName = caseQueriesCollection.partyName;
|
|
21010
|
+
this.roleOnCase = caseQueriesCollection.roleOnCase;
|
|
21011
|
+
// get the parent messages (messages without parentId) and add the children to them
|
|
21012
|
+
const parentMessages = caseQueriesCollection.caseMessages.filter((message) => !message.value.parentId);
|
|
21013
|
+
this.queries = parentMessages.map((message) => this.buildQueryListItem(message, caseQueriesCollection.caseMessages));
|
|
21014
|
+
}
|
|
21015
|
+
buildQueryListItem(message, allMessages) {
|
|
21016
|
+
const childrenMessages = allMessages.filter((childMessage) => childMessage.value.parentId === message.value.id);
|
|
21017
|
+
const children = childrenMessages.map((childMessage, index) => {
|
|
21018
|
+
const childItem = this.buildQueryListItem(childMessage, allMessages);
|
|
21019
|
+
childItem.messageIndexInParent = index; // Assign index for status logic
|
|
21020
|
+
return childItem;
|
|
21021
|
+
});
|
|
21022
|
+
const queryListItem = new QueryListItem();
|
|
21023
|
+
Object.assign(queryListItem, {
|
|
21024
|
+
...message.value,
|
|
21025
|
+
children
|
|
21026
|
+
});
|
|
21027
|
+
return queryListItem;
|
|
21028
|
+
}
|
|
21029
|
+
}
|
|
21030
|
+
|
|
21031
|
+
class QueryManagementUtils {
|
|
21032
|
+
static caseLevelCaseFieldId = 'CaseQueriesCollection';
|
|
21033
|
+
static FIELD_TYPE_COLLECTION = 'Collection';
|
|
21034
|
+
static FIELD_TYPE_COMPLEX = 'Complex';
|
|
21035
|
+
static DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
21036
|
+
static extractCaseQueriesFromCaseField(caseField) {
|
|
21037
|
+
const { field_type, value, display_context } = caseField;
|
|
21038
|
+
// Handle Complex type fields
|
|
21039
|
+
if (field_type.type === QueryManagementUtils.FIELD_TYPE_COMPLEX) {
|
|
21040
|
+
if (field_type.id === QueryManagementUtils.caseLevelCaseFieldId && display_context !== QueryManagementUtils.DISPLAY_CONTEXT_READONLY && QueryManagementUtils.isNonEmptyObject(value)) {
|
|
21041
|
+
return value;
|
|
21042
|
+
}
|
|
21043
|
+
return null;
|
|
21044
|
+
}
|
|
21045
|
+
}
|
|
21046
|
+
static documentToCollectionFormDocument(document) {
|
|
21047
|
+
return {
|
|
21048
|
+
id: null,
|
|
21049
|
+
value: {
|
|
21050
|
+
document_filename: document?.originalDocumentName,
|
|
21051
|
+
document_url: document?._links?.self?.href,
|
|
21052
|
+
document_binary_url: document?._links?.binary?.href
|
|
21053
|
+
}
|
|
21054
|
+
};
|
|
21055
|
+
}
|
|
21056
|
+
static getNewQueryData(formGroup, currentUserDetails) {
|
|
21057
|
+
const attachments = formGroup.get('attachments').value;
|
|
21058
|
+
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21059
|
+
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21060
|
+
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21061
|
+
const subject = formGroup.get('subject').value;
|
|
21062
|
+
const body = formGroup.get('body').value;
|
|
21063
|
+
const isHearingRelated = formGroup.get('isHearingRelated').value ? 'Yes' : 'No';
|
|
21064
|
+
const hearingDate = (isHearingRelated === 'Yes')
|
|
21065
|
+
? this.formattedDate(formGroup.get('hearingDate').value)
|
|
21066
|
+
: null;
|
|
21067
|
+
return {
|
|
21068
|
+
id: v4(),
|
|
21069
|
+
subject,
|
|
21070
|
+
name: currentUserName,
|
|
21071
|
+
body,
|
|
21072
|
+
attachments: formDocument,
|
|
21073
|
+
isHearingRelated,
|
|
21074
|
+
hearingDate,
|
|
21075
|
+
createdOn: new Date(),
|
|
21076
|
+
createdBy: currentUserId,
|
|
21077
|
+
messageType: QueryCreateContext.FOLLOWUP // Default to value new queries will be FOLLOWUP
|
|
21078
|
+
};
|
|
21079
|
+
}
|
|
21080
|
+
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
|
|
21081
|
+
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21082
|
+
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21083
|
+
const body = formGroup.get('body').value;
|
|
21084
|
+
const attachments = formGroup.get('attachments').value;
|
|
21085
|
+
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21086
|
+
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
21087
|
+
const messageType = messageTypeParam === QueryCreateContext.RESPOND
|
|
21088
|
+
? QueryCreateContext.RESPOND
|
|
21089
|
+
: messageTypeParam === QueryCreateContext.FOLLOWUP
|
|
21090
|
+
? QueryCreateContext.FOLLOWUP
|
|
21091
|
+
: undefined;
|
|
21092
|
+
return {
|
|
21093
|
+
id: v4(),
|
|
21094
|
+
subject: queryItem.subject,
|
|
21095
|
+
name: currentUserName,
|
|
21096
|
+
body,
|
|
21097
|
+
attachments: formDocument,
|
|
21098
|
+
isHearingRelated: queryItem.isHearingRelated,
|
|
21099
|
+
hearingDate: queryItem.hearingDate,
|
|
21100
|
+
createdOn: new Date(),
|
|
21101
|
+
createdBy: currentUserId,
|
|
21102
|
+
parentId: queryItem.id,
|
|
21103
|
+
isClosed,
|
|
21104
|
+
messageType
|
|
21105
|
+
};
|
|
21106
|
+
}
|
|
21107
|
+
static isObject(elem) {
|
|
21108
|
+
return typeof elem === 'object' && elem !== null;
|
|
21109
|
+
}
|
|
21110
|
+
static isNonEmptyObject(elem) {
|
|
21111
|
+
return this.isObject(elem) && Object.keys(elem).length !== 0;
|
|
21112
|
+
}
|
|
21113
|
+
static formattedDate(date) {
|
|
21114
|
+
const formattedDate = moment(date).format('YYYY-MM-DD');
|
|
21115
|
+
return formattedDate;
|
|
21116
|
+
}
|
|
21117
|
+
static ɵfac = function QueryManagementUtils_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementUtils)(); };
|
|
21118
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
|
|
21119
|
+
}
|
|
21120
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementUtils, [{
|
|
21121
|
+
type: Injectable
|
|
21122
|
+
}], null, null); })();
|
|
21123
|
+
|
|
21281
21124
|
function QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template(rf, ctx) { if (rf & 1) {
|
|
21282
21125
|
i0.ɵɵelementStart(0, "li")(1, "a", 28);
|
|
21283
21126
|
i0.ɵɵtext(2);
|
|
@@ -21603,27 +21446,21 @@ class QueryCheckYourAnswersComponent {
|
|
|
21603
21446
|
casesService;
|
|
21604
21447
|
caseNotifier;
|
|
21605
21448
|
workAllocationService;
|
|
21449
|
+
sessionStorageService;
|
|
21606
21450
|
qualifyingQuestionService;
|
|
21607
|
-
queryManagementService;
|
|
21608
|
-
errorNotifierService;
|
|
21609
|
-
alertService;
|
|
21610
21451
|
RAISE_A_QUERY_EVENT_TRIGGER_ID = 'queryManagementRaiseQuery';
|
|
21611
21452
|
RESPOND_TO_QUERY_EVENT_TRIGGER_ID = 'queryManagementRespondQuery';
|
|
21612
21453
|
CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
|
|
21613
|
-
static TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
|
|
21614
|
-
static TRIGGER_TEXT_START = 'Continue';
|
|
21615
21454
|
FIELD_TYPE_COMPLEX = 'Complex';
|
|
21616
21455
|
DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
21617
21456
|
QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
|
|
21618
21457
|
QM_COLLECTION_PROMPT = 'promptQmCollection';
|
|
21619
21458
|
CIVIL_JURISDICTION = 'CIVIL';
|
|
21620
|
-
triggerTextStart = QueryCheckYourAnswersComponent.TRIGGER_TEXT_START;
|
|
21621
|
-
triggerTextIgnoreWarnings = QueryCheckYourAnswersComponent.TRIGGER_TEXT_CONTINUE;
|
|
21622
21459
|
formGroup;
|
|
21623
21460
|
queryItem;
|
|
21624
21461
|
queryCreateContext;
|
|
21625
21462
|
eventData = null;
|
|
21626
|
-
|
|
21463
|
+
multipleFollowUpFeature;
|
|
21627
21464
|
backClicked = new EventEmitter();
|
|
21628
21465
|
querySubmitted = new EventEmitter();
|
|
21629
21466
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21642,24 +21479,20 @@ class QueryCheckYourAnswersComponent {
|
|
|
21642
21479
|
filteredTasks = [];
|
|
21643
21480
|
readyToSubmit;
|
|
21644
21481
|
isSubmitting = false;
|
|
21645
|
-
messgaeId;
|
|
21646
21482
|
callbackErrorsSubject = new Subject();
|
|
21647
21483
|
error;
|
|
21648
|
-
constructor(route, router, casesService, caseNotifier, workAllocationService,
|
|
21484
|
+
constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, qualifyingQuestionService) {
|
|
21649
21485
|
this.route = route;
|
|
21650
21486
|
this.router = router;
|
|
21651
21487
|
this.casesService = casesService;
|
|
21652
21488
|
this.caseNotifier = caseNotifier;
|
|
21653
21489
|
this.workAllocationService = workAllocationService;
|
|
21490
|
+
this.sessionStorageService = sessionStorageService;
|
|
21654
21491
|
this.qualifyingQuestionService = qualifyingQuestionService;
|
|
21655
|
-
this.queryManagementService = queryManagementService;
|
|
21656
|
-
this.errorNotifierService = errorNotifierService;
|
|
21657
|
-
this.alertService = alertService;
|
|
21658
21492
|
}
|
|
21659
21493
|
ngOnInit() {
|
|
21660
21494
|
this.queryId = this.route.snapshot.params.qid;
|
|
21661
21495
|
this.tid = this.route.snapshot.queryParams?.tid;
|
|
21662
|
-
this.messgaeId = this.route.snapshot.params.dataid;
|
|
21663
21496
|
this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
|
|
21664
21497
|
this.caseDetails = caseDetails;
|
|
21665
21498
|
// Find the appropriate event trigger based on the queryCreateContext
|
|
@@ -21688,23 +21521,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21688
21521
|
}
|
|
21689
21522
|
},
|
|
21690
21523
|
error: (error) => {
|
|
21524
|
+
console.error('Error in searchTasksSubscription:', error);
|
|
21691
21525
|
this.readyToSubmit = false;
|
|
21692
|
-
if (error.status !== 401 && error.status !== 403) {
|
|
21693
|
-
this.errorNotifierService.announceError(error);
|
|
21694
|
-
this.alertService.error({ phrase: error.message });
|
|
21695
|
-
console.error('Error occurred while fetching event data:', error);
|
|
21696
|
-
this.callbackErrorsSubject.next(error);
|
|
21697
|
-
}
|
|
21698
|
-
else {
|
|
21699
|
-
this.errorMessages = [
|
|
21700
|
-
{
|
|
21701
|
-
title: 'Error',
|
|
21702
|
-
description: 'Something unexpected happened. Please try again later.',
|
|
21703
|
-
fieldId: 'field-id'
|
|
21704
|
-
}
|
|
21705
|
-
];
|
|
21706
|
-
}
|
|
21707
|
-
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21708
21526
|
}
|
|
21709
21527
|
});
|
|
21710
21528
|
}
|
|
@@ -21715,7 +21533,6 @@ class QueryCheckYourAnswersComponent {
|
|
|
21715
21533
|
ngOnDestroy() {
|
|
21716
21534
|
this.createEventSubscription?.unsubscribe();
|
|
21717
21535
|
this.searchTasksSubscription?.unsubscribe();
|
|
21718
|
-
this.callbackErrorsSubject?.unsubscribe();
|
|
21719
21536
|
}
|
|
21720
21537
|
goBack() {
|
|
21721
21538
|
this.backClicked.emit(true);
|
|
@@ -21724,7 +21541,20 @@ class QueryCheckYourAnswersComponent {
|
|
|
21724
21541
|
if (this.isSubmitting) {
|
|
21725
21542
|
return;
|
|
21726
21543
|
}
|
|
21727
|
-
|
|
21544
|
+
// Check if fieldId is null or undefined
|
|
21545
|
+
if (!this.fieldId) {
|
|
21546
|
+
console.error('Error: Field ID is missing. Cannot proceed with submission.');
|
|
21547
|
+
this.errorMessages = [
|
|
21548
|
+
{
|
|
21549
|
+
title: 'Error',
|
|
21550
|
+
description: 'This case is not configured for query management.',
|
|
21551
|
+
fieldId: 'field-id'
|
|
21552
|
+
}
|
|
21553
|
+
];
|
|
21554
|
+
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21555
|
+
return;
|
|
21556
|
+
}
|
|
21557
|
+
const data = this.generateCaseQueriesCollectionData();
|
|
21728
21558
|
const createEvent$ = this.createEvent(data);
|
|
21729
21559
|
this.isSubmitting = true;
|
|
21730
21560
|
if (this.queryCreateContext === QueryCreateContext.RESPOND) {
|
|
@@ -21785,7 +21615,172 @@ class QueryCheckYourAnswersComponent {
|
|
|
21785
21615
|
handleError(error) {
|
|
21786
21616
|
console.error('Error in API calls:', error);
|
|
21787
21617
|
this.isSubmitting = false;
|
|
21788
|
-
this.
|
|
21618
|
+
if (this.isServiceErrorFound(error)) {
|
|
21619
|
+
this.error = null;
|
|
21620
|
+
this.callbackErrorsSubject.next(error);
|
|
21621
|
+
}
|
|
21622
|
+
else {
|
|
21623
|
+
if (error && error.status !== 401 && error.status !== 403) {
|
|
21624
|
+
this.error = error;
|
|
21625
|
+
}
|
|
21626
|
+
else {
|
|
21627
|
+
this.router.navigate(['/', 'service-down']);
|
|
21628
|
+
}
|
|
21629
|
+
}
|
|
21630
|
+
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21631
|
+
}
|
|
21632
|
+
generateCaseQueriesCollectionData() {
|
|
21633
|
+
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21634
|
+
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21635
|
+
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21636
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
|
|
21637
|
+
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21638
|
+
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21639
|
+
// Check if the field ID has been set dynamically
|
|
21640
|
+
if (!this.fieldId) {
|
|
21641
|
+
console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
|
|
21642
|
+
this.router.navigate(['/', 'service-down']);
|
|
21643
|
+
}
|
|
21644
|
+
// Initialize new query data structure
|
|
21645
|
+
const newQueryData = {};
|
|
21646
|
+
if (this.caseQueriesCollections?.length) {
|
|
21647
|
+
let matchedCollection;
|
|
21648
|
+
// If it's not a new query, try to find the existing collection with the message ID
|
|
21649
|
+
if (!isNewQuery && messageId) {
|
|
21650
|
+
matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
|
|
21651
|
+
}
|
|
21652
|
+
if (matchedCollection) {
|
|
21653
|
+
// Append the new case message to the matched collection's caseMessages
|
|
21654
|
+
matchedCollection.caseMessages.push({
|
|
21655
|
+
id: null,
|
|
21656
|
+
value: caseMessage
|
|
21657
|
+
});
|
|
21658
|
+
// Add the matched collection to newQueryData
|
|
21659
|
+
newQueryData[this.fieldId] = {
|
|
21660
|
+
...matchedCollection, // Keep existing data intact
|
|
21661
|
+
caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
|
|
21662
|
+
};
|
|
21663
|
+
}
|
|
21664
|
+
else {
|
|
21665
|
+
// Use partyName from the first collection (assumption: all share the same party)
|
|
21666
|
+
const originalPartyName = this.caseQueriesCollections[0].partyName;
|
|
21667
|
+
// If no collection matches, or it's a new query
|
|
21668
|
+
newQueryData[this.fieldId] = {
|
|
21669
|
+
partyName: originalPartyName,
|
|
21670
|
+
roleOnCase: '', // Not returned by CCD
|
|
21671
|
+
caseMessages: [
|
|
21672
|
+
{
|
|
21673
|
+
id: null,
|
|
21674
|
+
value: caseMessage
|
|
21675
|
+
}
|
|
21676
|
+
]
|
|
21677
|
+
};
|
|
21678
|
+
// If caseQueriesCollections is not empty, append its data
|
|
21679
|
+
newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
|
|
21680
|
+
}
|
|
21681
|
+
}
|
|
21682
|
+
else {
|
|
21683
|
+
// If there are no existing collections, create a new one (e.g., for new queries)
|
|
21684
|
+
newQueryData[this.fieldId] = {
|
|
21685
|
+
partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
|
|
21686
|
+
roleOnCase: '', // Not returned by CCD
|
|
21687
|
+
caseMessages: [
|
|
21688
|
+
{
|
|
21689
|
+
id: null,
|
|
21690
|
+
value: caseMessage
|
|
21691
|
+
}
|
|
21692
|
+
]
|
|
21693
|
+
};
|
|
21694
|
+
}
|
|
21695
|
+
return newQueryData;
|
|
21696
|
+
}
|
|
21697
|
+
setCaseQueriesCollectionData() {
|
|
21698
|
+
if (this.eventData?.case_fields?.length) {
|
|
21699
|
+
// Workaround for multiple qmCaseQueriesCollections that are not to be appearing in the eventData
|
|
21700
|
+
// Counts number qmCaseQueriesCollections
|
|
21701
|
+
const numberOfCaseQueriesCollections = this.eventData?.case_fields?.filter((caseField) => caseField.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
|
|
21702
|
+
caseField.field_type.type === this.FIELD_TYPE_COMPLEX && caseField.display_context !== this.DISPLAY_CONTEXT_READONLY)?.length || 0;
|
|
21703
|
+
this.caseQueriesCollections = this.eventData.case_fields.reduce((acc, caseField) => {
|
|
21704
|
+
// Extract the ID based on conditions, updating this.fieldId dynamically
|
|
21705
|
+
this.extractCaseQueryId(caseField, numberOfCaseQueriesCollections);
|
|
21706
|
+
const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
|
|
21707
|
+
if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
|
|
21708
|
+
acc.push(extractedCaseQueriesFromCaseField);
|
|
21709
|
+
}
|
|
21710
|
+
return acc;
|
|
21711
|
+
}, []);
|
|
21712
|
+
}
|
|
21713
|
+
}
|
|
21714
|
+
extractCaseQueryId(data, count) {
|
|
21715
|
+
const { id, value } = data;
|
|
21716
|
+
const messageId = this.route.snapshot.params.dataid;
|
|
21717
|
+
// Check if the field_type matches CaseQueriesCollection and type is Complex
|
|
21718
|
+
if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID && data.field_type.type === this.FIELD_TYPE_COMPLEX) {
|
|
21719
|
+
if (this.isNewQueryContext(data)) {
|
|
21720
|
+
// If there is more than one qmCaseQueriesCollection, pick the one with the lowest order
|
|
21721
|
+
if (count > 1) {
|
|
21722
|
+
if (!this.handleMultipleCollections()) {
|
|
21723
|
+
return;
|
|
21724
|
+
}
|
|
21725
|
+
}
|
|
21726
|
+
else {
|
|
21727
|
+
// Set the field ID dynamically based on the extracted data
|
|
21728
|
+
this.fieldId = id; // Store the ID for use in generating newQueryData
|
|
21729
|
+
}
|
|
21730
|
+
}
|
|
21731
|
+
// If messageId is present, find the corresponding case message
|
|
21732
|
+
this.setMessageFieldId(messageId, value, id);
|
|
21733
|
+
}
|
|
21734
|
+
}
|
|
21735
|
+
setMessageFieldId(messageId, value, id) {
|
|
21736
|
+
if (messageId && value?.caseMessages) {
|
|
21737
|
+
// If a matching message is found, set the fieldId to the corresponding id
|
|
21738
|
+
const matchedMessage = value?.caseMessages?.find((message) => message.value.id === messageId);
|
|
21739
|
+
if (matchedMessage) {
|
|
21740
|
+
this.fieldId = id;
|
|
21741
|
+
}
|
|
21742
|
+
}
|
|
21743
|
+
}
|
|
21744
|
+
isNewQueryContext(data) {
|
|
21745
|
+
return this.queryCreateContext === QueryCreateContext.NEW_QUERY && data.display_context !== this.DISPLAY_CONTEXT_READONLY;
|
|
21746
|
+
}
|
|
21747
|
+
handleMultipleCollections() {
|
|
21748
|
+
const jurisdictionId = this.caseDetails?.case_type?.jurisdiction?.id;
|
|
21749
|
+
if (!jurisdictionId) {
|
|
21750
|
+
console.error('Jurisdiction ID is missing.');
|
|
21751
|
+
return false;
|
|
21752
|
+
}
|
|
21753
|
+
if (this.getCollectionSelectionMethod(jurisdictionId) === this.QM_SELECT_FIRST_COLLECTION) {
|
|
21754
|
+
// Pick the collection with the lowest order
|
|
21755
|
+
this.fieldId = this.getCaseQueriesCollectionFieldOrderFromWizardPages()?.id;
|
|
21756
|
+
}
|
|
21757
|
+
else {
|
|
21758
|
+
// Display Error, for now, until EXUI-2644 is implemented
|
|
21759
|
+
console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
|
|
21760
|
+
return false;
|
|
21761
|
+
}
|
|
21762
|
+
return true;
|
|
21763
|
+
}
|
|
21764
|
+
getCaseQueriesCollectionFieldOrderFromWizardPages() {
|
|
21765
|
+
const candidateFields = this.eventData?.case_fields?.filter((field) => field.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
|
|
21766
|
+
field.field_type.type === this.FIELD_TYPE_COMPLEX &&
|
|
21767
|
+
field.display_context !== this.DISPLAY_CONTEXT_READONLY);
|
|
21768
|
+
if (!candidateFields?.length) {
|
|
21769
|
+
return undefined;
|
|
21770
|
+
}
|
|
21771
|
+
const firstPageFields = this.eventData?.wizard_pages?.[0]?.wizard_page_fields;
|
|
21772
|
+
if (!firstPageFields) {
|
|
21773
|
+
return undefined;
|
|
21774
|
+
}
|
|
21775
|
+
return candidateFields
|
|
21776
|
+
.map((field) => {
|
|
21777
|
+
const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
|
|
21778
|
+
return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
|
|
21779
|
+
})
|
|
21780
|
+
.sort((a, b) => a.order - b.order)[0]?.field;
|
|
21781
|
+
}
|
|
21782
|
+
getCollectionSelectionMethod(jurisdiction) {
|
|
21783
|
+
return jurisdiction.toUpperCase() === this.CIVIL_JURISDICTION ? this.QM_SELECT_FIRST_COLLECTION : this.QM_COLLECTION_PROMPT;
|
|
21789
21784
|
}
|
|
21790
21785
|
getDocumentAttachments() {
|
|
21791
21786
|
const attachmentsValue = this.formGroup.get('attachments').value;
|
|
@@ -21797,14 +21792,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21797
21792
|
isServiceErrorFound(error) {
|
|
21798
21793
|
return !!(error?.callbackErrors?.length);
|
|
21799
21794
|
}
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
21803
|
-
}
|
|
21804
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
21805
|
-
}
|
|
21806
|
-
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(QualifyingQuestionService), i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(AlertService)); };
|
|
21807
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", qmCaseQueriesCollectionData: "qmCaseQueriesCollectionData" }, 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) {
|
|
21795
|
+
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)); };
|
|
21796
|
+
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) {
|
|
21808
21797
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
|
|
21809
21798
|
} if (rf & 2) {
|
|
21810
21799
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21813,7 +21802,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21813
21802
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
|
|
21814
21803
|
type: Component,
|
|
21815
21804
|
args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\" *ngIf=\"readyToSubmit\">\n <div class=\"govuk-grid-column-two-thirds-from-desktop\">\n <!-- Error message summary -->\n <div *ngIf=\"errorMessages.length > 0\" class=\"govuk-error-summary\"\n aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\"\n data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{ 'There is a problem' | rpxTranslate }}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a [id]=\"'error-' + errorMessage.fieldId\" href=\"javascript:void(0)\"\n class=\"validation-error\">{{ errorMessage.description | rpxTranslate }}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"callbackErrorsSubject\"></ccd-callback-errors>\n\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n </ng-container>\n\n <h1 class=\"govuk-heading-l\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND; else defaultCheckYourAnswersTitle\">\n {{ 'Review query response details' | rpxTranslate }}\n </ng-container>\n\n <ng-template #defaultCheckYourAnswersTitle>\n {{ 'Review query details' | rpxTranslate }}\n </ng-template>\n </h1>\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <dl *ngIf=\"queryCreateContext !== queryCreateContextEnum.FOLLOWUP\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Submitted query' : 'Query subject' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? queryItem.subject : formGroup.get('subject')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" \n href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query detail' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('body')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <ng-container *ngIf=\"formGroup.get('isHearingRelated')?.value === true; else isHearingRelatedFalse\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </ng-container>\n <ng-template #isHearingRelatedFalse>\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </ng-template>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n\n <div *ngIf=\"formGroup.get('isHearingRelated')?.value\" class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY\n ? 'What is the date of the hearing?'\n : 'What is the date of the hearing your query is related to?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('hearingDate')?.value | date: 'dd MMM yyyy' }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\" *ngIf=\"this.formGroup.get('attachments').value.length > 0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY ? 'Upload a file to the query' : 'Document attached' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value govuk-summary-list__value--documentAttached\">\n <ccd-query-attachments-read\n *ngIf=\"this.formGroup.get('attachments').value\"\n [attachments]=\"attachments\"\n >\n </ccd-query-attachments-read>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Closing the query' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('closeQuery')?.value ? 'I want to close this query' : 'No answer' | rpxTranslate }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <br>\n\n <div>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-right-3\" data-module=\"govuk-button\"\n (click)=\"goBack()\">\n {{ 'Previous' | rpxTranslate }}\n </button>\n <button class=\"govuk-button\" data-module=\"govuk-button\" type=\"submit\" (click)=\"submit()\">\n {{ 'Submit' | rpxTranslate }}\n </button>\n </div>\n </div>\n\n <ccd-query-event-completion [eventCompletionParams]=\"eventCompletionParams\"> \n </ccd-query-event-completion>\n</div>\n", styles: [".govuk-summary-list__value--documentAttached{vertical-align:middle}\n"] }]
|
|
21816
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type:
|
|
21805
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: QualifyingQuestionService }], { formGroup: [{
|
|
21817
21806
|
type: Input
|
|
21818
21807
|
}], queryItem: [{
|
|
21819
21808
|
type: Input
|
|
@@ -21821,7 +21810,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21821
21810
|
type: Input
|
|
21822
21811
|
}], eventData: [{
|
|
21823
21812
|
type: Input
|
|
21824
|
-
}],
|
|
21813
|
+
}], multipleFollowUpFeature: [{
|
|
21825
21814
|
type: Input
|
|
21826
21815
|
}], backClicked: [{
|
|
21827
21816
|
type: Output
|
|
@@ -21830,7 +21819,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21830
21819
|
}], callbackConfirmationMessage: [{
|
|
21831
21820
|
type: Output
|
|
21832
21821
|
}] }); })();
|
|
21833
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber:
|
|
21822
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 28 }); })();
|
|
21834
21823
|
|
|
21835
21824
|
function QueryDetailsComponent_ng_container_0_p_1_Template(rf, ctx) { if (rf & 1) {
|
|
21836
21825
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -22042,10 +22031,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
|
|
|
22042
22031
|
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);
|
|
22043
22032
|
i0.ɵɵelementContainerEnd();
|
|
22044
22033
|
} if (rf & 2) {
|
|
22034
|
+
const child_r3 = ctx.$implicit;
|
|
22045
22035
|
const i_r4 = ctx.index;
|
|
22046
22036
|
const followUpMessage_r5 = i0.ɵɵreference(3);
|
|
22037
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
22047
22038
|
i0.ɵɵadvance();
|
|
22048
|
-
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
22039
|
+
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);
|
|
22049
22040
|
} }
|
|
22050
22041
|
function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
|
|
22051
22042
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22149,6 +22140,8 @@ class QueryDetailsComponent {
|
|
|
22149
22140
|
sessionStorageService;
|
|
22150
22141
|
route;
|
|
22151
22142
|
router;
|
|
22143
|
+
abstractConfig;
|
|
22144
|
+
caseNotifier;
|
|
22152
22145
|
query;
|
|
22153
22146
|
caseId;
|
|
22154
22147
|
queryResponseStatus;
|
|
@@ -22158,10 +22151,18 @@ class QueryDetailsComponent {
|
|
|
22158
22151
|
static QUERY_ITEM_RESPOND = '3';
|
|
22159
22152
|
static QUERY_ITEM_FOLLOW_UP = '4';
|
|
22160
22153
|
queryItemId;
|
|
22161
|
-
|
|
22154
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
22155
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
22156
|
+
enableServiceSpecificMultiFollowups;
|
|
22157
|
+
currentJurisdictionId;
|
|
22158
|
+
isMultipleFollowUpEnabled = false;
|
|
22159
|
+
caseSubscription;
|
|
22160
|
+
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22162
22161
|
this.sessionStorageService = sessionStorageService;
|
|
22163
22162
|
this.route = route;
|
|
22164
22163
|
this.router = router;
|
|
22164
|
+
this.abstractConfig = abstractConfig;
|
|
22165
|
+
this.caseNotifier = caseNotifier;
|
|
22165
22166
|
}
|
|
22166
22167
|
onBack() {
|
|
22167
22168
|
this.backClicked.emit(true);
|
|
@@ -22169,10 +22170,23 @@ class QueryDetailsComponent {
|
|
|
22169
22170
|
isInternalUser() {
|
|
22170
22171
|
return isInternalUser(this.sessionStorageService);
|
|
22171
22172
|
}
|
|
22173
|
+
ngOnInit() {
|
|
22174
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22175
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
|
|
22176
|
+
if (caseView?.case_type?.jurisdiction?.id) {
|
|
22177
|
+
this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
|
|
22178
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
22179
|
+
this.hasRespondedToQuery();
|
|
22180
|
+
}
|
|
22181
|
+
});
|
|
22182
|
+
}
|
|
22172
22183
|
ngOnChanges() {
|
|
22173
22184
|
this.toggleLinkVisibility();
|
|
22174
22185
|
this.hasRespondedToQuery();
|
|
22175
22186
|
}
|
|
22187
|
+
ngOnDestroy() {
|
|
22188
|
+
this.caseSubscription?.unsubscribe();
|
|
22189
|
+
}
|
|
22176
22190
|
toggleLinkVisibility() {
|
|
22177
22191
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
22178
22192
|
if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
|
|
@@ -22185,6 +22199,24 @@ class QueryDetailsComponent {
|
|
|
22185
22199
|
this.hasResponded.emit(true);
|
|
22186
22200
|
return true;
|
|
22187
22201
|
}
|
|
22202
|
+
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22203
|
+
const lastMessageType = this.query?.children?.length
|
|
22204
|
+
? this.query.children[this.query.children.length - 1]?.messageType
|
|
22205
|
+
: this.query?.messageType;
|
|
22206
|
+
const isFollowUp = lastMessageType === this.followUpQuery;
|
|
22207
|
+
const isRespond = lastChild?.messageType === this.respondToQuery;
|
|
22208
|
+
if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
|
|
22209
|
+
this.hasResponded.emit(true);
|
|
22210
|
+
return true;
|
|
22211
|
+
}
|
|
22212
|
+
if (isFollowUp && this.isMultipleFollowUpEnabled) {
|
|
22213
|
+
this.hasResponded.emit(false);
|
|
22214
|
+
return false;
|
|
22215
|
+
}
|
|
22216
|
+
if (isRespond) {
|
|
22217
|
+
this.hasResponded.emit(false);
|
|
22218
|
+
return false;
|
|
22219
|
+
}
|
|
22188
22220
|
if (this.isInternalUser()) {
|
|
22189
22221
|
if (isAwaiting) {
|
|
22190
22222
|
this.hasResponded.emit(false);
|
|
@@ -22200,7 +22232,7 @@ class QueryDetailsComponent {
|
|
|
22200
22232
|
this.hasResponded.emit(false);
|
|
22201
22233
|
return false;
|
|
22202
22234
|
}
|
|
22203
|
-
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
22235
|
+
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)); };
|
|
22204
22236
|
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) {
|
|
22205
22237
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22206
22238
|
} if (rf & 2) {
|
|
@@ -22209,8 +22241,8 @@ class QueryDetailsComponent {
|
|
|
22209
22241
|
}
|
|
22210
22242
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22211
22243
|
type: Component,
|
|
22212
|
-
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"] }]
|
|
22213
|
-
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
22244
|
+
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"] }]
|
|
22245
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
|
|
22214
22246
|
type: Input
|
|
22215
22247
|
}], caseId: [{
|
|
22216
22248
|
type: Input
|
|
@@ -22221,7 +22253,7 @@ class QueryDetailsComponent {
|
|
|
22221
22253
|
}], hasResponded: [{
|
|
22222
22254
|
type: Output
|
|
22223
22255
|
}] }); })();
|
|
22224
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
22256
|
+
(() => { (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 }); })();
|
|
22225
22257
|
|
|
22226
22258
|
class QueryEventCompletionComponent {
|
|
22227
22259
|
eventCompletionParams;
|
|
@@ -22782,36 +22814,12 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
22782
22814
|
i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("isHearingRelated").value);
|
|
22783
22815
|
} }
|
|
22784
22816
|
class QueryWriteRaiseQueryComponent {
|
|
22785
|
-
queryManagementService;
|
|
22786
|
-
route;
|
|
22787
22817
|
formGroup;
|
|
22788
22818
|
submitted;
|
|
22789
22819
|
caseDetails;
|
|
22790
22820
|
showForm;
|
|
22791
22821
|
serviceMessage;
|
|
22792
|
-
queryCreateContext;
|
|
22793
|
-
eventData = null;
|
|
22794
|
-
queryItem;
|
|
22795
|
-
validate;
|
|
22796
|
-
triggerSubmission;
|
|
22797
|
-
queryDataCreated = new EventEmitter();
|
|
22798
22822
|
raiseQueryErrorMessage = RaiseQueryErrorMessage;
|
|
22799
|
-
eventCompletionParams;
|
|
22800
|
-
messgaeId;
|
|
22801
|
-
constructor(queryManagementService, route) {
|
|
22802
|
-
this.queryManagementService = queryManagementService;
|
|
22803
|
-
this.route = route;
|
|
22804
|
-
}
|
|
22805
|
-
ngOnChanges() {
|
|
22806
|
-
this.messgaeId = this.route.snapshot.params.dataid;
|
|
22807
|
-
const isCollectionDataSet = this.setCaseQueriesCollectionData();
|
|
22808
|
-
if (isCollectionDataSet) {
|
|
22809
|
-
if (this.triggerSubmission) {
|
|
22810
|
-
const data = this.generateCaseQueriesCollectionData();
|
|
22811
|
-
this.queryDataCreated.emit(data);
|
|
22812
|
-
}
|
|
22813
|
-
}
|
|
22814
|
-
}
|
|
22815
22823
|
onSubjectInput() {
|
|
22816
22824
|
const control = this.formGroup.get('subject');
|
|
22817
22825
|
const value = control?.value;
|
|
@@ -22829,19 +22837,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22829
22837
|
}
|
|
22830
22838
|
return '';
|
|
22831
22839
|
}
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
22835
|
-
return false;
|
|
22836
|
-
}
|
|
22837
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
22838
|
-
return true;
|
|
22839
|
-
}
|
|
22840
|
-
generateCaseQueriesCollectionData() {
|
|
22841
|
-
return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messgaeId);
|
|
22842
|
-
}
|
|
22843
|
-
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
22844
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm", serviceMessage: "serviceMessage", queryCreateContext: "queryCreateContext", eventData: "eventData", queryItem: "queryItem", validate: "validate", triggerSubmission: "triggerSubmission" }, outputs: { queryDataCreated: "queryDataCreated" }, features: [i0.ɵɵNgOnChangesFeature], decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [3, "caseDetails"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [3, "content"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "id", "subject", "formControlName", "subject", "maxlength", "200", "aria-describedby", "subject-error", 1, "govuk-input", 3, "input"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-hint", 1, "govuk-hint"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "isHearingRelated-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--inline"], [1, "govuk-radios__item"], ["id", "isHearingRelated-yes", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-yes", 1, "govuk-label", "govuk-radios__label"], ["id", "isHearingRelated-no", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-no", 1, "govuk-label", "govuk-radios__label"], [4, "ngIf"], ["id", "subject-error", 1, "govuk-error-message"], ["id", "body-error", 1, "govuk-error-message"], ["id", "isHearingRelated-error", 1, "govuk-error-message"], [1, "govuk-radios__conditional", "govuk-!-margin-top-1", 3, "ngClass"], ["role", "group", 1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--s"], ["id", "hearingDate-error", "class", "govuk-error-message", 4, "ngIf"], ["formControlName", "hearingDate"], ["id", "hearingDate-error", 1, "govuk-error-message"]], template: function QueryWriteRaiseQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
22840
|
+
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(); };
|
|
22841
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm", serviceMessage: "serviceMessage" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [3, "caseDetails"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [3, "content"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "id", "subject", "formControlName", "subject", "maxlength", "200", "aria-describedby", "subject-error", 1, "govuk-input", 3, "input"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-hint", 1, "govuk-hint"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "isHearingRelated-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--inline"], [1, "govuk-radios__item"], ["id", "isHearingRelated-yes", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-yes", 1, "govuk-label", "govuk-radios__label"], ["id", "isHearingRelated-no", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-no", 1, "govuk-label", "govuk-radios__label"], [4, "ngIf"], ["id", "subject-error", 1, "govuk-error-message"], ["id", "body-error", 1, "govuk-error-message"], ["id", "isHearingRelated-error", 1, "govuk-error-message"], [1, "govuk-radios__conditional", "govuk-!-margin-top-1", 3, "ngClass"], ["role", "group", 1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--s"], ["id", "hearingDate-error", "class", "govuk-error-message", 4, "ngIf"], ["formControlName", "hearingDate"], ["id", "hearingDate-error", 1, "govuk-error-message"]], template: function QueryWriteRaiseQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
22845
22842
|
i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "div", 1);
|
|
22846
22843
|
i0.ɵɵtext(3);
|
|
22847
22844
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -22870,7 +22867,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22870
22867
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
|
|
22871
22868
|
type: Component,
|
|
22872
22869
|
args: [{ selector: 'ccd-query-write-raise-query', template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <ccd-markdown\n [content]=\"serviceMessage | rpxTranslate\">\n </ccd-markdown>\n </strong>\n </div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && (formGroup.get('subject').hasError('required') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('body').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ 'Query detail' | rpxTranslate }}\n </label>\n </div>\n <div id=\"body-hint\" class=\"govuk-hint\">\n {{ 'Include as many details as possible so case workers can respond to your query' | rpxTranslate }}\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\"\n id=\"body\" name=\"body\" rows=\"5\"\n aria-describedby=\"body-hint body-error\"\n class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body').hasError('required')\"\n >\n </textarea>\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('isHearingRelated').hasError('required')}\">\n <fieldset class=\"govuk-fieldset\">\n <legend>\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"isHearingRelated-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_RELATED | rpxTranslate }}\n </p>\n <div class=\"govuk-radios govuk-radios--inline\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-yes\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === true\" [value]=\"true\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-yes\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-no\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === false\" [value]=\"false\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-no\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </label>\n </div>\n </div>\n </fieldset>\n\n <ng-container *ngIf=\"formGroup.get('isHearingRelated').value\">\n <div class=\"govuk-radios__conditional govuk-!-margin-top-1\"\n [ngClass]=\"{'govuk-form-group--error': submitted &&\n formGroup.get('isHearingRelated').value === true &&\n formGroup.get('hearingDate').value === null}\">\n <fieldset class=\"govuk-fieldset\" role=\"group\">\n <legend>\n <label class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </label>\n </legend>\n <p id=\"hearingDate-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').value === true && formGroup.get('hearingDate').value === null\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_DATE | rpxTranslate }}\n </p>\n <ccd-query-write-date-input formControlName=\"hearingDate\"></ccd-query-write-date-input>\n </fieldset>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
22873
|
-
}],
|
|
22870
|
+
}], null, { formGroup: [{
|
|
22874
22871
|
type: Input
|
|
22875
22872
|
}], submitted: [{
|
|
22876
22873
|
type: Input
|
|
@@ -22880,20 +22877,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22880
22877
|
type: Input
|
|
22881
22878
|
}], serviceMessage: [{
|
|
22882
22879
|
type: Input
|
|
22883
|
-
}], queryCreateContext: [{
|
|
22884
|
-
type: Input
|
|
22885
|
-
}], eventData: [{
|
|
22886
|
-
type: Input
|
|
22887
|
-
}], queryItem: [{
|
|
22888
|
-
type: Input
|
|
22889
|
-
}], validate: [{
|
|
22890
|
-
type: Input
|
|
22891
|
-
}], triggerSubmission: [{
|
|
22892
|
-
type: Input
|
|
22893
|
-
}], queryDataCreated: [{
|
|
22894
|
-
type: Output
|
|
22895
22880
|
}] }); })();
|
|
22896
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber:
|
|
22881
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 8 }); })();
|
|
22897
22882
|
|
|
22898
22883
|
function QueryWriteRespondToQueryComponent_ccd_query_case_details_header_9_Template(rf, ctx) { if (rf & 1) {
|
|
22899
22884
|
i0.ɵɵelement(0, "ccd-query-case-details-header", 8);
|
|
@@ -22975,16 +22960,12 @@ function QueryWriteRespondToQueryComponent_ng_container_13_Template(rf, ctx) { i
|
|
|
22975
22960
|
class QueryWriteRespondToQueryComponent {
|
|
22976
22961
|
caseNotifier;
|
|
22977
22962
|
route;
|
|
22978
|
-
queryManagementService;
|
|
22979
22963
|
queryItem;
|
|
22980
22964
|
formGroup;
|
|
22981
22965
|
queryCreateContext;
|
|
22982
22966
|
submitted = false;
|
|
22983
22967
|
caseQueriesCollections;
|
|
22984
22968
|
showForm;
|
|
22985
|
-
triggerSubmission;
|
|
22986
|
-
eventData = null;
|
|
22987
|
-
queryDataCreated = new EventEmitter();
|
|
22988
22969
|
hasRespondedToQueryTask = new EventEmitter();
|
|
22989
22970
|
queryCreateContextEnum = QueryCreateContext;
|
|
22990
22971
|
raiseQueryErrorMessages = RaiseQueryErrorMessage;
|
|
@@ -22994,13 +22975,11 @@ class QueryWriteRespondToQueryComponent {
|
|
|
22994
22975
|
queryResponseStatus;
|
|
22995
22976
|
queryListData;
|
|
22996
22977
|
hasRespondedToQuery = false;
|
|
22997
|
-
messgaeId;
|
|
22998
22978
|
static QUERY_ITEM_RESPOND = '3';
|
|
22999
22979
|
static QUERY_ITEM_FOLLOWUP = '4';
|
|
23000
|
-
constructor(caseNotifier, route
|
|
22980
|
+
constructor(caseNotifier, route) {
|
|
23001
22981
|
this.caseNotifier = caseNotifier;
|
|
23002
22982
|
this.route = route;
|
|
23003
|
-
this.queryManagementService = queryManagementService;
|
|
23004
22983
|
}
|
|
23005
22984
|
ngOnInit() {
|
|
23006
22985
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
@@ -23042,31 +23021,13 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23042
23021
|
: matchingMessage?.id;
|
|
23043
23022
|
this.queryListData = queryWithChildren?.queries.find((query) => query?.id === targetId);
|
|
23044
23023
|
this.queryResponseStatus = this.queryListData?.responseStatus;
|
|
23045
|
-
const isCollectionDataSet = this.setCaseQueriesCollectionData();
|
|
23046
|
-
if (isCollectionDataSet) {
|
|
23047
|
-
if (this.triggerSubmission) {
|
|
23048
|
-
const data = this.generateCaseQueriesCollectionData();
|
|
23049
|
-
this.queryDataCreated.emit(data);
|
|
23050
|
-
}
|
|
23051
|
-
}
|
|
23052
23024
|
}
|
|
23053
23025
|
hasResponded(value) {
|
|
23054
23026
|
this.hasRespondedToQuery = value;
|
|
23055
23027
|
this.hasRespondedToQueryTask.emit(value);
|
|
23056
23028
|
}
|
|
23057
|
-
|
|
23058
|
-
|
|
23059
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
23060
|
-
return false;
|
|
23061
|
-
}
|
|
23062
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
23063
|
-
return true;
|
|
23064
|
-
}
|
|
23065
|
-
generateCaseQueriesCollectionData() {
|
|
23066
|
-
return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messgaeId);
|
|
23067
|
-
}
|
|
23068
|
-
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(QueryManagementService)); };
|
|
23069
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", caseQueriesCollections: "caseQueriesCollections", showForm: "showForm", triggerSubmission: "triggerSubmission", eventData: "eventData" }, outputs: { queryDataCreated: "queryDataCreated", hasRespondedToQueryTask: "hasRespondedToQueryTask" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 11, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], [3, "hasResponded", "query", "queryResponseStatus"], ["class", "query-respond", 4, "ngIf"], [4, "ngIf"], [3, "caseDetails"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [3, "formGroup", 4, "ngIf"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23029
|
+
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
23030
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", caseQueriesCollections: "caseQueriesCollections", showForm: "showForm" }, outputs: { hasRespondedToQueryTask: "hasRespondedToQueryTask" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 11, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], [3, "hasResponded", "query", "queryResponseStatus"], ["class", "query-respond", 4, "ngIf"], [4, "ngIf"], [3, "caseDetails"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [3, "formGroup", 4, "ngIf"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23070
23031
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 0)(2, "div", 1);
|
|
23071
23032
|
i0.ɵɵtext(3);
|
|
23072
23033
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -23100,7 +23061,7 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23100
23061
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRespondToQueryComponent, [{
|
|
23101
23062
|
type: Component,
|
|
23102
23063
|
args: [{ selector: 'ccd-query-write-respond-to-query', template: "<div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Respond to a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-0\">{{ 'Query details' | rpxTranslate }}</h1>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryListData\"\n [queryResponseStatus]=\"queryResponseStatus\"\n (hasResponded)=\"hasResponded($event)\"></ccd-query-details>\n </div>\n</div>\n<div class=\"query-respond\" *ngIf=\"showForm\">\n <div *ngIf=\"!hasRespondedToQuery\">\n <h1 class=\"govuk-heading-m\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Respond to a query' : 'Ask a follow-up question' | rpxTranslate }}\n </h1>\n\n <div [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group body-textarea\"\n [class.govuk-form-group--error]=\"submitted && formGroup.get('body')?.hasError('required')\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query Body' | rpxTranslate }}\n </label>\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body')?.hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ queryCreateContext === queryCreateContextEnum.RESPOND ? raiseQueryErrorMessages.RESPOND_QUERY_BODY : raiseQueryErrorMessages.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\" class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body')?.hasError('required')\" id=\"body\"\n name=\"body\" rows=\"5\" aria-describedby=\"body-hint body-error\">\n </textarea>\n </div>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND\">\n <ccd-close-query *ngIf=\"!hasRespondedToQuery\"\n [formGroup]=\"formGroup\">\n </ccd-close-query>\n</ng-container>", styles: [".query-respond{width:100%;max-width:720px}\n"] }]
|
|
23103
|
-
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }
|
|
23064
|
+
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }], { queryItem: [{
|
|
23104
23065
|
type: Input
|
|
23105
23066
|
}], formGroup: [{
|
|
23106
23067
|
type: Input
|
|
@@ -23112,16 +23073,10 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23112
23073
|
type: Input
|
|
23113
23074
|
}], showForm: [{
|
|
23114
23075
|
type: Input
|
|
23115
|
-
}], triggerSubmission: [{
|
|
23116
|
-
type: Input
|
|
23117
|
-
}], eventData: [{
|
|
23118
|
-
type: Input
|
|
23119
|
-
}], queryDataCreated: [{
|
|
23120
|
-
type: Output
|
|
23121
23076
|
}], hasRespondedToQueryTask: [{
|
|
23122
23077
|
type: Output
|
|
23123
23078
|
}] }); })();
|
|
23124
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber:
|
|
23079
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber: 14 }); })();
|
|
23125
23080
|
|
|
23126
23081
|
function QueryConfirmationComponent_main_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
23127
23082
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -23297,7 +23252,7 @@ class CloseQueryComponent {
|
|
|
23297
23252
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
23298
23253
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
23299
23254
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
23300
|
-
i0.ɵɵelementStart(0, "div",
|
|
23255
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
|
|
23301
23256
|
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)); });
|
|
23302
23257
|
i0.ɵɵelementEnd()();
|
|
23303
23258
|
} if (rf & 2) {
|
|
@@ -23307,7 +23262,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23307
23262
|
} }
|
|
23308
23263
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23309
23264
|
i0.ɵɵelementContainerStart(0);
|
|
23310
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23265
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
|
|
23311
23266
|
i0.ɵɵelementContainerEnd();
|
|
23312
23267
|
} if (rf & 2) {
|
|
23313
23268
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23316,7 +23271,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23316
23271
|
} }
|
|
23317
23272
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23318
23273
|
i0.ɵɵelementContainerStart(0);
|
|
23319
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23274
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
|
|
23320
23275
|
i0.ɵɵelementContainerEnd();
|
|
23321
23276
|
} if (rf & 2) {
|
|
23322
23277
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23325,7 +23280,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23325
23280
|
} }
|
|
23326
23281
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23327
23282
|
i0.ɵɵelementContainerStart(0);
|
|
23328
|
-
i0.ɵɵelementStart(1, "button",
|
|
23283
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23329
23284
|
i0.ɵɵtext(2);
|
|
23330
23285
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23331
23286
|
i0.ɵɵelementEnd();
|
|
@@ -23337,49 +23292,61 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23337
23292
|
i0.ɵɵadvance();
|
|
23338
23293
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23339
23294
|
} }
|
|
23340
|
-
function
|
|
23341
|
-
i0.ɵɵ
|
|
23295
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23296
|
+
i0.ɵɵelementContainerStart(0);
|
|
23297
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23298
|
+
i0.ɵɵtext(2);
|
|
23299
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23300
|
+
i0.ɵɵelementEnd();
|
|
23301
|
+
i0.ɵɵelementContainerEnd();
|
|
23302
|
+
} if (rf & 2) {
|
|
23303
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23304
|
+
i0.ɵɵadvance();
|
|
23305
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23306
|
+
i0.ɵɵadvance();
|
|
23307
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23308
|
+
} }
|
|
23309
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23310
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23342
23311
|
i0.ɵɵtext(2);
|
|
23343
23312
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23344
23313
|
i0.ɵɵelementEnd();
|
|
23345
|
-
i0.ɵɵelementStart(4, "p"
|
|
23314
|
+
i0.ɵɵelementStart(4, "p");
|
|
23346
23315
|
i0.ɵɵtext(5);
|
|
23347
23316
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
23348
|
-
i0.ɵɵelementEnd();
|
|
23349
|
-
i0.ɵɵelementStart(7, "p");
|
|
23350
|
-
i0.ɵɵtext(8);
|
|
23351
|
-
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23352
23317
|
i0.ɵɵelementEnd()();
|
|
23353
23318
|
} if (rf & 2) {
|
|
23354
|
-
|
|
23355
|
-
i0.ɵɵ
|
|
23356
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(10, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23357
|
-
i0.ɵɵadvance();
|
|
23358
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, "Ask a follow-up question"), " ");
|
|
23359
|
-
i0.ɵɵadvance(3);
|
|
23360
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, "Your query is under review"));
|
|
23319
|
+
i0.ɵɵadvance(2);
|
|
23320
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Your query is under review"));
|
|
23361
23321
|
i0.ɵɵadvance(3);
|
|
23362
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
23322
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23323
|
+
} }
|
|
23324
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23325
|
+
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);
|
|
23326
|
+
} if (rf & 2) {
|
|
23327
|
+
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23328
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23329
|
+
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);
|
|
23363
23330
|
} }
|
|
23364
23331
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23365
23332
|
i0.ɵɵelementContainerStart(0);
|
|
23366
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23333
|
+
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);
|
|
23367
23334
|
i0.ɵɵelementContainerEnd();
|
|
23368
23335
|
} if (rf & 2) {
|
|
23369
|
-
const
|
|
23336
|
+
const sequentialQuery_r6 = i0.ɵɵreference(3);
|
|
23370
23337
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23371
23338
|
i0.ɵɵadvance();
|
|
23372
|
-
i0.ɵɵproperty("ngIf",
|
|
23339
|
+
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);
|
|
23373
23340
|
} }
|
|
23374
23341
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
23375
23342
|
i0.ɵɵelementContainerStart(0);
|
|
23376
|
-
i0.ɵɵelementStart(1, "div",
|
|
23343
|
+
i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
|
|
23377
23344
|
i0.ɵɵtext(3, "!");
|
|
23378
23345
|
i0.ɵɵelementEnd();
|
|
23379
|
-
i0.ɵɵelementStart(4, "strong",
|
|
23346
|
+
i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
|
|
23380
23347
|
i0.ɵɵtext(6, "Warning");
|
|
23381
23348
|
i0.ɵɵelementEnd();
|
|
23382
|
-
i0.ɵɵelementStart(7, "p",
|
|
23349
|
+
i0.ɵɵelementStart(7, "p", 16);
|
|
23383
23350
|
i0.ɵɵtext(8);
|
|
23384
23351
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23385
23352
|
i0.ɵɵelementEnd()()();
|
|
@@ -23390,15 +23357,15 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
|
|
|
23390
23357
|
} }
|
|
23391
23358
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23392
23359
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23393
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23360
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 8);
|
|
23394
23361
|
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); });
|
|
23395
23362
|
i0.ɵɵelementEnd();
|
|
23396
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23363
|
+
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);
|
|
23397
23364
|
} if (rf & 2) {
|
|
23398
23365
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23399
23366
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
23400
23367
|
i0.ɵɵadvance();
|
|
23401
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed
|
|
23368
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
|
|
23402
23369
|
i0.ɵɵadvance();
|
|
23403
23370
|
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && ctx_r1.isQueryClosed);
|
|
23404
23371
|
} }
|
|
@@ -23406,19 +23373,36 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23406
23373
|
route;
|
|
23407
23374
|
sessionStorageService;
|
|
23408
23375
|
caseNotifier;
|
|
23376
|
+
abstractConfig;
|
|
23409
23377
|
caseQueriesCollections;
|
|
23410
23378
|
query;
|
|
23411
23379
|
showQueryList = true;
|
|
23412
23380
|
caseId;
|
|
23381
|
+
messageType;
|
|
23382
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23383
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
23413
23384
|
isQueryClosed = false;
|
|
23414
|
-
|
|
23385
|
+
value;
|
|
23386
|
+
isMultipleFollowUpEnabled = false;
|
|
23387
|
+
currentJurisdictionId;
|
|
23388
|
+
enableServiceSpecificMultiFollowups = [];
|
|
23389
|
+
caseSubscription;
|
|
23390
|
+
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23415
23391
|
super();
|
|
23416
23392
|
this.route = route;
|
|
23417
23393
|
this.sessionStorageService = sessionStorageService;
|
|
23418
23394
|
this.caseNotifier = caseNotifier;
|
|
23395
|
+
this.abstractConfig = abstractConfig;
|
|
23419
23396
|
}
|
|
23420
23397
|
ngOnInit() {
|
|
23421
23398
|
this.caseId = this.route.snapshot.params.cid;
|
|
23399
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23400
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
|
|
23401
|
+
if (caseDetails?.case_type?.jurisdiction?.id) {
|
|
23402
|
+
this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
|
|
23403
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
23404
|
+
}
|
|
23405
|
+
});
|
|
23422
23406
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23423
23407
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
23424
23408
|
// this.caseQueriesCollections = caseMessagesMockData;
|
|
@@ -23444,9 +23428,13 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23444
23428
|
// QueryManagementUtils.extractCaseQueriesFromCaseField();
|
|
23445
23429
|
}
|
|
23446
23430
|
}
|
|
23431
|
+
ngOnDestroy() {
|
|
23432
|
+
this.caseSubscription?.unsubscribe();
|
|
23433
|
+
}
|
|
23447
23434
|
setQuery(query) {
|
|
23448
23435
|
this.showQueryList = false;
|
|
23449
23436
|
this.query = query;
|
|
23437
|
+
this.messageType = this.getMessageType(query);
|
|
23450
23438
|
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23451
23439
|
}
|
|
23452
23440
|
backToQueryListPage() {
|
|
@@ -23456,19 +23444,27 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23456
23444
|
isInternalUser() {
|
|
23457
23445
|
return isInternalUser(this.sessionStorageService);
|
|
23458
23446
|
}
|
|
23459
|
-
|
|
23460
|
-
|
|
23461
|
-
|
|
23447
|
+
getMessageType(query) {
|
|
23448
|
+
if (!query) {
|
|
23449
|
+
return undefined;
|
|
23450
|
+
}
|
|
23451
|
+
return query.children?.length
|
|
23452
|
+
? query.children[query.children.length - 1]?.messageType
|
|
23453
|
+
: query?.messageType;
|
|
23454
|
+
}
|
|
23455
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23456
|
+
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) {
|
|
23457
|
+
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);
|
|
23462
23458
|
} if (rf & 2) {
|
|
23463
|
-
const
|
|
23464
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23459
|
+
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
23460
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
|
|
23465
23461
|
} }, encapsulation: 2 });
|
|
23466
23462
|
}
|
|
23467
23463
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23468
23464
|
type: Component,
|
|
23469
|
-
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
|
|
23470
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23471
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
23465
|
+
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" }]
|
|
23466
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
23467
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
|
|
23472
23468
|
|
|
23473
23469
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23474
23470
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|
|
@@ -30733,8 +30729,6 @@ class PaletteModule {
|
|
|
30733
30729
|
CommonDataService,
|
|
30734
30730
|
LinkedCasesService,
|
|
30735
30731
|
QualifyingQuestionService,
|
|
30736
|
-
QueryManagementUtils,
|
|
30737
|
-
QueryManagementService,
|
|
30738
30732
|
{ provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
|
|
30739
30733
|
], imports: [CommonModule,
|
|
30740
30734
|
RouterModule,
|
|
@@ -30852,8 +30846,6 @@ class PaletteModule {
|
|
|
30852
30846
|
CommonDataService,
|
|
30853
30847
|
LinkedCasesService,
|
|
30854
30848
|
QualifyingQuestionService,
|
|
30855
|
-
QueryManagementUtils,
|
|
30856
|
-
QueryManagementService,
|
|
30857
30849
|
{ provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
|
|
30858
30850
|
],
|
|
30859
30851
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
@@ -40260,5 +40252,5 @@ class TestRouteSnapshotBuilder {
|
|
|
40260
40252
|
* Generated bundle index. Do not edit.
|
|
40261
40253
|
*/
|
|
40262
40254
|
|
|
40263
|
-
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewFolderToggleComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, CloseQueryComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem,
|
|
40255
|
+
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewFolderToggleComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, CloseQueryComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RespondToQueryErrorMessages, RetryUtil, RouterHelperService, RouterLinkComponent, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagAddTranslationErrorMessage, UpdateFlagAddTranslationFormComponent, UpdateFlagAddTranslationStep, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, UpdateFlagTitleDisplayPipe, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
|
|
40264
40256
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map
|