@hmcts/ccd-case-ui-toolkit 6.16.0-create-qualifying-questions-component-v3 → 6.16.0-create-qualifying-questions-continue-raise-a-query-v3

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.
Files changed (31) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +275 -230
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/shared/components/palette/palette.module.js +4 -2
  6. package/esm2015/lib/shared/components/palette/query-management/__mocks__/index.js +20 -2
  7. package/esm2015/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-questions.component.js +76 -64
  8. package/esm2015/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.js +14 -14
  9. package/esm2015/lib/shared/components/palette/query-management/components/query-details-table/query-details-table.component.js +17 -20
  10. package/esm2015/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.js +37 -27
  11. package/esm2015/lib/shared/components/palette/query-management/enums/index.js +2 -1
  12. package/esm2015/lib/shared/components/palette/query-management/enums/qualifying-questions-error-message.enum.js +5 -0
  13. package/esm2015/lib/shared/components/palette/query-management/index.js +2 -1
  14. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +234 -195
  15. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  16. package/lib/shared/components/palette/query-management/__mocks__/index.d.ts.map +1 -1
  17. package/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-questions.component.d.ts +7 -4
  18. package/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-questions.component.d.ts.map +1 -1
  19. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +2 -2
  20. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  21. package/lib/shared/components/palette/query-management/components/query-details-table/query-details-table.component.d.ts +5 -1
  22. package/lib/shared/components/palette/query-management/components/query-details-table/query-details-table.component.d.ts.map +1 -1
  23. package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts +9 -3
  24. 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
  25. package/lib/shared/components/palette/query-management/enums/index.d.ts +1 -0
  26. package/lib/shared/components/palette/query-management/enums/index.d.ts.map +1 -1
  27. package/lib/shared/components/palette/query-management/enums/qualifying-questions-error-message.enum.d.ts +4 -0
  28. package/lib/shared/components/palette/query-management/enums/qualifying-questions-error-message.enum.d.ts.map +1 -0
  29. package/lib/shared/components/palette/query-management/index.d.ts +1 -0
  30. package/lib/shared/components/palette/query-management/index.d.ts.map +1 -1
  31. package/package.json +1 -1
@@ -20275,101 +20275,243 @@
20275
20275
  collection_field_type: null
20276
20276
  })
20277
20277
  }),
20278
- display_context_parameter: '#COLLECTION(allowInsert,allowUpdate)'
20278
+ display_context_parameter: '#COLLECTION(allowInsert,allowUpdate)',
20279
+ value: [
20280
+ {
20281
+ id: '725bf4a7-9e4c-4132-b5c1-f8028cb83459',
20282
+ value: {
20283
+ document_url: 'https://dm-store-aat.service.core-compute-aat.internal/documents/e5366837-b3f6-492d-acbf-548730625e8f',
20284
+ document_filename: 'Screenshot 2023-06-01 at 16.07.06.png',
20285
+ document_binary_url: 'https://dm-store-aat.service.core-compute-aat.internal/documents/e5366837-b3f6-492d-acbf-548730625e8f/binary'
20286
+ }
20287
+ },
20288
+ {
20289
+ id: '725bf4a7-9e4c-4132-b5c1-f8028cb83459',
20290
+ value: {
20291
+ document_url: 'https://dm-store-aat.service.core-compute-aat.internal/documents/f50ccd7a-7f28-40f3-b5f9-7ad2f6425506',
20292
+ document_filename: 'dummy.pdf',
20293
+ document_binary_url: 'https://dm-store-aat.service.core-compute-aat.internal/documents/f50ccd7a-7f28-40f3-b5f9-7ad2f6425506/binary'
20294
+ }
20295
+ }
20296
+ ]
20279
20297
  });
20280
20298
 
