@hmcts/ccd-case-ui-toolkit 6.16.0-query-management-read-write-view-v10 → 6.16.0-query-management-query-response-validation

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 (28) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +177 -99
  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/query-management/__mocks__/index.js +1 -10
  6. package/esm2015/lib/shared/components/palette/query-management/components/query-list/query-list.component.js +4 -4
  7. package/esm2015/lib/shared/components/palette/query-management/components/query-management-error-messages/query-management-error-message.model.js +2 -0
  8. package/esm2015/lib/shared/components/palette/query-management/components/query-management-error-messages/query-management-error-messages.component.js +56 -0
  9. package/esm2015/lib/shared/components/palette/query-management/models/party-messages/party-message.model.js +1 -1
  10. package/esm2015/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.js +1 -1
  11. package/esm2015/lib/shared/components/palette/query-management/query-management.module.js +7 -3
  12. package/esm2015/lib/shared/components/palette/query-management/write-query-management-field.component.js +106 -86
  13. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +165 -99
  14. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  15. package/lib/shared/components/palette/query-management/__mocks__/index.d.ts.map +1 -1
  16. package/lib/shared/components/palette/query-management/components/query-management-error-messages/query-management-error-message.model.d.ts +5 -0
  17. package/lib/shared/components/palette/query-management/components/query-management-error-messages/query-management-error-message.model.d.ts.map +1 -0
  18. package/lib/shared/components/palette/query-management/components/query-management-error-messages/query-management-error-messages.component.d.ts +8 -0
  19. package/lib/shared/components/palette/query-management/components/query-management-error-messages/query-management-error-messages.component.d.ts.map +1 -0
  20. package/lib/shared/components/palette/query-management/models/party-messages/party-message.model.d.ts +0 -1
  21. package/lib/shared/components/palette/query-management/models/party-messages/party-message.model.d.ts.map +1 -1
  22. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts +0 -1
  23. package/lib/shared/components/palette/query-management/models/query-list/query-list-item/query-list-item.model.d.ts.map +1 -1
  24. package/lib/shared/components/palette/query-management/query-management.module.d.ts +6 -5
  25. package/lib/shared/components/palette/query-management/query-management.module.d.ts.map +1 -1
  26. package/lib/shared/components/palette/query-management/write-query-management-field.component.d.ts +4 -0
  27. package/lib/shared/components/palette/query-management/write-query-management-field.component.d.ts.map +1 -1
  28. package/package.json +1 -1
