@hmcts/ccd-case-ui-toolkit 7.1.44 → 7.1.45-exui-2868-rc1
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/shared/components/palette/document/write-document-field.component.mjs +33 -28
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +18 -13
- package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +20 -15
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.mjs +8 -7
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +74 -59
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +2 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts +4 -4
- 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-respond-to-query/query-write-respond-to-query.component.d.ts +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.map +1 -1
- package/package.json +1 -1
|
@@ -14272,8 +14272,8 @@ class FileUploadStateService {
|
|
|
14272
14272
|
|
|
14273
14273
|
const _c0$R = ["fileInput"];
|
|
14274
14274
|
const _c1$l = a0 => ({ "form-group-error bottom-30": a0 });
|
|
14275
|
-
function
|
|
14276
|
-
i0.ɵɵelementStart(0, "span",
|
|
14275
|
+
function WriteDocumentFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
14276
|
+
i0.ɵɵelementStart(0, "span", 12);
|
|
14277
14277
|
i0.ɵɵtext(1);
|
|
14278
14278
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
14279
14279
|
i0.ɵɵelementEnd();
|
|
@@ -14282,8 +14282,8 @@ function WriteDocumentFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
14282
14282
|
i0.ɵɵadvance();
|
|
14283
14283
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, ctx_r1.caseField.hint_text), " ");
|
|
14284
14284
|
} }
|
|
14285
|
-
function
|
|
14286
|
-
i0.ɵɵelement(0, "ccd-read-document-field",
|
|
14285
|
+
function WriteDocumentFieldComponent_ccd_read_document_field_11_Template(rf, ctx) { if (rf & 1) {
|
|
14286
|
+
i0.ɵɵelement(0, "ccd-read-document-field", 13);
|
|
14287
14287
|
} if (rf & 2) {
|
|
14288
14288
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
14289
14289
|
i0.ɵɵproperty("caseField", ctx_r1.caseField);
|
|
@@ -14628,41 +14628,46 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14628
14628
|
} if (rf & 2) {
|
|
14629
14629
|
let _t;
|
|
14630
14630
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileInput = _t.first);
|
|
14631
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
14631
|
+
} }, 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) {
|
|
14632
14632
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
14633
|
-
i0.ɵɵelementStart(0, "div", 1)(1, "
|
|
14634
|
-
i0.ɵɵtext(2);
|
|
14633
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "label", 2)(2, "span", 3);
|
|
14635
14634
|
i0.ɵɵpipe(3, "ccdFieldLabel");
|
|
14635
|
+
i0.ɵɵtext(4);
|
|
14636
|
+
i0.ɵɵpipe(5, "ccdFieldLabel");
|
|
14637
|
+
i0.ɵɵelementEnd()();
|
|
14638
|
+
i0.ɵɵtemplate(6, WriteDocumentFieldComponent_span_6_Template, 3, 3, "span", 4);
|
|
14639
|
+
i0.ɵɵelementStart(7, "span", 5);
|
|
14640
|
+
i0.ɵɵtext(8);
|
|
14641
|
+
i0.ɵɵpipe(9, "rpxTranslate");
|
|
14636
14642
|
i0.ɵɵelementEnd();
|
|
14637
|
-
i0.ɵɵ
|
|
14638
|
-
i0.ɵɵ
|
|
14639
|
-
i0.ɵɵtext(6);
|
|
14640
|
-
i0.ɵɵpipe(7, "rpxTranslate");
|
|
14641
|
-
i0.ɵɵelementEnd();
|
|
14642
|
-
i0.ɵɵelementStart(8, "div");
|
|
14643
|
-
i0.ɵɵtemplate(9, WriteDocumentFieldComponent_ccd_read_document_field_9_Template, 1, 1, "ccd-read-document-field", 5);
|
|
14643
|
+
i0.ɵɵelementStart(10, "div");
|
|
14644
|
+
i0.ɵɵtemplate(11, WriteDocumentFieldComponent_ccd_read_document_field_11_Template, 1, 1, "ccd-read-document-field", 6);
|
|
14644
14645
|
i0.ɵɵelementEnd();
|
|
14645
|
-
i0.ɵɵelementStart(
|
|
14646
|
-
i0.ɵɵlistener("click", function
|
|
14646
|
+
i0.ɵɵelementStart(12, "div", 7)(13, "div", 8);
|
|
14647
|
+
i0.ɵɵlistener("click", function WriteDocumentFieldComponent_Template_div_click_13_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileSelectEvent()); })("keyup", function WriteDocumentFieldComponent_Template_div_keyup_13_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileSelectEvent()); });
|
|
14647
14648
|
i0.ɵɵelementEnd();
|
|
14648
|
-
i0.ɵɵelementStart(
|
|
14649
|
-
i0.ɵɵlistener("keydown.Tab", function
|
|
14649
|
+
i0.ɵɵelementStart(14, "input", 9, 0);
|
|
14650
|
+
i0.ɵɵlistener("keydown.Tab", function WriteDocumentFieldComponent_Template_input_keydown_Tab_14_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileValidationsOnTab()); })("change", function WriteDocumentFieldComponent_Template_input_change_14_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileChangeEvent($event, ctx.caseField.field_type.regular_expression)); });
|
|
14650
14651
|
i0.ɵɵelementEnd()()();
|
|
14651
|
-
i0.ɵɵelementStart(
|
|
14652
|
-
i0.ɵɵlistener("click", function
|
|
14653
|
-
i0.ɵɵtext(
|
|
14654
|
-
i0.ɵɵpipe(
|
|
14652
|
+
i0.ɵɵelementStart(16, "div", 10)(17, "button", 11);
|
|
14653
|
+
i0.ɵɵlistener("click", function WriteDocumentFieldComponent_Template_button_click_17_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.cancelUpload()); });
|
|
14654
|
+
i0.ɵɵtext(18);
|
|
14655
|
+
i0.ɵɵpipe(19, "rpxTranslate");
|
|
14655
14656
|
i0.ɵɵelementEnd()();
|
|
14656
14657
|
} if (rf & 2) {
|
|
14657
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
14658
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c1$l, !ctx.valid));
|
|
14659
|
+
i0.ɵɵadvance();
|
|
14660
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
14661
|
+
i0.ɵɵadvance();
|
|
14662
|
+
i0.ɵɵattribute("aria-label", i0.ɵɵpipeBind1(3, 13, ctx.caseField));
|
|
14658
14663
|
i0.ɵɵadvance(2);
|
|
14659
|
-
i0.ɵɵ
|
|
14664
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 15, ctx.caseField));
|
|
14660
14665
|
i0.ɵɵadvance(2);
|
|
14661
14666
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
14662
14667
|
i0.ɵɵadvance();
|
|
14663
14668
|
i0.ɵɵproperty("hidden", !(ctx.fileUploadMessages && !ctx.valid));
|
|
14664
14669
|
i0.ɵɵadvance();
|
|
14665
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(
|
|
14670
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 17, ctx.fileUploadMessages), " ");
|
|
14666
14671
|
i0.ɵɵadvance(3);
|
|
14667
14672
|
i0.ɵɵproperty("ngIf", ctx.caseField);
|
|
14668
14673
|
i0.ɵɵadvance(2);
|
|
@@ -14673,12 +14678,12 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14673
14678
|
i0.ɵɵadvance(3);
|
|
14674
14679
|
i0.ɵɵproperty("disabled", !ctx.isUploadInProgress());
|
|
14675
14680
|
i0.ɵɵadvance();
|
|
14676
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
14681
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(19, 19, "Cancel upload"));
|
|
14677
14682
|
} }, encapsulation: 2 });
|
|
14678
14683
|
}
|
|
14679
14684
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
|
|
14680
14685
|
type: Component,
|
|
14681
|
-
args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <
|
|
14686
|
+
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 {{ caseField.hint_text | rpxTranslate }}\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" }]
|
|
14682
14687
|
}], () => [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }], { fileInput: [{
|
|
14683
14688
|
type: ViewChild,
|
|
14684
14689
|
args: ['fileInput', { static: false }]
|
|
@@ -20331,7 +20336,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
20331
20336
|
fieldId;
|
|
20332
20337
|
attachments;
|
|
20333
20338
|
errorMessages = [];
|
|
20334
|
-
|
|
20339
|
+
filteredTasks = [];
|
|
20335
20340
|
constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, qualifyingQuestionService) {
|
|
20336
20341
|
this.route = route;
|
|
20337
20342
|
this.router = router;
|
|
@@ -20361,11 +20366,11 @@ class QueryCheckYourAnswersComponent {
|
|
|
20361
20366
|
.subscribe({
|
|
20362
20367
|
next: (response) => {
|
|
20363
20368
|
// Filter task by query id
|
|
20364
|
-
if (response.tasks?.length > 1) {
|
|
20365
|
-
this.
|
|
20369
|
+
if (this.tid && response.tasks?.length > 1) {
|
|
20370
|
+
this.filteredTasks = response.tasks?.filter((task) => task.id === this.tid);
|
|
20366
20371
|
}
|
|
20367
20372
|
else {
|
|
20368
|
-
this.
|
|
20373
|
+
this.filteredTasks = response.tasks;
|
|
20369
20374
|
}
|
|
20370
20375
|
},
|
|
20371
20376
|
error: (error) => {
|
|
@@ -20397,13 +20402,18 @@ class QueryCheckYourAnswersComponent {
|
|
|
20397
20402
|
const data = this.generateCaseQueriesCollectionData();
|
|
20398
20403
|
const createEvent$ = this.createEvent(data);
|
|
20399
20404
|
if (this.queryCreateContext === QueryCreateContext.RESPOND) {
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20405
|
+
if (this.filteredTasks?.length > 0) {
|
|
20406
|
+
const completeTask$ = this.workAllocationService.completeTask(this.filteredTasks[0].id, this.caseViewTrigger.name);
|
|
20407
|
+
this.createEventSubscription = forkJoin([createEvent$, completeTask$]).subscribe({
|
|
20408
|
+
next: ([createEventResponse, tasksResponse]) => {
|
|
20409
|
+
this.finaliseSubmission();
|
|
20410
|
+
},
|
|
20411
|
+
error: (error) => this.handleError(error)
|
|
20412
|
+
});
|
|
20413
|
+
}
|
|
20414
|
+
else {
|
|
20415
|
+
console.error('Error: No task to complete found');
|
|
20416
|
+
}
|
|
20407
20417
|
}
|
|
20408
20418
|
else {
|
|
20409
20419
|
this.createEventSubscription = createEvent$.subscribe({
|
|
@@ -20640,7 +20650,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
20640
20650
|
}], querySubmitted: [{
|
|
20641
20651
|
type: Output
|
|
20642
20652
|
}] }); })();
|
|
20643
|
-
(() => { (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:
|
|
20653
|
+
(() => { (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: 27 }); })();
|
|
20644
20654
|
|
|
20645
20655
|
function QueryDetailsComponent_ng_container_0_cut_alert_1_Template(rf, ctx) { if (rf & 1) {
|
|
20646
20656
|
i0.ɵɵelementStart(0, "cut-alert", 11);
|
|
@@ -20930,9 +20940,9 @@ function QueryDetailsComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
20930
20940
|
} if (rf & 2) {
|
|
20931
20941
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
20932
20942
|
i0.ɵɵadvance();
|
|
20933
|
-
i0.ɵɵproperty("ngIf", ctx_r0.hasRespondedToQuery());
|
|
20943
|
+
i0.ɵɵproperty("ngIf", ctx_r0.hasRespondedToQuery() && !ctx_r0.showItem);
|
|
20934
20944
|
i0.ɵɵadvance(2);
|
|
20935
|
-
i0.ɵɵproperty("ngIf", ctx_r0.
|
|
20945
|
+
i0.ɵɵproperty("ngIf", ctx_r0.showItem);
|
|
20936
20946
|
i0.ɵɵadvance(2);
|
|
20937
20947
|
i0.ɵɵattribute("aria-describedby", i0.ɵɵpipeBind1(6, 21, "Details of the query"));
|
|
20938
20948
|
i0.ɵɵadvance(4);
|
|
@@ -20973,11 +20983,11 @@ class QueryDetailsComponent {
|
|
|
20973
20983
|
route;
|
|
20974
20984
|
router;
|
|
20975
20985
|
query;
|
|
20976
|
-
backClicked = new EventEmitter();
|
|
20977
20986
|
caseId;
|
|
20987
|
+
queryResponseStatus;
|
|
20988
|
+
backClicked = new EventEmitter();
|
|
20978
20989
|
hasResponded = new EventEmitter();
|
|
20979
|
-
|
|
20980
|
-
showLink = true;
|
|
20990
|
+
showItem = true;
|
|
20981
20991
|
message;
|
|
20982
20992
|
static QUERY_ITEM_RESPOND = '3';
|
|
20983
20993
|
queryItemId;
|
|
@@ -21001,10 +21011,14 @@ class QueryDetailsComponent {
|
|
|
21001
21011
|
}
|
|
21002
21012
|
toggleLinkVisibility() {
|
|
21003
21013
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
21004
|
-
this.
|
|
21014
|
+
this.showItem = this.queryItemId !== QueryDetailsComponent.QUERY_ITEM_RESPOND;
|
|
21005
21015
|
}
|
|
21006
21016
|
hasRespondedToQuery() {
|
|
21007
|
-
if (this.
|
|
21017
|
+
if (this.queryResponseStatus === undefined || this.queryResponseStatus === QueryItemResponseStatus.AWAITING) {
|
|
21018
|
+
this.hasResponded.emit(false);
|
|
21019
|
+
return false;
|
|
21020
|
+
}
|
|
21021
|
+
if (this.isCaseworker() && this.queryResponseStatus !== QueryItemResponseStatus.AWAITING) {
|
|
21008
21022
|
this.message = Constants.TASK_COMPLETION_ERROR;
|
|
21009
21023
|
this.hasResponded.emit(true);
|
|
21010
21024
|
return true;
|
|
@@ -21013,7 +21027,7 @@ class QueryDetailsComponent {
|
|
|
21013
21027
|
return false;
|
|
21014
21028
|
}
|
|
21015
21029
|
static ɵfac = function QueryDetailsComponent_Factory(t) { return new (t || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
21016
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryDetailsComponent, selectors: [["ccd-query-details"]], inputs: { query: "query", caseId: "caseId",
|
|
21030
|
+
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"], ["type", "error", 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"], ["type", "error"], ["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) {
|
|
21017
21031
|
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 47, 42, "ng-container", 1);
|
|
21018
21032
|
} if (rf & 2) {
|
|
21019
21033
|
i0.ɵɵproperty("ngIf", ctx.query);
|
|
@@ -21021,19 +21035,19 @@ class QueryDetailsComponent {
|
|
|
21021
21035
|
}
|
|
21022
21036
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
21023
21037
|
type: Component,
|
|
21024
|
-
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <cut-alert type=\"error\" *ngIf=\"hasRespondedToQuery()\">\n <ng-container>{{message}}</ng-container>\n </cut-alert>\n\n <br/>\n <p *ngIf=\"
|
|
21038
|
+
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <cut-alert type=\"error\" *ngIf=\"hasRespondedToQuery() && !showItem\">\n <ng-container>{{message}}</ng-container>\n </cut-alert>\n\n <br/>\n <p *ngIf=\"showItem\">\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 MMM yyyy' }}</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 MMM yyyy' }}</td>\n </tr>\n\n <tr *ngIf=\"isCaseworker()\" 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 MMM yyyy' }}</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"] }]
|
|
21025
21039
|
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
21026
21040
|
type: Input
|
|
21027
|
-
}], backClicked: [{
|
|
21028
|
-
type: Output
|
|
21029
21041
|
}], caseId: [{
|
|
21030
21042
|
type: Input
|
|
21043
|
+
}], queryResponseStatus: [{
|
|
21044
|
+
type: Input
|
|
21045
|
+
}], backClicked: [{
|
|
21046
|
+
type: Output
|
|
21031
21047
|
}], hasResponded: [{
|
|
21032
21048
|
type: Output
|
|
21033
|
-
}], totalNumberOfQueryChildren: [{
|
|
21034
|
-
type: Input
|
|
21035
21049
|
}] }); })();
|
|
21036
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
21050
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 12 }); })();
|
|
21037
21051
|
|
|
21038
21052
|
class QueryEventCompletionComponent {
|
|
21039
21053
|
eventCompletionParams;
|
|
@@ -21696,7 +21710,7 @@ class QueryWriteRespondToQueryComponent {
|
|
|
21696
21710
|
caseId;
|
|
21697
21711
|
queryItemId;
|
|
21698
21712
|
caseDetails;
|
|
21699
|
-
|
|
21713
|
+
queryResponseStatus;
|
|
21700
21714
|
queryItemDisplay;
|
|
21701
21715
|
hasRespondedToQuery = false;
|
|
21702
21716
|
static QUERY_ITEM_RESPOND = '3';
|
|
@@ -21724,8 +21738,7 @@ class QueryWriteRespondToQueryComponent {
|
|
|
21724
21738
|
console.error('caseQueriesCollections[0] is undefined!', this.caseQueriesCollections);
|
|
21725
21739
|
return;
|
|
21726
21740
|
}
|
|
21727
|
-
const
|
|
21728
|
-
this.totalNumberOfQueryChildren = numberOfQueryChildren?.queries?.[0]?.children?.length || 0;
|
|
21741
|
+
const queryWithChildren = new QueryListData(this.caseQueriesCollections[0]);
|
|
21729
21742
|
const messageId = this.route.snapshot.params.dataid;
|
|
21730
21743
|
if (!messageId) {
|
|
21731
21744
|
console.warn('No messageId found in route params:', this.route.snapshot.params);
|
|
@@ -21737,6 +21750,8 @@ class QueryWriteRespondToQueryComponent {
|
|
|
21737
21750
|
.filter((message) => message?.value?.id === messageId); // Safe access
|
|
21738
21751
|
if (filteredMessages.length > 0) {
|
|
21739
21752
|
const matchingMessage = filteredMessages[0]?.value;
|
|
21753
|
+
const filteredQuery = queryWithChildren?.queries.filter((message) => filteredMessages[0]?.value?.parentId === message?.id);
|
|
21754
|
+
this.queryResponseStatus = filteredQuery[0]?.responseStatus;
|
|
21740
21755
|
if (matchingMessage) {
|
|
21741
21756
|
this.queryItemDisplay = new QueryListItem();
|
|
21742
21757
|
Object.assign(this.queryItemDisplay, matchingMessage);
|
|
@@ -21750,7 +21765,7 @@ class QueryWriteRespondToQueryComponent {
|
|
|
21750
21765
|
this.hasRespondedToQueryTask.emit(value);
|
|
21751
21766
|
}
|
|
21752
21767
|
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(t) { return new (t || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
21753
|
-
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: 13, vars: 10, 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"], [3, "hasResponded", "query", "
|
|
21768
|
+
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: 13, vars: 10, 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"], [3, "hasResponded", "query", "queryResponseStatus"], ["class", "query-respond", 4, "ngIf"], [1, "query-respond"], [4, "ngIf"], [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"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21754
21769
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 0)(2, "div", 1);
|
|
21755
21770
|
i0.ɵɵtext(3);
|
|
21756
21771
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -21774,14 +21789,14 @@ class QueryWriteRespondToQueryComponent {
|
|
|
21774
21789
|
i0.ɵɵadvance(3);
|
|
21775
21790
|
i0.ɵɵproperty("caseDetails", ctx.caseDetails);
|
|
21776
21791
|
i0.ɵɵadvance(2);
|
|
21777
|
-
i0.ɵɵproperty("query", ctx.queryItem)("
|
|
21792
|
+
i0.ɵɵproperty("query", ctx.queryItem)("queryResponseStatus", ctx.queryResponseStatus);
|
|
21778
21793
|
i0.ɵɵadvance();
|
|
21779
21794
|
i0.ɵɵproperty("ngIf", ctx.showForm);
|
|
21780
21795
|
} }, styles: [".query-respond[_ngcontent-%COMP%]{width:100%;max-width:720px}"] });
|
|
21781
21796
|
}
|
|
21782
21797
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRespondToQueryComponent, [{
|
|
21783
21798
|
type: Component,
|
|
21784
|
-
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\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryItem\"\n [
|
|
21799
|
+
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\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryItem\"\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", styles: [".query-respond{width:100%;max-width:720px}\n"] }]
|
|
21785
21800
|
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }], { queryItem: [{
|
|
21786
21801
|
type: Input
|
|
21787
21802
|
}], formGroup: [{
|