20281
- function QualifyingQuestionsComponent_span_7_Template(rf, ctx) {
20299
+ exports.RaiseQueryErrorMessage = void 0;
20300
+ (function (RaiseQueryErrorMessage) {
20301
+ RaiseQueryErrorMessage["FULL_NAME"] = "Enter a full name";
20302
+ RaiseQueryErrorMessage["QUERY_SUBJECT"] = "Enter a query subject";
20303
+ RaiseQueryErrorMessage["QUERY_BODY"] = "Enter query details";
20304
+ RaiseQueryErrorMessage["QUERY_HEARING_RELATED"] = "Select whether the query is hearing related or not";
20305
+ RaiseQueryErrorMessage["QUERY_HEARING_DATE"] = "Enter a valid date";
20306
+ })(exports.RaiseQueryErrorMessage || (exports.RaiseQueryErrorMessage = {}));
20307
+
20308
+ exports.QualifyingQuestionsErrorMessage = void 0;
20309
+ (function (QualifyingQuestionsErrorMessage) {
20310
+ QualifyingQuestionsErrorMessage["SELECT_AN_OPTION"] = "Select an option";
20311
+ })(exports.QualifyingQuestionsErrorMessage || (exports.QualifyingQuestionsErrorMessage = {}));
20312
+
20313
+ var QueryListItem = /** @class */ (function () {
20314
+ function QueryListItem() {
20315
+ this.children = [];
20316
+ }
20317
+ Object.defineProperty(QueryListItem.prototype, "lastSubmittedMessage", {
20318
+ get: function () {
20319
+ var getLastSubmittedMessage = function (item) {
20320
+ var e_1, _b;
20321
+ var lastSubmittedMessage = item;
20322
+ if (item.children && item.children.length > 0) {
20323
+ try {
20324
+ for (var _c = __values(item.children), _d = _c.next(); !_d.done; _d = _c.next()) {
20325
+ var child = _d.value;
20326
+ var childLastSubmittedMessage = getLastSubmittedMessage(child);
20327
+ if (childLastSubmittedMessage.createdOn > lastSubmittedMessage.createdOn) {
20328
+ lastSubmittedMessage = childLastSubmittedMessage;
20329
+ }
20330
+ }
20331
+ }
20332
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
20333
+ finally {
20334
+ try {
20335
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
20336
+ }
20337
+ finally { if (e_1) throw e_1.error; }
20338
+ }
20339
+ }
20340
+ return lastSubmittedMessage;
20341
+ };
20342
+ return getLastSubmittedMessage(this);
20343
+ },
20344
+ enumerable: false,
20345
+ configurable: true
20346
+ });
20347
+ Object.defineProperty(QueryListItem.prototype, "lastSubmittedBy", {
20348
+ get: function () {
20349
+ return this.lastSubmittedMessage.name;
20350
+ },
20351
+ enumerable: false,
20352
+ configurable: true
20353
+ });
20354
+ Object.defineProperty(QueryListItem.prototype, "lastSubmittedDate", {
20355
+ get: function () {
20356
+ return new Date(this.lastSubmittedMessage.createdOn);
20357
+ },
20358
+ enumerable: false,
20359
+ configurable: true
20360
+ });
20361
+ Object.defineProperty(QueryListItem.prototype, "lastResponseBy", {
20362
+ get: function () {
20363
+ var _a;
20364
+ return ((_a = this.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.lastSubmittedMessage.name : '';
20365
+ },
20366
+ enumerable: false,
20367
+ configurable: true
20368
+ });
20369
+ Object.defineProperty(QueryListItem.prototype, "lastResponseDate", {
20370
+ get: function () {
20371
+ var _a;
20372
+ return ((_a = this.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? new Date(this.lastSubmittedMessage.createdOn) : null;
20373
+ },
20374
+ enumerable: false,
20375
+ configurable: true
20376
+ });
20377
+ return QueryListItem;
20378
+ }());
20379
+
20380
+ var QueryListData = /** @class */ (function () {
20381
+ function QueryListData(partyMessagesGroup) {
20382
+ var _this = this;
20383
+ this.partyName = partyMessagesGroup.partyName;
20384
+ this.roleOnCase = partyMessagesGroup.roleOnCase;
20385
+ // get the parent messages (messages without parentId) and add the children to them
20386
+ var parentMessages = partyMessagesGroup.partyMessages.filter(function (message) { return !message.parentId; });
20387
+ this.partyMessages = parentMessages.map(function (message) { return _this.buildQueryListItem(message, partyMessagesGroup.partyMessages); });
20388
+ }
20389
+ QueryListData.prototype.buildQueryListItem = function (message, allMessages) {
20390
+ var _this = this;
20391
+ var queryListItem = new QueryListItem();
20392
+ Object.assign(queryListItem, Object.assign(Object.assign({}, message), { children: allMessages
20393
+ .filter(function (childMessage) { return childMessage.parentId === message.id; })
20394
+ .map(function (childMessage) { return _this.buildQueryListItem(childMessage, allMessages); }) }));
20395
+ return queryListItem;
20396
+ };
20397
+ return QueryListData;
20398
+ }());
20399
+
20400
+ exports.QueryItemType = void 0;
20401
+ (function (QueryItemType) {
20402
+ QueryItemType["NEW"] = "New";
20403
+ QueryItemType["RESPOND"] = "Respond";
20404
+ QueryItemType["FOLLOWUP"] = "Followup";
20405
+ QueryItemType["NONE"] = "None";
20406
+ })(exports.QueryItemType || (exports.QueryItemType = {}));
20407
+
20408
+ function QualifyingQuestionsComponent_ng_container_0_ng_container_7_Template(rf, ctx) {
20282
20409
  if (rf & 1) {
20283
- i0__namespace.ɵɵelementStart(0, "span", 9);
20284
- i0__namespace.ɵɵelementStart(1, "span", 10);
20285
- i0__namespace.ɵɵtext(2);
20286
- i0__namespace.ɵɵpipe(3, "rpxTranslate");
20410
+ i0__namespace.ɵɵelementContainerStart(0);
20411
+ i0__namespace.ɵɵelementStart(1, "p", 10);
20412
+ i0__namespace.ɵɵelementStart(2, "span", 11);
20413
+ i0__namespace.ɵɵtext(3, "Error: ");
20287
20414
  i0__namespace.ɵɵelementEnd();
20288
20415
  i0__namespace.ɵɵtext(4);
20289
20416
  i0__namespace.ɵɵpipe(5, "rpxTranslate");
20290
20417
  i0__namespace.ɵɵelementEnd();
20418
+ i0__namespace.ɵɵelementContainerEnd();
20291
20419
  }
20292
20420
  if (rf & 2) {
20293
- var ctx_r0 = i0__namespace.ɵɵnextContext();
20294
- i0__namespace.ɵɵadvance(2);
20295
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(3, 2, "Error:"));
20296
- i0__namespace.ɵɵadvance(2);
20297
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 4, ctx_r0.qualifyingQuestionSelectionError), " ");
20421
+ var ctx_r1 = i0__namespace.ɵɵnextContext(2);
20422
+ i0__namespace.ɵɵadvance(4);
20423
+ i0__namespace.ɵɵtextInterpolate1("", i0__namespace.ɵɵpipeBind1(5, 1, ctx_r1.qualifyingQuestionsErrorMessage.SELECT_AN_OPTION), " ");
20298
20424
  }
20299
20425
  }
20300
- function QualifyingQuestionsComponent_div_10_Template(rf, ctx) {
20426
+ function QualifyingQuestionsComponent_ng_container_0_div_9_Template(rf, ctx) {
20301
20427
  if (rf & 1) {
20302
- i0__namespace.ɵɵelementStart(0, "div", 6);
20303
- i0__namespace.ɵɵelement(1, "input", 11);
20304
- i0__namespace.ɵɵelementStart(2, "label", 12);
20428
+ i0__namespace.ɵɵelementStart(0, "div", 7);
20429
+ i0__namespace.ɵɵelement(1, "input", 8);
20430
+ i0__namespace.ɵɵelementStart(2, "label", 9);
20305
20431
  i0__namespace.ɵɵtext(3);
20306
- i0__namespace.ɵɵpipe(4, "rpxTranslate");
20307
20432
  i0__namespace.ɵɵelementEnd();
20308
20433
  i0__namespace.ɵɵelementEnd();
20309
20434
  }
20310
20435
  if (rf & 2) {
20311
- var qualifyingQuestion_r2 = ctx.$implicit;
20312
- var ctx_r1 = i0__namespace.ɵɵnextContext();
20436
+ var qualifyingQuestion_r3 = ctx.$implicit;
20437
+ var ctx_r2 = i0__namespace.ɵɵnextContext(2);
20313
20438
  i0__namespace.ɵɵadvance(1);
20314
- i0__namespace.ɵɵpropertyInterpolate("id", qualifyingQuestion_r2.name);
20315
- i0__namespace.ɵɵproperty("formControl", ctx_r1.qualifyingQuestionControl)("value", qualifyingQuestion_r2.name);
20439
+ i0__namespace.ɵɵpropertyInterpolate("id", qualifyingQuestion_r3.name);
20440
+ i0__namespace.ɵɵproperty("formControl", ctx_r2.qualifyingQuestionsControl)("value", qualifyingQuestion_r3.name);
20316
20441
  i0__namespace.ɵɵadvance(1);
20317
- i0__namespace.ɵɵproperty("for", qualifyingQuestion_r2.name);
20442
+ i0__namespace.ɵɵproperty("for", qualifyingQuestion_r3.name);
20318
20443
  i0__namespace.ɵɵadvance(1);
20319
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(4, 5, qualifyingQuestion_r2.name));
20444
+ i0__namespace.ɵɵtextInterpolate(qualifyingQuestion_r3.name);
20445
+ }
20446
+ }
20447
+ function QualifyingQuestionsComponent_ng_container_0_Template(rf, ctx) {
20448
+ if (rf & 1) {
20449
+ i0__namespace.ɵɵelementContainerStart(0);
20450
+ i0__namespace.ɵɵelementStart(1, "div", 1);
20451
+ i0__namespace.ɵɵelementStart(2, "fieldset", 2);
20452
+ i0__namespace.ɵɵelementStart(3, "legend", 3);
20453
+ i0__namespace.ɵɵelementStart(4, "h1", 4);
20454
+ i0__namespace.ɵɵtext(5);
20455
+ i0__namespace.ɵɵpipe(6, "rpxTranslate");
20456
+ i0__namespace.ɵɵelementEnd();
20457
+ i0__namespace.ɵɵelementEnd();
20458
+ i0__namespace.ɵɵtemplate(7, QualifyingQuestionsComponent_ng_container_0_ng_container_7_Template, 6, 3, "ng-container", 0);
20459
+ i0__namespace.ɵɵelementStart(8, "div", 5);
20460
+ i0__namespace.ɵɵtemplate(9, QualifyingQuestionsComponent_ng_container_0_div_9_Template, 4, 5, "div", 6);
20461
+ i0__namespace.ɵɵpipe(10, "async");
20462
+ i0__namespace.ɵɵelementStart(11, "div", 7);
20463
+ i0__namespace.ɵɵelement(12, "input", 8);
20464
+ i0__namespace.ɵɵelementStart(13, "label", 9);
20465
+ i0__namespace.ɵɵtext(14);
20466
+ i0__namespace.ɵɵpipe(15, "rpxTranslate");
20467
+ i0__namespace.ɵɵelementEnd();
20468
+ i0__namespace.ɵɵelementEnd();
20469
+ i0__namespace.ɵɵelementEnd();
20470
+ i0__namespace.ɵɵelementEnd();
20471
+ i0__namespace.ɵɵelementEnd();
20472
+ i0__namespace.ɵɵelementContainerEnd();
20473
+ }
20474
+ if (rf & 2) {
20475
+ var ctx_r0 = i0__namespace.ɵɵnextContext();
20476
+ i0__namespace.ɵɵadvance(1);
20477
+ i0__namespace.ɵɵclassProp("govuk-form-group--error", ctx_r0.displayError);
20478
+ i0__namespace.ɵɵadvance(4);
20479
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(6, 10, "Are you contacting us about any of the following:"), " ");
20480
+ i0__namespace.ɵɵadvance(2);
20481
+ i0__namespace.ɵɵproperty("ngIf", ctx_r0.displayError);
20482
+ i0__namespace.ɵɵadvance(2);
20483
+ i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(10, 12, ctx_r0.qualifyingQuestions$));
20484
+ i0__namespace.ɵɵadvance(3);
20485
+ i0__namespace.ɵɵproperty("id", ctx_r0.queryItemTypeEnum.NEW)("formControl", ctx_r0.qualifyingQuestionsControl)("value", ctx_r0.queryItemTypeEnum.NEW);
20486
+ i0__namespace.ɵɵadvance(1);
20487
+ i0__namespace.ɵɵproperty("for", ctx_r0.queryItemTypeEnum.NEW);
20488
+ i0__namespace.ɵɵadvance(1);
20489
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(15, 14, "Raise a query"), " ");
20320
20490
  }