@@ -17513,7 +17513,6 @@ const partyMessagesMockData = [
17513
17513
  id: 'case-message-001',
17514
17514
  subject: 'Review attached document',
17515
17515
  name: 'Maggie Conroy',
17516
- responseStatus: 'Response sent for Caseworker',
17517
17516
  body: 'Please review attached document and advise if hearing should proceed?',
17518
17517
  attachments: [
17519
17518
  {
@@ -17533,7 +17532,6 @@ const partyMessagesMockData = [
17533
17532
  id: 'case-message-002',
17534
17533
  subject: 'Games',
17535
17534
  name: 'Maggie Conroy',
17536
- responseStatus: 'Response sent for Caseworker',
17537
17535
  body: 'Can I play games in my phone when my solicitor is talking?',
17538
17536
  attachments: [],
17539
17537
  isHearingRelated: true,
@@ -17544,7 +17542,6 @@ const partyMessagesMockData = [
17544
17542
  {
17545
17543
  id: 'case-message-003',
17546
17544
  name: 'Maggie Conroy',
17547
- responseStatus: 'Response sent for Caseworker',
17548
17545
  body: 'Using mobile phone is strictly prohibited in the court room.',
17549
17546
  attachments: [],
17550
17547
  isHearingRelated: true,
@@ -17563,7 +17560,6 @@ const partyMessagesMockData = [
17563
17560
  id: 'case-message-005',
17564
17561
  subject: 'Add respondent detention order',
17565
17562
  name: 'Maggie Conroy',
17566
- responseStatus: 'Response sent for Caseworker',
17567
17563
  body: 'Please add respondent detention order to the file XX20230423-DX.',
17568
17564
  attachments: [],
17569
17565
  isHearingRelated: false,
@@ -17573,7 +17569,6 @@ const partyMessagesMockData = [
17573
17569
  {
17574
17570
  id: 'case-message-006',
17575
17571
  name: 'Maggie Conroy',
17576
- responseStatus: 'Response sent for Caseworker',
17577
17572
  body: 'I confirm that the respondent detention order is now added to the file XX20230423-DX.',
17578
17573
  attachments: [],
17579
17574
  isHearingRelated: false,
@@ -17585,7 +17580,6 @@ const partyMessagesMockData = [
17585
17580
  id: 'case-message-007',
17586
17581
  subject: 'Food',
17587
17582
  name: 'Maggie Conroy',
17588
- responseStatus: 'Response sent for Caseworker',
17589
17583
  body: 'Can I eat in the hearings?',
17590
17584
  attachments: [],
17591
17585
  isHearingRelated: true,
@@ -17596,7 +17590,6 @@ const partyMessagesMockData = [
17596
17590
  {
17597
17591
  id: 'case-message-008',
17598
17592
  name: 'Maggie Conroy',
17599
- responseStatus: 'Response sent for Caseworker',
17600
17593
  body: 'Consumption of food is not allowed when a hearing is taking place.',
17601
17594
  attachments: [],
17602
17595
  isHearingRelated: true,
@@ -17609,7 +17602,6 @@ const partyMessagesMockData = [
17609
17602
  id: 'case-message-009',
17610
17603
  subject: 'Bring relatives',
17611
17604
  name: 'Maggie Conroy',
17612
- responseStatus: 'Response received for professional user',
17613
17605
  body: 'Can I bring my grandma with me so she get out from the residence?',
17614
17606
  attachments: [],
17615
17607
  isHearingRelated: true,
@@ -17620,7 +17612,6 @@ const partyMessagesMockData = [
17620
17612
  {
17621
17613
  id: 'case-message-010',
17622
17614
  name: 'Maggie Conroy',
17623
- responseStatus: 'Response received for professional user',
17624
17615
  body: 'Sorry, only those required for the hearing should be present inside the court room.',
17625
17616
  attachments: [],
17626
17617
  isHearingRelated: true,
@@ -17736,9 +17727,9 @@ var QueryListResponseStatus;
17736
17727
  QueryListResponseStatus["RESPONDED"] = "Responded";
17737
17728
  })(QueryListResponseStatus || (QueryListResponseStatus = {}));
17738
17729
 
17739
- function WriteQueryManagementFieldComponent_p_28_Template(rf, ctx) { if (rf & 1) {
17740
- i0.ɵɵelementStart(0, "p", 25);
17741
- i0.ɵɵelementStart(1, "span", 26);
17730
+ function WriteQueryManagementFieldComponent_p_29_Template(rf, ctx) { if (rf & 1) {
17731
+ i0.ɵɵelementStart(0, "p", 26);
17732
+ i0.ɵɵelementStart(1, "span", 27);
17742
17733
  i0.ɵɵtext(2);
17743
17734
  i0.ɵɵpipe(3, "rpxTranslate");
17744
17735
  i0.ɵɵelementEnd();
@@ -17747,13 +17738,13 @@ function WriteQueryManagementFieldComponent_p_28_Template(rf, ctx) { if (rf & 1)
17747
17738
  i0.ɵɵelementEnd();
17748
17739
  } if (rf & 2) {
17749
17740
  i0.ɵɵadvance(2);
17750
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
17741
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
17751
17742
  i0.ɵɵadvance(2);
17752
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, "Enter a response message"), " ");
17743
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, "Enter a response message"), " ");
17753
17744
  } }
17754
- function WriteQueryManagementFieldComponent_p_41_Template(rf, ctx) { if (rf & 1) {
17755
- i0.ɵɵelementStart(0, "p", 27);
17756
- i0.ɵɵelementStart(1, "span", 26);
17745
+ function WriteQueryManagementFieldComponent_p_42_Template(rf, ctx) { if (rf & 1) {
17746
+ i0.ɵɵelementStart(0, "p", 28);
17747
+ i0.ɵɵelementStart(1, "span", 27);
17757
17748
  i0.ɵɵtext(2);
17758
17749
  i0.ɵɵpipe(3, "rpxTranslate");
17759
17750
  i0.ɵɵelementEnd();
@@ -17762,153 +17753,173 @@ function WriteQueryManagementFieldComponent_p_41_Template(rf, ctx) { if (rf & 1)
17762
17753
  i0.ɵɵelementEnd();
17763
17754
  } if (rf & 2) {
17764
17755
  i0.ɵɵadvance(2);
17765
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Error:"));
17756
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
17766
17757
  i0.ɵɵadvance(2);
17767
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, "File error message"), " ");
17758
+ i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, "File error message"), " ");
17768
17759
  } }
17769
17760
  class WriteQueryManagementFieldComponent extends AbstractFieldReadComponent {
17770
17761
  constructor() {
17771
17762
  super();
17772
17763
  this.responseFormGroup = new FormGroup({
17773
- response: new FormControl('', Validators.required),
17774
- documents: new FormControl([], Validators.required)
17764
+ response: new FormControl('', [Validators.required]),
17765
+ documents: new FormControl([])
17775
17766
  });
17767
+ this.errorMessages = [];
17768
+ this.submitted = false;
17776
17769
  }
17777
17770
  ngOnInit() {
17778
17771
  this.queryItem = new QueryListItem();
17779
17772
  Object.assign(this.queryItem, partyMessagesMockData[0].partyMessages[0]);
17780
17773
  }
17774
+ submitForm() {
17775
+ this.submitted = true;
17776
+ this.errorMessages = [];
17777
+ window.scrollTo(0, 0);
17778
+ if (!this.responseFormGroup.valid) {
17779
+ if (this.responseFormGroup.controls.response.hasError('required')) {
17780
+ this.errorMessages.push({ controlName: 'response', message: 'Add a response before continue' });
17781
+ }
17782
+ }
17783
+ }
17781
17784
  }
17782
17785
  WriteQueryManagementFieldComponent.ɵfac = function WriteQueryManagementFieldComponent_Factory(t) { return new (t || WriteQueryManagementFieldComponent)(); };
17783
- WriteQueryManagementFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteQueryManagementFieldComponent, selectors: [["ccd-write-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 55, vars: 45, consts: [[1, "govuk-!-margin-top-6", "govuk-!-margin-bottom-6"], [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", "govuk-!-margin-bottom-6"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-body-l", "govuk-!-margin-bottom-0"], [3, "queryItem"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "response-textarea"], [1, "govuk-label-wrapper"], ["for", "query-response", 1, "govuk-label", "govuk-!-font-weight-bold"], ["id", "query-response-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "query-response", "name", "query-response", "rows", "5", "aria-describedby", "query-response-hint query-response-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-form-group"], ["for", "add-documents", 1, "govuk-label"], [1, "govuk-!-font-weight-bold"], ["id", "add-documents-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-documents", "name", "add-documents", "type", "file", 1, "govuk-file-upload"], [1, "govuk-button-group"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "disabled"], ["data-module", "govuk-button", 1, "govuk-button"], ["href", "javascript:void(0)", 1, "govuk-back-link"], ["id", "query-response-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-documents-error", 1, "govuk-error-message"]], template: function WriteQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
17786
+ WriteQueryManagementFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteQueryManagementFieldComponent, selectors: [["ccd-write-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 58, vars: 49, consts: [[1, "govuk-!-margin-top-6", "govuk-!-margin-bottom-6"], [3, "errorMessages"], [1, "govuk-!-margin-bottom-4"], ["href", "javascript:void(0)", 1, "govuk-back-link", "govuk-!-margin-top-0"], [1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l", "govuk-!-margin-bottom-4"], [1, "govuk-heading-l", "govuk-!-margin-bottom-1"], [1, "govuk-body-l", "govuk-!-margin-bottom-0"], [3, "queryItem"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "response-textarea"], [1, "govuk-label-wrapper"], ["for", "query-response", 1, "govuk-label", "govuk-!-font-weight-bold"], ["id", "query-response-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "query-response", "name", "query-response", "rows", "5", "aria-describedby", "query-response-hint query-response-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-form-group"], ["for", "add-documents", 1, "govuk-label"], [1, "govuk-!-font-weight-bold"], ["id", "add-documents-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-documents", "name", "add-documents", "type", "file", 1, "govuk-file-upload"], ["data-module", "govuk-button", 1, "govuk-button"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "disabled"], ["data-module", "govuk-button", 1, "govuk-button", 3, "click"], [1, "govuk-!-margin-bottom-2"], ["href", "javascript:void(0)", 1, "govuk-back-link"], ["id", "query-response-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-documents-error", 1, "govuk-error-message"]], template: function WriteQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
17784
17787
  i0.ɵɵelementStart(0, "div", 0);
17785
- i0.ɵɵelementStart(1, "div", 1);
17786
- i0.ɵɵelementStart(2, "a", 2);
17787
- i0.ɵɵtext(3);
17788
- i0.ɵɵpipe(4, "rpxTranslate");
17788
+ i0.ɵɵelement(1, "ccd-query-management-error-messages", 1);
17789
+ i0.ɵɵelementStart(2, "div", 2);
17790
+ i0.ɵɵelementStart(3, "a", 3);
17791
+ i0.ɵɵtext(4);
17792
+ i0.ɵɵpipe(5, "rpxTranslate");
17789
17793
  i0.ɵɵelementEnd();
17790
17794
  i0.ɵɵelementEnd();
17791
- i0.ɵɵelementStart(5, "div", 3);
17792
17795
  i0.ɵɵelementStart(6, "div", 4);
17793
- i0.ɵɵtext(7);
17794
- i0.ɵɵpipe(8, "rpxTranslate");
17796
+ i0.ɵɵelementStart(7, "div", 5);
17797
+ i0.ɵɵtext(8);
17798
+ i0.ɵɵpipe(9, "rpxTranslate");
17795
17799
  i0.ɵɵelementEnd();
17796
- i0.ɵɵelementStart(9, "h1", 5);
17797
- i0.ɵɵtext(10);
17798
- i0.ɵɵpipe(11, "rpxTranslate");
17800
+ i0.ɵɵelementStart(10, "h1", 6);
17801
+ i0.ɵɵtext(11);
17802
+ i0.ɵɵpipe(12, "rpxTranslate");
17799
17803
  i0.ɵɵelementEnd();
17800
- i0.ɵɵelementStart(12, "div", 6);
17801
- i0.ɵɵelementStart(13, "div", 7);
17802
- i0.ɵɵtext(14);
17803
- i0.ɵɵpipe(15, "ccdCaseReference");
17804
+ i0.ɵɵelementStart(13, "div", 2);
17805
+ i0.ɵɵelementStart(14, "div", 7);
17806
+ i0.ɵɵtext(15);
17807
+ i0.ɵɵpipe(16, "ccdCaseReference");
17804
17808
  i0.ɵɵelementEnd();
17805
17809
  i0.ɵɵelementEnd();
17806
- i0.ɵɵelementStart(16, "div");
17807
- i0.ɵɵelement(17, "ccd-query-details-table", 8);
17810
+ i0.ɵɵelementStart(17, "div");
17811
+ i0.ɵɵelement(18, "ccd-query-details-table", 8);
17808
17812
  i0.ɵɵelementEnd();
17809
17813
  i0.ɵɵelementEnd();
17810
- i0.ɵɵelementStart(18, "div", 6);
17811
- i0.ɵɵelementStart(19, "h1", 9);
17812
- i0.ɵɵtext(20);
17813
- i0.ɵɵpipe(21, "rpxTranslate");
17814
+ i0.ɵɵelementStart(19, "div", 2);
17815
+ i0.ɵɵelementStart(20, "h1", 9);
17816
+ i0.ɵɵtext(21);
17817
+ i0.ɵɵpipe(22, "rpxTranslate");
17814
17818
  i0.ɵɵelementEnd();
17815
- i0.ɵɵelementStart(22, "div", 10);
17816
- i0.ɵɵelementStart(23, "div", 11);
17817
- i0.ɵɵelementStart(24, "div", 12);
17818
- i0.ɵɵelementStart(25, "label", 13);
17819
- i0.ɵɵtext(26);
17820
- i0.ɵɵpipe(27, "rpxTranslate");
17819
+ i0.ɵɵelementStart(23, "form", 10);
17820
+ i0.ɵɵelementStart(24, "div", 11);
17821
+ i0.ɵɵelementStart(25, "div", 12);
17822
+ i0.ɵɵelementStart(26, "label", 13);
17823
+ i0.ɵɵtext(27);
17824
+ i0.ɵɵpipe(28, "rpxTranslate");
17821
17825
  i0.ɵɵelementEnd();
17822
17826
  i0.ɵɵelementEnd();
17823
- i0.ɵɵtemplate(28, WriteQueryManagementFieldComponent_p_28_Template, 6, 6, "p", 14);
17824
- i0.ɵɵelementStart(29, "textarea", 15);
17825
- i0.ɵɵtext(30, " ");
17827
+ i0.ɵɵtemplate(29, WriteQueryManagementFieldComponent_p_29_Template, 6, 6, "p", 14);
17828
+ i0.ɵɵelementStart(30, "textarea", 15);
17829
+ i0.ɵɵtext(31, " ");
17826
17830
  i0.ɵɵelementEnd();
17827
17831
  i0.ɵɵelementEnd();
17828
- i0.ɵɵelementStart(31, "div");
17829
- i0.ɵɵelementStart(32, "div", 16);
17830
- i0.ɵɵelementStart(33, "div", 12);
17831
- i0.ɵɵelementStart(34, "label", 17);
17832
- i0.ɵɵelementStart(35, "div", 18);
17833
- i0.ɵɵtext(36);
17834
- i0.ɵɵpipe(37, "rpxTranslate");
17832
+ i0.ɵɵelementStart(32, "div");
17833
+ i0.ɵɵelementStart(33, "div", 16);
17834
+ i0.ɵɵelementStart(34, "div", 12);
17835
+ i0.ɵɵelementStart(35, "label", 17);
17836
+ i0.ɵɵelementStart(36, "div", 18);
17837
+ i0.ɵɵtext(37);
17838
+ i0.ɵɵpipe(38, "rpxTranslate");
17835
17839
  i0.ɵɵelementEnd();
17836
- i0.ɵɵelementStart(38, "div");
17837
- i0.ɵɵtext(39);
17838
- i0.ɵɵpipe(40, "rpxTranslate");
17840
+ i0.ɵɵelementStart(39, "div");
17841
+ i0.ɵɵtext(40);
17842
+ i0.ɵɵpipe(41, "rpxTranslate");
17839
17843
  i0.ɵɵelementEnd();
17840
17844
  i0.ɵɵelementEnd();
17841
17845
  i0.ɵɵelementEnd();
17842
- i0.ɵɵtemplate(41, WriteQueryManagementFieldComponent_p_41_Template, 6, 6, "p", 19);
17843
- i0.ɵɵelement(42, "input", 20);
17846
+ i0.ɵɵtemplate(42, WriteQueryManagementFieldComponent_p_42_Template, 6, 6, "p", 19);
17847
+ i0.ɵɵelement(43, "input", 20);
17844
17848
  i0.ɵɵelementEnd();
17845
17849
  i0.ɵɵelementEnd();
17846
17850
  i0.ɵɵelementEnd();
17851
+ i0.ɵɵelementStart(44, "button", 21);
17852
+ i0.ɵɵtext(45);
17853
+ i0.ɵɵpipe(46, "rpxTranslate");
17847
17854
  i0.ɵɵelementEnd();
17848
- i0.ɵɵelementStart(43, "div");
17849
- i0.ɵɵelementStart(44, "div", 21);
17850
- i0.ɵɵelementStart(45, "button", 22);
17851
- i0.ɵɵtext(46);
17852
- i0.ɵɵpipe(47, "rpxTranslate");
17853
17855
  i0.ɵɵelementEnd();
17854
- i0.ɵɵelementStart(48, "button", 23);
17856
+ i0.ɵɵelementStart(47, "div");
17857
+ i0.ɵɵelementStart(48, "button", 22);
17855
17858
  i0.ɵɵtext(49);
17856
17859
  i0.ɵɵpipe(50, "rpxTranslate");
17857
17860
  i0.ɵɵelementEnd();
17861
+ i0.ɵɵelementStart(51, "button", 23);
17862
+ i0.ɵɵlistener("click", function WriteQueryManagementFieldComponent_Template_button_click_51_listener() { return ctx.submitForm(); });
17863
+ i0.ɵɵtext(52);
17864
+ i0.ɵɵpipe(53, "rpxTranslate");
17858
17865
  i0.ɵɵelementEnd();
17859
17866
  i0.ɵɵelementEnd();
17860
- i0.ɵɵelementStart(51, "div", 1);
17861
- i0.ɵɵelementStart(52, "a", 24);
17862
- i0.ɵɵtext(53);
17863
- i0.ɵɵpipe(54, "rpxTranslate");
17867
+ i0.ɵɵelementStart(54, "div", 24);
17868
+ i0.ɵɵelementStart(55, "a", 25);
17869
+ i0.ɵɵtext(56);
17870
+ i0.ɵɵpipe(57, "rpxTranslate");
17864
17871
  i0.ɵɵelementEnd();
17865
17872
  i0.ɵɵelementEnd();
17866
17873
  i0.ɵɵelementEnd();
17867
17874
  } if (rf & 2) {
17868
- let tmp_7_0 = null;
17869
- let tmp_9_0 = null;
17875
+ let tmp_8_0 = null;
17870
17876
  let tmp_10_0 = null;
17871
- let tmp_12_0 = null;
17872
- let tmp_15_0 = null;
17877
+ let tmp_11_0 = null;
17878
+ let tmp_13_0 = null;
17879
+ let tmp_16_0 = null;
17880
+ i0.ɵɵadvance(1);
17881
+ i0.ɵɵproperty("errorMessages", ctx.errorMessages);
17873
17882
  i0.ɵɵadvance(3);
17874
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 23, "Back to tasks"));
17883
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 25, "Back to tasks"));
17875
17884
  i0.ɵɵadvance(4);
17876
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 25, "Respond to query"));
17885
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 27, "Respond to query"));
17877
17886
  i0.ɵɵadvance(3);
17878
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 27, "Query details"));
17887
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 29, "Query details"));
17879
17888
  i0.ɵɵadvance(4);
17880
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 29, ctx.caseReference));
17889
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 31, ctx.caseReference));
17881
17890
  i0.ɵɵadvance(3);
