@hmcts/ccd-case-ui-toolkit 7.1.60-subject-message-length → 7.1.61-qm-task-management
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/case-viewer/services/case.resolver.mjs +8 -1
- package/esm2022/lib/shared/components/palette/palette.module.mjs +2 -2
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +16 -7
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +42 -57
- package/esm2022/lib/shared/components/palette/query-management/enums/raise-query-error-message.enum.mjs +1 -2
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +64 -64
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts +1 -0
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -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-write/query-write-raise-query/query-write-raise-query.component.d.ts +0 -2
- 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/enums/raise-query-error-message.enum.d.ts +0 -1
- package/lib/shared/components/palette/query-management/enums/raise-query-error-message.enum.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -20425,7 +20425,6 @@ var RaiseQueryErrorMessage;
|
|
|
20425
20425
|
RaiseQueryErrorMessage["QUERY_BODY"] = "Enter query details";
|
|
20426
20426
|
RaiseQueryErrorMessage["QUERY_HEARING_RELATED"] = "Select whether the query is hearing related or not";
|
|
20427
20427
|
RaiseQueryErrorMessage["QUERY_HEARING_DATE"] = "Enter a valid date";
|
|
20428
|
-
RaiseQueryErrorMessage["QUERY_SUBJECT_MAX_LENGTH"] = "Query subject must be less than 201 characters in length";
|
|
20429
20428
|
RaiseQueryErrorMessage["RESPOND_QUERY_BODY"] = "Add a response before continue";
|
|
20430
20429
|
})(RaiseQueryErrorMessage || (RaiseQueryErrorMessage = {}));
|
|
20431
20430
|
|
|
@@ -21115,11 +21114,13 @@ class QueryCheckYourAnswersComponent {
|
|
|
21115
21114
|
.subscribe({
|
|
21116
21115
|
next: (response) => {
|
|
21117
21116
|
// Filter task by query id
|
|
21118
|
-
if (this.tid
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
|
|
21117
|
+
if (this.tid) {
|
|
21118
|
+
if (response.tasks?.length > 1) {
|
|
21119
|
+
this.filteredTasks = response.tasks?.filter((task) => task.id === this.tid);
|
|
21120
|
+
}
|
|
21121
|
+
else {
|
|
21122
|
+
this.filteredTasks = response.tasks;
|
|
21123
|
+
}
|
|
21123
21124
|
}
|
|
21124
21125
|
},
|
|
21125
21126
|
error: (error) => {
|
|
@@ -21158,7 +21159,14 @@ class QueryCheckYourAnswersComponent {
|
|
|
21158
21159
|
});
|
|
21159
21160
|
}
|
|
21160
21161
|
else {
|
|
21161
|
-
console.error('Error: No task to complete found');
|
|
21162
|
+
console.error('Error: No task to complete was found');
|
|
21163
|
+
this.errorMessages = [
|
|
21164
|
+
{
|
|
21165
|
+
title: 'Error',
|
|
21166
|
+
description: 'No task to complete was found',
|
|
21167
|
+
fieldId: 'field-id'
|
|
21168
|
+
}
|
|
21169
|
+
];
|
|
21162
21170
|
}
|
|
21163
21171
|
}
|
|
21164
21172
|
else {
|
|
@@ -22168,11 +22176,11 @@ function QueryWriteRaiseQueryComponent_div_11_p_11_Template(rf, ctx) { if (rf &
|
|
|
22168
22176
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22169
22177
|
i0.ɵɵelementEnd();
|
|
22170
22178
|
} if (rf & 2) {
|
|
22171
|
-
const
|
|
22179
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
22172
22180
|
i0.ɵɵadvance(2);
|
|
22173
|
-
i0.ɵɵ
|
|
22181
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
22174
22182
|
i0.ɵɵadvance(2);
|
|
22175
|
-
i0.ɵɵtextInterpolate1("
|
|
22183
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_SUBJECT), " ");
|
|
22176
22184
|
} }
|
|
22177
22185
|
function QueryWriteRaiseQueryComponent_div_11_p_21_Template(rf, ctx) { if (rf & 1) {
|
|
22178
22186
|
i0.ɵɵelementStart(0, "p", 29)(1, "span", 28);
|
|
@@ -22183,11 +22191,11 @@ function QueryWriteRaiseQueryComponent_div_11_p_21_Template(rf, ctx) { if (rf &
|
|
|
22183
22191
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22184
22192
|
i0.ɵɵelementEnd();
|
|
22185
22193
|
} if (rf & 2) {
|
|
22186
|
-
const
|
|
22194
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
22187
22195
|
i0.ɵɵadvance(2);
|
|
22188
22196
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
22189
22197
|
i0.ɵɵadvance(2);
|
|
22190
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4,
|
|
22198
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_BODY), " ");
|
|
22191
22199
|
} }
|
|
22192
22200
|
function QueryWriteRaiseQueryComponent_div_11_p_30_Template(rf, ctx) { if (rf & 1) {
|
|
22193
22201
|
i0.ɵɵelementStart(0, "p", 30)(1, "span", 28);
|
|
@@ -22198,11 +22206,11 @@ function QueryWriteRaiseQueryComponent_div_11_p_30_Template(rf, ctx) { if (rf &
|
|
|
22198
22206
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22199
22207
|
i0.ɵɵelementEnd();
|
|
22200
22208
|
} if (rf & 2) {
|
|
22201
|
-
const
|
|
22209
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
22202
22210
|
i0.ɵɵadvance(2);
|
|
22203
22211
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
22204
22212
|
i0.ɵɵadvance(2);
|
|
22205
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4,
|
|
22213
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_HEARING_RELATED), " ");
|
|
22206
22214
|
} }
|
|
22207
22215
|
function QueryWriteRaiseQueryComponent_div_11_ng_container_42_p_7_Template(rf, ctx) { if (rf & 1) {
|
|
22208
22216
|
i0.ɵɵelementStart(0, "p", 36)(1, "span", 28);
|
|
@@ -22213,11 +22221,11 @@ function QueryWriteRaiseQueryComponent_div_11_ng_container_42_p_7_Template(rf, c
|
|
|
22213
22221
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
22214
22222
|
i0.ɵɵelementEnd();
|
|
22215
22223
|
} if (rf & 2) {
|
|
22216
|
-
const
|
|
22224
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
22217
22225
|
i0.ɵɵadvance(2);
|
|
22218
22226
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
22219
22227
|
i0.ɵɵadvance(2);
|
|
22220
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4,
|
|
22228
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_HEARING_DATE), " ");
|
|
22221
22229
|
} }
|
|
22222
22230
|
function QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template(rf, ctx) { if (rf & 1) {
|
|
22223
22231
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -22230,16 +22238,15 @@ function QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template(rf, ctx)
|
|
|
22230
22238
|
i0.ɵɵelementEnd()();
|
|
22231
22239
|
i0.ɵɵelementContainerEnd();
|
|
22232
22240
|
} if (rf & 2) {
|
|
22233
|
-
const
|
|
22241
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
22234
22242
|
i0.ɵɵadvance();
|
|
22235
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$C,
|
|
22243
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").value === true && ctx_r0.formGroup.get("hearingDate").value === null));
|
|
22236
22244
|
i0.ɵɵadvance(4);
|
|
22237
22245
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 3, "What is the date of the hearing?"), " ");
|
|
22238
22246
|
i0.ɵɵadvance(2);
|
|
22239
|
-
i0.ɵɵproperty("ngIf",
|
|
22247
|
+
i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").value === true && ctx_r0.formGroup.get("hearingDate").value === null);
|
|
22240
22248
|
} }
|
|
22241
22249
|
function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
22242
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
22243
22250
|
i0.ɵɵelementStart(0, "div", 5)(1, "div", 6)(2, "div")(3, "div", 7)(4, "div", 8)(5, "label", 9);
|
|
22244
22251
|
i0.ɵɵtext(6);
|
|
22245
22252
|
i0.ɵɵpipe(7, "rpxTranslate");
|
|
@@ -22249,8 +22256,7 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
22249
22256
|
i0.ɵɵpipe(10, "rpxTranslate");
|
|
22250
22257
|
i0.ɵɵelementEnd();
|
|
22251
22258
|
i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_p_11_Template, 6, 6, "p", 11);
|
|
22252
|
-
i0.ɵɵ
|
|
22253
|
-
i0.ɵɵlistener("input", function QueryWriteRaiseQueryComponent_div_11_Template_input_input_12_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSubjectInput()); });
|
|
22259
|
+
i0.ɵɵelement(12, "input", 12);
|
|
22254
22260
|
i0.ɵɵelementEnd()();
|
|
22255
22261
|
i0.ɵɵelementStart(13, "div", 7)(14, "div", 8)(15, "label", 13);
|
|
22256
22262
|
i0.ɵɵtext(16);
|
|
@@ -22282,46 +22288,50 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
22282
22288
|
i0.ɵɵpipe(41, "rpxTranslate");
|
|
22283
22289
|
i0.ɵɵelementEnd()()()();
|
|
22284
22290
|
i0.ɵɵtemplate(42, QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template, 9, 7, "ng-container", 26);
|
|
22285
|
-
i0.ɵɵelementEnd()()()
|
|
22291
|
+
i0.ɵɵelementEnd()()();
|
|
22286
22292
|
} if (rf & 2) {
|
|
22287
|
-
|
|
22293
|
+
let tmp_6_0;
|
|
22294
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
22288
22295
|
i0.ɵɵadvance();
|
|
22289
|
-
i0.ɵɵproperty("formGroup",
|
|
22296
|
+
i0.ɵɵproperty("formGroup", ctx_r0.formGroup);
|
|
22290
22297
|
i0.ɵɵadvance(2);
|
|
22291
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
22298
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(43, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("subject").hasError("required")));
|
|
22292
22299
|
i0.ɵɵadvance(3);
|
|
22293
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7,
|
|
22300
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 25, "Query subject"), " ");
|
|
22294
22301
|
i0.ɵɵadvance(3);
|
|
22295
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10,
|
|
22296
|
-
i0.ɵɵadvance(2);
|
|
22297
|
-
i0.ɵɵproperty("ngIf", ctx_r1.submitted && (ctx_r1.formGroup.get("subject").hasError("required") || ctx_r1.formGroup.get("subject").hasError("maxlength")));
|
|
22302
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 27, "The subject should be a summary of your query"), " ");
|
|
22298
22303
|
i0.ɵɵadvance(2);
|
|
22299
|
-
i0.ɵɵproperty("
|
|
22304
|
+
i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("subject").hasError("required"));
|
|
22305
|
+
i0.ɵɵadvance();
|
|
22306
|
+
i0.ɵɵclassProp("govuk-input--error", ctx_r0.submitted && ((tmp_6_0 = ctx_r0.formGroup.get("subject")) == null ? null : tmp_6_0.hasError("required")));
|
|
22307
|
+
i0.ɵɵproperty("formControlName", "subject");
|
|
22308
|
+
i0.ɵɵadvance();
|
|
22309
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(45, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("body").hasError("required")));
|
|
22300
22310
|
i0.ɵɵadvance(3);
|
|
22301
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17,
|
|
22311
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17, 29, "Query detail"), " ");
|
|
22302
22312
|
i0.ɵɵadvance(3);
|
|
22303
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20,
|
|
22313
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 31, "Include as many details as possible so case workers can respond to your query"), " ");
|
|
22304
22314
|
i0.ɵɵadvance(2);
|
|
22305
|
-
i0.ɵɵproperty("ngIf",
|
|
22315
|
+
i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("body").hasError("required"));
|
|
22306
22316
|
i0.ɵɵadvance();
|
|
22307
|
-
i0.ɵɵclassProp("govuk-textarea--error",
|
|
22317
|
+
i0.ɵɵclassProp("govuk-textarea--error", ctx_r0.submitted && ctx_r0.formGroup.get("body").hasError("required"));
|
|
22308
22318
|
i0.ɵɵproperty("formControlName", "body");
|
|
22309
22319
|
i0.ɵɵadvance(2);
|
|
22310
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
22320
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(47, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").hasError("required")));
|
|
22311
22321
|
i0.ɵɵadvance(4);
|
|
22312
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29,
|
|
22322
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29, 33, "Is the query hearing related?"), " ");
|
|
22313
22323
|
i0.ɵɵadvance(2);
|
|
22314
|
-
i0.ɵɵproperty("ngIf",
|
|
22324
|
+
i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").hasError("required"));
|
|
22315
22325
|
i0.ɵɵadvance(3);
|
|
22316
|
-
i0.ɵɵproperty("checked",
|
|
22326
|
+
i0.ɵɵproperty("checked", ctx_r0.formGroup.get("isHearingRelated").value === true)("value", true);
|
|
22317
22327
|
i0.ɵɵadvance(2);
|
|
22318
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(36,
|
|
22328
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(36, 35, "Is the query hearing related?", null, "Yes"), " ");
|
|
22319
22329
|
i0.ɵɵadvance(3);
|
|
22320
|
-
i0.ɵɵproperty("checked",
|
|
22330
|
+
i0.ɵɵproperty("checked", ctx_r0.formGroup.get("isHearingRelated").value === false)("value", false);
|
|
22321
22331
|
i0.ɵɵadvance(2);
|
|
22322
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(41,
|
|
22332
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(41, 39, "Is the query hearing related?", null, "No"), " ");
|
|
22323
22333
|
i0.ɵɵadvance(2);
|
|
22324
|
-
i0.ɵɵproperty("ngIf",
|
|
22334
|
+
i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("isHearingRelated").value);
|
|
22325
22335
|
} }
|
|
22326
22336
|
class QueryWriteRaiseQueryComponent {
|
|
22327
22337
|
formGroup;
|
|
@@ -22329,25 +22339,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22329
22339
|
caseDetails;
|
|
22330
22340
|
showForm;
|
|
22331
22341
|
raiseQueryErrorMessage = RaiseQueryErrorMessage;
|
|
22332
|
-
onSubjectInput() {
|
|
22333
|
-
const control = this.formGroup.get('subject');
|
|
22334
|
-
const value = control?.value;
|
|
22335
|
-
if (value && value.length > 200) {
|
|
22336
|
-
control?.setValue(value.substring(0, 200));
|
|
22337
|
-
}
|
|
22338
|
-
}
|
|
22339
|
-
getSubjectErrorMessage() {
|
|
22340
|
-
const control = this.formGroup.get('subject');
|
|
22341
|
-
if (control.hasError('required')) {
|
|
22342
|
-
return this.raiseQueryErrorMessage.QUERY_SUBJECT;
|
|
22343
|
-
}
|
|
22344
|
-
if (control.hasError('maxlength')) {
|
|
22345
|
-
return this.raiseQueryErrorMessage.QUERY_SUBJECT_MAX_LENGTH;
|
|
22346
|
-
}
|
|
22347
|
-
return '';
|
|
22348
|
-
}
|
|
22349
22342
|
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(t) { return new (t || QueryWriteRaiseQueryComponent)(); };
|
|
22350
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [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", "
|
|
22343
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [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", "name", "subject", "id", "subject", 1, "govuk-input", 3, "formControlName"], ["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"], [1, "govuk-visually-hidden"], ["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) {
|
|
22351
22344
|
i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "div", 1);
|
|
22352
22345
|
i0.ɵɵtext(3);
|
|
22353
22346
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -22360,7 +22353,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22360
22353
|
i0.ɵɵelement(9, "ccd-query-case-details-header", 3);
|
|
22361
22354
|
i0.ɵɵelementEnd();
|
|
22362
22355
|
i0.ɵɵelement(10, "hr");
|
|
22363
|
-
i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_Template, 43,
|
|
22356
|
+
i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_Template, 43, 49, "div", 4);
|
|
22364
22357
|
i0.ɵɵelementEnd();
|
|
22365
22358
|
} if (rf & 2) {
|
|
22366
22359
|
i0.ɵɵadvance(3);
|
|
@@ -22375,7 +22368,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22375
22368
|
}
|
|
22376
22369
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
|
|
22377
22370
|
type: Component,
|
|
22378
|
-
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\"></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-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
|
|
22371
|
+
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\"></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-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')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_SUBJECT | rpxTranslate }}\n </p>\n <input [formControlName]=\"'subject'\" type=\"text\" name=\"subject\"\n class=\"govuk-input\" id=\"subject\"\n [class.govuk-input--error]=\"submitted && formGroup.get('subject')?.hasError('required')\"\n />\n </div>\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" }]
|
|
22379
22372
|
}], null, { formGroup: [{
|
|
22380
22373
|
type: Input
|
|
22381
22374
|
}], submitted: [{
|
|
@@ -30492,7 +30485,7 @@ ReadQueryManagementFieldComponent, function () { return [i5.NgForOf, i5.NgIf, i1
|
|
|
30492
30485
|
i0.ɵɵsetComponentScope(QueryDetailsComponent, function () { return [i5.NgForOf, i5.NgIf, AlertComponent, QueryAttachmentsReadComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
|
|
30493
30486
|
i0.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, function () { return [i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryDetailsComponent,
|
|
30494
30487
|
QueryCaseDetailsHeaderComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
30495
|
-
i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.
|
|
30488
|
+
i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryCaseDetailsHeaderComponent,
|
|
30496
30489
|
QueryWriteDateInputComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
30497
30490
|
i0.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, function () { return [i5.NgForOf, i5.NgIf, QueryCaseDetailsHeaderComponent,
|
|
30498
30491
|
QueryAttachmentsReadComponent,
|
|
@@ -33458,6 +33451,7 @@ class CaseResolver {
|
|
|
33458
33451
|
static EVENT_REGEX = new RegExp('\/trigger\/.*?\/submit$');
|
|
33459
33452
|
static PARAM_CASE_ID = 'cid';
|
|
33460
33453
|
static CASE_CREATED_MSG = 'The case has been created successfully';
|
|
33454
|
+
static EVENT_ID_QM_RESPOND_TO_QUERY = 'eventId=queryManagementRespondQuery';
|
|
33461
33455
|
static defaultWAPage = '/work/my-work/list';
|
|
33462
33456
|
static defaultPage = '/cases';
|
|
33463
33457
|
// we need to run the CaseResolver on every child route of 'case/:jid/:ctid/:cid'
|
|
@@ -33478,6 +33472,12 @@ class CaseResolver {
|
|
|
33478
33472
|
}
|
|
33479
33473
|
resolve(route) {
|
|
33480
33474
|
const cid = route.paramMap.get(CaseResolver.PARAM_CASE_ID);
|
|
33475
|
+
const currentUrl = this.router.url ?? '';
|
|
33476
|
+
// Prevent resolving if eventId=queryManagementRespondQuery is in the URL
|
|
33477
|
+
if (currentUrl.includes(CaseResolver.EVENT_ID_QM_RESPOND_TO_QUERY)) {
|
|
33478
|
+
console.info('Skipping resolve for event queryManagementRespondQuery.');
|
|
33479
|
+
this.goToDefaultPage();
|
|
33480
|
+
}
|
|
33481
33481
|
if (!cid) {
|
|
33482
33482
|
console.info('No case ID available in the route. Will navigate to case list.');
|
|
33483
33483
|
// when redirected to case view after a case created, and the user has no READ access,
|