20321
20491
  }
20322
- var _c0$C = function (a0) { return { "govuk-form-group--error": a0 }; };
20323
20492
  var QualifyingQuestionsComponent = /** @class */ (function () {
20324
20493
  function QualifyingQuestionsComponent() {
20494
+ this.queryItemTypeEnum = exports.QueryItemType;
20495
+ this.qualifyingQuestionsErrorMessage = exports.QualifyingQuestionsErrorMessage;
20325
20496
  }
20497
+ Object.defineProperty(QualifyingQuestionsComponent.prototype, "displayError", {
20498
+ get: function () {
20499
+ return this.qualifyingQuestionsControl.touched && this.qualifyingQuestionsControl.hasError('required');
20500
+ },
20501
+ enumerable: false,
20502
+ configurable: true
20503
+ });
20326
20504
  return QualifyingQuestionsComponent;
20327
20505
  }());
20328
20506
  QualifyingQuestionsComponent.ɵfac = function QualifyingQuestionsComponent_Factory(t) { return new (t || QualifyingQuestionsComponent)(); };
20329
- QualifyingQuestionsComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QualifyingQuestionsComponent, selectors: [["ccd-qualifying-questions"]], inputs: { qualifyingQuestionControl: "qualifyingQuestionControl", qualifyingQuestions$: "qualifyingQuestions$" }, decls: 17, vars: 14, consts: [[1, "govuk-heading-l"], [1, "govuk-form-group", 3, "ngClass"], ["id", "qualifying-question", 1, "govuk-fieldset"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-radios"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], [1, "govuk-radios__item"], ["id", "raiseAQuery", "name", "qualifyingQuestionOption", "type", "radio", "value", "raiseAQuery", 1, "govuk-radios__input", 3, "formControl"], ["for", "raise-a-query", 1, "govuk-label", "govuk-radios__label"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["name", "qualifyingQuestionOption", "type", "radio", 1, "govuk-radios__input", 3, "id", "formControl", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"]], template: function QualifyingQuestionsComponent_Template(rf, ctx) {
20507
+ QualifyingQuestionsComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QualifyingQuestionsComponent, selectors: [["ccd-qualifying-questions"]], inputs: { qualifyingQuestionsControl: "qualifyingQuestionsControl", qualifyingQuestions$: "qualifyingQuestions$" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-form-group"], [1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], [1, "govuk-fieldset__heading"], ["data-module", "govuk-radios", 1, "govuk-radios"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], [1, "govuk-radios__item"], ["name", "qualifyingQuestionOption", "type", "radio", 1, "govuk-radios__input", 3, "id", "formControl", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function QualifyingQuestionsComponent_Template(rf, ctx) {
20330
20508
  if (rf & 1) {
20331
- i0__namespace.ɵɵelementStart(0, "h1", 0);
20332
- i0__namespace.ɵɵtext(1);
20333
- i0__namespace.ɵɵpipe(2, "rpxTranslate");
20334
- i0__namespace.ɵɵelementEnd();
20335
- i0__namespace.ɵɵelementStart(3, "div");
20336
- i0__namespace.ɵɵelementStart(4, "div", 1);
20337
- i0__namespace.ɵɵelementStart(5, "fieldset", 2);
20338
- i0__namespace.ɵɵelementStart(6, "legend");
20339
- i0__namespace.ɵɵtemplate(7, QualifyingQuestionsComponent_span_7_Template, 6, 6, "span", 3);
20340
- i0__namespace.ɵɵelementStart(8, "div", 4);
20341
- i0__namespace.ɵɵelementStart(9, "div", 4);
20342
- i0__namespace.ɵɵtemplate(10, QualifyingQuestionsComponent_div_10_Template, 5, 7, "div", 5);
20343
- i0__namespace.ɵɵpipe(11, "async");
20344
- i0__namespace.ɵɵelementStart(12, "div", 6);
20345
- i0__namespace.ɵɵelement(13, "input", 7);
20346
- i0__namespace.ɵɵelementStart(14, "label", 8);
20347
- i0__namespace.ɵɵtext(15);
20348
- i0__namespace.ɵɵpipe(16, "rpxTranslate");
20349
- i0__namespace.ɵɵelementEnd();
20350
- i0__namespace.ɵɵelementEnd();
20351
- i0__namespace.ɵɵelementEnd();
20352
- i0__namespace.ɵɵelementEnd();
20353
- i0__namespace.ɵɵelementEnd();
20354
- i0__namespace.ɵɵelementEnd();
20355
- i0__namespace.ɵɵelementEnd();
20356
- i0__namespace.ɵɵelementEnd();
20509
+ i0__namespace.ɵɵtemplate(0, QualifyingQuestionsComponent_ng_container_0_Template, 16, 16, "ng-container", 0);
20357
20510
  }
20358
20511
  if (rf & 2) {
20359
- i0__namespace.ɵɵadvance(1);
20360
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 6, "Are you contacting us about any of the following:"), "\n");
20361
- i0__namespace.ɵɵadvance(3);
20362
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$C, ctx.qualifyingQuestionSelectionError));
20363
- i0__namespace.ɵɵadvance(3);
20364
- i0__namespace.ɵɵproperty("ngIf", ctx.qualifyingQuestionSelectionError);
20365
- i0__namespace.ɵɵadvance(3);
20366
- i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(11, 8, ctx.qualifyingQuestions$));
20367
- i0__namespace.ɵɵadvance(3);
20368
- i0__namespace.ɵɵproperty("formControl", ctx.qualifyingQuestionControl);
20369
- i0__namespace.ɵɵadvance(2);
20370
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(16, 10, "Raise another query relating to this case"));
20512
+ i0__namespace.ɵɵproperty("ngIf", ctx.qualifyingQuestionsControl);
20371
20513
  }