17882
17891
  i0.ɵɵproperty("queryItem", ctx.queryItem);
17883
17892
  i0.ɵɵadvance(3);
17884
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(21, 31, "Respond to a query"));
17893
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 33, "Respond to a query"));
17885
17894
  i0.ɵɵadvance(2);
17886
17895
  i0.ɵɵproperty("formGroup", ctx.responseFormGroup);
17887
17896
  i0.ɵɵadvance(1);
17888
- i0.ɵɵclassProp("govuk-form-group--error", (tmp_7_0 = ctx.responseFormGroup.get("response")) == null ? null : tmp_7_0.errors == null ? null : tmp_7_0.errors.length);
17897
+ i0.ɵɵclassProp("govuk-form-group--error", ctx.submitted && ((tmp_8_0 = ctx.responseFormGroup.get("response")) == null ? null : tmp_8_0.errors));
17889
17898
  i0.ɵɵadvance(3);
17890
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(27, 33, "Response message"), " ");
17899
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(28, 35, "Response message"), " ");
17891
17900
  i0.ɵɵadvance(2);
17892
- i0.ɵɵproperty("ngIf", (tmp_9_0 = ctx.responseFormGroup.get("response")) == null ? null : tmp_9_0.errors == null ? null : tmp_9_0.errors.length);
17901
+ i0.ɵɵproperty("ngIf", ctx.submitted && ((tmp_10_0 = ctx.responseFormGroup.get("response")) == null ? null : tmp_10_0.hasError("required")));
17893
17902
  i0.ɵɵadvance(1);
