@hmcts/ccd-case-ui-toolkit 7.2.20-multiple-followup → 7.2.21
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 +1 -3
- package/esm2022/lib/shared/components/palette/document/write-document-field.component.mjs +41 -36
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +3 -6
- package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +8 -52
- 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 +2 -13
- package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +24 -74
- package/esm2022/lib/shared/components/palette/query-management/utils/query-management.utils.mjs +3 -10
- package/esm2022/lib/shared/utils.mjs +1 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +74 -177
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/app.config.d.ts +0 -3
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts +1 -0
- package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +1 -2
- 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 +3 -15
- package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/models/case-queries-collection.model.d.ts +0 -1
- 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 +0 -1
- 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 +3 -15
- package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts +1 -1
- package/lib/shared/components/palette/query-management/utils/query-management.utils.d.ts.map +1 -1
- package/lib/shared/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1326,8 +1326,6 @@ class CaseEditorConfig {
|
|
|
1326
1326
|
icp_enabled;
|
|
1327
1327
|
icp_jurisdictions;
|
|
1328
1328
|
events_to_hide;
|
|
1329
|
-
enable_service_specific_multi_followups;
|
|
1330
|
-
multiple_follow_up_enabled;
|
|
1331
1329
|
}
|
|
1332
1330
|
|
|
1333
1331
|
class HttpError {
|
|
@@ -15105,17 +15103,17 @@ class FileUploadStateService {
|
|
|
15105
15103
|
const _c0$R = ["fileInput"];
|
|
15106
15104
|
const _c1$l = a0 => ({ "form-group-error bottom-30": a0 });
|
|
15107
15105
|
function WriteDocumentFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
15108
|
-
i0.ɵɵelementStart(0, "span", 12)
|
|
15109
|
-
i0.ɵɵ
|
|
15110
|
-
i0.ɵɵpipe(
|
|
15111
|
-
i0.ɵɵelementEnd()
|
|
15106
|
+
i0.ɵɵelementStart(0, "span", 12);
|
|
15107
|
+
i0.ɵɵelement(1, "markdown", 13);
|
|
15108
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
15109
|
+
i0.ɵɵelementEnd();
|
|
15112
15110
|
} if (rf & 2) {
|
|
15113
15111
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
15114
|
-
i0.ɵɵadvance(
|
|
15115
|
-
i0.ɵɵ
|
|
15112
|
+
i0.ɵɵadvance();
|
|
15113
|
+
i0.ɵɵproperty("data", i0.ɵɵpipeBind1(2, 1, ctx_r1.caseField.hint_text));
|
|
15116
15114
|
} }
|
|
15117
15115
|
function WriteDocumentFieldComponent_ccd_read_document_field_11_Template(rf, ctx) { if (rf & 1) {
|
|
15118
|
-
i0.ɵɵelement(0, "ccd-read-document-field",
|
|
15116
|
+
i0.ɵɵelement(0, "ccd-read-document-field", 14);
|
|
15119
15117
|
} if (rf & 2) {
|
|
15120
15118
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
15121
15119
|
i0.ɵɵproperty("caseField", ctx_r1.caseField);
|
|
@@ -15385,31 +15383,36 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15385
15383
|
this.uploadedDocument = this.registerControl(new FormGroup(documentFormGroup), true);
|
|
15386
15384
|
}
|
|
15387
15385
|
getErrorMessage(error) {
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15408
|
-
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15386
|
+
if (error.status === 0 || error.status === 502) {
|
|
15387
|
+
return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
|
|
15388
|
+
}
|
|
15389
|
+
if (error.status === 422 || error.status === 500) {
|
|
15390
|
+
if (this.fileSecureModeOn) {
|
|
15391
|
+
return this.extractSecureErrorMessage(error) || WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
15392
|
+
}
|
|
15393
|
+
return error.error || WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
15394
|
+
}
|
|
15395
|
+
if (error.status === 429) {
|
|
15396
|
+
return error?.error;
|
|
15397
|
+
}
|
|
15398
|
+
return WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
15399
|
+
}
|
|
15400
|
+
extractSecureErrorMessage(error) {
|
|
15401
|
+
if (!error?.error) {
|
|
15402
|
+
return WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
15403
|
+
}
|
|
15404
|
+
const fullError = error.error;
|
|
15405
|
+
const start = fullError.indexOf('{');
|
|
15406
|
+
if (start < 0) {
|
|
15407
|
+
return WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
15408
|
+
}
|
|
15409
|
+
try {
|
|
15410
|
+
const json = fullError.substring(start, fullError.length - 1).replace(/<EOL>/g, '');
|
|
15411
|
+
const obj = JSON.parse(json);
|
|
15412
|
+
return obj?.error;
|
|
15413
|
+
}
|
|
15414
|
+
catch {
|
|
15415
|
+
return WriteDocumentFieldComponent.ERROR_UPLOADING_FILE;
|
|
15413
15416
|
}
|
|
15414
15417
|
}
|
|
15415
15418
|
buildDocumentUploadData(selectedFile) {
|
|
@@ -15463,14 +15466,14 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15463
15466
|
} if (rf & 2) {
|
|
15464
15467
|
let _t;
|
|
15465
15468
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileInput = _t.first);
|
|
15466
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 20, vars: 23, consts: [["fileInput", ""], [1, "form-group", 3, "ngClass"], [3, "for"], [1, "form-label"], ["class", "form-hint", 4, "ngIf"], ["role", "alert", "tabindex", "0", 1, "error-message", 3, "hidden"], [3, "caseField", 4, "ngIf"], [2, "position", "relative"], [3, "click", "keyup", "id"], ["type", "file", 1, "form-control", "bottom-30", 3, "keydown.Tab", "change", "id", "accept"], [1, "form-group", "bottom-30"], ["type", "button", "aria-label", "Cancel upload", 1, "button", "button-secondary", 3, "click", "disabled"], [1, "form-hint"], [3, "caseField"]], template: function WriteDocumentFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15469
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 20, vars: 23, consts: [["fileInput", ""], [1, "form-group", 3, "ngClass"], [3, "for"], [1, "form-label"], ["class", "form-hint", 4, "ngIf"], ["role", "alert", "tabindex", "0", 1, "error-message", 3, "hidden"], [3, "caseField", 4, "ngIf"], [2, "position", "relative"], [3, "click", "keyup", "id"], ["type", "file", 1, "form-control", "bottom-30", 3, "keydown.Tab", "change", "id", "accept"], [1, "form-group", "bottom-30"], ["type", "button", "aria-label", "Cancel upload", 1, "button", "button-secondary", 3, "click", "disabled"], [1, "form-hint"], [3, "data"], [3, "caseField"]], template: function WriteDocumentFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15467
15470
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
15468
15471
|
i0.ɵɵelementStart(0, "div", 1)(1, "label", 2)(2, "span", 3);
|
|
15469
15472
|
i0.ɵɵpipe(3, "ccdFieldLabel");
|
|
15470
15473
|
i0.ɵɵtext(4);
|
|
15471
15474
|
i0.ɵɵpipe(5, "ccdFieldLabel");
|
|
15472
15475
|
i0.ɵɵelementEnd()();
|
|
15473
|
-
i0.ɵɵtemplate(6, WriteDocumentFieldComponent_span_6_Template,
|
|
15476
|
+
i0.ɵɵtemplate(6, WriteDocumentFieldComponent_span_6_Template, 3, 3, "span", 4);
|
|
15474
15477
|
i0.ɵɵelementStart(7, "span", 5);
|
|
15475
15478
|
i0.ɵɵtext(8);
|
|
15476
15479
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
@@ -15518,7 +15521,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15518
15521
|
}
|
|
15519
15522
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
|
|
15520
15523
|
type: Component,
|
|
15521
|
-
args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">\n <markdown
|
|
15524
|
+
args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">\n <markdown [data]=\"caseField.hint_text | rpxTranslate\"></markdown>\n </span>\n <span class=\"error-message\"\n role=\"alert\"\n tabindex=\"0\"\n [hidden]=\"!(fileUploadMessages && !valid)\">\n {{ fileUploadMessages | rpxTranslate }}\n </span>\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event, caseField.field_type.regular_expression)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
|
|
15522
15525
|
}], () => [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }], { fileInput: [{
|
|
15523
15526
|
type: ViewChild,
|
|
15524
15527
|
args: ['fileInput', { static: false }]
|
|
@@ -20901,7 +20904,6 @@ class QueryListItem {
|
|
|
20901
20904
|
createdBy;
|
|
20902
20905
|
parentId;
|
|
20903
20906
|
isClosed;
|
|
20904
|
-
messageType;
|
|
20905
20907
|
children = [];
|
|
20906
20908
|
messageIndexInParent = null;
|
|
20907
20909
|
get lastSubmittedMessage() {
|
|
@@ -20966,20 +20968,11 @@ class QueryListItem {
|
|
|
20966
20968
|
if (item.isClosed === 'Yes') {
|
|
20967
20969
|
return true;
|
|
20968
20970
|
}
|
|
20969
|
-
return item.children?.some(
|
|
20971
|
+
return item.children?.some(child => isThreadClosed(child)) || false;
|
|
20970
20972
|
};
|
|
20971
20973
|
if (isThreadClosed(this)) {
|
|
20972
20974
|
return QueryItemResponseStatus.CLOSED;
|
|
20973
20975
|
}
|
|
20974
|
-
const lastMessageType = this.children?.length
|
|
20975
|
-
? this.children[this.children.length - 1]?.messageType
|
|
20976
|
-
: undefined;
|
|
20977
|
-
if (lastMessageType && lastMessageType === QueryCreateContext.RESPOND) {
|
|
20978
|
-
return QueryItemResponseStatus.RESPONDED;
|
|
20979
|
-
}
|
|
20980
|
-
else if (lastMessageType && lastMessageType === QueryCreateContext.FOLLOWUP) {
|
|
20981
|
-
return QueryItemResponseStatus.AWAITING;
|
|
20982
|
-
}
|
|
20983
20976
|
if (this.messageIndexInParent !== null) {
|
|
20984
20977
|
return this.messageIndexInParent % 2 === 0
|
|
20985
20978
|
? QueryItemResponseStatus.RESPONDED
|
|
@@ -21071,18 +21064,13 @@ class QueryManagementUtils {
|
|
|
21071
21064
|
createdBy: currentUserId
|
|
21072
21065
|
};
|
|
21073
21066
|
}
|
|
21074
|
-
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails
|
|
21067
|
+
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails) {
|
|
21075
21068
|
const currentUserId = currentUserDetails?.uid || currentUserDetails?.id;
|
|
21076
21069
|
const currentUserName = currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`;
|
|
21077
21070
|
const body = formGroup.get('body').value;
|
|
21078
21071
|
const attachments = formGroup.get('attachments').value;
|
|
21079
21072
|
const formDocument = attachments.map((document) => this.documentToCollectionFormDocument(document));
|
|
21080
21073
|
const isClosed = formGroup.get('closeQuery').value ? 'Yes' : 'No';
|
|
21081
|
-
const messageType = messageTypeParam === QueryCreateContext.RESPOND
|
|
21082
|
-
? QueryCreateContext.RESPOND
|
|
21083
|
-
: messageTypeParam === QueryCreateContext.FOLLOWUP
|
|
21084
|
-
? QueryCreateContext.FOLLOWUP
|
|
21085
|
-
: undefined;
|
|
21086
21074
|
return {
|
|
21087
21075
|
id: v4(),
|
|
21088
21076
|
subject: queryItem.subject,
|
|
@@ -21094,8 +21082,7 @@ class QueryManagementUtils {
|
|
|
21094
21082
|
createdOn: new Date(),
|
|
21095
21083
|
createdBy: currentUserId,
|
|
21096
21084
|
parentId: queryItem.id,
|
|
21097
|
-
isClosed
|
|
21098
|
-
messageType
|
|
21085
|
+
isClosed
|
|
21099
21086
|
};
|
|
21100
21087
|
}
|
|
21101
21088
|
static isObject(elem) {
|
|
@@ -21455,7 +21442,6 @@ class QueryCheckYourAnswersComponent {
|
|
|
21455
21442
|
queryItem;
|
|
21456
21443
|
queryCreateContext;
|
|
21457
21444
|
eventData = null;
|
|
21458
|
-
multipleFollowUpFeature;
|
|
21459
21445
|
backClicked = new EventEmitter();
|
|
21460
21446
|
querySubmitted = new EventEmitter();
|
|
21461
21447
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21628,7 +21614,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21628
21614
|
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21629
21615
|
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21630
21616
|
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21631
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails
|
|
21617
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
|
|
21632
21618
|
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21633
21619
|
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21634
21620
|
// Check if the field ID has been set dynamically
|
|
@@ -21788,7 +21774,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21788
21774
|
return !!(error?.callbackErrors?.length);
|
|
21789
21775
|
}
|
|
21790
21776
|
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)); };
|
|
21791
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData"
|
|
21777
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21792
21778
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
|
|
21793
21779
|
} if (rf & 2) {
|
|
21794
21780
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21805,8 +21791,6 @@ class QueryCheckYourAnswersComponent {
|
|
|
21805
21791
|
type: Input
|
|
21806
21792
|
}], eventData: [{
|
|
21807
21793
|
type: Input
|
|
21808
|
-
}], multipleFollowUpFeature: [{
|
|
21809
|
-
type: Input
|
|
21810
21794
|
}], backClicked: [{
|
|
21811
21795
|
type: Output
|
|
21812
21796
|
}], querySubmitted: [{
|
|
@@ -22026,12 +22010,10 @@ function QueryDetailsComponent_ng_container_0_ng_container_44_ng_container_1_Tem
|
|
|
22026
22010
|
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);
|
|
22027
22011
|
i0.ɵɵelementContainerEnd();
|
|
22028
22012
|
} if (rf & 2) {
|
|
22029
|
-
const child_r3 = ctx.$implicit;
|
|
22030
22013
|
const i_r4 = ctx.index;
|
|
22031
22014
|
const followUpMessage_r5 = i0.ɵɵreference(3);
|
|
22032
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
22033
22015
|
i0.ɵɵadvance();
|
|
22034
|
-
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0
|
|
22016
|
+
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
22035
22017
|
} }
|
|
22036
22018
|
function QueryDetailsComponent_ng_container_0_ng_container_44_Template(rf, ctx) { if (rf & 1) {
|
|
22037
22019
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22135,8 +22117,6 @@ class QueryDetailsComponent {
|
|
|
22135
22117
|
sessionStorageService;
|
|
22136
22118
|
route;
|
|
22137
22119
|
router;
|
|
22138
|
-
abstractConfig;
|
|
22139
|
-
caseNotifier;
|
|
22140
22120
|
query;
|
|
22141
22121
|
caseId;
|
|
22142
22122
|
queryResponseStatus;
|
|
@@ -22146,18 +22126,10 @@ class QueryDetailsComponent {
|
|
|
22146
22126
|
static QUERY_ITEM_RESPOND = '3';
|
|
22147
22127
|
static QUERY_ITEM_FOLLOW_UP = '4';
|
|
22148
22128
|
queryItemId;
|
|
22149
|
-
|
|
22150
|
-
respondToQuery = QueryCreateContext.RESPOND;
|
|
22151
|
-
enableServiceSpecificMultiFollowups;
|
|
22152
|
-
currentJurisdictionId;
|
|
22153
|
-
isMultipleFollowUpEnabled = false;
|
|
22154
|
-
caseSubscription;
|
|
22155
|
-
constructor(sessionStorageService, route, router, abstractConfig, caseNotifier) {
|
|
22129
|
+
constructor(sessionStorageService, route, router) {
|
|
22156
22130
|
this.sessionStorageService = sessionStorageService;
|
|
22157
22131
|
this.route = route;
|
|
22158
22132
|
this.router = router;
|
|
22159
|
-
this.abstractConfig = abstractConfig;
|
|
22160
|
-
this.caseNotifier = caseNotifier;
|
|
22161
22133
|
}
|
|
22162
22134
|
onBack() {
|
|
22163
22135
|
this.backClicked.emit(true);
|
|
@@ -22165,23 +22137,10 @@ class QueryDetailsComponent {
|
|
|
22165
22137
|
isInternalUser() {
|
|
22166
22138
|
return isInternalUser(this.sessionStorageService);
|
|
22167
22139
|
}
|
|
22168
|
-
ngOnInit() {
|
|
22169
|
-
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
22170
|
-
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseView) => {
|
|
22171
|
-
if (caseView?.case_type?.jurisdiction?.id) {
|
|
22172
|
-
this.currentJurisdictionId = caseView.case_type.jurisdiction.id;
|
|
22173
|
-
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
22174
|
-
this.hasRespondedToQuery();
|
|
22175
|
-
}
|
|
22176
|
-
});
|
|
22177
|
-
}
|
|
22178
22140
|
ngOnChanges() {
|
|
22179
22141
|
this.toggleLinkVisibility();
|
|
22180
22142
|
this.hasRespondedToQuery();
|
|
22181
22143
|
}
|
|
22182
|
-
ngOnDestroy() {
|
|
22183
|
-
this.caseSubscription?.unsubscribe();
|
|
22184
|
-
}
|
|
22185
22144
|
toggleLinkVisibility() {
|
|
22186
22145
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
22187
22146
|
if (this.queryItemId === QueryDetailsComponent.QUERY_ITEM_RESPOND || this.queryItemId === QueryDetailsComponent.QUERY_ITEM_FOLLOW_UP) {
|
|
@@ -22194,21 +22153,6 @@ class QueryDetailsComponent {
|
|
|
22194
22153
|
this.hasResponded.emit(true);
|
|
22195
22154
|
return true;
|
|
22196
22155
|
}
|
|
22197
|
-
const lastChild = this.query?.children?.[this.query.children.length - 1];
|
|
22198
|
-
const isFollowUp = lastChild?.messageType === this.followUpQuery;
|
|
22199
|
-
const isRespond = lastChild?.messageType === this.respondToQuery;
|
|
22200
|
-
if (this.queryResponseStatus === QueryItemResponseStatus.CLOSED) {
|
|
22201
|
-
this.hasResponded.emit(true);
|
|
22202
|
-
return true;
|
|
22203
|
-
}
|
|
22204
|
-
if (isFollowUp && this.isMultipleFollowUpEnabled) {
|
|
22205
|
-
this.hasResponded.emit(false);
|
|
22206
|
-
return false;
|
|
22207
|
-
}
|
|
22208
|
-
if (isRespond) {
|
|
22209
|
-
this.hasResponded.emit(false);
|
|
22210
|
-
return false;
|
|
22211
|
-
}
|
|
22212
22156
|
if (this.isInternalUser()) {
|
|
22213
22157
|
if (isAwaiting) {
|
|
22214
22158
|
this.hasResponded.emit(false);
|
|
@@ -22224,7 +22168,7 @@ class QueryDetailsComponent {
|
|
|
22224
22168
|
this.hasResponded.emit(false);
|
|
22225
22169
|
return false;
|
|
22226
22170
|
}
|
|
22227
|
-
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)
|
|
22171
|
+
static ɵfac = function QueryDetailsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
22228
22172
|
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) {
|
|
22229
22173
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 45, 41, "ng-container", 1);
|
|
22230
22174
|
} if (rf & 2) {
|
|
@@ -22233,8 +22177,8 @@ class QueryDetailsComponent {
|
|
|
22233
22177
|
}
|
|
22234
22178
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
22235
22179
|
type: Component,
|
|
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=\"
|
|
22237
|
-
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }
|
|
22180
|
+
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"] }]
|
|
22181
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
22238
22182
|
type: Input
|
|
22239
22183
|
}], caseId: [{
|
|
22240
22184
|
type: Input
|
|
@@ -22245,7 +22189,7 @@ class QueryDetailsComponent {
|
|
|
22245
22189
|
}], hasResponded: [{
|
|
22246
22190
|
type: Output
|
|
22247
22191
|
}] }); })();
|
|
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:
|
|
22192
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 14 }); })();
|
|
22249
22193
|
|
|
22250
22194
|
class QueryEventCompletionComponent {
|
|
22251
22195
|
eventCompletionParams;
|
|
@@ -23232,7 +23176,7 @@ class CloseQueryComponent {
|
|
|
23232
23176
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
23233
23177
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
23234
23178
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
23235
|
-
i0.ɵɵelementStart(0, "div",
|
|
23179
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
|
|
23236
23180
|
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)); });
|
|
23237
23181
|
i0.ɵɵelementEnd()();
|
|
23238
23182
|
} if (rf & 2) {
|
|
@@ -23242,7 +23186,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_T
|
|
|
23242
23186
|
} }
|
|
23243
23187
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23244
23188
|
i0.ɵɵelementContainerStart(0);
|
|
23245
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div",
|
|
23189
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template, 2, 1, "div", 4);
|
|
23246
23190
|
i0.ɵɵelementContainerEnd();
|
|
23247
23191
|
} if (rf & 2) {
|
|
23248
23192
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -23251,7 +23195,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Templat
|
|
|
23251
23195
|
} }
|
|
23252
23196
|
function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
23253
23197
|
i0.ɵɵelementContainerStart(0);
|
|
23254
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container",
|
|
23198
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_Template, 2, 1, "ng-container", 3);
|
|
23255
23199
|
i0.ɵɵelementContainerEnd();
|
|
23256
23200
|
} if (rf & 2) {
|
|
23257
23201
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -23260,7 +23204,7 @@ function ReadQueryManagementFieldComponent_ng_container_0_Template(rf, ctx) { if
|
|
|
23260
23204
|
} }
|
|
23261
23205
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23262
23206
|
i0.ɵɵelementContainerStart(0);
|
|
23263
|
-
i0.ɵɵelementStart(1, "button",
|
|
23207
|
+
i0.ɵɵelementStart(1, "button", 9);
|
|
23264
23208
|
i0.ɵɵtext(2);
|
|
23265
23209
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23266
23210
|
i0.ɵɵelementEnd();
|
|
@@ -23272,22 +23216,8 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23272
23216
|
i0.ɵɵadvance();
|
|
23273
23217
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23274
23218
|
} }
|
|
23275
|
-
function
|
|
23276
|
-
i0.ɵɵ
|
|
23277
|
-
i0.ɵɵelementStart(1, "button", 10);
|
|
23278
|
-
i0.ɵɵtext(2);
|
|
23279
|
-
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23280
|
-
i0.ɵɵelementEnd();
|
|
23281
|
-
i0.ɵɵelementContainerEnd();
|
|
23282
|
-
} if (rf & 2) {
|
|
23283
|
-
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
23284
|
-
i0.ɵɵadvance();
|
|
23285
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23286
|
-
i0.ɵɵadvance();
|
|
23287
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23288
|
-
} }
|
|
23289
|
-
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23290
|
-
i0.ɵɵelementStart(0, "div")(1, "p", 11);
|
|
23219
|
+
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23220
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 10);
|
|
23291
23221
|
i0.ɵɵtext(2);
|
|
23292
23222
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23293
23223
|
i0.ɵɵelementEnd();
|
|
@@ -23301,32 +23231,25 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
23301
23231
|
i0.ɵɵadvance(3);
|
|
23302
23232
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23303
23233
|
} }
|
|
23304
|
-
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23305
|
-
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template, 4, 7, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template, 7, 6, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
|
|
23306
|
-
} if (rf & 2) {
|
|
23307
|
-
const queryIsInReview_r5 = i0.ɵɵreference(2);
|
|
23308
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
23309
|
-
i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) > 0 && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) % 2 === 1)("ngIfElse", queryIsInReview_r5);
|
|
23310
|
-
} }
|
|
23311
23234
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23312
23235
|
i0.ɵɵelementContainerStart(0);
|
|
23313
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container",
|
|
23236
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 2)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 7, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
23314
23237
|
i0.ɵɵelementContainerEnd();
|
|
23315
23238
|
} if (rf & 2) {
|
|
23316
|
-
const
|
|
23239
|
+
const queryIsInReview_r5 = i0.ɵɵreference(3);
|
|
23317
23240
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
23318
23241
|
i0.ɵɵadvance();
|
|
23319
|
-
i0.ɵɵproperty("ngIf", ctx_r1.
|
|
23242
|
+
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);
|
|
23320
23243
|
} }
|
|
23321
23244
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
23322
23245
|
i0.ɵɵelementContainerStart(0);
|
|
23323
|
-
i0.ɵɵelementStart(1, "div",
|
|
23246
|
+
i0.ɵɵelementStart(1, "div", 11)(2, "span", 12);
|
|
23324
23247
|
i0.ɵɵtext(3, "!");
|
|
23325
23248
|
i0.ɵɵelementEnd();
|
|
23326
|
-
i0.ɵɵelementStart(4, "strong",
|
|
23249
|
+
i0.ɵɵelementStart(4, "strong", 13)(5, "span", 14);
|
|
23327
23250
|
i0.ɵɵtext(6, "Warning");
|
|
23328
23251
|
i0.ɵɵelementEnd();
|
|
23329
|
-
i0.ɵɵelementStart(7, "p",
|
|
23252
|
+
i0.ɵɵelementStart(7, "p", 15);
|
|
23330
23253
|
i0.ɵɵtext(8);
|
|
23331
23254
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23332
23255
|
i0.ɵɵelementEnd()()();
|
|
@@ -23337,10 +23260,10 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template
|
|
|
23337
23260
|
} }
|
|
23338
23261
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
23339
23262
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
23340
|
-
i0.ɵɵelementStart(0, "ccd-query-details",
|
|
23263
|
+
i0.ɵɵelementStart(0, "ccd-query-details", 7);
|
|
23341
23264
|
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); });
|
|
23342
23265
|
i0.ɵɵelementEnd();
|
|
23343
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container",
|
|
23266
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 8)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template, 10, 3, "ng-container", 8);
|
|
23344
23267
|
} if (rf & 2) {
|
|
23345
23268
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23346
23269
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
@@ -23353,36 +23276,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23353
23276
|
route;
|
|
23354
23277
|
sessionStorageService;
|
|
23355
23278
|
caseNotifier;
|
|
23356
|
-
abstractConfig;
|
|
23357
23279
|
caseQueriesCollections;
|
|
23358
23280
|
query;
|
|
23359
23281
|
showQueryList = true;
|
|
23360
23282
|
caseId;
|
|
23361
|
-
messageType;
|
|
23362
|
-
followUpQuery = QueryCreateContext.FOLLOWUP;
|
|
23363
|
-
respondToQuery = QueryCreateContext.RESPOND;
|
|
23364
23283
|
isQueryClosed = false;
|
|
23365
|
-
|
|
23366
|
-
isMultipleFollowUpEnabled = false;
|
|
23367
|
-
currentJurisdictionId;
|
|
23368
|
-
enableServiceSpecificMultiFollowups = [];
|
|
23369
|
-
caseSubscription;
|
|
23370
|
-
constructor(route, sessionStorageService, caseNotifier, abstractConfig) {
|
|
23284
|
+
constructor(route, sessionStorageService, caseNotifier) {
|
|
23371
23285
|
super();
|
|
23372
23286
|
this.route = route;
|
|
23373
23287
|
this.sessionStorageService = sessionStorageService;
|
|
23374
23288
|
this.caseNotifier = caseNotifier;
|
|
23375
|
-
this.abstractConfig = abstractConfig;
|
|
23376
23289
|
}
|
|
23377
23290
|
ngOnInit() {
|
|
23378
23291
|
this.caseId = this.route.snapshot.params.cid;
|
|
23379
|
-
this.enableServiceSpecificMultiFollowups = this.abstractConfig.getEnableServiceSpecificMultiFollowups() || [];
|
|
23380
|
-
this.caseSubscription = this.caseNotifier.caseView.subscribe((caseDetails) => {
|
|
23381
|
-
if (caseDetails?.case_type?.jurisdiction?.id) {
|
|
23382
|
-
this.currentJurisdictionId = caseDetails.case_type.jurisdiction.id;
|
|
23383
|
-
this.isMultipleFollowUpEnabled = this.enableServiceSpecificMultiFollowups.includes(this.currentJurisdictionId);
|
|
23384
|
-
}
|
|
23385
|
-
});
|
|
23386
23292
|
if (this.context === PaletteContext.DEFAULT) {
|
|
23387
23293
|
// EUI-8303 Using mock data until CCD is ready with the API and data contract
|
|
23388
23294
|
// this.caseQueriesCollections = caseMessagesMockData;
|
|
@@ -23408,13 +23314,9 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23408
23314
|
// QueryManagementUtils.extractCaseQueriesFromCaseField();
|
|
23409
23315
|
}
|
|
23410
23316
|
}
|
|
23411
|
-
ngOnDestroy() {
|
|
23412
|
-
this.caseSubscription?.unsubscribe();
|
|
23413
|
-
}
|
|
23414
23317
|
setQuery(query) {
|
|
23415
23318
|
this.showQueryList = false;
|
|
23416
23319
|
this.query = query;
|
|
23417
|
-
this.messageType = this.getMessageType(query);
|
|
23418
23320
|
this.isQueryClosed = this.query?.children?.some((queryItem) => queryItem?.isClosed === 'Yes');
|
|
23419
23321
|
}
|
|
23420
23322
|
backToQueryListPage() {
|
|
@@ -23424,24 +23326,19 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23424
23326
|
isInternalUser() {
|
|
23425
23327
|
return isInternalUser(this.sessionStorageService);
|
|
23426
23328
|
}
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
: undefined;
|
|
23431
|
-
}
|
|
23432
|
-
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
23433
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23434
|
-
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
23329
|
+
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
|
|
23330
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["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) {
|
|
23331
|
+
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 2)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
23435
23332
|
} if (rf & 2) {
|
|
23436
|
-
const
|
|
23437
|
-
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse",
|
|
23333
|
+
const singleQueryDetails_r6 = i0.ɵɵreference(2);
|
|
23334
|
+
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
|
|
23438
23335
|
} }, encapsulation: 2 });
|
|
23439
23336
|
}
|
|
23440
23337
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23441
23338
|
type: Component,
|
|
23442
|
-
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"
|
|
23443
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }
|
|
23444
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber:
|
|
23339
|
+
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <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-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" }]
|
|
23340
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23341
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
|
|
23445
23342
|
|
|
23446
23343
|
class ReadTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
23447
23344
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextAreaFieldComponent_BaseFactory; return function ReadTextAreaFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextAreaFieldComponent_BaseFactory || (ɵReadTextAreaFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextAreaFieldComponent)))(__ngFactoryType__ || ReadTextAreaFieldComponent); }; })();
|