20372
- }, directives: [i5__namespace.NgClass, i5__namespace.NgIf, i5__namespace.NgForOf, i3__namespace.RadioControlValueAccessor, i3__namespace.DefaultValueAccessor, i3__namespace.NgControlStatus, i3__namespace.FormControlDirective], pipes: [i1__namespace.RpxTranslatePipe, i5__namespace.AsyncPipe], encapsulation: 2 });
20514
+ }, directives: [i5__namespace.NgIf, i5__namespace.NgForOf, i3__namespace.RadioControlValueAccessor, i3__namespace.DefaultValueAccessor, i3__namespace.NgControlStatus, i3__namespace.FormControlDirective], pipes: [i1__namespace.RpxTranslatePipe, i5__namespace.AsyncPipe], encapsulation: 2 });
20373
20515
  (function () {
20374
20516
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(QualifyingQuestionsComponent, [{
20375
20517
  type: i0.Component,
@@ -20377,7 +20519,7 @@
20377
20519
  selector: 'ccd-qualifying-questions',
20378
20520
  templateUrl: './qualifying-questions.component.html'
20379
20521
  }]
20380
- }], null, { qualifyingQuestionControl: [{
20522
+ }], null, { qualifyingQuestionsControl: [{
20381
20523
  type: i0.Input
20382
20524
  }], qualifyingQuestions$: [{
20383
20525
  type: i0.Input
@@ -20504,101 +20646,6 @@
20504
20646
  }], function () { return [{ type: i1__namespace$1.ActivatedRoute }]; }, null);
20505
20647
  })();
20506
20648
 
20507
- var QueryListItem = /** @class */ (function () {
20508
- function QueryListItem() {
20509
- this.children = [];
20510
- }
20511
- Object.defineProperty(QueryListItem.prototype, "lastSubmittedMessage", {
20512
- get: function () {
20513
- var getLastSubmittedMessage = function (item) {
20514
- var e_1, _b;
20515
- var lastSubmittedMessage = item;
20516
- if (item.children && item.children.length > 0) {
20517
- try {
20518
- for (var _c = __values(item.children), _d = _c.next(); !_d.done; _d = _c.next()) {
20519
- var child = _d.value;
20520
- var childLastSubmittedMessage = getLastSubmittedMessage(child);
20521
- if (childLastSubmittedMessage.createdOn > lastSubmittedMessage.createdOn) {
20522
- lastSubmittedMessage = childLastSubmittedMessage;
20523
- }
20524
- }
20525
- }
20526
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
20527
- finally {
20528
- try {
20529
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
20530
- }
20531
- finally { if (e_1) throw e_1.error; }
20532
- }
20533
- }
20534
- return lastSubmittedMessage;
20535
- };
20536
- return getLastSubmittedMessage(this);
20537
- },
20538
- enumerable: false,
20539
- configurable: true
20540
- });
20541
- Object.defineProperty(QueryListItem.prototype, "lastSubmittedBy", {
20542
- get: function () {
20543
- return this.lastSubmittedMessage.name;
20544
- },
20545
- enumerable: false,
20546
- configurable: true
20547
- });
20548
- Object.defineProperty(QueryListItem.prototype, "lastSubmittedDate", {
20549
- get: function () {
20550
- return new Date(this.lastSubmittedMessage.createdOn);
20551
- },
20552
- enumerable: false,
20553
- configurable: true
20554
- });
20555
- Object.defineProperty(QueryListItem.prototype, "lastResponseBy", {
20556
- get: function () {
20557
- var _a;
20558
- return ((_a = this.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.lastSubmittedMessage.name : '';
20559
- },
20560
- enumerable: false,
20561
- configurable: true
20562
- });
20563
- Object.defineProperty(QueryListItem.prototype, "lastResponseDate", {
20564
- get: function () {
20565
- var _a;
20566
- return ((_a = this.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? new Date(this.lastSubmittedMessage.createdOn) : null;
20567
- },
20568
- enumerable: false,
20569
- configurable: true
20570
- });
20571
- return QueryListItem;
20572
- }());
20573
-
20574
- var QueryListData = /** @class */ (function () {
20575
- function QueryListData(partyMessagesGroup) {
20576
- var _this = this;
20577
- this.partyName = partyMessagesGroup.partyName;
20578
- this.roleOnCase = partyMessagesGroup.roleOnCase;
20579
- // get the parent messages (messages without parentId) and add the children to them
20580
- var parentMessages = partyMessagesGroup.partyMessages.filter(function (message) { return !message.parentId; });
20581
- this.partyMessages = parentMessages.map(function (message) { return _this.buildQueryListItem(message, partyMessagesGroup.partyMessages); });
20582
- }
20583
- QueryListData.prototype.buildQueryListItem = function (message, allMessages) {
20584
- var _this = this;
20585
- var queryListItem = new QueryListItem();
20586
- Object.assign(queryListItem, Object.assign(Object.assign({}, message), { children: allMessages
20587
- .filter(function (childMessage) { return childMessage.parentId === message.id; })
20588
- .map(function (childMessage) { return _this.buildQueryListItem(childMessage, allMessages); }) }));
20589
- return queryListItem;
20590
- };
20591
- return QueryListData;
20592
- }());
20593
-
20594
- exports.QueryItemType = void 0;
20595
- (function (QueryItemType) {
20596
- QueryItemType["NEW"] = "New";
20597
- QueryItemType["RESPOND"] = "Respond";
20598
- QueryItemType["FOLLOWUP"] = "Followup";
20599
- QueryItemType["NONE"] = "None";
20600
- })(exports.QueryItemType || (exports.QueryItemType = {}));
20601
-
20602
20649
  var QueryManagementUtils = /** @class */ (function () {
20603
20650
  function QueryManagementUtils() {
20604
20651
  }
@@ -20669,7 +20716,7 @@
20669
20716
  }
20670
20717
  function QueryCheckYourAnswersComponent_ccd_read_collection_field_37_Template(rf, ctx) {
20671
20718
  if (rf & 1) {
20672
- i0__namespace.ɵɵelement(0, "ccd-read-collection-field", 18);
20719
+ i0__namespace.ɵɵelement(0, "ccd-read-collection-field", 17);
20673
20720
  }
20674
20721
  if (rf & 2) {
20675
20722
  var ctx_r4 = i0__namespace.ɵɵnextContext();
@@ -20692,7 +20739,7 @@
20692
20739
  return QueryCheckYourAnswersComponent;
20693
20740
  }());
20694
20741
  QueryCheckYourAnswersComponent.ɵfac = function QueryCheckYourAnswersComponent_Factory(t) { return new (t || QueryCheckYourAnswersComponent)(); };
20695
- QueryCheckYourAnswersComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", QueryCreateContext: "QueryCreateContext" }, outputs: { backClicked: "backClicked" }, decls: 50, vars: 30, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], ["defaultCheckYourAnswersTitle", ""], [1, "govuk-!-margin-bottom-4"], ["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"], [1, "govuk-link", 3, "click"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "caseField", 4, "ngIf"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button"], [3, "caseField"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) {
20742
+ QueryCheckYourAnswersComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext" }, outputs: { backClicked: "backClicked" }, decls: 50, vars: 30, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], ["defaultCheckYourAnswersTitle", ""], [1, "govuk-!-margin-bottom-4"], ["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"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "caseField", 4, "ngIf"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button"], [3, "caseField"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) {
20696
20743
  if (rf & 1) {
20697
20744
  i0__namespace.ɵɵelementStart(0, "div", 0);
20698
20745
  i0__namespace.ɵɵelementStart(1, "div", 1);
@@ -20732,7 +20779,7 @@
20732
20779
  i0__namespace.ɵɵtext(26);
20733
20780
  i0__namespace.ɵɵelementEnd();
20734
20781
  i0__namespace.ɵɵelementStart(27, "dd", 11);
20735
- i0__namespace.ɵɵelementStart(28, "a", 13);
20782
+ i0__namespace.ɵɵelementStart(28, "a", 12);
20736
20783
  i0__namespace.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_28_listener() { return ctx.goBack(); });
20737
20784
  i0__namespace.ɵɵtext(29);
20738
20785
  i0__namespace.ɵɵpipe(30, "rpxTranslate");
@@ -20746,11 +20793,11 @@
20746
20793
  i0__namespace.ɵɵtext(34);
20747
20794
  i0__namespace.ɵɵpipe(35, "rpxTranslate");
20748
20795
  i0__namespace.ɵɵelementEnd();
20749
- i0__namespace.ɵɵelementStart(36, "dd", 14);
20750
- i0__namespace.ɵɵtemplate(37, QueryCheckYourAnswersComponent_ccd_read_collection_field_37_Template, 1, 1, "ccd-read-collection-field", 15);
20796
+ i0__namespace.ɵɵelementStart(36, "dd", 13);
20797
+ i0__namespace.ɵɵtemplate(37, QueryCheckYourAnswersComponent_ccd_read_collection_field_37_Template, 1, 1, "ccd-read-collection-field", 14);
20751
20798
  i0__namespace.ɵɵelementEnd();
20752
20799
  i0__namespace.ɵɵelementStart(38, "dd", 11);
20753
- i0__namespace.ɵɵelementStart(39, "a", 13);
20800
+ i0__namespace.ɵɵelementStart(39, "a", 12);
20754
20801
  i0__namespace.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_a_click_39_listener() { return ctx.goBack(); });
20755
20802
  i0__namespace.ɵɵtext(40);
20756
20803
  i0__namespace.ɵɵpipe(41, "rpxTranslate");
@@ -20760,12 +20807,12 @@
20760
20807
  i0__namespace.ɵɵelementEnd();
20761
20808
  i0__namespace.ɵɵelement(42, "br");
20762
20809
  i0__namespace.ɵɵelementStart(43, "div");
20763
- i0__namespace.ɵɵelementStart(44, "button", 16);
20810
+ i0__namespace.ɵɵelementStart(44, "button", 15);
20764
20811
  i0__namespace.ɵɵlistener("click", function QueryCheckYourAnswersComponent_Template_button_click_44_listener() { return ctx.goBack(); });
20765
20812
  i0__namespace.ɵɵtext(45);
20766
20813
  i0__namespace.ɵɵpipe(46, "rpxTranslate");
20767
20814
  i0__namespace.ɵɵelementEnd();
20768
- i0__namespace.ɵɵelementStart(47, "button", 17);
20815
+ i0__namespace.ɵɵelementStart(47, "button", 16);
20769
20816
  i0__namespace.ɵɵtext(48);
20770
20817
  i0__namespace.ɵɵpipe(49, "rpxTranslate");
20771
20818
  i0__namespace.ɵɵelementEnd();
@@ -20776,9 +20823,9 @@
20776
20823
  if (rf & 2) {
20777
20824
  var _r1 = i0__namespace.ɵɵreference(5);
20778
20825
  i0__namespace.ɵɵadvance(3);
20779
- i0__namespace.ɵɵproperty("ngIf", ctx.QueryCreateContext === ctx.queryItemTypeEnum.RESPOND)("ngIfElse", _r1);
20826
+ i0__namespace.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryItemTypeEnum.RESPOND)("ngIfElse", _r1);
20780
20827
  i0__namespace.ɵɵadvance(5);
20781
- i0__namespace.ɵɵproperty("ngIf", ctx.QueryCreateContext === ctx.queryItemTypeEnum.RESPOND);
20828
+ i0__namespace.ɵɵproperty("ngIf", ctx.queryCreateContext === ctx.queryItemTypeEnum.RESPOND);
20782
20829
  i0__namespace.ɵɵadvance(4);
20783
20830
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(13, 14, "Full name"), " ");
20784
20831
  i0__namespace.ɵɵadvance(3);
@@ -20786,7 +20833,7 @@
20786
20833
  i0__namespace.ɵɵadvance(3);
20787
20834
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(19, 16, "Change"), " ");
20788
20835
  i0__namespace.ɵɵadvance(5);
20789
- i0__namespace.ɵɵtextInterpolate1(" ", ctx.QueryCreateContext === ctx.queryItemTypeEnum.RESPOND ? "Response message" : i0__namespace.ɵɵpipeBind1(24, 18, "Query body"), " ");
20836
+ i0__namespace.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryItemTypeEnum.RESPOND ? "Response message" : i0__namespace.ɵɵpipeBind1(24, 18, "Query body"), " ");
20790
20837
  i0__namespace.ɵɵadvance(3);
20791
20838
  i0__namespace.ɵɵtextInterpolate1(" ", ctx.formGroup.controls["body"].value, " ");
20792
20839
  i0__namespace.ɵɵadvance(3);
@@ -20816,7 +20863,7 @@
20816
20863
  type: i0.Input
20817
20864
  }], queryItem: [{
20818
20865
  type: i0.Input
20819
- }], QueryCreateContext: [{
20866
+ }], queryCreateContext: [{
20820
20867
  type: i0.Input
20821
20868
  }], backClicked: [{
20822
20869
  type: i0.Output
@@ -20863,20 +20910,13 @@
20863
20910
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(6, 4, ctx_r1.queryItem.hearingDate, "dd MMM yyyy"));
20864
20911
  }