17894
- i0.ɵɵclassProp("govuk-textarea--error", (tmp_10_0 = ctx.responseFormGroup.get("response")) == null ? null : tmp_10_0.errors == null ? null : tmp_10_0.errors.length);
17903
+ i0.ɵɵclassProp("govuk-textarea--error", ctx.submitted && ((tmp_11_0 = ctx.responseFormGroup.get("response")) == null ? null : tmp_11_0.hasError("required")));
17895
17904
  i0.ɵɵproperty("formControlName", "response");
17896
17905
  i0.ɵɵadvance(3);
17897
- i0.ɵɵclassProp("govuk-form-group--error", (tmp_12_0 = ctx.responseFormGroup.get("documents")) == null ? null : tmp_12_0.errors == null ? null : tmp_12_0.errors.length);
17906
+ i0.ɵɵclassProp("govuk-form-group--error", ctx.submitted && ((tmp_13_0 = ctx.responseFormGroup.get("documents")) == null ? null : tmp_13_0.errors));
17898
17907
  i0.ɵɵadvance(4);
17899
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(37, 35, "Add document (optional)"));
17908
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(38, 37, "Add document (optional)"));
17900
17909
  i0.ɵɵadvance(3);
17901
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(40, 37, "Attach a document to this message"));
17910
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(41, 39, "Attach a document to this message"));
17902
17911
  i0.ɵɵadvance(2);
