@hmcts/ccd-case-ui-toolkit 7.2.26-mid-event-callback → 7.2.26-multiple-followup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/app.config.mjs +2 -1
- package/esm2022/lib/shared/components/palette/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 +557 -566
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/app.config.d.ts +2 -0
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/components/palette/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,7 @@ class CaseEditorConfig {
|
|
|
1326
1326
|
icp_enabled;
|
|
1327
1327
|
icp_jurisdictions;
|
|
1328
1328
|
events_to_hide;
|
|
1329
|
+
enable_service_specific_multi_followups;
|
|
1329
1330
|
}
|
|
1330
1331
|
|
|
1331
1332
|
class HttpError {
|
|
@@ -20637,394 +20638,6 @@ class QualifyingQuestionService {
|
|
|
20637
20638
|
type: Injectable
|
|
20638
20639
|
}], null, null); })();
|
|
20639
20640
|
|
|
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
|
-
return this.children[childrenCount - 1].name;
|
|
20684
|
-
}
|
|
20685
|
-
get lastSubmittedDate() {
|
|
20686
|
-
const childrenCount = this.children.length;
|
|
20687
|
-
if (childrenCount <= 1) {
|
|
20688
|
-
return new Date(this.lastSubmittedMessage.createdOn);
|
|
20689
|
-
}
|
|
20690
|
-
let index;
|
|
20691
|
-
if (childrenCount > 1) {
|
|
20692
|
-
index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
|
|
20693
|
-
}
|
|
20694
|
-
return new Date(this.children[index].createdOn);
|
|
20695
|
-
}
|
|
20696
|
-
get lastResponseBy() {
|
|
20697
|
-
return this.children?.length > 0 ? this.lastSubmittedMessage.name : '';
|
|
20698
|
-
}
|
|
20699
|
-
get lastResponseDate() {
|
|
20700
|
-
const childrenCount = this.children.length;
|
|
20701
|
-
if (childrenCount === 0) {
|
|
20702
|
-
return null;
|
|
20703
|
-
}
|
|
20704
|
-
let index;
|
|
20705
|
-
if (childrenCount === 1) {
|
|
20706
|
-
index = 0;
|
|
20707
|
-
}
|
|
20708
|
-
else {
|
|
20709
|
-
index = childrenCount % 2 === 1 ? childrenCount - 1 : childrenCount - 2;
|
|
20710
|
-
}
|
|
20711
|
-
return new Date(this.children[index].createdOn);
|
|
20712
|
-
}
|
|
20713
|
-
get responseStatus() {
|
|
20714
|
-
const isThreadClosed = (item) => {
|
|
20715
|
-
if (item.isClosed === 'Yes') {
|
|
20716
|
-
return true;
|
|
20717
|
-
}
|
|
20718
|
-
return item.children?.some(child => isThreadClosed(child)) || false;
|
|
20719
|
-
};
|
|
20720
|
-
if (isThreadClosed(this)) {
|
|
20721
|
-
return QueryItemResponseStatus.CLOSED;
|
|
20722
|
-
}
|
|
20723
|
-
if (this.messageIndexInParent !== null) {
|
|
20724
|
-
return this.messageIndexInParent % 2 === 0
|
|
20725
|
-
? QueryItemResponseStatus.RESPONDED
|
|
20726
|
-
: QueryItemResponseStatus.AWAITING;
|
|
20727
|
-
}
|
|
20728
|
-
// Parent logic (children count)
|
|
20729
|
-
if (this.children && this.children.length > 0) {
|
|
20730
|
-
return this.children.length % 2 === 1
|
|
20731
|
-
? QueryItemResponseStatus.RESPONDED
|
|
20732
|
-
: QueryItemResponseStatus.AWAITING;
|
|
20733
|
-
}
|
|
20734
|
-
// No children — still awaiting
|
|
20735
|
-
return QueryItemResponseStatus.AWAITING;
|
|
20736
|
-
}
|
|
20737
|
-
}
|
|
20738
|
-
|
|
20739
|
-
class QueryListData {
|
|
20740
|
-
partyName;
|
|
20741
|
-
roleOnCase;
|
|
20742
|
-
queries;
|
|
20743
|
-
constructor(caseQueriesCollection) {
|
|
20744
|
-
this.partyName = caseQueriesCollection.partyName;
|
|
20745
|
-
this.roleOnCase = caseQueriesCollection.roleOnCase;
|
|
20746
|
-
// get the parent messages (messages without parentId) and add the children to them
|
|
20747
|
-
const parentMessages = caseQueriesCollection.caseMessages.filter((message) => !message.value.parentId);
|
|
20748
|
-
this.queries = parentMessages.map((message) => this.buildQueryListItem(message, caseQueriesCollection.caseMessages));
|
|
20749
|
-
}
|
|
20750
|
-
buildQueryListItem(message, allMessages) {
|
|
20751
|
-
const childrenMessages = allMessages.filter((childMessage) => childMessage.value.parentId === message.value.id);
|
|
20752
|
-
const children = childrenMessages.map((childMessage, index) => {
|
|
20753
|
-
const childItem = this.buildQueryListItem(childMessage, allMessages);
|
|
20754
|
-
childItem.messageIndexInParent = index; // Assign index for status logic
|
|
20755
|
-
return childItem;
|
|
20756
|
-
});
|
|
20757
|
-
const queryListItem = new QueryListItem();
|
|
20758
|
-
Object.assign(queryListItem, {
|
|
20759
|
-
...message.value,
|
|
20760
|
-
children
|
|
20761
|
-
});
|
|
20762
|
-
return queryListItem;
|
|
20763
|
-
}
|
|
20764
|
-
}
|
|
20765
|
-
|
|
20766
|
-
class QueryManagementUtils {
|
|
20767
|
-
static caseLevelCaseFieldId = 'CaseQueriesCollection';
|
|
20768
|
-
static FIELD_TYPE_COLLECTION = 'Collection';
|
|
20769
|
-
static FIELD_TYPE_COMPLEX = 'Complex';
|
|
20770
|
-
static DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
20771
|
-
static extractCaseQueriesFromCaseField(caseField) {
|
|
20772
|
-
const { field_type, value, display_context } = caseField;
|
|
20773
|
-
// Handle Complex type fields
|
|
20774
|
-
if (field_type.type === QueryManagementUtils.FIELD_TYPE_COMPLEX) {
|
|
20775
|
-
if (field_type.id === QueryManagementUtils.caseLevelCaseFieldId && display_context !== QueryManagementUtils.DISPLAY_CONTEXT_READONLY && QueryManagementUtils.isNonEmptyObject(value)) {
|
|
20776
|
-
return value;
|
|
20777
|
-
}
|
|
20778
|
-
return null;
|
|
20779
|
-
}
|
|
20780
|
-
}
|
|
20781
|
-
static documentToCollectionFormDocument(document) {
|
|
20782
|
-
return {
|
|
20783
|
-
id: null,
|
|
20784
|
-
value: {
|
|
20785
|
-
document_filename: document?.originalDocumentName,
|
|
20786
|
-
document_url: document?._links?.self?.href,
|
|
20787
|
-
document_binary_url: document?._links?.binary?.href
|
|
20788
|
-
}
|
|
20789
|
-
};
|
|
20790
|
-
}
|
|
20791
|
-
static getNewQueryData(formGroup, currentUserDetails) {
|
|
20792
|
-
const attachments = formGroup.get('attachments').value;
|
|
20793
|
-
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
20794
|
-
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
20795
|
-
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
20796
|
-
const subject = formGroup.get('subject').value;
|
|
20797
|
-
const body = formGroup.get('body').value;
|
|
20798
|
-
const isHearingRelated = formGroup.get('isHearingRelated').value ? 'Yes' : 'No';
|
|
20799
|
-
const hearingDate = (isHearingRelated === 'Yes')
|
|
20800
|
-
? this.formattedDate(formGroup.get('hearingDate').value)
|
|
20801
|
-
: null;
|
|
20802
|
-
return {
|
|
20803
|
-
id: v4(),
|
|
20804
|
-
subject,
|
|
20805
|
-
name: currentUserName,
|
|
20806
|
-
body,
|
|
20807
|
-
attachments: formDocument,
|
|
20808
|
-
isHearingRelated,
|
|
20809
|
-
hearingDate,
|
|
20810
|
-
createdOn: new Date(),
|
|
20811
|
-
createdBy: currentUserId
|
|
20812
|
-
};
|
|
20813
|
-
}
|
|
20814
|
-
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
|
|
20815
|
-
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
20816
|
-
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
20817
|
-
const body = formGroup.get('body').value;
|
|
20818
|
-
const attachments = formGroup.get('attachments').value;
|
|
20819
|
-
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
20820
|
-
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
20821
|
-
return {
|
|
20822
|
-
id: v4(),
|
|
20823
|
-
subject: queryItem.subject,
|
|
20824
|
-
name: currentUserName,
|
|
20825
|
-
body,
|
|
20826
|
-
attachments: formDocument,
|
|
20827
|
-
isHearingRelated: queryItem.isHearingRelated,
|
|
20828
|
-
hearingDate: queryItem.hearingDate,
|
|
20829
|
-
createdOn: new Date(),
|
|
20830
|
-
createdBy: currentUserId,
|
|
20831
|
-
parentId: queryItem.id,
|
|
20832
|
-
isClosed
|
|
20833
|
-
};
|
|
20834
|
-
}
|
|
20835
|
-
static isObject(elem) {
|
|
20836
|
-
return typeof elem === 'object' && elem !== null;
|
|
20837
|
-
}
|
|
20838
|
-
static isNonEmptyObject(elem) {
|
|
20839
|
-
return this.isObject(elem) && Object.keys(elem).length !== 0;
|
|
20840
|
-
}
|
|
20841
|
-
static formattedDate(date) {
|
|
20842
|
-
const formattedDate = moment(date).format('YYYY-MM-DD');
|
|
20843
|
-
return formattedDate;
|
|
20844
|
-
}
|
|
20845
|
-
static ɵfac = function QueryManagementUtils_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementUtils)(); };
|
|
20846
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
|
|
20847
|
-
}
|
|
20848
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementUtils, [{
|
|
20849
|
-
type: Injectable
|
|
20850
|
-
}], null, null); })();
|
|
20851
|
-
|
|
20852
|
-
const CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
|
|
20853
|
-
const FIELD_TYPE_COMPLEX = 'Complex';
|
|
20854
|
-
const DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
20855
|
-
const QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
|
|
20856
|
-
const QM_COLLECTION_PROMPT = 'promptQmCollection';
|
|
20857
|
-
const CIVIL_JURISDICTION = 'CIVIL';
|
|
20858
|
-
|
|
20859
|
-
class QueryManagementService {
|
|
20860
|
-
router;
|
|
20861
|
-
sessionStorageService;
|
|
20862
|
-
caseQueriesCollections;
|
|
20863
|
-
fieldId;
|
|
20864
|
-
constructor(router, sessionStorageService) {
|
|
20865
|
-
this.router = router;
|
|
20866
|
-
this.sessionStorageService = sessionStorageService;
|
|
20867
|
-
}
|
|
20868
|
-
generateCaseQueriesCollectionData(formGroup, queryCreateContext, queryItem, messageId // Get the message ID from route params (if present)
|
|
20869
|
-
) {
|
|
20870
|
-
let currentUserDetails;
|
|
20871
|
-
try {
|
|
20872
|
-
currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
20873
|
-
}
|
|
20874
|
-
catch (e) {
|
|
20875
|
-
console.error('Could not parse USER_DETAILS from session storage:', e);
|
|
20876
|
-
currentUserDetails = {};
|
|
20877
|
-
}
|
|
20878
|
-
const caseMessage = queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
20879
|
-
? QueryManagementUtils.getNewQueryData(formGroup, currentUserDetails)
|
|
20880
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails);
|
|
20881
|
-
const isNewQuery = queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
20882
|
-
// Check if the field ID has been set dynamically
|
|
20883
|
-
if (!this.fieldId) {
|
|
20884
|
-
console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
|
|
20885
|
-
this.router.navigate(['/', 'service-down']);
|
|
20886
|
-
throw new Error('Field ID for CaseQueriesCollection not found. Aborting query data generation.');
|
|
20887
|
-
}
|
|
20888
|
-
// Initialize new query data structure
|
|
20889
|
-
const newQueryData = {};
|
|
20890
|
-
if (this.caseQueriesCollections?.length) {
|
|
20891
|
-
let matchedCollection;
|
|
20892
|
-
// If it's not a new query, try to find the existing collection with the message ID
|
|
20893
|
-
if (!isNewQuery && messageId) {
|
|
20894
|
-
matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
|
|
20895
|
-
}
|
|
20896
|
-
if (matchedCollection) {
|
|
20897
|
-
// Append the new case message to the matched collection's caseMessages
|
|
20898
|
-
matchedCollection.caseMessages.push({
|
|
20899
|
-
id: null,
|
|
20900
|
-
value: caseMessage
|
|
20901
|
-
});
|
|
20902
|
-
// Add the matched collection to newQueryData
|
|
20903
|
-
newQueryData[this.fieldId] = {
|
|
20904
|
-
...matchedCollection, // Keep existing data intact
|
|
20905
|
-
caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
|
|
20906
|
-
};
|
|
20907
|
-
}
|
|
20908
|
-
else {
|
|
20909
|
-
// Use partyName from the first collection (assumption: all share the same party)
|
|
20910
|
-
const originalPartyName = this.caseQueriesCollections?.[0]?.partyName ?? currentUserDetails?.name;
|
|
20911
|
-
// If no collection matches, or it's a new query
|
|
20912
|
-
newQueryData[this.fieldId] = {
|
|
20913
|
-
partyName: originalPartyName,
|
|
20914
|
-
roleOnCase: '', // Not returned by CCD
|
|
20915
|
-
caseMessages: [
|
|
20916
|
-
{
|
|
20917
|
-
id: null,
|
|
20918
|
-
value: caseMessage
|
|
20919
|
-
}
|
|
20920
|
-
]
|
|
20921
|
-
};
|
|
20922
|
-
// If caseQueriesCollections is not empty, append its data
|
|
20923
|
-
newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
|
|
20924
|
-
}
|
|
20925
|
-
}
|
|
20926
|
-
else {
|
|
20927
|
-
// If there are no existing collections, create a new one (e.g., for new queries)
|
|
20928
|
-
newQueryData[this.fieldId] = {
|
|
20929
|
-
partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
|
|
20930
|
-
roleOnCase: '', // Not returned by CCD
|
|
20931
|
-
caseMessages: [
|
|
20932
|
-
{
|
|
20933
|
-
id: null,
|
|
20934
|
-
value: caseMessage
|
|
20935
|
-
}
|
|
20936
|
-
]
|
|
20937
|
-
};
|
|
20938
|
-
}
|
|
20939
|
-
return newQueryData;
|
|
20940
|
-
}
|
|
20941
|
-
setCaseQueriesCollectionData(eventData, queryCreateContext, caseDetails, messageId) {
|
|
20942
|
-
const resolvedFieldId = this.resolveFieldId(eventData, queryCreateContext, caseDetails, messageId);
|
|
20943
|
-
if (!resolvedFieldId) {
|
|
20944
|
-
console.error('Failed to resolve fieldId for CaseQueriesCollection. Cannot proceed.');
|
|
20945
|
-
return;
|
|
20946
|
-
}
|
|
20947
|
-
this.fieldId = resolvedFieldId;
|
|
20948
|
-
this.caseQueriesCollections = eventData.case_fields.reduce((acc, field) => {
|
|
20949
|
-
if (field.id === this.fieldId) {
|
|
20950
|
-
const extracted = QueryManagementUtils.extractCaseQueriesFromCaseField(field);
|
|
20951
|
-
if (extracted && typeof extracted === 'object') {
|
|
20952
|
-
acc.push(extracted);
|
|
20953
|
-
}
|
|
20954
|
-
}
|
|
20955
|
-
return acc;
|
|
20956
|
-
}, []);
|
|
20957
|
-
}
|
|
20958
|
-
resolveFieldId(eventData, queryCreateContext, caseDetails, messageId) {
|
|
20959
|
-
// Step 1: Filter candidate fields (must be editable CaseQueriesCollection fields)
|
|
20960
|
-
const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
|
|
20961
|
-
field.field_type.type === FIELD_TYPE_COMPLEX &&
|
|
20962
|
-
field.display_context !== DISPLAY_CONTEXT_READONLY);
|
|
20963
|
-
if (!candidateFields?.length) {
|
|
20964
|
-
console.warn('No editable CaseQueriesCollection fields found.');
|
|
20965
|
-
return null;
|
|
20966
|
-
}
|
|
20967
|
-
const numberOfCollections = candidateFields.length;
|
|
20968
|
-
const jurisdictionId = caseDetails?.case_type?.jurisdiction?.id ?? '';
|
|
20969
|
-
// Step 2: If messageId is present, try to locate the field containing that message
|
|
20970
|
-
if (messageId) {
|
|
20971
|
-
const fieldByMessage = candidateFields.find((field) => field?.value?.caseMessages?.some((msg) => msg?.value?.id === messageId));
|
|
20972
|
-
if (fieldByMessage) {
|
|
20973
|
-
return fieldByMessage.id; // Found the matching field by message ID
|
|
20974
|
-
}
|
|
20975
|
-
}
|
|
20976
|
-
// Step 3: Handle new queries
|
|
20977
|
-
if (queryCreateContext === QueryCreateContext.NEW_QUERY) {
|
|
20978
|
-
// If there's only one collection, use it
|
|
20979
|
-
if (numberOfCollections === 1) {
|
|
20980
|
-
return candidateFields[0].id;
|
|
20981
|
-
}
|
|
20982
|
-
// For multiple collections, use jurisdiction-based resolution strategy
|
|
20983
|
-
if (this.getCollectionSelectionMethod(jurisdictionId) === QM_SELECT_FIRST_COLLECTION) {
|
|
20984
|
-
// Choose the one with the lowest order from the first wizard page
|
|
20985
|
-
const firstOrdered = this.getCaseQueriesCollectionFieldOrderFromWizardPages(eventData);
|
|
20986
|
-
if (firstOrdered) {
|
|
20987
|
-
return firstOrdered.id;
|
|
20988
|
-
}
|
|
20989
|
-
}
|
|
20990
|
-
else {
|
|
20991
|
-
console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
|
|
20992
|
-
return null;
|
|
20993
|
-
}
|
|
20994
|
-
}
|
|
20995
|
-
// Step 4: Fallback — if none of the above succeeded
|
|
20996
|
-
console.warn('Could not determine fieldId for context:', queryCreateContext);
|
|
20997
|
-
return null;
|
|
20998
|
-
}
|
|
20999
|
-
getCaseQueriesCollectionFieldOrderFromWizardPages(eventData) {
|
|
21000
|
-
const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
|
|
21001
|
-
field.field_type.type === FIELD_TYPE_COMPLEX &&
|
|
21002
|
-
field.display_context !== DISPLAY_CONTEXT_READONLY);
|
|
21003
|
-
if (!candidateFields?.length) {
|
|
21004
|
-
return undefined;
|
|
21005
|
-
}
|
|
21006
|
-
const firstPageFields = eventData?.wizard_pages?.[0]?.wizard_page_fields;
|
|
21007
|
-
if (!firstPageFields) {
|
|
21008
|
-
return undefined;
|
|
21009
|
-
}
|
|
21010
|
-
return candidateFields
|
|
21011
|
-
.map((field) => {
|
|
21012
|
-
const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
|
|
21013
|
-
return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
|
|
21014
|
-
})
|
|
21015
|
-
.sort((a, b) => a.order - b.order)[0]?.field;
|
|
21016
|
-
}
|
|
21017
|
-
getCollectionSelectionMethod(jurisdiction) {
|
|
21018
|
-
return jurisdiction.toUpperCase() === CIVIL_JURISDICTION ? QM_SELECT_FIRST_COLLECTION : QM_COLLECTION_PROMPT;
|
|
21019
|
-
}
|
|
21020
|
-
static ɵfac = function QueryManagementService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementService)(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
21021
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementService, factory: QueryManagementService.ɵfac, providedIn: 'root' });
|
|
21022
|
-
}
|
|
21023
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementService, [{
|
|
21024
|
-
type: Injectable,
|
|
21025
|
-
args: [{ providedIn: 'root' }]
|
|
21026
|
-
}], () => [{ type: i1$1.Router }, { type: SessionStorageService }], null); })();
|
|
21027
|
-
|
|
21028
20641
|
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
|
|
21029
20642
|
i0.ɵɵelementContainerStart(0);
|
|
21030
20643
|
i0.ɵɵelementStart(1, "p", 8)(2, "span", 9);
|
|
@@ -21271,6 +20884,235 @@ class QueryCaseDetailsHeaderComponent {
|
|
|
21271
20884
|
}] }); })();
|
|
21272
20885
|
(() => { (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 }); })();
|
|
21273
20886
|
|
|
20887
|
+
var QueryCreateContext;
|
|
20888
|
+
(function (QueryCreateContext) {
|
|
20889
|
+
QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_OPTIONS"] = "NewQueryQualifyingQuestionOptions";
|
|
20890
|
+
QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_DETAIL"] = "NewQueryQualifyingQuestionDetail";
|
|
20891
|
+
QueryCreateContext["NEW_QUERY"] = "NewQuery";
|
|
20892
|
+
QueryCreateContext["RESPOND"] = "Respond";
|
|
20893
|
+
QueryCreateContext["FOLLOWUP"] = "Followup";
|
|
20894
|
+
})(QueryCreateContext || (QueryCreateContext = {}));
|
|
20895
|
+
|
|
20896
|
+
class QueryListItem {
|
|
20897
|
+
id;
|
|
20898
|
+
subject;
|
|
20899
|
+
name;
|
|
20900
|
+
body;
|
|
20901
|
+
attachments = [];
|
|
20902
|
+
isHearingRelated;
|
|
20903
|
+
hearingDate;
|
|
20904
|
+
createdOn;
|
|
20905
|
+
createdBy;
|
|
20906
|
+
parentId;
|
|
20907
|
+
isClosed;
|
|
20908
|
+
messageType;
|
|
20909
|
+
children = [];
|
|
20910
|
+
messageIndexInParent = null;
|
|
20911
|
+
get lastSubmittedMessage() {
|
|
20912
|
+
const getLastSubmittedMessage = (item) => {
|
|
20913
|
+
let lastSubmittedMessage = item;
|
|
20914
|
+
if (item.children && item.children.length > 1) {
|
|
20915
|
+
for (const child of item.children) {
|
|
20916
|
+
const childLastSubmittedMessage = getLastSubmittedMessage(child);
|
|
20917
|
+
if (childLastSubmittedMessage.createdOn > lastSubmittedMessage.createdOn) {
|
|
20918
|
+
lastSubmittedMessage = childLastSubmittedMessage;
|
|
20919
|
+
}
|
|
20920
|
+
}
|
|
20921
|
+
}
|
|
20922
|
+
return lastSubmittedMessage;
|
|
20923
|
+
};
|
|
20924
|
+
return getLastSubmittedMessage(this);
|
|
20925
|
+
}
|
|
20926
|
+
get lastSubmittedBy() {
|
|
20927
|
+
const childrenCount = this.children.length;
|
|
20928
|
+
if (childrenCount === 0) {
|
|
20929
|
+
return this.lastSubmittedMessage.name;
|
|
20930
|
+
}
|
|
20931
|
+
return this.children[childrenCount - 1].name;
|
|
20932
|
+
}
|
|
20933
|
+
get lastSubmittedDate() {
|
|
20934
|
+
const childrenCount = this.children.length;
|
|
20935
|
+
if (childrenCount <= 1) {
|
|
20936
|
+
return new Date(this.lastSubmittedMessage.createdOn);
|
|
20937
|
+
}
|
|
20938
|
+
let index;
|
|
20939
|
+
if (childrenCount > 1) {
|
|
20940
|
+
index = childrenCount % 2 === 0 ? childrenCount - 1 : childrenCount - 2;
|
|
20941
|
+
}
|
|
20942
|
+
return new Date(this.children[index].createdOn);
|
|
20943
|
+
}
|
|
20944
|
+
get lastResponseBy() {
|
|
20945
|
+
return this.children?.length > 0 ? this.lastSubmittedMessage.name : '';
|
|
20946
|
+
}
|
|
20947
|
+
get lastResponseDate() {
|
|
20948
|
+
const childrenCount = this.children.length;
|
|
20949
|
+
if (childrenCount === 0) {
|
|
20950
|
+
return null;
|
|
20951
|
+
}
|
|
20952
|
+
let index;
|
|
20953
|
+
if (childrenCount === 1) {
|
|
20954
|
+
index = 0;
|
|
20955
|
+
}
|
|
20956
|
+
else {
|
|
20957
|
+
index = childrenCount % 2 === 1 ? childrenCount - 1 : childrenCount - 2;
|
|
20958
|
+
}
|
|
20959
|
+
return new Date(this.children[index].createdOn);
|
|
20960
|
+
}
|
|
20961
|
+
get responseStatus() {
|
|
20962
|
+
const isThreadClosed = (item) => {
|
|
20963
|
+
if (item.isClosed === 'Yes') {
|
|
20964
|
+
return true;
|
|
20965
|
+
}
|
|
20966
|
+
return item.children?.some((child) => isThreadClosed(child)) || false;
|
|
20967
|
+
};
|
|
20968
|
+
if (isThreadClosed(this)) {
|
|
20969
|
+
return QueryItemResponseStatus.CLOSED;
|
|
20970
|
+
}
|
|
20971
|
+
const lastMessageType = this.children?.length
|
|
20972
|
+
? this.children[this.children.length - 1]?.messageType
|
|
20973
|
+
: undefined;
|
|
20974
|
+
if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
|
|
20975
|
+
return QueryItemResponseStatus.RESPONDED;
|
|
20976
|
+
}
|
|
20977
|
+
else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
|
|
20978
|
+
return QueryItemResponseStatus.AWAITING;
|
|
20979
|
+
}
|
|
20980
|
+
if (this.messageIndexInParent !== null) {
|
|
20981
|
+
return this.messageIndexInParent % 2 === 0
|
|
20982
|
+
? QueryItemResponseStatus.RESPONDED
|
|
20983
|
+
: QueryItemResponseStatus.AWAITING;
|
|
20984
|
+
}
|
|
20985
|
+
// Parent logic (children count)
|
|
20986
|
+
if (this.children && this.children.length > 0) {
|
|
20987
|
+
return this.children.length % 2 === 1
|
|
20988
|
+
? QueryItemResponseStatus.RESPONDED
|
|
20989
|
+
: QueryItemResponseStatus.AWAITING;
|
|
20990
|
+
}
|
|
20991
|
+
// No children — still awaiting
|
|
20992
|
+
return QueryItemResponseStatus.AWAITING;
|
|
20993
|
+
}
|
|
20994
|
+
}
|
|
20995
|
+
|
|
20996
|
+
class QueryListData {
|
|
20997
|
+
partyName;
|
|
20998
|
+
roleOnCase;
|
|
20999
|
+
queries;
|
|
21000
|
+
constructor(caseQueriesCollection) {
|
|
21001
|
+
this.partyName = caseQueriesCollection.partyName;
|
|
21002
|
+
this.roleOnCase = caseQueriesCollection.roleOnCase;
|
|
21003
|
+
// get the parent messages (messages without parentId) and add the children to them
|
|
21004
|
+
const parentMessages = caseQueriesCollection.caseMessages.filter((message) => !message.value.parentId);
|
|
21005
|
+
this.queries = parentMessages.map((message) => this.buildQueryListItem(message, caseQueriesCollection.caseMessages));
|
|
21006
|
+
}
|
|
21007
|
+
buildQueryListItem(message, allMessages) {
|
|
21008
|
+
const childrenMessages = allMessages.filter((childMessage) => childMessage.value.parentId === message.value.id);
|
|
21009
|
+
const children = childrenMessages.map((childMessage, index) => {
|
|
21010
|
+
const childItem = this.buildQueryListItem(childMessage, allMessages);
|
|
21011
|
+
childItem.messageIndexInParent = index; // Assign index for status logic
|
|
21012
|
+
return childItem;
|
|
21013
|
+
});
|
|
21014
|
+
const queryListItem = new QueryListItem();
|
|
21015
|
+
Object.assign(queryListItem, {
|
|
21016
|
+
...message.value,
|
|
21017
|
+
children
|
|
21018
|
+
});
|
|
21019
|
+
return queryListItem;
|
|
21020
|
+
}
|
|
21021
|
+
}
|
|
21022
|
+
|
|
21023
|
+
class QueryManagementUtils {
|
|
21024
|
+
static caseLevelCaseFieldId = 'CaseQueriesCollection';
|
|
21025
|
+
static FIELD_TYPE_COLLECTION = 'Collection';
|
|
21026
|
+
static FIELD_TYPE_COMPLEX = 'Complex';
|
|
21027
|
+
static DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
21028
|
+
static extractCaseQueriesFromCaseField(caseField) {
|
|
21029
|
+
const { field_type, value, display_context } = caseField;
|
|
21030
|
+
// Handle Complex type fields
|
|
21031
|
+
if (field_type.type === QueryManagementUtils.FIELD_TYPE_COMPLEX) {
|
|
21032
|
+
if (field_type.id === QueryManagementUtils.caseLevelCaseFieldId && display_context !== QueryManagementUtils.DISPLAY_CONTEXT_READONLY && QueryManagementUtils.isNonEmptyObject(value)) {
|
|
21033
|
+
return value;
|
|
21034
|
+
}
|
|
21035
|
+
return null;
|
|
21036
|
+
}
|
|
21037
|
+
}
|
|
21038
|
+
static documentToCollectionFormDocument(document) {
|
|
21039
|
+
return {
|
|
21040
|
+
id: null,
|
|
21041
|
+
value: {
|
|
21042
|
+
document_filename: document?.originalDocumentName,
|
|
21043
|
+
document_url: document?._links?.self?.href,
|
|
21044
|
+
document_binary_url: document?._links?.binary?.href
|
|
21045
|
+
}
|
|
21046
|
+
};
|
|
21047
|
+
}
|
|
21048
|
+
static getNewQueryData(formGroup, currentUserDetails) {
|
|
21049
|
+
const attachments = formGroup.get('attachments').value;
|
|
21050
|
+
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21051
|
+
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21052
|
+
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21053
|
+
const subject = formGroup.get('subject').value;
|
|
21054
|
+
const body = formGroup.get('body').value;
|
|
21055
|
+
const isHearingRelated = formGroup.get('isHearingRelated').value ? 'Yes' : 'No';
|
|
21056
|
+
const hearingDate = (isHearingRelated === 'Yes')
|
|
21057
|
+
? this.formattedDate(formGroup.get('hearingDate').value)
|
|
21058
|
+
: null;
|
|
21059
|
+
return {
|
|
21060
|
+
id: v4(),
|
|
21061
|
+
subject,
|
|
21062
|
+
name: currentUserName,
|
|
21063
|
+
body,
|
|
21064
|
+
attachments: formDocument,
|
|
21065
|
+
isHearingRelated,
|
|
21066
|
+
hearingDate,
|
|
21067
|
+
createdOn: new Date(),
|
|
21068
|
+
createdBy: currentUserId,
|
|
21069
|
+
messageType: QueryCreateContext.FOLLOWUP // Default to value new queries will be FOLLOWUP
|
|
21070
|
+
};
|
|
21071
|
+
}
|
|
21072
|
+
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam) {
|
|
21073
|
+
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21074
|
+
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21075
|
+
const body = formGroup.get('body').value;
|
|
21076
|
+
const attachments = formGroup.get('attachments').value;
|
|
21077
|
+
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21078
|
+
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
21079
|
+
const messageType = messageTypeParam === QueryCreateContext.RESPOND
|
|
21080
|
+
? QueryCreateContext.RESPOND
|
|
21081
|
+
: messageTypeParam === QueryCreateContext.FOLLOWUP
|
|
21082
|
+
? QueryCreateContext.FOLLOWUP
|
|
21083
|
+
: undefined;
|
|
21084
|
+
return {
|
|
21085
|
+
id: v4(),
|
|
21086
|
+
subject: queryItem.subject,
|
|
21087
|
+
name: currentUserName,
|
|
21088
|
+
body,
|
|
21089
|
+
attachments: formDocument,
|
|
21090
|
+
isHearingRelated: queryItem.isHearingRelated,
|
|
21091
|
+
hearingDate: queryItem.hearingDate,
|
|
21092
|
+
createdOn: new Date(),
|
|
21093
|
+
createdBy: currentUserId,
|
|
21094
|
+
parentId: queryItem.id,
|
|
21095
|
+
isClosed,
|
|
21096
|
+
messageType
|
|
21097
|
+
};
|
|
21098
|
+
}
|
|
21099
|
+
static isObject(elem) {
|
|
21100
|
+
return typeof elem === 'object' && elem !== null;
|
|
21101
|
+
}
|
|
21102
|
+
static isNonEmptyObject(elem) {
|
|
21103
|
+
return this.isObject(elem) && Object.keys(elem).length !== 0;
|
|
21104
|
+
}
|
|
21105
|
+
static formattedDate(date) {
|
|
21106
|
+
const formattedDate = moment(date).format('YYYY-MM-DD');
|
|
21107
|
+
return formattedDate;
|
|
21108
|
+
}
|
|
21109
|
+
static ɵfac = function QueryManagementUtils_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementUtils)(); };
|
|
21110
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
|
|
21111
|
+
}
|
|
21112
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementUtils, [{
|
|
21113
|
+
type: Injectable
|
|
21114
|
+
}], null, null); })();
|
|
21115
|
+
|
|
21274
21116
|
function QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template(rf, ctx) { if (rf & 1) {
|
|
21275
21117
|
i0.ɵɵelementStart(0, "li")(1, "a", 28);
|
|
21276
21118
|
i0.ɵɵtext(2);
|
|
@@ -21596,27 +21438,21 @@ class QueryCheckYourAnswersComponent {
|
|
|
21596
21438
|
casesService;
|
|
21597
21439
|
caseNotifier;
|
|
21598
21440
|
workAllocationService;
|
|
21441
|
+
sessionStorageService;
|
|
21599
21442
|
qualifyingQuestionService;
|
|
21600
|
-
queryManagementService;
|
|
21601
|
-
errorNotifierService;
|
|
21602
|
-
alertService;
|
|
21603
21443
|
RAISE_A_QUERY_EVENT_TRIGGER_ID = 'queryManagementRaiseQuery';
|
|
21604
21444
|
RESPOND_TO_QUERY_EVENT_TRIGGER_ID = 'queryManagementRespondQuery';
|
|
21605
21445
|
CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
|
|
21606
|
-
static TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
|
|
21607
|
-
static TRIGGER_TEXT_START = 'Continue';
|
|
21608
21446
|
FIELD_TYPE_COMPLEX = 'Complex';
|
|
21609
21447
|
DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
21610
21448
|
QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
|
|
21611
21449
|
QM_COLLECTION_PROMPT = 'promptQmCollection';
|
|
21612
21450
|
CIVIL_JURISDICTION = 'CIVIL';
|
|
21613
|
-
triggerTextStart = QueryCheckYourAnswersComponent.TRIGGER_TEXT_START;
|
|
21614
|
-
triggerTextIgnoreWarnings = QueryCheckYourAnswersComponent.TRIGGER_TEXT_CONTINUE;
|
|
21615
21451
|
formGroup;
|
|
21616
21452
|
queryItem;
|
|
21617
21453
|
queryCreateContext;
|
|
21618
21454
|
eventData = null;
|
|
21619
|
-
|
|
21455
|
+
multipleFollowUpFeature;
|
|
21620
21456
|
backClicked = new EventEmitter();
|
|
21621
21457
|
querySubmitted = new EventEmitter();
|
|
21622
21458
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21635,24 +21471,20 @@ class QueryCheckYourAnswersComponent {
|
|
|
21635
21471
|
filteredTasks = [];
|
|
21636
21472
|
readyToSubmit;
|
|
21637
21473
|
isSubmitting = false;
|
|
21638
|
-
messgaeId;
|
|
21639
21474
|
callbackErrorsSubject = new Subject();
|
|
21640
21475
|
error;
|
|
21641
|
-
constructor(route, router, casesService, caseNotifier, workAllocationService,
|
|
21476
|
+
constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, qualifyingQuestionService) {
|
|
21642
21477
|
this.route = route;
|
|
21643
21478
|
this.router = router;
|
|
21644
21479
|
this.casesService = casesService;
|
|
21645
21480
|
this.caseNotifier = caseNotifier;
|
|
21646
21481
|
this.workAllocationService = workAllocationService;
|
|
21482
|
+
this.sessionStorageService = sessionStorageService;
|
|
21647
21483
|
this.qualifyingQuestionService = qualifyingQuestionService;
|
|
21648
|
-
this.queryManagementService = queryManagementService;
|
|
21649
|
-
this.errorNotifierService = errorNotifierService;
|
|
21650
|
-
this.alertService = alertService;
|
|
21651
21484
|
}
|
|
21652
21485
|
ngOnInit() {
|
|
21653
21486
|
this.queryId = this.route.snapshot.params.qid;
|
|
21654
21487
|
this.tid = this.route.snapshot.queryParams?.tid;
|
|
21655
|
-
this.messgaeId = this.route.snapshot.params.dataid;
|
|
21656
21488
|
this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
|
|
21657
21489
|
this.caseDetails = caseDetails;
|
|
21658
21490
|
// Find the appropriate event trigger based on the queryCreateContext
|
|
@@ -21681,23 +21513,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21681
21513
|
}
|
|
21682
21514
|
},
|
|
21683
21515
|
error: (error) => {
|
|
21516
|
+
console.error('Error in searchTasksSubscription:', error);
|
|
21684
21517
|
this.readyToSubmit = false;
|
|
21685
|
-
if (error.status !== 401 && error.status !== 403) {
|
|
21686
|
-
this.errorNotifierService.announceError(error);
|
|
21687
|
-
this.alertService.error({ phrase: error.message });
|
|
21688
|
-
console.error('Error occurred while fetching event data:', error);
|
|
21689
|
-
this.callbackErrorsSubject.next(error);
|
|
21690
|
-
}
|
|
21691
|
-
else {
|
|
21692
|
-
this.errorMessages = [
|
|
21693
|
-
{
|
|
21694
|
-
title: 'Error',
|
|
21695
|
-
description: 'Something unexpected happened. Please try again later.',
|
|
21696
|
-
fieldId: 'field-id'
|
|
21697
|
-
}
|
|
21698
|
-
];
|
|
21699
|
-
}
|
|
21700
|
-
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21701
21518
|
}
|
|
21702
21519
|
});
|
|
21703
21520
|
}
|
|
@@ -21708,7 +21525,6 @@ class QueryCheckYourAnswersComponent {
|
|
|
21708
21525
|
ngOnDestroy() {
|
|
21709
21526
|
this.createEventSubscription?.unsubscribe();
|
|
21710
21527
|
this.searchTasksSubscription?.unsubscribe();
|
|
21711
|
-
this.callbackErrorsSubject?.unsubscribe();
|
|
21712
21528
|
}
|
|
21713
21529
|
goBack() {
|
|
21714
21530
|
this.backClicked.emit(true);
|
|
@@ -21717,7 +21533,20 @@ class QueryCheckYourAnswersComponent {
|
|
|
21717
21533
|
if (this.isSubmitting) {
|
|
21718
21534
|
return;
|
|
21719
21535
|
}
|
|
21720
|
-
|
|
21536
|
+
// Check if fieldId is null or undefined
|
|
21537
|
+
if (!this.fieldId) {
|
|
21538
|
+
console.error('Error: Field ID is missing. Cannot proceed with submission.');
|
|
21539
|
+
this.errorMessages = [
|
|
21540
|
+
{
|
|
21541
|
+
title: 'Error',
|
|
21542
|
+
description: 'This case is not configured for query management.',
|
|
21543
|
+
fieldId: 'field-id'
|
|
21544
|
+
}
|
|
21545
|
+
];
|
|
21546
|
+
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21547
|
+
return;
|
|
21548
|
+
}
|
|
21549
|
+
const data = this.generateCaseQueriesCollectionData();
|
|
21721
21550
|
const createEvent$ = this.createEvent(data);
|
|
21722
21551
|
this.isSubmitting = true;
|
|
21723
21552
|
if (this.queryCreateContext === QueryCreateContext.RESPOND) {
|
|
@@ -21778,7 +21607,172 @@ class QueryCheckYourAnswersComponent {
|
|
|
21778
21607
|
handleError(error) {
|
|
21779
21608
|
console.error('Error in API calls:', error);
|
|
21780
21609
|
this.isSubmitting = false;
|
|
21781
|
-
this.
|
|
21610
|
+
if (this.isServiceErrorFound(error)) {
|
|
21611
|
+
this.error = null;
|
|
21612
|
+
this.callbackErrorsSubject.next(error);
|
|
21613
|
+
}
|
|
21614
|
+
else {
|
|
21615
|
+
if (error && error.status !== 401 && error.status !== 403) {
|
|
21616
|
+
this.error = error;
|
|
21617
|
+
}
|
|
21618
|
+
else {
|
|
21619
|
+
this.router.navigate(['/', 'service-down']);
|
|
21620
|
+
}
|
|
21621
|
+
}
|
|
21622
|
+
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21623
|
+
}
|
|
21624
|
+
generateCaseQueriesCollectionData() {
|
|
21625
|
+
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21626
|
+
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21627
|
+
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21628
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails, this.queryCreateContext);
|
|
21629
|
+
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21630
|
+
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21631
|
+
// Check if the field ID has been set dynamically
|
|
21632
|
+
if (!this.fieldId) {
|
|
21633
|
+
console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
|
|
21634
|
+
this.router.navigate(['/', 'service-down']);
|
|
21635
|
+
}
|
|
21636
|
+
// Initialize new query data structure
|
|
21637
|
+
const newQueryData = {};
|
|
21638
|
+
if (this.caseQueriesCollections?.length) {
|
|
21639
|
+
let matchedCollection;
|
|
21640
|
+
// If it's not a new query, try to find the existing collection with the message ID
|
|
21641
|
+
if (!isNewQuery && messageId) {
|
|
21642
|
+
matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
|
|
21643
|
+
}
|
|
21644
|
+
if (matchedCollection) {
|
|
21645
|
+
// Append the new case message to the matched collection's caseMessages
|
|
21646
|
+
matchedCollection.caseMessages.push({
|
|
21647
|
+
id: null,
|
|
21648
|
+
value: caseMessage
|
|
21649
|
+
});
|
|
21650
|
+
// Add the matched collection to newQueryData
|
|
21651
|
+
newQueryData[this.fieldId] = {
|
|
21652
|
+
...matchedCollection, // Keep existing data intact
|
|
21653
|
+
caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
|
|
21654
|
+
};
|
|
21655
|
+
}
|
|
21656
|
+
else {
|
|
21657
|
+
// Use partyName from the first collection (assumption: all share the same party)
|
|
21658
|
+
const originalPartyName = this.caseQueriesCollections[0].partyName;
|
|
21659
|
+
// If no collection matches, or it's a new query
|
|
21660
|
+
newQueryData[this.fieldId] = {
|
|
21661
|
+
partyName: originalPartyName,
|
|
21662
|
+
roleOnCase: '', // Not returned by CCD
|
|
21663
|
+
caseMessages: [
|
|
21664
|
+
{
|
|
21665
|
+
id: null,
|
|
21666
|
+
value: caseMessage
|
|
21667
|
+
}
|
|
21668
|
+
]
|
|
21669
|
+
};
|
|
21670
|
+
// If caseQueriesCollections is not empty, append its data
|
|
21671
|
+
newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
|
|
21672
|
+
}
|
|
21673
|
+
}
|
|
21674
|
+
else {
|
|
21675
|
+
// If there are no existing collections, create a new one (e.g., for new queries)
|
|
21676
|
+
newQueryData[this.fieldId] = {
|
|
21677
|
+
partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
|
|
21678
|
+
roleOnCase: '', // Not returned by CCD
|
|
21679
|
+
caseMessages: [
|
|
21680
|
+
{
|
|
21681
|
+
id: null,
|
|
21682
|
+
value: caseMessage
|
|
21683
|
+
}
|
|
21684
|
+
]
|
|
21685
|
+
};
|
|
21686
|
+
}
|
|
21687
|
+
return newQueryData;
|
|
21688
|
+
}
|
|
21689
|
+
setCaseQueriesCollectionData() {
|
|
21690
|
+
if (this.eventData?.case_fields?.length) {
|
|
21691
|
+
// Workaround for multiple qmCaseQueriesCollections that are not to be appearing in the eventData
|
|
21692
|
+
// Counts number qmCaseQueriesCollections
|
|
21693
|
+
const numberOfCaseQueriesCollections = this.eventData?.case_fields?.filter((caseField) => caseField.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
|
|
21694
|
+
caseField.field_type.type === this.FIELD_TYPE_COMPLEX && caseField.display_context !== this.DISPLAY_CONTEXT_READONLY)?.length || 0;
|
|
21695
|
+
this.caseQueriesCollections = this.eventData.case_fields.reduce((acc, caseField) => {
|
|
21696
|
+
// Extract the ID based on conditions, updating this.fieldId dynamically
|
|
21697
|
+
this.extractCaseQueryId(caseField, numberOfCaseQueriesCollections);
|
|
21698
|
+
const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
|
|
21699
|
+
if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
|
|
21700
|
+
acc.push(extractedCaseQueriesFromCaseField);
|
|
21701
|
+
}
|
|
21702
|
+
return acc;
|
|
21703
|
+
}, []);
|
|
21704
|
+
}
|
|
21705
|
+
}
|
|
21706
|
+
extractCaseQueryId(data, count) {
|
|
21707
|
+
const { id, value } = data;
|
|
21708
|
+
const messageId = this.route.snapshot.params.dataid;
|
|
21709
|
+
// Check if the field_type matches CaseQueriesCollection and type is Complex
|
|
21710
|
+
if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID && data.field_type.type === this.FIELD_TYPE_COMPLEX) {
|
|
21711
|
+
if (this.isNewQueryContext(data)) {
|
|
21712
|
+
// If there is more than one qmCaseQueriesCollection, pick the one with the lowest order
|
|
21713
|
+
if (count > 1) {
|
|
21714
|
+
if (!this.handleMultipleCollections()) {
|
|
21715
|
+
return;
|
|
21716
|
+
}
|
|
21717
|
+
}
|
|
21718
|
+
else {
|
|
21719
|
+
// Set the field ID dynamically based on the extracted data
|
|
21720
|
+
this.fieldId = id; // Store the ID for use in generating newQueryData
|
|
21721
|
+
}
|
|
21722
|
+
}
|
|
21723
|
+
// If messageId is present, find the corresponding case message
|
|
21724
|
+
this.setMessageFieldId(messageId, value, id);
|
|
21725
|
+
}
|
|
21726
|
+
}
|
|
21727
|
+
setMessageFieldId(messageId, value, id) {
|
|
21728
|
+
if (messageId && value?.caseMessages) {
|
|
21729
|
+
// If a matching message is found, set the fieldId to the corresponding id
|
|
21730
|
+
const matchedMessage = value?.caseMessages?.find((message) => message.value.id === messageId);
|
|
21731
|
+
if (matchedMessage) {
|
|
21732
|
+
this.fieldId = id;
|
|
21733
|
+
}
|
|
21734
|
+
}
|
|
21735
|
+
}
|
|
21736
|
+
isNewQueryContext(data) {
|
|
21737
|
+
return this.queryCreateContext === QueryCreateContext.NEW_QUERY && data.display_context !== this.DISPLAY_CONTEXT_READONLY;
|
|
21738
|
+
}
|
|
21739
|
+
handleMultipleCollections() {
|
|
21740
|
+
const jurisdictionId = this.caseDetails?.case_type?.jurisdiction?.id;
|
|
21741
|
+
if (!jurisdictionId) {
|
|
21742
|
+
console.error('Jurisdiction ID is missing.');
|
|
21743
|
+
return false;
|
|
21744
|
+
}
|
|
21745
|
+
if (this.getCollectionSelectionMethod(jurisdictionId) === this.QM_SELECT_FIRST_COLLECTION) {
|
|
21746
|
+
// Pick the collection with the lowest order
|
|
21747
|
+
this.fieldId = this.getCaseQueriesCollectionFieldOrderFromWizardPages()?.id;
|
|
21748
|
+
}
|
|
21749
|
+
else {
|
|
21750
|
+
// Display Error, for now, until EXUI-2644 is implemented
|
|
21751
|
+
console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
|
|
21752
|
+
return false;
|
|
21753
|
+
}
|
|
21754
|
+
return true;
|
|
21755
|
+
}
|
|
21756
|
+
getCaseQueriesCollectionFieldOrderFromWizardPages() {
|
|
21757
|
+
const candidateFields = this.eventData?.case_fields?.filter((field) => field.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
|
|
21758
|
+
field.field_type.type === this.FIELD_TYPE_COMPLEX &&
|
|
21759
|
+
field.display_context !== this.DISPLAY_CONTEXT_READONLY);
|
|
21760
|
+
if (!candidateFields?.length) {
|
|
21761
|
+
return undefined;
|
|
21762
|
+
}
|
|
21763
|
+
const firstPageFields = this.eventData?.wizard_pages?.[0]?.wizard_page_fields;
|
|
21764
|
+
if (!firstPageFields) {
|
|
21765
|
+
return undefined;
|
|
21766
|
+
}
|
|
21767
|
+
return candidateFields
|
|
21768
|
+
.map((field) => {
|
|
21769
|
+
const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
|
|
21770
|
+
return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
|
|
21771
|
+
})
|
|
21772
|
+
.sort((a, b) => a.order - b.order)[0]?.field;
|
|
21773
|
+
}
|
|
21774
|
+
getCollectionSelectionMethod(jurisdiction) {
|
|
21775
|
+
return jurisdiction.toUpperCase() === this.CIVIL_JURISDICTION ? this.QM_SELECT_FIRST_COLLECTION : this.QM_COLLECTION_PROMPT;
|
|
21782
21776
|
}
|
|
21783
21777
|
getDocumentAttachments() {
|
|
21784
21778
|
const attachmentsValue = this.formGroup.get('attachments').value;
|
|
@@ -21790,14 +21784,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21790
21784
|
isServiceErrorFound(error) {
|
|
21791
21785
|
return !!(error?.callbackErrors?.length);
|
|
21792
21786
|
}
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
21796
|
-
}
|
|
21797
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
21798
|
-
}
|
|
21799
|
-
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)); };
|
|
21800
|
-
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) {
|
|
21787
|
+
static ɵfac = function QueryCheckYourAnswersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(QualifyingQuestionService)); };
|
|
21788
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", multipleFollowUpFeature: "multipleFollowUpFeature" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21801
21789
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
|
|
21802
21790
|
} if (rf & 2) {
|
|
21803
21791
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21806,7 +21794,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21806
21794
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
|
|
21807
21795
|
type: Component,
|
|
21808
21796
|
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"] }]
|
|
21809
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type:
|
|
21797
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: QualifyingQuestionService }], { formGroup: [{
|
|
21810
21798
|
type: Input
|
|
21811
21799
|
}], queryItem: [{
|
|
21812
21800
|
type: Input
|
|
@@ -21814,7 +21802,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21814
21802
|
type: Input
|
|
21815
21803
|
}], eventData: [{
|
|
21816
21804
|
type: Input
|
|
21817
|
-
}],
|
|
21805
|
+
}], multipleFollowUpFeature: [{
|
|
21818
21806
|
type: Input
|
|
21819
21807
|
}], backClicked: [{
|
|
21820
21808
|
type: Output
|
|
@@ -21823,7 +21811,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21823
21811
|
}], callbackConfirmationMessage: [{
|
|
21824
21812
|
type: Output
|
|
21825
21813
|
}] }); })();
|
|
21826
|
-
(() => { (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:
|
|
21814
|
+
(() => { (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 }); })();
|
|
21827
21815
|
|
|
21828
21816
|
function QueryDetailsComponent_ng_container_0_p_1_Template(rf, ctx) { if (rf & 1) {
|
|
21829
21817
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -22035,10 +22023,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
|
|
|
22035
22023
|
i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_ng_container_1_Template, 23, 19, "ng-container", 15)(2, QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_ng_template_2_Template, 27, 22, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
22036
22024
|
i0.ɵɵelementContainerEnd();
|
|
22037
22025
|
} if (rf & 2) {
|
|
22026
|
+
const child_r3 = ctx.$implicit;
|
|
22038
22027
|
const i_r4 = ctx.index;
|
|
22039
22028
|
const followUpMessage_r5 = i0.ɵɵreference(3);
|
|
22029
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
22040
22030
|
i0.ɵɵadvance();
|
|
22041
|
-
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
22031
|
+
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0 && !(child_r3 == null ? null : child_r3.messageType) || child_r3 && (child_r3 == null ? null : child_r3.messageType) === ctx_r1.respondToQuery)("ngIfElse", followUpMessage_r5);
|
|
22042
22032
|
} }
|
|
22043
22033
|
function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
|
|
22044
22034
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22142,6 +22132,8 @@ class QueryDetailsComponent {
|
|
|
22142
22132
|
sessionStorageService;
|
|
22143
22133
|
route;
|
|
22144
22134
|
router;
|
|
22135
|
+
abstractConfig;
|
|
22136
|
+
caseNotifier;
|
|
22145
22137
|
query;
|
|
22146
22138
|
caseId;
|
|
22147
22139
|
queryResponseStatus;
|
|
@@ -22151,10 +22143,18 @@ class QueryDetailsComponent {
|
|
|
22151
22143
|
static QUERY_ITEM_RESPOND = '3';
|
|
22152
22144
|
static QUERY_ITEM_FOLLOW_UP = '4';
|
|
22153
22145
|
queryItemId;
|
|
22154
|
-
|
|
22146
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
22147
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
22148
|
+
enableServiceSpecificMultiFollowups;
|
|
22149
|
+
currentJurisdictionId;
|
|
22150
|
+
isMultipleFollowUpEnabled = false;
|
|
22151
|
+
caseSubscription;
|
|
22152
|
+
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22155
22153
|
this.sessionStorageService = sessionStorageService;
|
|
22156
22154
|
this.route = route;
|
|
22157
22155
|
this.router = router;
|
|
22156
|
+
this.abstractConfig = abstractConfig;
|
|
22157
|
+
this.caseNotifier = caseNotifier;
|
|
22158
22158
|
}
|
|
22159
22159
|
onBack() {
|
|
22160
22160
|
this.backClicked.emit(true);
|
|
@@ -22162,10 +22162,23 @@ class QueryDetailsComponent {
|
|
|
22162
22162
|
isInternalUser() {
|
|
22163
22163
|
return isInternalUser(this.sessionStorageService);
|
|
22164
22164
|
}
|
|
22165
|
+
ngOnInit() {
|
|
22166
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22167
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
|
|
22168
|
+
if (caseView?.case_type?.jurisdiction?.id) {
|
|
22169
|
+
this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
|
|
22170
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
22171
|
+
this.hasRespondedToQuery();
|
|
22172
|
+
}
|
|
22173
|
+
});
|
|
22174
|
+
}
|
|
22165
22175
|
ngOnChanges() {
|
|
22166
22176
|
this.toggleLinkVisibility();
|
|
22167
22177
|
this.hasRespondedToQuery();
|
|
22168
22178
|
}
|
|
22179
|
+
ngOnDestroy() {
|
|
22180
|
+
this.caseSubscription?.unsubscribe();
|
|
22181
|
+
}
|
|
22169
22182
|
toggleLinkVisibility() {
|
|
22170
22183
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
22171
22184
|
if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
|
|
@@ -22178,6 +22191,24 @@ class QueryDetailsComponent {
|
|
|
22178
22191
|
this.hasResponded.emit(true);
|
|
22179
22192
|
return true;
|
|
22180
22193
|
}
|
|
22194
|
+
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22195
|
+
const lastMessageType = this.query?.children?.length
|
|
22196
|
+
? this.query.children[this.query.children.length - 1]?.messageType
|
|
22197
|
+
: this.query?.messageType;
|
|
22198
|
+
const isFollowUp = lastMessageType === this.followUpQuery;
|
|
22199
|
+
const isRespond = lastChild?.messageType === this.respondToQuery;
|
|
22200
|
+
if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
|
|
22201
|
+
this.hasResponded.emit(true);
|
|
22202
|
+
return true;
|
|
22203
|
+
}
|
|
22204
|
+
if (isFollowUp && this.isMultipleFollowUpEnabled) {
|
|
22205
|
+
this.hasResponded.emit(false);
|
|
22206
|
+
return false;
|
|
22207
|
+
}
|
|
22208
|
+
if (isRespond) {
|
|
22209
|
+
this.hasResponded.emit(false);
|
|
22210
|
+
return false;
|
|
22211
|
+
}
|
|
22181
22212
|
if (this.isInternalUser()) {
|
|
22182
22213
|
if (isAwaiting) {
|
|
22183
22214
|
this.hasResponded.emit(false);
|
|
@@ -22193,7 +22224,7 @@ class QueryDetailsComponent {
|
|
|
22193
22224
|
this.hasResponded.emit(false);
|
|
22194
22225
|
return false;
|
|
22195
22226
|
}
|
|
22196
|
-
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
22227
|
+
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier)); };
|
|
22197
22228
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryDetailsComponent, selectors: [["ccd-query-details"]], inputs: { query: "query", caseId: "caseId", queryResponseStatus: "queryResponseStatus" }, outputs: { backClicked: "backClicked", hasResponded: "hasResponded" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["followUpMessage", ""], [4, "ngIf"], [1, "govuk-table", "query-details-table"], [1, "govuk-table__caption", "govuk-table__caption--l"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row govuk-table__row--isHearingRelated", 4, "ngIf"], ["class", "govuk-table__row", 4, "ngIf"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-table__row", "govuk-table__row--isHearingRelated"], [3, "attachments", 4, "ngIf"], [3, "attachments"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"]], template: function QueryDetailsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
22198
22229
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22199
22230
|
} if (rf & 2) {
|
|
@@ -22202,8 +22233,8 @@ class QueryDetailsComponent {
|
|
|
22202
22233
|
}
|
|
22203
22234
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22204
22235
|
type: Component,
|
|
22205
|
-
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"] }]
|
|
22206
|
-
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
22236
|
+
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <p *ngIf=\"showItem\">\n <br />\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"query.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"(i % 2 === 0 && !child?.messageType) || (child && child?.messageType === respondToQuery); else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm' }}</td>\n </tr>\n\n <tr *ngIf=\"isInternalUser()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <!-- <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div> -->\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMMM YYYY HH:mm'}}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
|
|
22237
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: CaseNotifier }], { query: [{
|
|
22207
22238
|
type: Input
|
|
22208
22239
|
}], caseId: [{
|
|
22209
22240
|
type: Input
|
|
@@ -22214,7 +22245,7 @@ class QueryDetailsComponent {
|
|
|
22214
22245
|
}], hasResponded: [{
|
|
22215
22246
|
type: Output
|
|
22216
22247
|
}] }); })();
|
|
22217
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
22248
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 17 }); })();
|
|
22218
22249
|
|
|
22219
22250
|
class QueryEventCompletionComponent {
|
|
22220
22251
|
eventCompletionParams;
|
|
@@ -22775,36 +22806,12 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
22775
22806
|
i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("isHearingRelated").value);
|
|
22776
22807
|
} }
|
|
22777
22808
|
class QueryWriteRaiseQueryComponent {
|
|
22778
|
-
queryManagementService;
|
|
22779
|
-
route;
|
|
22780
22809
|
formGroup;
|
|
22781
22810
|
submitted;
|
|
22782
22811
|
caseDetails;
|
|
22783
22812
|
showForm;
|
|
22784
22813
|
serviceMessage;
|
|
22785
|
-
queryCreateContext;
|
|
22786
|
-
eventData = null;
|
|
22787
|
-
queryItem;
|
|
22788
|
-
validate;
|
|
22789
|
-
triggerSubmission;
|
|
22790
|
-
queryDataCreated = new EventEmitter();
|
|
22791
22814
|
raiseQueryErrorMessage = RaiseQueryErrorMessage;
|
|
22792
|
-
eventCompletionParams;
|
|
22793
|
-
messgaeId;
|
|
22794
|
-
constructor(queryManagementService, route) {
|
|
22795
|
-
this.queryManagementService = queryManagementService;
|
|
22796
|
-
this.route = route;
|
|
22797
|
-
}
|
|
22798
|
-
ngOnChanges() {
|
|
22799
|
-
this.messgaeId = this.route.snapshot.params.dataid;
|
|
22800
|
-
const isCollectionDataSet = this.setCaseQueriesCollectionData();
|
|
22801
|
-
if (isCollectionDataSet) {
|
|
22802
|
-
if (this.triggerSubmission) {
|
|
22803
|
-
const data = this.generateCaseQueriesCollectionData();
|
|
22804
|
-
this.queryDataCreated.emit(data);
|
|
22805
|
-
}
|
|
22806
|
-
}
|
|
22807
|
-
}
|
|
22808
22815
|
onSubjectInput() {
|
|
22809
22816
|
const control = this.formGroup.get('subject');
|
|
22810
22817
|
const value = control?.value;
|
|
@@ -22822,19 +22829,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22822
22829
|
}
|
|
22823
22830
|
return '';
|
|
22824
22831
|
}
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
22828
|
-
return false;
|
|
22829
|
-
}
|
|
22830
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
22831
|
-
return true;
|
|
22832
|
-
}
|
|
22833
|
-
generateCaseQueriesCollectionData() {
|
|
22834
|
-
return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messgaeId);
|
|
22835
|
-
}
|
|
22836
|
-
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
22837
|
-
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) {
|
|
22832
|
+
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(); };
|
|
22833
|
+
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) {
|
|
22838
22834
|
i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "div", 1);
|
|
22839
22835
|
i0.ɵɵtext(3);
|
|
22840
22836
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -22863,7 +22859,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22863
22859
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
|
|
22864
22860
|
type: Component,
|
|
22865
22861
|
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" }]
|
|
22866
|
-
}],
|
|
22862
|
+
}], null, { formGroup: [{
|
|
22867
22863
|
type: Input
|
|
22868
22864
|
}], submitted: [{
|
|
22869
22865
|
type: Input
|
|
@@ -22873,20 +22869,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22873
22869
|
type: Input
|
|
22874
22870
|
}], serviceMessage: [{
|
|
22875
22871
|
type: Input
|
|
22876
|
-
}], queryCreateContext: [{
|
|
22877
|
-
type: Input
|
|
22878
|
-
}], eventData: [{
|
|
22879
|
-
type: Input
|
|
22880
|
-
}], queryItem: [{
|
|
22881
|
-
type: Input
|
|
22882
|
-
}], validate: [{
|
|
22883
|
-
type: Input
|
|
22884
|
-
}], triggerSubmission: [{
|
|
22885
|
-
type: Input
|
|
22886
|
-
}], queryDataCreated: [{
|
|
22887
|
-
type: Output
|
|
22888
22872
|
}] }); })();
|
|
22889
|
-
(() => { (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:
|
|
22873
|
+
(() => { (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 }); })();
|
|
22890
22874
|
|
|
22891
22875
|
function QueryWriteRespondToQueryComponent_ccd_query_case_details_header_9_Template(rf, ctx) { if (rf & 1) {
|
|
22892
22876
|
i0.ɵɵelement(0, "ccd-query-case-details-header", 8);
|
|
@@ -22968,16 +22952,12 @@ function QueryWriteRespondToQueryComponent_ng_container_13_Template(rf, ctx) { i
|
|
|
22968
22952
|
class QueryWriteRespondToQueryComponent {
|
|
22969
22953
|
caseNotifier;
|
|
22970
22954
|
route;
|
|
22971
|
-
queryManagementService;
|
|
22972
22955
|
queryItem;
|
|
22973
22956
|
formGroup;
|
|
22974
22957
|
queryCreateContext;
|
|
22975
22958
|
submitted = false;
|
|
22976
22959
|
caseQueriesCollections;
|
|
22977
22960
|
showForm;
|
|
22978
|
-
triggerSubmission;
|
|
22979
|
-
eventData = null;
|
|
22980
|
-
queryDataCreated = new EventEmitter();
|
|
22981
22961
|
hasRespondedToQueryTask = new EventEmitter();
|
|
22982
22962
|
queryCreateContextEnum = QueryCreateContext;
|
|
22983
22963
|
raiseQueryErrorMessages = RaiseQueryErrorMessage;
|
|
@@ -22987,13 +22967,11 @@ class QueryWriteRespondToQueryComponent {
|
|
|
22987
22967
|
queryResponseStatus;
|
|
22988
22968
|
queryListData;
|
|
22989
22969
|
hasRespondedToQuery = false;
|
|
22990
|
-
messgaeId;
|
|
22991
22970
|
static QUERY_ITEM_RESPOND = '3';
|
|
22992
22971
|
static QUERY_ITEM_FOLLOWUP = '4';
|
|
22993
|
-
constructor(caseNotifier, route
|
|
22972
|
+
constructor(caseNotifier, route) {
|
|
22994
22973
|
this.caseNotifier = caseNotifier;
|
|
22995
22974
|
this.route = route;
|
|
22996
|
-
this.queryManagementService = queryManagementService;
|
|
22997
22975
|
}
|
|
22998
22976
|
ngOnInit() {
|
|
22999
22977
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
@@ -23035,31 +23013,13 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23035
23013
|
: matchingMessage?.id;
|
|
23036
23014
|
this.queryListData = queryWithChildren?.queries.find((query) => query?.id === targetId);
|
|
23037
23015
|
this.queryResponseStatus = this.queryListData?.responseStatus;
|
|
23038
|
-
const isCollectionDataSet = this.setCaseQueriesCollectionData();
|
|
23039
|
-
if (isCollectionDataSet) {
|
|
23040
|
-
if (this.triggerSubmission) {
|
|
23041
|
-
const data = this.generateCaseQueriesCollectionData();
|
|
23042
|
-
this.queryDataCreated.emit(data);
|
|
23043
|
-
}
|
|
23044
|
-
}
|
|
23045
23016
|
}
|
|
23046
23017
|
hasResponded(value) {
|
|
23047
23018
|
this.hasRespondedToQuery = value;
|
|
23048
23019
|
this.hasRespondedToQueryTask.emit(value);
|
|
23049
23020
|
}
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
23053
|
-
return false;
|
|
23054
|
-
}
|
|
23055
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
23056
|
-
return true;
|
|
23057
|
-
}
|
|
23058
|
-
generateCaseQueriesCollectionData() {
|
|
23059
|
-
return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messgaeId);
|
|
23060
|
-
}
|
|
23061
|
-
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(QueryManagementService)); };
|
|
23062
|
-
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) {
|
|
23021
|
+
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
23022
|
+
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) {
|
|
23063
23023
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 0)(2, "div", 1);
|
|
23064
23024
|
i0.ɵɵtext(3);
|
|
23065
23025
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -23093,7 +23053,7 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23093
23053
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRespondToQueryComponent, [{
|
|
23094
23054
|
type: Component,
|
|
23095
23055
|
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"] }]
|
|
23096
|
-
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }
|
|
23056
|
+
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }], { queryItem: [{
|
|
23097
23057
|
type: Input
|
|
23098
23058
|
}], formGroup: [{
|
|
23099
23059
|
type: Input
|
|
@@ -23105,16 +23065,10 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23105
23065
|
type: Input
|
|
23106
23066
|
}], showForm: [{
|
|
23107
23067
|
type: Input
|
|
23108
|
-
}], triggerSubmission: [{
|
|
23109
|
-
type: Input
|
|
23110
|
-
}], eventData: [{
|
|
23111
|
-
type: Input
|
|
23112
|
-
}], queryDataCreated: [{
|
|
23113
|
-
type: Output
|
|
23114
23068
|
}], hasRespondedToQueryTask: [{
|
|
23115
23069
|
type: Output
|
|
23116
23070
|
}] }); })();
|
|
23117
|
-
(() => { (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:
|
|
23071
|
+
(() => { (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 }); })();
|
|
23118
23072
|
|
|
23119
23073
|
function QueryConfirmationComponent_main_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
23120
23074
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -23290,7 +23244,7 @@ class CloseQueryComponent {
|
|
|
23290
23244
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
23291
23245
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
23292
23246
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
23293
|
-
i0.ɵɵelementStart(0, "div",
|
|
23247
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-query-list", 7);
|
|
23294
23248
|
i0.ɵɵlistener("selectedQuery", function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template_ccd_query_list_selectedQuery_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.setQuery($event)); });
|
|
23295
23249
|
i0.ɵɵelementEnd()();
|
|
23296
23250
|
} if (rf & 2) {
|
|
@@ -23300,7 +23254,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23300
23254
|
} }
|
|
23301
23255
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23302
23256
|
i0.ɵɵelementContainerStart(0);
|
|
23303
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23257
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 5);
|
|
23304
23258
|
i0.ɵɵelementContainerEnd();
|
|
23305
23259
|
} if (rf & 2) {
|
|
23306
23260
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23309,7 +23263,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23309
23263
|
} }
|
|
23310
23264
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23311
23265
|
i0.ɵɵelementContainerStart(0);
|
|
23312
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23266
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 4);
|
|
23313
23267
|
i0.ɵɵelementContainerEnd();
|
|
23314
23268
|
} if (rf & 2) {
|
|
23315
23269
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23318,7 +23272,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23318
23272
|
} }
|
|
23319
23273
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23320
23274
|
i0.ɵɵelementContainerStart(0);
|
|
23321
|
-
i0.ɵɵelementStart(1, "button",
|
|
23275
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23322
23276
|
i0.ɵɵtext(2);
|
|
23323
23277
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23324
23278
|
i0.ɵɵelementEnd();
|
|
@@ -23330,49 +23284,61 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23330
23284
|
i0.ɵɵadvance();
|
|
23331
23285
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23332
23286
|
} }
|
|
23333
|
-
function
|
|
23334
|
-
i0.ɵɵ
|
|
23287
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23288
|
+
i0.ɵɵelementContainerStart(0);
|
|
23289
|
+
i0.ɵɵelementStart(1, "button", 10);
|
|
23290
|
+
i0.ɵɵtext(2);
|
|
23291
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23292
|
+
i0.ɵɵelementEnd();
|
|
23293
|
+
i0.ɵɵelementContainerEnd();
|
|
23294
|
+
} if (rf & 2) {
|
|
23295
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23296
|
+
i0.ɵɵadvance();
|
|
23297
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23298
|
+
i0.ɵɵadvance();
|
|
23299
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23300
|
+
} }
|
|
23301
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23302
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23335
23303
|
i0.ɵɵtext(2);
|
|
23336
23304
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23337
23305
|
i0.ɵɵelementEnd();
|
|
23338
|
-
i0.ɵɵelementStart(4, "p"
|
|
23306
|
+
i0.ɵɵelementStart(4, "p");
|
|
23339
23307
|
i0.ɵɵtext(5);
|
|
23340
23308
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
23341
|
-
i0.ɵɵelementEnd();
|
|
23342
|
-
i0.ɵɵelementStart(7, "p");
|
|
23343
|
-
i0.ɵɵtext(8);
|
|
23344
|
-
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23345
23309
|
i0.ɵɵelementEnd()();
|
|
23346
23310
|
} if (rf & 2) {
|
|
23347
|
-
|
|
23348
|
-
i0.ɵɵ
|
|
23349
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(10, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23350
|
-
i0.ɵɵadvance();
|
|
23351
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, "Ask a follow-up question"), " ");
|
|
23352
|
-
i0.ɵɵadvance(3);
|
|
23353
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, "Your query is under review"));
|
|
23311
|
+
i0.ɵɵadvance(2);
|
|
23312
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Your query is under review"));
|
|
23354
23313
|
i0.ɵɵadvance(3);
|
|
23355
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
23314
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23315
|
+
} }
|
|
23316
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23317
|
+
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template, 4, 7, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template, 7, 6, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
|
|
23318
|
+
} if (rf & 2) {
|
|
23319
|
+
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23320
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23321
|
+
i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) > 0 && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) % 2 === 1)("ngIfElse", queryIsInReview_r5);
|
|
23356
23322
|
} }
|
|
23357
23323
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23358
23324
|
i0.ɵɵelementContainerStart(0);
|
|
23359
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23325
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 3)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 3, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
23360
23326
|
i0.ɵɵelementContainerEnd();
|
|
23361
23327
|
} if (rf & 2) {
|
|
23362
|
-
const
|
|
23328
|
+
const sequentialQuery_r6 = i0.ɵɵreference(3);
|
|
23363
23329
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23364
23330
|
i0.ɵɵadvance();
|
|
23365
|
-
i0.ɵɵproperty("ngIf",
|
|
23331
|
+
i0.ɵɵproperty("ngIf", ctx_r1.messageType && ctx_r1.messageType === ctx_r1.followUpQuery && ctx_r1.isMultipleFollowUpEnabled || ctx_r1.messageType && ctx_r1.messageType === ctx_r1.respondToQuery)("ngIfElse", sequentialQuery_r6);
|
|
23366
23332
|
} }
|
|
23367
23333
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
23368
23334
|
i0.ɵɵelementContainerStart(0);
|
|
23369
|
-
i0.ɵɵelementStart(1, "div",
|
|
23335
|
+
i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
|
|
23370
23336
|
i0.ɵɵtext(3, "!");
|
|
23371
23337
|
i0.ɵɵelementEnd();
|
|
23372
|
-
i0.ɵɵelementStart(4, "strong",
|
|
23338
|
+
i0.ɵɵelementStart(4, "strong", 14)(5, "span", 15);
|
|
23373
23339
|
i0.ɵɵtext(6, "Warning");
|
|
23374
23340
|
i0.ɵɵelementEnd();
|
|
23375
|
-
i0.ɵɵelementStart(7, "p",
|
|
23341
|
+
i0.ɵɵelementStart(7, "p", 16);
|
|
23376
23342
|
i0.ɵɵtext(8);
|
|
23377
23343
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23378
23344
|
i0.ɵɵelementEnd()()();
|
|
@@ -23383,15 +23349,15 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
|
|
|
23383
23349
|
} }
|
|
23384
23350
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23385
23351
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23386
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23352
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 8);
|
|
23387
23353
|
i0.ɵɵlistener("backClicked", function ReadQueryManagementFieldComponent_ng_template_1_Template_ccd_query_details_backClicked_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showQueryList = true); });
|
|
23388
23354
|
i0.ɵɵelementEnd();
|
|
23389
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23355
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 9)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template, 10, 3, "ng-container", 9);
|
|
23390
23356
|
} if (rf & 2) {
|
|
23391
23357
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23392
23358
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
23393
23359
|
i0.ɵɵadvance();
|
|
23394
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed
|
|
23360
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
|
|
23395
23361
|
i0.ɵɵadvance();
|
|
23396
23362
|
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && ctx_r1.isQueryClosed);
|
|
23397
23363
|
} }
|
|
@@ -23399,19 +23365,36 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23399
23365
|
route;
|
|
23400
23366
|
sessionStorageService;
|
|
23401
23367
|
caseNotifier;
|
|
23368
|
+
abstractConfig;
|
|
23402
23369
|
caseQueriesCollections;
|
|
23403
23370
|
query;
|
|
23404
23371
|
showQueryList = true;
|
|
23405
23372
|
caseId;
|
|
23373
|
+
messageType;
|
|
23374
|
+
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23375
|
+
respondToQuery = QueryCreateContext.RESPOND;
|
|
23406
23376
|
isQueryClosed = false;
|
|
23407
|
-
|
|
23377
|
+
value;
|
|
23378
|
+
isMultipleFollowUpEnabled = false;
|
|
23379
|
+
currentJurisdictionId;
|
|
23380
|
+
enableServiceSpecificMultiFollowups = [];
|
|
23381
|
+
caseSubscription;
|
|
23382
|
+
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23408
23383
|
super();
|
|
23409
23384
|
this.route = route;
|
|
23410
23385
|
this.sessionStorageService = sessionStorageService;
|
|
23411
23386
|
this.caseNotifier = caseNotifier;
|
|
23387
|
+
this.abstractConfig = abstractConfig;
|
|
23412
23388
|
}
|
|
23413
23389
|
ngOnInit() {
|
|
23414
23390
|
this.caseId = this.route.snapshot.params.cid;
|
|
23391
|
+
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23392
|
+
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
|
|
23393
|
+
if (caseDetails?.case_type?.jurisdiction?.id) {
|
|
23394
|
+
this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
|
|
23395
|
+
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
23396
|
+
}
|
|
23397
|
+
});
|
|
23415
23398
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23416
23399
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
23417
23400
|
// this.caseQueriesCollections = caseMessagesMockData;
|
|
@@ -23437,9 +23420,13 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23437
23420
|
// QueryManagementUtils.extractCaseQueriesFromCaseField();
|
|
23438
23421
|
}
|
|
23439
23422
|
}
|
|
23423
|
+
ngOnDestroy() {
|
|
23424
|
+
this.caseSubscription?.unsubscribe();
|
|
23425
|
+
}
|
|
23440
23426
|
setQuery(query) {
|
|
23441
23427
|
this.showQueryList = false;
|
|
23442
23428
|
this.query = query;
|
|
23429
|
+
this.messageType = this.getMessageType(query);
|
|
23443
23430
|
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23444
23431
|
}
|
|
23445
23432
|
backToQueryListPage() {
|
|
@@ -23449,19 +23436,27 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23449
23436
|
isInternalUser() {
|
|
23450
23437
|
return isInternalUser(this.sessionStorageService);
|
|
23451
23438
|
}
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23439
|
+
getMessageType(query) {
|
|
23440
|
+
if (!query) {
|
|
23441
|
+
return undefined;
|
|
23442
|
+
}
|
|
23443
|
+
return query.children?.length
|
|
23444
|
+
? query.children[query.children.length - 1]?.messageType
|
|
23445
|
+
: query?.messageType;
|
|
23446
|
+
}
|
|
23447
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23448
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23449
|
+
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
23455
23450
|
} if (rf & 2) {
|
|
23456
|
-
const
|
|
23457
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23451
|
+
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
23452
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r7);
|
|
23458
23453
|
} }, encapsulation: 2 });
|
|
23459
23454
|
}
|
|
23460
23455
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23461
23456
|
type: Component,
|
|
23462
|
-
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
|
|
23463
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23464
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
23457
|
+
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) || (messageType && messageType === respondToQuery); else sequentialQuery\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n <ng-template #sequentialQuery>\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n\n </ng-container>\n <ng-container *ngIf=\"!isInternalUser() && isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by court staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
|
|
23458
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
23459
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 18 }); })();
|
|
23465
23460
|
|
|
23466
23461
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23467
23462
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|
|
@@ -30726,8 +30721,6 @@ class PaletteModule {
|
|
|
30726
30721
|
CommonDataService,
|
|
30727
30722
|
LinkedCasesService,
|
|
30728
30723
|
QualifyingQuestionService,
|
|
30729
|
-
QueryManagementUtils,
|
|
30730
|
-
QueryManagementService,
|
|
30731
30724
|
{ provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
|
|
30732
30725
|
], imports: [CommonModule,
|
|
30733
30726
|
RouterModule,
|
|
@@ -30845,8 +30838,6 @@ class PaletteModule {
|
|
|
30845
30838
|
CommonDataService,
|
|
30846
30839
|
LinkedCasesService,
|
|
30847
30840
|
QualifyingQuestionService,
|
|
30848
|
-
QueryManagementUtils,
|
|
30849
|
-
QueryManagementService,
|
|
30850
30841
|
{ provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
|
|
30851
30842
|
],
|
|
30852
30843
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
@@ -40253,5 +40244,5 @@ class TestRouteSnapshotBuilder {
|
|
|
40253
40244
|
* Generated bundle index. Do not edit.
|
|
40254
40245
|
*/
|
|
40255
40246
|
|
|
40256
|
-
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,
|
|
40247
|
+
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 };
|
|
40257
40248
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map
|