20865
20912
  }
20866
- function QueryDetailsTableComponent_ng_container_0_div_41_Template(rf, ctx) {
20913
+ function QueryDetailsTableComponent_ng_container_0_ccd_read_collection_field_41_Template(rf, ctx) {
20867
20914
  if (rf & 1) {
20868
- i0__namespace.ɵɵelementStart(0, "div");
20869
- i0__namespace.ɵɵelementStart(1, "a", 8);
20870
- i0__namespace.ɵɵtext(2);
20871
- i0__namespace.ɵɵelementEnd();
20872
- i0__namespace.ɵɵelementEnd();
20915
+ i0__namespace.ɵɵelement(0, "ccd-read-collection-field", 8);
20873
20916
  }
20874
20917
  if (rf & 2) {
20875
- var attachment_r3 = ctx.$implicit;
20876
- i0__namespace.ɵɵadvance(1);
20877
- i0__namespace.ɵɵproperty("href", attachment_r3._links.self.href, i0__namespace.ɵɵsanitizeUrl);
20878
- i0__namespace.ɵɵadvance(1);
20879
- i0__namespace.ɵɵtextInterpolate(attachment_r3.originalDocumentName);
20918
+ var ctx_r2 = i0__namespace.ɵɵnextContext(2);
20919
+ i0__namespace.ɵɵproperty("caseField", ctx_r2.caseField);
20880
20920
  }
20881
20921
  }
20882
20922
  function QueryDetailsTableComponent_ng_container_0_Template(rf, ctx) {
@@ -20938,7 +20978,7 @@
20938
20978
  i0__namespace.ɵɵpipe(39, "rpxTranslate");
20939
20979
  i0__namespace.ɵɵelementEnd();
20940
20980
  i0__namespace.ɵɵelementStart(40, "td", 5);
20941
- i0__namespace.ɵɵtemplate(41, QueryDetailsTableComponent_ng_container_0_div_41_Template, 3, 2, "div", 7);
20981
+ i0__namespace.ɵɵtemplate(41, QueryDetailsTableComponent_ng_container_0_ccd_read_collection_field_41_Template, 1, 1, "ccd-read-collection-field", 7);
20942
20982
  i0__namespace.ɵɵelementEnd();
20943
20983
  i0__namespace.ɵɵelementEnd();
20944
20984
  i0__namespace.ɵɵelementEnd();
@@ -20974,30 +21014,35 @@
20974
21014
  i0__namespace.ɵɵadvance(3);
20975
21015
  i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(39, 29, "Attachments"));
20976
21016
  i0__namespace.ɵɵadvance(3);
20977
- i0__namespace.ɵɵproperty("ngForOf", ctx_r0.queryItem.attachments);
21017
+ i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField);
20978
21018
  }