17903
- i0.ɵɵproperty("ngIf", (tmp_15_0 = ctx.responseFormGroup.get("response")) == null ? null : tmp_15_0.errors == null ? null : tmp_15_0.errors.length);
17904
- i0.ɵɵadvance(4);
17912
+ i0.ɵɵproperty("ngIf", ctx.submitted && ((tmp_16_0 = ctx.responseFormGroup.get("documents")) == null ? null : tmp_16_0.errors));
17913
+ i0.ɵɵadvance(3);
17914
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(46, 41, "Next"), " ");
17915
+ i0.ɵɵadvance(3);
17905
17916
  i0.ɵɵproperty("disabled", true);
17906
17917
  i0.ɵɵadvance(1);
17907
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(47, 39, "Previous"), " ");
17918
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(50, 43, "Previous"), " ");
17908
17919
  i0.ɵɵadvance(3);
17909
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(50, 41, "Continue"), " ");
17920
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(53, 45, "Continue"), " ");
17910
17921
  i0.ɵɵadvance(4);
17911
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(54, 43, "Cancel and return to query list"));
17922
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(57, 47, "Cancel and return to query list"));
17912
17923
  } }, styles: [".response-textarea[_ngcontent-%COMP%]{max-width:576px}"] });
17913
17924
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteQueryManagementFieldComponent, [{
17914
17925
  type: Component,
@@ -24870,7 +24881,7 @@ function QueryListComponent_ng_container_0_tr_9_Template(rf, ctx) { if (rf & 1)
24870
24881
  i0.ɵɵadvance(3);
24871
24882
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(11, 8, message_r6.lastResponseDate, "dd MMM YYYY"));
24872
24883
  i0.ɵɵadvance(3);
24873
- i0.ɵɵtextInterpolate(message_r6.responseStatus);
24884
+ i0.ɵɵtextInterpolate(message_r6.lastResponseBy);
24874
24885
  } }
24875
24886
  function QueryListComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
24876
24887
  i0.ɵɵelementContainerStart(0);
@@ -24906,7 +24917,7 @@ class QueryListComponent {
24906
24917
  { name: 'lastSubmittedBy', displayName: 'Last submitted by', sortOrder: SortOrder.UNSORTED },
24907
24918
  { name: 'lastSubmittedDate', displayName: 'Last submission date', sortOrder: SortOrder.UNSORTED },
24908
24919
  { name: 'lastResponseDate', displayName: 'Last response date', sortOrder: SortOrder.UNSORTED },
24909
- { name: 'lastResponseBy', displayName: 'Response status', sortOrder: SortOrder.UNSORTED }
24920
+ { name: 'lastResponseBy', displayName: 'Response by', sortOrder: SortOrder.UNSORTED }
24910
24921
  ];
24911
24922
  }
24912
24923
  ngOnChanges(simpleChanges) {
@@ -24987,7 +24998,7 @@ QueryListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: QueryListComponent, se
24987
24998
  i0.ɵɵtemplate(0, QueryListComponent_ng_container_0_Template, 10, 3, "ng-container", 0);
24988
24999
  } if (rf & 2) {
24989
25000
  i0.ɵɵproperty("ngIf", ctx.queryListData);
24990
- } }, directives: [i5.NgIf, i5.NgForOf], pipes: [i1.RpxTranslatePipe, i5.DatePipe], styles: [".query-list__caption[_ngcontent-%COMP%], .query-list__table[_ngcontent-%COMP%]{border:1px solid #b1b4b6}.query-list__caption[_ngcontent-%COMP%]{background:#f3f2f1;border-bottom:0;font-weight:700}.query-list__row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{padding-left:10px}.query-list__row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child{padding-right:10px;max-width:150px}.query-list__cell--first[_ngcontent-%COMP%]{width:33%}.sort-widget[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none;color:#000}"] });
25001
+ } }, directives: [i5.NgIf, i5.NgForOf], pipes: [i1.RpxTranslatePipe, i5.DatePipe], styles: [".query-list__caption[_ngcontent-%COMP%], .query-list__table[_ngcontent-%COMP%]{border:1px solid #b1b4b6}.query-list__caption[_ngcontent-%COMP%]{background:#f3f2f1;border-bottom:0;font-weight:700}.query-list__row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{padding-left:10px}.query-list__row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child{padding-right:10px}.query-list__cell--first[_ngcontent-%COMP%]{width:33%}.sort-widget[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none;color:#000}"] });
24991
25002
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryListComponent, [{
24992
25003
  type: Component,
24993
25004
  args: [{
@@ -24999,6 +25010,58 @@ QueryListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: QueryListComponent, se
24999
25010
  type: Input
25000
25011
  }] }); })();