20979
21019
  }
20980
21020
  var QueryDetailsTableComponent = /** @class */ (function () {
20981
21021
  function QueryDetailsTableComponent() {
20982
21022
  }
21023
+ QueryDetailsTableComponent.prototype.ngOnInit = function () {
21024
+ // Mock object
21025
+ this.caseField = caseFieldMockData;
21026
+ };
20983
21027
  return QueryDetailsTableComponent;
20984
21028
  }());
20985
21029
  QueryDetailsTableComponent.ɵfac = function QueryDetailsTableComponent_Factory(t) { return new (t || QueryDetailsTableComponent)(); };
20986
- QueryDetailsTableComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QueryDetailsTableComponent, selectors: [["ccd-query-details-table"]], inputs: { queryItem: "queryItem" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-table", "query-details-table"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row", 4, "ngIf"], [4, "ngFor", "ngForOf"], ["target", "_blank", 3, "href"]], template: function QueryDetailsTableComponent_Template(rf, ctx) {
21030
+ QueryDetailsTableComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QueryDetailsTableComponent, selectors: [["ccd-query-details-table"]], inputs: { queryItem: "queryItem" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-table", "query-details-table"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row", 4, "ngIf"], [3, "caseField", 4, "ngIf"], [3, "caseField"]], template: function QueryDetailsTableComponent_Template(rf, ctx) {
20987
21031
  if (rf & 1) {
20988
21032
  i0__namespace.ɵɵtemplate(0, QueryDetailsTableComponent_ng_container_0_Template, 42, 31, "ng-container", 0);
20989
21033
  }
20990
21034
  if (rf & 2) {
20991
21035
  i0__namespace.ɵɵproperty("ngIf", ctx.queryItem);
20992
21036
  }
20993
- }, directives: [i5__namespace.NgIf, i5__namespace.NgForOf], pipes: [i1__namespace.RpxTranslatePipe, i5__namespace.DatePipe], styles: [".query-details-table[_ngcontent-%COMP%] .govuk-table__header[_ngcontent-%COMP%]{width:330px}"] });
21037
+ }, styles: [".query-details-table .govuk-table__header{width:330px}.query-details-table .collection-field-table tr>td{border-bottom:none}"], encapsulation: 2 });
20994
21038
  (function () {
20995
21039
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(QueryDetailsTableComponent, [{
20996
21040
  type: i0.Component,
20997
21041
  args: [{
20998
21042
  selector: 'ccd-query-details-table',
20999
21043
  templateUrl: './query-details-table.component.html',
21000
- styleUrls: ['./query-details-table.component.scss']
21044
+ styleUrls: ['./query-details-table.component.scss'],
21045
+ encapsulation: i0.ViewEncapsulation.None
21001
21046
  }]
21002
21047
  }], null, { queryItem: [{
21003
21048
  type: i0.Input
@@ -21458,15 +21503,6 @@
21458
21503
  }] });
21459
21504
  })();
21460
21505
 
21461
- var RaiseQueryErrorMessage;
21462
- (function (RaiseQueryErrorMessage) {
21463
- RaiseQueryErrorMessage["FULL_NAME"] = "Enter a full name";
21464
- RaiseQueryErrorMessage["QUERY_SUBJECT"] = "Enter a query subject";
21465
- RaiseQueryErrorMessage["QUERY_BODY"] = "Enter query details";
21466
- RaiseQueryErrorMessage["QUERY_HEARING_RELATED"] = "Select whether the query is hearing related or not";
21467
- RaiseQueryErrorMessage["QUERY_HEARING_DATE"] = "Enter a valid date";
21468
- })(RaiseQueryErrorMessage || (RaiseQueryErrorMessage = {}));
21469
-
21470
21506
  function QueryWriteRaiseQueryComponent_p_22_Template(rf, ctx) {
21471
21507
  if (rf & 1) {
21472
21508
  i0__namespace.ɵɵelementStart(0, "p", 29);
@@ -21562,7 +21598,7 @@
21562
21598
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 4, ctx_r5.raiseQueryErrorMessage.QUERY_HEARING_DATE), " ");
21563
21599
  }
21564
21600
  }
21565
- var _c0$B = function (a0) { return { "govuk-form-group--error": a0 }; };
21601
+ var _c0$C = function (a0) { return { "govuk-form-group--error": a0 }; };
21566
21602
  function QueryWriteRaiseQueryComponent_ng_container_63_Template(rf, ctx) {
21567
21603
  if (rf & 1) {
21568
21604
  i0__namespace.ɵɵelementContainerStart(0);
@@ -21583,7 +21619,7 @@
21583
21619
  if (rf & 2) {
21584
21620
  var ctx_r4 = i0__namespace.ɵɵnextContext();
21585
21621
  i0__namespace.ɵɵadvance(1);
21586
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$B, ctx_r4.submitted && ctx_r4.formGroup.get("isHearingRelated").value === true && ctx_r4.formGroup.get("hearingDate").value === null));
21622
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$C, ctx_r4.submitted && ctx_r4.formGroup.get("isHearingRelated").value === true && ctx_r4.formGroup.get("hearingDate").value === null));
21587
21623
  i0__namespace.ɵɵadvance(4);
21588
21624
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(6, 3, "Hearing date"), " ");
21589
21625
  i0__namespace.ɵɵadvance(2);
@@ -21592,7 +21628,7 @@
21592
21628
  }
21593
21629
  var QueryWriteRaiseQueryComponent = /** @class */ (function () {
21594
21630
  function QueryWriteRaiseQueryComponent() {
21595
- this.raiseQueryErrorMessage = RaiseQueryErrorMessage;
21631
+ this.raiseQueryErrorMessage = exports.RaiseQueryErrorMessage;
21596
21632
  }
21597
21633
  return QueryWriteRaiseQueryComponent;
21598
21634
  }());
@@ -21702,7 +21738,7 @@
21702
21738
  i0__namespace.ɵɵadvance(6);
21703
21739
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
21704
21740
  i0__namespace.ɵɵadvance(2);
21705
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(54, _c0$B, ctx.submitted && ctx.formGroup.get("fullName").hasError("required")));
21741
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(54, _c0$C, ctx.submitted && ctx.formGroup.get("fullName").hasError("required")));
21706
21742
  i0__namespace.ɵɵadvance(3);
21707
21743
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(18, 32, "Full name"), " ");
21708
21744
  i0__namespace.ɵɵadvance(3);
@@ -21712,7 +21748,7 @@
21712
21748
  i0__namespace.ɵɵadvance(1);