25001
25012
 
25013
+ function QueryManagementErrorMessagesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
25014
+ i0.ɵɵelementStart(0, "div", 4);
25015
+ i0.ɵɵelementStart(1, "ul", 5);
25016
+ i0.ɵɵelementStart(2, "li");
25017
+ i0.ɵɵelementStart(3, "a", 6);
25018
+ i0.ɵɵtext(4);
25019
+ i0.ɵɵpipe(5, "rpxTranslate");
25020
+ i0.ɵɵelementEnd();
25021
+ i0.ɵɵelementEnd();
25022
+ i0.ɵɵelementEnd();
25023
+ i0.ɵɵelementEnd();
25024
+ } if (rf & 2) {
25025
+ const errorMessage_r2 = ctx.$implicit;
25026
+ i0.ɵɵadvance(4);
25027
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 1, errorMessage_r2.message), " ");
25028
+ } }
25029
+ function QueryManagementErrorMessagesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
25030
+ i0.ɵɵelementStart(0, "div", 1);
25031
+ i0.ɵɵelementStart(1, "h2", 2);
25032
+ i0.ɵɵtext(2);
25033
+ i0.ɵɵpipe(3, "rpxTranslate");
25034
+ i0.ɵɵelementEnd();
25035
+ i0.ɵɵtemplate(4, QueryManagementErrorMessagesComponent_div_0_div_4_Template, 6, 3, "div", 3);
25036
+ i0.ɵɵelementEnd();
25037
+ } if (rf & 2) {
25038
+ const ctx_r0 = i0.ɵɵnextContext();
25039
+ i0.ɵɵadvance(2);
25040
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "There is a problem"), " ");
25041
+ i0.ɵɵadvance(2);
25042
+ i0.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
25043
+ } }
25044
+ class QueryManagementErrorMessagesComponent {
25045
+ constructor() {
25046
+ this.errorMessages = [];
25047
+ }
25048
+ }
25049
+ QueryManagementErrorMessagesComponent.ɵfac = function QueryManagementErrorMessagesComponent_Factory(t) { return new (t || QueryManagementErrorMessagesComponent)(); };
25050
+ QueryManagementErrorMessagesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: QueryManagementErrorMessagesComponent, selectors: [["ccd-query-management-error-messages"]], inputs: { errorMessages: "errorMessages" }, decls: 1, vars: 1, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["href", "javascript:void(0)", 1, "validation-error"]], template: function QueryManagementErrorMessagesComponent_Template(rf, ctx) { if (rf & 1) {
25051
+ i0.ɵɵtemplate(0, QueryManagementErrorMessagesComponent_div_0_Template, 5, 4, "div", 0);
25052
+ } if (rf & 2) {
25053
+ i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
25054
+ } }, directives: [i5.NgIf, i5.NgForOf], pipes: [i1.RpxTranslatePipe], encapsulation: 2 });
25055
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementErrorMessagesComponent, [{
25056
+ type: Component,
25057
+ args: [{
25058
+ selector: 'ccd-query-management-error-messages',
25059
+ templateUrl: './query-management-error-messages.component.html'
25060
+ }]
25061
+ }], null, { errorMessages: [{
25062
+ type: Input
25063
+ }] }); })();
25064
+
25002
25065
  class QueryManagementModule {
25003
25066
  }
25004
25067
  QueryManagementModule.ɵfac = function QueryManagementModule_Factory(t) { return new (t || QueryManagementModule)(); };
@@ -25014,7 +25077,8 @@ QueryManagementModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
25014
25077
  QueryDetailsComponent,
25015
25078
  QueryCreateComponent,
25016
25079
  QueryListComponent,
25017
- QueryDetailsTableComponent], imports: [CommonModule,
25080
+ QueryDetailsTableComponent,
25081
+ QueryManagementErrorMessagesComponent], imports: [CommonModule,
25018
25082
  ReactiveFormsModule, i1.RpxTranslationModule, PipesModule], exports: [ReadQueryManagementFieldComponent,
25019
25083
  WriteQueryManagementFieldComponent] }); })();
25020
25084
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementModule, [{
@@ -25027,6 +25091,7 @@ QueryManagementModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
25027
25091
  QueryCreateComponent,
25028
25092
  QueryListComponent,
25029
25093
  QueryDetailsTableComponent,
25094
+ QueryManagementErrorMessagesComponent,
25030
25095
  ],
25031
25096
  imports: [
25032
25097
  CommonModule,
@@ -25041,7 +25106,8 @@ QueryManagementModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
25041
25106
  }]
25042
25107
  }], null, null); })();
25043
25108
  i0.ɵɵsetComponentScope(ReadQueryManagementFieldComponent, [i5.NgForOf, QueryListComponent], []);
25044
- i0.ɵɵsetComponentScope(WriteQueryManagementFieldComponent, [QueryDetailsTableComponent, i3.NgControlStatusGroup, i3.FormGroupDirective, i5.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlName], [i1.RpxTranslatePipe, CaseReferencePipe]);
25109
+ i0.ɵɵsetComponentScope(WriteQueryManagementFieldComponent, [QueryManagementErrorMessagesComponent,
25110
+ QueryDetailsTableComponent, i3.ɵangular_packages_forms_forms_ba, i3.NgControlStatusGroup, i3.FormGroupDirective, i5.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlName], [i1.RpxTranslatePipe, CaseReferencePipe]);
25045
25111
 
25046
25112
  const PALETTE_COMPONENTS = [
25047
25113
  UnsupportedFieldComponent,