21713
21749
  i0__namespace.ɵɵproperty("formControlName", "fullName");
21714
21750
  i0__namespace.ɵɵadvance(1);
21715
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(56, _c0$B, ctx.submitted && ctx.formGroup.get("subject").hasError("required")));
21751
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(56, _c0$C, ctx.submitted && ctx.formGroup.get("subject").hasError("required")));
21716
21752
  i0__namespace.ɵɵadvance(3);
21717
21753
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(28, 36, "Query subject"), " ");
21718
21754
  i0__namespace.ɵɵadvance(3);
@@ -21722,7 +21758,7 @@
21722
21758
  i0__namespace.ɵɵadvance(1);
21723
21759
  i0__namespace.ɵɵproperty("formControlName", "subject");
21724
21760
  i0__namespace.ɵɵadvance(1);
21725
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(58, _c0$B, ctx.submitted && ctx.formGroup.get("body").hasError("required")));
21761
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(58, _c0$C, ctx.submitted && ctx.formGroup.get("body").hasError("required")));
21726
21762
  i0__namespace.ɵɵadvance(3);
21727
21763
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(38, 40, "Query body"), " ");
21728
21764
  i0__namespace.ɵɵadvance(3);
@@ -21732,7 +21768,7 @@
21732
21768
  i0__namespace.ɵɵadvance(1);
21733
21769
  i0__namespace.ɵɵproperty("formControlName", "body");
21734
21770
  i0__namespace.ɵɵadvance(2);
21735
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(60, _c0$B, ctx.submitted && ctx.formGroup.get("isHearingRelated").hasError("required")));
21771
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(60, _c0$C, ctx.submitted && ctx.formGroup.get("isHearingRelated").hasError("required")));
21736
21772
  i0__namespace.ɵɵadvance(4);
21737
21773
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(50, 44, "Is the query hearing related?"), " ");
21738
21774
  i0__namespace.ɵɵadvance(2);
@@ -21799,17 +21835,23 @@
21799
21835
  i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 4, "Enter a response message"), " ");
21800
21836
  }
21801
21837
  }
21838
+ var _c0$B = function (a3) { return ["/", "cases", "case-details", a3, "tasks"]; };
21802
21839
  var QueryWriteRespondToQueryComponent = /** @class */ (function () {
21803
- function QueryWriteRespondToQueryComponent() {
21840
+ function QueryWriteRespondToQueryComponent(caseNotifier) {
21841
+ this.caseNotifier = caseNotifier;
21804
21842
  this.submitted = false;
21805
- // Set default value as false for testing follow up EUI-8454
21806
- this.QueryCreateContext = exports.QueryItemType.FOLLOWUP;
21807
21843
  this.queryItemTypeEnum = exports.QueryItemType;
21808
21844
  }
21845
+ QueryWriteRespondToQueryComponent.prototype.ngOnInit = function () {
21846
+ var _this = this;
21847
+ this.caseNotifier.caseView.pipe(operators.take(1)).subscribe(function (caseDetails) {
21848
+ _this.caseId = caseDetails.case_id;
21849
+ });
21850
+ };
21809
21851
  return QueryWriteRespondToQueryComponent;
21810
21852
  }());
21811
- QueryWriteRespondToQueryComponent.ɵfac = function QueryWriteRespondToQueryComponent_Factory(t) { return new (t || QueryWriteRespondToQueryComponent)(); };
21812
- QueryWriteRespondToQueryComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", submitted: "submitted", QueryCreateContext: "QueryCreateContext" }, decls: 40, vars: 35, consts: [[1, "govuk-!-margin-bottom-2"], ["href", "javascript:void(0)", 1, "govuk-back-link", "govuk-!-margin-top-0"], [1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "queryItem"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group"], [1, "govuk-label-wrapper"], ["for", "query-respond-fullName", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "query-respond-fullName-hint", 1, "govuk-hint"], ["id", "query-respond-fullName-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "query-respond-fullName", "name", "query-respond-fullName", "type", "text", 1, "govuk-input", 3, "formControlName"], [1, "govuk-form-group", "body-textarea"], ["for", "query-body", 1, "govuk-label", "govuk-!-font-weight-bold"], ["id", "query-body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "query-body", "name", "query-body", "rows", "5", "aria-describedby", "query-body-hint query-body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "query-respond-fullName-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "query-body-error", 1, "govuk-error-message"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) {
21853
+ QueryWriteRespondToQueryComponent.ɵfac = function QueryWriteRespondToQueryComponent_Factory(t) { return new (t || QueryWriteRespondToQueryComponent)(i0__namespace.ɵɵdirectiveInject(CaseNotifier)); };
21854
+ QueryWriteRespondToQueryComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted" }, decls: 40, vars: 38, consts: [[1, "govuk-!-margin-bottom-2"], ["href", "javascript:void(0)", 1, "govuk-back-link", "govuk-!-margin-top-0", 3, "routerLink"], [1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "queryItem"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group"], [1, "govuk-label-wrapper"], ["for", "query-respond-fullName", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "query-respond-fullName-hint", 1, "govuk-hint"], ["id", "query-respond-fullName-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "query-respond-fullName", "name", "query-respond-fullName", "type", "text", 1, "govuk-input", 3, "formControlName"], [1, "govuk-form-group", "body-textarea"], ["for", "query-body", 1, "govuk-label", "govuk-!-font-weight-bold"], ["id", "query-body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "query-body", "name", "query-body", "rows", "5", "aria-describedby", "query-body-hint query-body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "query-respond-fullName-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "query-body-error", 1, "govuk-error-message"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) {
21813
21855
  if (rf & 1) {
21814
21856
  i0__namespace.ɵɵelementStart(0, "div", 0);
21815
21857
  i0__namespace.ɵɵelementStart(1, "a", 1);
@@ -21873,43 +21915,45 @@
21873
21915
  i0__namespace.ɵɵelementEnd();
21874
21916
  }
21875
21917
  if (rf & 2) {
21876
- var tmp_6_0 = null;
21877
- var tmp_9_0 = null;
21918
+ var tmp_7_0 = null;
21878
21919
  var tmp_10_0 = null;
21879
- var tmp_12_0 = null;
21880
- var tmp_14_0 = null;
21920
+ var tmp_11_0 = null;
21921
+ var tmp_13_0 = null;
21881
21922
  var tmp_15_0 = null;
21882
- i0__namespace.ɵɵadvance(2);
21883
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(3, 21, "Cancel and return to tasks"));
21923
+ var tmp_16_0 = null;
21924
+ i0__namespace.ɵɵadvance(1);
21925
+ i0__namespace.ɵɵproperty("routerLink", i0__namespace.ɵɵpureFunction1(36, _c0$B, ctx.caseId));
21926
+ i0__namespace.ɵɵadvance(1);
21927
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(3, 22, "Cancel and return to tasks"), " ");
21884
21928
  i0__namespace.ɵɵadvance(5);
21885
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(8, 23, "Respond to query"));
21929
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(8, 24, "Respond to query"));
21886
21930
  i0__namespace.ɵɵadvance(3);
21887
- i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(11, 25, "Query details"));
21931
+ i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(11, 26, "Query details"));
21888
21932
  i0__namespace.ɵɵadvance(5);
21889
21933
  i0__namespace.ɵɵproperty("queryItem", ctx.queryItem);
21890
21934
  i0__namespace.ɵɵadvance(4);
21891
- i0__namespace.ɵɵtextInterpolate1(" ", ctx.QueryCreateContext === ctx.queryItemTypeEnum.RESPOND ? "Respond to a query" : i0__namespace.ɵɵpipeBind1(20, 27, "Ask a follow-up question"), " ");
21935
+ i0__namespace.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryItemTypeEnum.RESPOND ? "Respond to a query" : i0__namespace.ɵɵpipeBind1(20, 28, "Ask a follow-up question"), " ");
21892
21936
  i0__namespace.ɵɵadvance(2);
21893
21937
  i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
21894
21938
  i0__namespace.ɵɵadvance(1);
21895
- i0__namespace.ɵɵclassProp("govuk-form-group--error", (tmp_6_0 = ctx.formGroup.get("fullName")) == null ? null : tmp_6_0.errors == null ? null : tmp_6_0.errors.length);
21939
+ i0__namespace.ɵɵclassProp("govuk-form-group--error", (tmp_7_0 = ctx.formGroup.get("fullName")) == null ? null : tmp_7_0.errors == null ? null : tmp_7_0.errors.length);
21896
21940
  i0__namespace.ɵɵadvance(3);
21897
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(26, 29, "Full name"), " ");
21941
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(26, 30, "Full name"), " ");
21898
21942
  i0__namespace.ɵɵadvance(3);
21899
- i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(29, 31, "Your full name must be included here"), " ");
21943
+ i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(29, 32, "Your full name must be included here"), " ");
21900
21944
  i0__namespace.ɵɵadvance(2);
21901
- i0__namespace.ɵɵproperty("ngIf", ctx.submitted && ((tmp_9_0 = ctx.formGroup.get("fullName")) == null ? null : tmp_9_0.errors == null ? null : tmp_9_0.errors.length));
21945
+ i0__namespace.ɵɵproperty("ngIf", ctx.submitted && ((tmp_10_0 = ctx.formGroup.get("fullName")) == null ? null : tmp_10_0.errors == null ? null : tmp_10_0.errors.length));
21902
21946
  i0__namespace.ɵɵadvance(1);
21903
- i0__namespace.ɵɵclassProp("govuk-input--error", (tmp_10_0 = ctx.formGroup.get("fullName")) == null ? null : tmp_10_0.errors == null ? null : tmp_10_0.errors.length);
21947
+ i0__namespace.ɵɵclassProp("govuk-input--error", (tmp_11_0 = ctx.formGroup.get("fullName")) == null ? null : tmp_11_0.errors == null ? null : tmp_11_0.errors.length);
21904
21948
  i0__namespace.ɵɵproperty("formControlName", "fullName");
21905
21949
  i0__namespace.ɵɵadvance(1);
21906
- i0__namespace.ɵɵclassProp("govuk-form-group--error", (tmp_12_0 = ctx.formGroup.get("body")) == null ? null : tmp_12_0.errors == null ? null : tmp_12_0.errors.length);
21950
+ i0__namespace.ɵɵclassProp("govuk-form-group--error", (tmp_13_0 = ctx.formGroup.get("body")) == null ? null : tmp_13_0.errors == null ? null : tmp_13_0.errors.length);
21907
21951
  i0__namespace.ɵɵadvance(3);
21908
- i0__namespace.ɵɵtextInterpolate1(" ", ctx.QueryCreateContext === ctx.queryItemTypeEnum.RESPOND ? "Response message" : i0__namespace.ɵɵpipeBind1(36, 33, "Query Body"), " ");
21952
+ i0__namespace.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryItemTypeEnum.RESPOND ? "Response message" : i0__namespace.ɵɵpipeBind1(36, 34, "Query Body"), " ");
21909
21953
  i0__namespace.ɵɵadvance(2);
21910
- i0__namespace.ɵɵproperty("ngIf", (tmp_14_0 = ctx.formGroup.get("body")) == null ? null : tmp_14_0.errors == null ? null : tmp_14_0.errors.length);
21954
+ i0__namespace.ɵɵproperty("ngIf", (tmp_15_0 = ctx.formGroup.get("body")) == null ? null : tmp_15_0.errors == null ? null : tmp_15_0.errors.length);
21911
21955
  i0__namespace.ɵɵadvance(1);
21912
- i0__namespace.ɵɵclassProp("govuk-textarea--error", (tmp_15_0 = ctx.formGroup.get("body")) == null ? null : tmp_15_0.errors == null ? null : tmp_15_0.errors.length);
21956
+ i0__namespace.ɵɵclassProp("govuk-textarea--error", (tmp_16_0 = ctx.formGroup.get("body")) == null ? null : tmp_16_0.errors == null ? null : tmp_16_0.errors.length);
21913
21957
  i0__namespace.ɵɵproperty("formControlName", "body");
21914
21958
  }
21915
21959
  }, styles: [".query-respond[_ngcontent-%COMP%]{width:100%;max-width:720px}"] });
@@ -21921,13 +21965,13 @@
21921
21965
  templateUrl: './query-write-respond-to-query.component.html',
21922
21966
  styleUrls: ['./query-write-respond-to-query.component.scss']
21923
21967
  }]
21924
- }], null, { queryItem: [{
21968
+ }], function () { return [{ type: CaseNotifier }]; }, { queryItem: [{
21925
21969
  type: i0.Input
21926
21970
  }], formGroup: [{
21927
21971
  type: i0.Input
21928
- }], submitted: [{
21972
+ }], queryCreateContext: [{
21929
21973
  type: i0.Input
21930
- }], QueryCreateContext: [{
21974
+ }], submitted: [{
21931
21975
  type: i0.Input
21932
21976
  }] });
21933
21977
  })();
@@ -30328,7 +30372,8 @@
30328
30372
  QueryDetailsComponent], []);
30329
30373
  i0__namespace.ɵɵsetComponentScope(WriteQueryManagementFieldComponent, [i5__namespace.NgIf, QueryWriteRespondToQueryComponent, i3__namespace.NgControlStatusGroup, i3__namespace.FormGroupDirective, QueryWriteRaiseQueryComponent], []);
30330
30374
  i0__namespace.ɵɵsetComponentScope(QueryDetailsComponent, [i5__namespace.NgIf, QueryDetailsTableComponent], [i1__namespace.RpxTranslatePipe]);
30331
- i0__namespace.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, [QueryCaseDetailsHeaderComponent,
30375
+ i0__namespace.ɵɵsetComponentScope(QueryDetailsTableComponent, [i5__namespace.NgIf, ReadCollectionFieldComponent], [i1__namespace.RpxTranslatePipe, i5__namespace.DatePipe]);
30376
+ i0__namespace.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, [i1__namespace$1.RouterLinkWithHref, QueryCaseDetailsHeaderComponent,
30332
30377
  QueryDetailsTableComponent, i3__namespace.NgControlStatusGroup, i3__namespace.FormGroupDirective, i5__namespace.NgIf, i3__namespace.DefaultValueAccessor, i3__namespace.NgControlStatus, i3__namespace.FormControlName], [i1__namespace.RpxTranslatePipe]);
30333
30378
  i0__namespace.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, [QueryCaseDetailsHeaderComponent, i3__namespace.NgControlStatusGroup, i3__namespace.FormGroupDirective, i5__namespace.NgClass, i5__namespace.NgIf, i3__namespace.DefaultValueAccessor, i3__namespace.NgControlStatus, i3__namespace.FormControlName, i3__namespace.RadioControlValueAccessor, QueryWriteDateInputComponent], [i1__namespace.RpxTranslatePipe]);
30334
30379
  i0__namespace.ɵɵsetComponentScope(QueryCheckYourAnswersComponent, [i5__namespace.NgIf, QueryCaseDetailsHeaderComponent,