@hmcts/ccd-case-ui-toolkit 7.2.26-mid-event-callback → 7.2.26-welsh-translation-qm
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/shared/components/palette/palette.module.mjs +7 -8
- package/esm2022/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.mjs +29 -15
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +193 -51
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +6 -59
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.mjs +6 -39
- package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +9 -18
- package/esm2022/lib/shared/components/palette/query-management/services/index.mjs +1 -2
- package/esm2022/lib/shared/directives/index.mjs +2 -1
- package/esm2022/lib/shared/directives/welsh-translated-markdown/index.mjs +3 -0
- package/esm2022/lib/shared/directives/welsh-translated-markdown/welsh-translated-markdown.directive.mjs +104 -0
- package/esm2022/lib/shared/directives/welsh-translated-markdown/welsh-translated-markdown.module.mjs +21 -0
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +599 -588
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts +18 -17
- package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +13 -15
- 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 +3 -24
- 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/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts +3 -12
- package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/services/index.d.ts +0 -1
- package/lib/shared/components/palette/query-management/services/index.d.ts.map +1 -1
- package/lib/shared/directives/index.d.ts +1 -0
- package/lib/shared/directives/index.d.ts.map +1 -1
- package/lib/shared/directives/welsh-translated-markdown/index.d.ts +3 -0
- package/lib/shared/directives/welsh-translated-markdown/index.d.ts.map +1 -0
- package/lib/shared/directives/welsh-translated-markdown/welsh-translated-markdown.directive.d.ts +76 -0
- package/lib/shared/directives/welsh-translated-markdown/welsh-translated-markdown.directive.d.ts.map +1 -0
- package/lib/shared/directives/welsh-translated-markdown/welsh-translated-markdown.module.d.ts +8 -0
- package/lib/shared/directives/welsh-translated-markdown/welsh-translated-markdown.module.d.ts.map +1 -0
- package/package.json +1 -1
- package/esm2022/lib/shared/components/palette/query-management/constants/query-management.constants.mjs +0 -7
- package/esm2022/lib/shared/components/palette/query-management/services/query-management.service.mjs +0 -179
- package/lib/shared/components/palette/query-management/constants/query-management.constants.d.ts +0 -7
- package/lib/shared/components/palette/query-management/constants/query-management.constants.d.ts.map +0 -1
- package/lib/shared/components/palette/query-management/services/query-management.service.d.ts +0 -21
- package/lib/shared/components/palette/query-management/services/query-management.service.d.ts.map +0 -1
|
@@ -6761,6 +6761,124 @@ class FocusElementModule {
|
|
|
6761
6761
|
}], null, null); })();
|
|
6762
6762
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(FocusElementModule, { declarations: [FocusElementDirective], exports: [FocusElementDirective] }); })();
|
|
6763
6763
|
|
|
6764
|
+
/**
|
|
6765
|
+
* @directive TranslatedMarkdownDirective
|
|
6766
|
+
*
|
|
6767
|
+
* @description
|
|
6768
|
+
* Structural directive that emits language-appropriate markdown content based on the user's UI language.
|
|
6769
|
+
* It is designed for service-supplied content that optionally includes a Welsh (`markdown_cy`) version.
|
|
6770
|
+
*
|
|
6771
|
+
* The directive:
|
|
6772
|
+
* - Emits `markdown_cy` if the UI language is Welsh and the field exists
|
|
6773
|
+
* - Emits `markdown` otherwise (no translation is applied within the directive)
|
|
6774
|
+
* - Leaves it up to the consuming template to apply fallback translation (e.g. via `rpxTranslate`)
|
|
6775
|
+
*
|
|
6776
|
+
* This allows cleaner templates and better separation of content choice vs. translation logic.
|
|
6777
|
+
*
|
|
6778
|
+
* @usage
|
|
6779
|
+
* ```html
|
|
6780
|
+
* <div *ngFor="let qq of qualifyingQuestions">
|
|
6781
|
+
* <ng-container *translatedMarkdown="qq; let content">
|
|
6782
|
+
* <markdown [data]="qq ? content : (qq.markdown | rpxTranslate)"></markdown>
|
|
6783
|
+
* </ng-container>
|
|
6784
|
+
* </div>
|
|
6785
|
+
* ```
|
|
6786
|
+
*
|
|
6787
|
+
* @input dataItem - An object expected to contain:
|
|
6788
|
+
* - `markdown` (string): the default English content
|
|
6789
|
+
* - `markdown_cy` (string | optional): the Welsh version of the content
|
|
6790
|
+
* - Any additional metadata used in context
|
|
6791
|
+
*
|
|
6792
|
+
* @example
|
|
6793
|
+
* // --- LaunchDarkly JSON format ---
|
|
6794
|
+
* {
|
|
6795
|
+
* "UNSPEC_CLAIM": [
|
|
6796
|
+
* {
|
|
6797
|
+
* "name": "Raise a query",
|
|
6798
|
+
* "url": "http://...",
|
|
6799
|
+
* "markdown": "### Raise a query\nUse this to raise a new query.",
|
|
6800
|
+
* "markdown_cy": "### Codwch ymholiad\nDefnyddiwch hwn i godi ymholiad newydd."
|
|
6801
|
+
* }
|
|
6802
|
+
* ]
|
|
6803
|
+
* }
|
|
6804
|
+
*
|
|
6805
|
+
* // --- Input object in component after processing ---
|
|
6806
|
+
* const dataItem = {
|
|
6807
|
+
* name: 'Raise a query',
|
|
6808
|
+
* url: 'http://...',
|
|
6809
|
+
* markdown: '### Raise a query\nUse this to raise a new query.',
|
|
6810
|
+
* markdown_cy: '### Codwch ymholiad\nDefnyddiwch hwn i godi ymholiad newydd.'
|
|
6811
|
+
* };
|
|
6812
|
+
*
|
|
6813
|
+
* // --- Template usage ---
|
|
6814
|
+
* <ng-container *translatedMarkdown="dataItem; let content">
|
|
6815
|
+
* <markdown [data]="dataItem ? content : (dataItem.markdown | rpxTranslate)"></markdown>
|
|
6816
|
+
* </ng-container>
|
|
6817
|
+
*/
|
|
6818
|
+
/**
|
|
6819
|
+
* @directive TranslatedMarkdownDirective
|
|
6820
|
+
*
|
|
6821
|
+
* Renders Welsh markdown (`markdown_cy`) if the UI language is Welsh,
|
|
6822
|
+
* otherwise uses English (`markdown`). Reactively updates when the language changes.
|
|
6823
|
+
*/
|
|
6824
|
+
class TranslatedMarkdownDirective {
|
|
6825
|
+
viewContainer;
|
|
6826
|
+
templateRef;
|
|
6827
|
+
translationService;
|
|
6828
|
+
dataItem;
|
|
6829
|
+
subscription;
|
|
6830
|
+
constructor(viewContainer, templateRef, translationService) {
|
|
6831
|
+
this.viewContainer = viewContainer;
|
|
6832
|
+
this.templateRef = templateRef;
|
|
6833
|
+
this.translationService = translationService;
|
|
6834
|
+
}
|
|
6835
|
+
ngOnInit() {
|
|
6836
|
+
this.subscription = this.translationService.language$.subscribe((lang) => {
|
|
6837
|
+
const isWelsh = lang === 'cy';
|
|
6838
|
+
const content = isWelsh && this.dataItem?.markdown_cy
|
|
6839
|
+
? this.dataItem.markdown_cy
|
|
6840
|
+
: this.dataItem?.markdown ?? '';
|
|
6841
|
+
this.viewContainer.clear();
|
|
6842
|
+
this.viewContainer.createEmbeddedView(this.templateRef, {
|
|
6843
|
+
$implicit: content,
|
|
6844
|
+
translatedMarkdown: this.dataItem
|
|
6845
|
+
});
|
|
6846
|
+
});
|
|
6847
|
+
}
|
|
6848
|
+
ngOnDestroy() {
|
|
6849
|
+
this.subscription?.unsubscribe();
|
|
6850
|
+
}
|
|
6851
|
+
static ɵfac = function TranslatedMarkdownDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TranslatedMarkdownDirective)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i1.RpxTranslationService)); };
|
|
6852
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TranslatedMarkdownDirective, selectors: [["", "translatedMarkdown", ""]], inputs: { dataItem: [0, "translatedMarkdown", "dataItem"] } });
|
|
6853
|
+
}
|
|
6854
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslatedMarkdownDirective, [{
|
|
6855
|
+
type: Directive,
|
|
6856
|
+
args: [{
|
|
6857
|
+
selector: '[translatedMarkdown]'
|
|
6858
|
+
}]
|
|
6859
|
+
}], () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1.RpxTranslationService }], { dataItem: [{
|
|
6860
|
+
type: Input,
|
|
6861
|
+
args: ['translatedMarkdown']
|
|
6862
|
+
}] }); })();
|
|
6863
|
+
|
|
6864
|
+
class TranslatedMarkdownModule {
|
|
6865
|
+
static ɵfac = function TranslatedMarkdownModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TranslatedMarkdownModule)(); };
|
|
6866
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TranslatedMarkdownModule });
|
|
6867
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
|
6868
|
+
}
|
|
6869
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslatedMarkdownModule, [{
|
|
6870
|
+
type: NgModule,
|
|
6871
|
+
args: [{
|
|
6872
|
+
declarations: [
|
|
6873
|
+
TranslatedMarkdownDirective
|
|
6874
|
+
],
|
|
6875
|
+
exports: [
|
|
6876
|
+
TranslatedMarkdownDirective
|
|
6877
|
+
]
|
|
6878
|
+
}]
|
|
6879
|
+
}], null, null); })();
|
|
6880
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TranslatedMarkdownModule, { declarations: [TranslatedMarkdownDirective], exports: [TranslatedMarkdownDirective] }); })();
|
|
6881
|
+
|
|
6764
6882
|
var AddressType;
|
|
6765
6883
|
(function (AddressType) {
|
|
6766
6884
|
AddressType["DPA"] = "DPA";
|
|
@@ -20551,36 +20669,49 @@ const caseMessagesMockData = [
|
|
|
20551
20669
|
}
|
|
20552
20670
|
];
|
|
20553
20671
|
|
|
20672
|
+
function QualifyingQuestionDetailComponent_ng_container_0_ng_container_4_Template(rf, ctx) { if (rf & 1) {
|
|
20673
|
+
i0.ɵɵelementContainerStart(0);
|
|
20674
|
+
i0.ɵɵelementStart(1, "div", 3);
|
|
20675
|
+
i0.ɵɵtext(2);
|
|
20676
|
+
i0.ɵɵelement(3, "ccd-markdown", 4);
|
|
20677
|
+
i0.ɵɵpipe(4, "rpxTranslate");
|
|
20678
|
+
i0.ɵɵelementEnd();
|
|
20679
|
+
i0.ɵɵelementContainerEnd();
|
|
20680
|
+
} if (rf & 2) {
|
|
20681
|
+
const content_r1 = ctx.$implicit;
|
|
20682
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
20683
|
+
i0.ɵɵadvance(2);
|
|
20684
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.qualifyingQuestion.markdown, " ");
|
|
20685
|
+
i0.ɵɵadvance();
|
|
20686
|
+
i0.ɵɵproperty("content", ctx_r1.qualifyingQuestion ? content_r1 : i0.ɵɵpipeBind1(4, 2, ctx_r1.qualifyingQuestion.markdown));
|
|
20687
|
+
} }
|
|
20554
20688
|
function QualifyingQuestionDetailComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
20555
20689
|
i0.ɵɵelementContainerStart(0);
|
|
20556
20690
|
i0.ɵɵelementStart(1, "h1", 1);
|
|
20557
20691
|
i0.ɵɵtext(2);
|
|
20558
20692
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
20559
20693
|
i0.ɵɵelementEnd();
|
|
20560
|
-
i0.ɵɵ
|
|
20561
|
-
i0.ɵɵelement(5, "ccd-markdown", 3);
|
|
20562
|
-
i0.ɵɵpipe(6, "rpxTranslate");
|
|
20563
|
-
i0.ɵɵelementEnd();
|
|
20694
|
+
i0.ɵɵtemplate(4, QualifyingQuestionDetailComponent_ng_container_0_ng_container_4_Template, 5, 4, "ng-container", 2);
|
|
20564
20695
|
i0.ɵɵelementContainerEnd();
|
|
20565
20696
|
} if (rf & 2) {
|
|
20566
|
-
const
|
|
20697
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
20567
20698
|
i0.ɵɵadvance(2);
|
|
20568
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2,
|
|
20569
|
-
i0.ɵɵadvance(
|
|
20570
|
-
i0.ɵɵproperty("
|
|
20699
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, ctx_r1.qualifyingQuestion.name), " - ");
|
|
20700
|
+
i0.ɵɵadvance(2);
|
|
20701
|
+
i0.ɵɵproperty("translatedMarkdown", ctx_r1.qualifyingQuestion);
|
|
20571
20702
|
} }
|
|
20572
20703
|
class QualifyingQuestionDetailComponent {
|
|
20573
20704
|
qualifyingQuestion;
|
|
20574
20705
|
static ɵfac = function QualifyingQuestionDetailComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QualifyingQuestionDetailComponent)(); };
|
|
20575
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionDetailComponent, selectors: [["ccd-qualifying-question-detail"]], inputs: { qualifyingQuestion: "qualifyingQuestion" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-heading-l"], [1, "qm-qualifying-question"], [3, "content"]], template: function QualifyingQuestionDetailComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20576
|
-
i0.ɵɵtemplate(0, QualifyingQuestionDetailComponent_ng_container_0_Template,
|
|
20706
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionDetailComponent, selectors: [["ccd-qualifying-question-detail"]], inputs: { qualifyingQuestion: "qualifyingQuestion" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-heading-l"], [4, "translatedMarkdown"], [1, "qm-qualifying-question"], [3, "content"]], template: function QualifyingQuestionDetailComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20707
|
+
i0.ɵɵtemplate(0, QualifyingQuestionDetailComponent_ng_container_0_Template, 5, 4, "ng-container", 0);
|
|
20577
20708
|
} if (rf & 2) {
|
|
20578
20709
|
i0.ɵɵproperty("ngIf", ctx.qualifyingQuestion == null ? null : ctx.qualifyingQuestion.markdown);
|
|
20579
|
-
} }, dependencies: [i5.NgIf, MarkdownComponent, i1.RpxTranslatePipe], styles: [".qm-qualifying-question[_ngcontent-%COMP%] .markdown[_ngcontent-%COMP%]{font-size:19px}"] });
|
|
20710
|
+
} }, dependencies: [i5.NgIf, TranslatedMarkdownDirective, MarkdownComponent, i1.RpxTranslatePipe], styles: [".qm-qualifying-question[_ngcontent-%COMP%] .markdown[_ngcontent-%COMP%]{font-size:19px}"] });
|
|
20580
20711
|
}
|
|
20581
20712
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionDetailComponent, [{
|
|
20582
20713
|
type: Component,
|
|
20583
|
-
args: [{ selector: 'ccd-qualifying-question-detail', template: "<ng-container *ngIf=\"qualifyingQuestion?.markdown\">\n <h1 class=\"govuk-heading-l\">\n {{ qualifyingQuestion.name | rpxTranslate }}\n </h1>\n <div class=\"qm-qualifying-question\">\n <ccd-markdown\n [content]=\"qualifyingQuestion.markdown | rpxTranslate\">\n </ccd-markdown>\n </div>\n</ng-container>\n", styles: [".qm-qualifying-question .markdown{font-size:19px}\n"] }]
|
|
20714
|
+
args: [{ selector: 'ccd-qualifying-question-detail', template: "<!-- <ng-container *ngIf=\"qualifyingQuestion?.markdown\">\n <h1 class=\"govuk-heading-l\">\n {{ qualifyingQuestion.name | rpxTranslate }}\n </h1>\n <div class=\"qm-qualifying-question\">\n <ccd-markdown\n [content]=\"qualifyingQuestion.markdown | rpxTranslate\">\n </ccd-markdown>\n </div>\n</ng-container> -->\n\n<ng-container *ngIf=\"qualifyingQuestion?.markdown\">\n <h1 class=\"govuk-heading-l\">\n {{ qualifyingQuestion.name | rpxTranslate }} -\n </h1>\n <!-- <ng-container *translatedMarkdown=\"qq; let content\">\n {{ qq.markdown }}\n <div class=\"qm-qualifying-question\">\n <ccd-markdown\n [content]=\"qq ? content : (qq.markdown | rpxTranslate)\">\n </ccd-markdown>\n </div>\n </ng-container> -->\n\n <ng-container *translatedMarkdown=\"qualifyingQuestion; let content;\">\n <div class=\"qm-qualifying-question\">\n {{ qualifyingQuestion.markdown }}\n <ccd-markdown [content]=\"qualifyingQuestion ? content : (qualifyingQuestion.markdown | rpxTranslate)\"></ccd-markdown>\n </div>\n </ng-container>\n </ng-container>", styles: [".qm-qualifying-question .markdown{font-size:19px}\n"] }]
|
|
20584
20715
|
}], null, { qualifyingQuestion: [{
|
|
20585
20716
|
type: Input
|
|
20586
20717
|
}] }); })();
|
|
@@ -20637,6 +20768,252 @@ class QualifyingQuestionService {
|
|
|
20637
20768
|
type: Injectable
|
|
20638
20769
|
}], null, null); })();
|
|
20639
20770
|
|
|
20771
|
+
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
|
|
20772
|
+
i0.ɵɵelementContainerStart(0);
|
|
20773
|
+
i0.ɵɵelementStart(1, "p", 8)(2, "span", 9);
|
|
20774
|
+
i0.ɵɵtext(3);
|
|
20775
|
+
i0.ɵɵpipe(4, "rpxTranslate");
|
|
20776
|
+
i0.ɵɵelementEnd();
|
|
20777
|
+
i0.ɵɵtext(5);
|
|
20778
|
+
i0.ɵɵpipe(6, "rpxTranslate");
|
|
20779
|
+
i0.ɵɵelementEnd();
|
|
20780
|
+
i0.ɵɵelementContainerEnd();
|
|
20781
|
+
} if (rf & 2) {
|
|
20782
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
20783
|
+
i0.ɵɵadvance(3);
|
|
20784
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(4, 2, "Error:"), " ");
|
|
20785
|
+
i0.ɵɵadvance(2);
|
|
20786
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(6, 4, ctx_r0.qualifyingQuestionsErrorMessage.SELECT_AN_OPTION), " ");
|
|
20787
|
+
} }
|
|
20788
|
+
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
20789
|
+
i0.ɵɵelementContainerStart(0);
|
|
20790
|
+
i0.ɵɵelementStart(1, "div", 13);
|
|
20791
|
+
i0.ɵɵtext(2);
|
|
20792
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
20793
|
+
i0.ɵɵelementEnd();
|
|
20794
|
+
i0.ɵɵelementContainerEnd();
|
|
20795
|
+
} if (rf & 2) {
|
|
20796
|
+
i0.ɵɵadvance(2);
|
|
20797
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "If your issue is not covered by the options above, raise a query:"));
|
|
20798
|
+
} }
|
|
20799
|
+
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template(rf, ctx) { if (rf & 1) {
|
|
20800
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
20801
|
+
i0.ɵɵelementContainerStart(0);
|
|
20802
|
+
i0.ɵɵtemplate(1, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template, 4, 3, "ng-container", 0);
|
|
20803
|
+
i0.ɵɵelementStart(2, "div", 10)(3, "input", 11);
|
|
20804
|
+
i0.ɵɵlistener("change", function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template_input_change_3_listener() { const qualifyingQuestion_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSelectionChange(qualifyingQuestion_r3)); });
|
|
20805
|
+
i0.ɵɵelementEnd();
|
|
20806
|
+
i0.ɵɵelementStart(4, "label", 12);
|
|
20807
|
+
i0.ɵɵtext(5);
|
|
20808
|
+
i0.ɵɵpipe(6, "rpxTranslate");
|
|
20809
|
+
i0.ɵɵelementEnd()();
|
|
20810
|
+
i0.ɵɵelementContainerEnd();
|
|
20811
|
+
} if (rf & 2) {
|
|
20812
|
+
const qualifyingQuestion_r3 = ctx.$implicit;
|
|
20813
|
+
const isLast_r4 = ctx.last;
|
|
20814
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
20815
|
+
i0.ɵɵadvance();
|
|
20816
|
+
i0.ɵɵproperty("ngIf", isLast_r4);
|
|
20817
|
+
i0.ɵɵadvance(2);
|
|
20818
|
+
i0.ɵɵpropertyInterpolate("id", qualifyingQuestion_r3.name);
|
|
20819
|
+
i0.ɵɵproperty("formControl", ctx_r0.qualifyingQuestionsControl)("value", qualifyingQuestion_r3);
|
|
20820
|
+
i0.ɵɵadvance();
|
|
20821
|
+
i0.ɵɵproperty("for", qualifyingQuestion_r3.name);
|
|
20822
|
+
i0.ɵɵadvance();
|
|
20823
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, qualifyingQuestion_r3.name));
|
|
20824
|
+
} }
|
|
20825
|
+
function QualifyingQuestionOptionsComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
20826
|
+
i0.ɵɵelementContainerStart(0);
|
|
20827
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "fieldset", 2)(3, "legend", 3)(4, "h1", 4);
|
|
20828
|
+
i0.ɵɵtext(5);
|
|
20829
|
+
i0.ɵɵpipe(6, "rpxTranslate");
|
|
20830
|
+
i0.ɵɵelementEnd()();
|
|
20831
|
+
i0.ɵɵelementStart(7, "h2", 5);
|
|
20832
|
+
i0.ɵɵtext(8);
|
|
20833
|
+
i0.ɵɵpipe(9, "rpxTranslate");
|
|
20834
|
+
i0.ɵɵelementEnd();
|
|
20835
|
+
i0.ɵɵtemplate(10, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template, 7, 6, "ng-container", 0);
|
|
20836
|
+
i0.ɵɵelementStart(11, "div", 6);
|
|
20837
|
+
i0.ɵɵtemplate(12, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template, 7, 8, "ng-container", 7);
|
|
20838
|
+
i0.ɵɵpipe(13, "async");
|
|
20839
|
+
i0.ɵɵelementEnd()()();
|
|
20840
|
+
i0.ɵɵelementContainerEnd();
|
|
20841
|
+
} if (rf & 2) {
|
|
20842
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
20843
|
+
i0.ɵɵadvance();
|
|
20844
|
+
i0.ɵɵclassProp("govuk-form-group--error", ctx_r0.displayError);
|
|
20845
|
+
i0.ɵɵadvance(4);
|
|
20846
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, "Raise a new query"), " ");
|
|
20847
|
+
i0.ɵɵadvance(3);
|
|
20848
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 8, "What do you need help to do?"), " ");
|
|
20849
|
+
i0.ɵɵadvance(2);
|
|
20850
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayError);
|
|
20851
|
+
i0.ɵɵadvance(2);
|
|
20852
|
+
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(13, 10, ctx_r0.qualifyingQuestions$));
|
|
20853
|
+
} }
|
|
20854
|
+
class QualifyingQuestionOptionsComponent {
|
|
20855
|
+
route;
|
|
20856
|
+
router;
|
|
20857
|
+
qualifyingQuestionService;
|
|
20858
|
+
qualifyingQuestionsControl;
|
|
20859
|
+
qualifyingQuestions$;
|
|
20860
|
+
questionSelected = new EventEmitter();
|
|
20861
|
+
qualifyingQuestionsErrorMessage = QualifyingQuestionsErrorMessage;
|
|
20862
|
+
caseId;
|
|
20863
|
+
constructor(route, router, qualifyingQuestionService) {
|
|
20864
|
+
this.route = route;
|
|
20865
|
+
this.router = router;
|
|
20866
|
+
this.qualifyingQuestionService = qualifyingQuestionService;
|
|
20867
|
+
}
|
|
20868
|
+
ngOnInit() {
|
|
20869
|
+
this.caseId = this.route.snapshot.params.cid;
|
|
20870
|
+
// Check if there's already a selected qualifying question from the service
|
|
20871
|
+
const savedSelection = this.qualifyingQuestionService.getQualifyingQuestionSelection();
|
|
20872
|
+
if (savedSelection) {
|
|
20873
|
+
this.qualifyingQuestionsControl.setValue(savedSelection);
|
|
20874
|
+
}
|
|
20875
|
+
}
|
|
20876
|
+
click() {
|
|
20877
|
+
this.router.navigate(['cases', 'case-details', this.caseId], { fragment: 'Queries' });
|
|
20878
|
+
}
|
|
20879
|
+
get displayError() {
|
|
20880
|
+
return this.qualifyingQuestionsControl.touched && this.qualifyingQuestionsControl.hasError('required');
|
|
20881
|
+
}
|
|
20882
|
+
onSelectionChange(qualifyingQuestion) {
|
|
20883
|
+
this.questionSelected.emit(qualifyingQuestion);
|
|
20884
|
+
}
|
|
20885
|
+
static ɵfac = function QualifyingQuestionOptionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QualifyingQuestionOptionsComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(QualifyingQuestionService)); };
|
|
20886
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionOptionsComponent, selectors: [["ccd-qualifying-question-options"]], inputs: { qualifyingQuestionsControl: "qualifyingQuestionsControl", qualifyingQuestions$: "qualifyingQuestions$" }, outputs: { questionSelected: "questionSelected" }, 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"], [1, "govuk-heading-m", "govuk-!-margin-top-10"], ["data-module", "govuk-radios", 1, "govuk-radios"], [4, "ngFor", "ngForOf"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["name", "qualifyingQuestionOption", "type", "radio", 1, "govuk-radios__input", 3, "change", "id", "formControl", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [1, "qm-qualifying-question__divider"]], template: function QualifyingQuestionOptionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20887
|
+
i0.ɵɵtemplate(0, QualifyingQuestionOptionsComponent_ng_container_0_Template, 14, 12, "ng-container", 0);
|
|
20888
|
+
} if (rf & 2) {
|
|
20889
|
+
i0.ɵɵproperty("ngIf", ctx.qualifyingQuestionsControl);
|
|
20890
|
+
} }, dependencies: [i5.NgForOf, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.FormControlDirective, i5.AsyncPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
20891
|
+
}
|
|
20892
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionOptionsComponent, [{
|
|
20893
|
+
type: Component,
|
|
20894
|
+
args: [{ selector: 'ccd-qualifying-question-options', template: "<ng-container *ngIf=\"qualifyingQuestionsControl\">\n <div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"displayError\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ 'Raise a new query' | rpxTranslate }}\n </h1>\n </legend>\n <h2 class=\"govuk-heading-m govuk-!-margin-top-10\">\n {{ 'What do you need help to do?' | rpxTranslate }}\n </h2>\n\n <ng-container *ngIf=\"displayError\">\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{\n qualifyingQuestionsErrorMessage.SELECT_AN_OPTION | rpxTranslate }}\n </p>\n </ng-container>\n\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <ng-container *ngFor=\"let qualifyingQuestion of qualifyingQuestions$ | async; let isLast = last\">\n <ng-container *ngIf=\"isLast\">\n <div class=\"qm-qualifying-question__divider\">{{ 'If your issue is not covered by the options above, raise a query:' | rpxTranslate }}</div>\n </ng-container>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" \n id=\"{{qualifyingQuestion.name}}\" \n name=\"qualifyingQuestionOption\"\n type=\"radio\" [formControl]=\"qualifyingQuestionsControl\" \n [value]=\"qualifyingQuestion\"\n (change)=\"onSelectionChange(qualifyingQuestion)\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"qualifyingQuestion.name\">{{ qualifyingQuestion.name |\n rpxTranslate }}</label>\n </div>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</ng-container>\n" }]
|
|
20895
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: QualifyingQuestionService }], { qualifyingQuestionsControl: [{
|
|
20896
|
+
type: Input
|
|
20897
|
+
}], qualifyingQuestions$: [{
|
|
20898
|
+
type: Input
|
|
20899
|
+
}], questionSelected: [{
|
|
20900
|
+
type: Output
|
|
20901
|
+
}] }); })();
|
|
20902
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionOptionsComponent, { className: "QualifyingQuestionOptionsComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-options/qualifying-question-options.component.ts", lineNumber: 13 }); })();
|
|
20903
|
+
|
|
20904
|
+
function QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template(rf, ctx) { if (rf & 1) {
|
|
20905
|
+
i0.ɵɵelement(0, "ccd-read-collection-field", 2);
|
|
20906
|
+
} if (rf & 2) {
|
|
20907
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
20908
|
+
i0.ɵɵproperty("caseField", ctx_r0.caseFieldWithAttachments);
|
|
20909
|
+
} }
|
|
20910
|
+
function QueryAttachmentsReadComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
20911
|
+
i0.ɵɵelementContainerStart(0);
|
|
20912
|
+
i0.ɵɵtemplate(1, QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template, 1, 1, "ccd-read-collection-field", 1);
|
|
20913
|
+
i0.ɵɵelementContainerEnd();
|
|
20914
|
+
} if (rf & 2) {
|
|
20915
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
20916
|
+
i0.ɵɵadvance();
|
|
20917
|
+
i0.ɵɵproperty("ngIf", (ctx_r0.attachments == null ? null : ctx_r0.attachments.length) > 0);
|
|
20918
|
+
} }
|
|
20919
|
+
class QueryAttachmentsReadComponent {
|
|
20920
|
+
attachments;
|
|
20921
|
+
caseFieldWithAttachments;
|
|
20922
|
+
ngOnChanges() {
|
|
20923
|
+
this.caseFieldWithAttachments = Object.assign(new CaseField(), {
|
|
20924
|
+
id: '',
|
|
20925
|
+
label: '',
|
|
20926
|
+
hint_text: '',
|
|
20927
|
+
field_type: Object.assign(new FieldType(), {
|
|
20928
|
+
id: 'QueryDocuments',
|
|
20929
|
+
type: 'QueryDocuments',
|
|
20930
|
+
min: null,
|
|
20931
|
+
max: null,
|
|
20932
|
+
regular_expression: null,
|
|
20933
|
+
fixed_list_items: [],
|
|
20934
|
+
complex_fields: [],
|
|
20935
|
+
collection_field_type: Object.assign(new FieldType(), {
|
|
20936
|
+
id: 'Document',
|
|
20937
|
+
type: 'Document',
|
|
20938
|
+
min: null,
|
|
20939
|
+
max: null,
|
|
20940
|
+
regular_expression: null,
|
|
20941
|
+
fixed_list_items: [],
|
|
20942
|
+
complex_fields: [],
|
|
20943
|
+
collection_field_type: null
|
|
20944
|
+
})
|
|
20945
|
+
}),
|
|
20946
|
+
display_context_parameter: '#COLLECTION(allowInsert,allowUpdate)',
|
|
20947
|
+
value: []
|
|
20948
|
+
});
|
|
20949
|
+
this.caseFieldWithAttachments.value = this.attachments;
|
|
20950
|
+
}
|
|
20951
|
+
static ɵfac = function QueryAttachmentsReadComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryAttachmentsReadComponent)(); };
|
|
20952
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryAttachmentsReadComponent, selectors: [["ccd-query-attachments-read"]], inputs: { attachments: "attachments" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "caseField", 4, "ngIf"], [3, "caseField"]], template: function QueryAttachmentsReadComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20953
|
+
i0.ɵɵtemplate(0, QueryAttachmentsReadComponent_ng_container_0_Template, 2, 1, "ng-container", 0);
|
|
20954
|
+
} if (rf & 2) {
|
|
20955
|
+
i0.ɵɵproperty("ngIf", (ctx.attachments == null ? null : ctx.attachments.length) > 0);
|
|
20956
|
+
} }, styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"], encapsulation: 2 });
|
|
20957
|
+
}
|
|
20958
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryAttachmentsReadComponent, [{
|
|
20959
|
+
type: Component,
|
|
20960
|
+
args: [{ selector: 'ccd-query-attachments-read', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"attachments?.length > 0\">\n <ccd-read-collection-field\n *ngIf=\"attachments?.length > 0\"\n [caseField]=\"caseFieldWithAttachments\"\n >\n </ccd-read-collection-field>\n</ng-container>\n", styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"] }]
|
|
20961
|
+
}], null, { attachments: [{
|
|
20962
|
+
type: Input
|
|
20963
|
+
}] }); })();
|
|
20964
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryAttachmentsReadComponent, { className: "QueryAttachmentsReadComponent", filePath: "lib/shared/components/palette/query-management/components/query-attachments-read/query-attachments-read.component.ts", lineNumber: 10 }); })();
|
|
20965
|
+
|
|
20966
|
+
function QueryCaseDetailsHeaderComponent_h1_0_Template(rf, ctx) { if (rf & 1) {
|
|
20967
|
+
i0.ɵɵelementStart(0, "h1", 2);
|
|
20968
|
+
i0.ɵɵtext(1);
|
|
20969
|
+
i0.ɵɵpipe(2, "ccdCaseReference");
|
|
20970
|
+
i0.ɵɵelementEnd();
|
|
20971
|
+
} if (rf & 2) {
|
|
20972
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
20973
|
+
i0.ɵɵadvance();
|
|
20974
|
+
i0.ɵɵtextInterpolate1("#", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseDetails.case_id), "");
|
|
20975
|
+
} }
|
|
20976
|
+
function QueryCaseDetailsHeaderComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
20977
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
20978
|
+
i0.ɵɵelement(1, "ccd-label-field", 4);
|
|
20979
|
+
i0.ɵɵelementEnd();
|
|
20980
|
+
} if (rf & 2) {
|
|
20981
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
20982
|
+
i0.ɵɵadvance();
|
|
20983
|
+
i0.ɵɵproperty("caseField", ctx_r0.caseTitle)("caseFields", ctx_r0.caseFields);
|
|
20984
|
+
} }
|
|
20985
|
+
class QueryCaseDetailsHeaderComponent {
|
|
20986
|
+
caseDetails;
|
|
20987
|
+
caseTitle;
|
|
20988
|
+
caseFields;
|
|
20989
|
+
ngOnInit() {
|
|
20990
|
+
this.caseTitle = new CaseField();
|
|
20991
|
+
this.caseTitle.label = this.caseDetails?.state?.title_display;
|
|
20992
|
+
this.caseFields = this.getCaseFieldsInfo();
|
|
20993
|
+
}
|
|
20994
|
+
getCaseFieldsInfo() {
|
|
20995
|
+
const caseDataFields = this.caseDetails?.tabs?.reduce((acc, tab) => {
|
|
20996
|
+
return acc.concat(tab.fields);
|
|
20997
|
+
}, []);
|
|
20998
|
+
return caseDataFields.concat(this.caseDetails.metadataFields);
|
|
20999
|
+
}
|
|
21000
|
+
static ɵfac = function QueryCaseDetailsHeaderComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCaseDetailsHeaderComponent)(); };
|
|
21001
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCaseDetailsHeaderComponent, selectors: [["ccd-query-case-details-header"]], inputs: { caseDetails: "caseDetails" }, decls: 2, vars: 2, consts: [["class", "heading-h1", 4, "ngIf"], ["class", "case-title", 4, "ngIf"], [1, "heading-h1"], [1, "case-title"], [3, "caseField", "caseFields"]], template: function QueryCaseDetailsHeaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21002
|
+
i0.ɵɵtemplate(0, QueryCaseDetailsHeaderComponent_h1_0_Template, 3, 3, "h1", 0)(1, QueryCaseDetailsHeaderComponent_div_1_Template, 2, 2, "div", 1);
|
|
21003
|
+
} if (rf & 2) {
|
|
21004
|
+
i0.ɵɵproperty("ngIf", !ctx.caseTitle.label);
|
|
21005
|
+
i0.ɵɵadvance();
|
|
21006
|
+
i0.ɵɵproperty("ngIf", ctx.caseTitle.label);
|
|
21007
|
+
} }, dependencies: [i5.NgIf, LabelFieldComponent, CaseReferencePipe], encapsulation: 2 });
|
|
21008
|
+
}
|
|
21009
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCaseDetailsHeaderComponent, [{
|
|
21010
|
+
type: Component,
|
|
21011
|
+
args: [{ selector: 'ccd-query-case-details-header', template: "<h1 *ngIf=\"!caseTitle.label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n<div *ngIf=\"caseTitle.label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n" }]
|
|
21012
|
+
}], null, { caseDetails: [{
|
|
21013
|
+
type: Input
|
|
21014
|
+
}] }); })();
|
|
21015
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCaseDetailsHeaderComponent, { className: "QueryCaseDetailsHeaderComponent", filePath: "lib/shared/components/palette/query-management/components/query-case-details-header/query-case-details-header.component.ts", lineNumber: 10 }); })();
|
|
21016
|
+
|
|
20640
21017
|
var QueryCreateContext;
|
|
20641
21018
|
(function (QueryCreateContext) {
|
|
20642
21019
|
QueryCreateContext["NEW_QUERY_QUALIFYING_QUESTION_OPTIONS"] = "NewQueryQualifyingQuestionOptions";
|
|
@@ -20849,428 +21226,6 @@ class QueryManagementUtils {
|
|
|
20849
21226
|
type: Injectable
|
|
20850
21227
|
}], null, null); })();
|
|
20851
21228
|
|
|
20852
|
-
const CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
|
|
20853
|
-
const FIELD_TYPE_COMPLEX = 'Complex';
|
|
20854
|
-
const DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
20855
|
-
const QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
|
|
20856
|
-
const QM_COLLECTION_PROMPT = 'promptQmCollection';
|
|
20857
|
-
const CIVIL_JURISDICTION = 'CIVIL';
|
|
20858
|
-
|
|
20859
|
-
class QueryManagementService {
|
|
20860
|
-
router;
|
|
20861
|
-
sessionStorageService;
|
|
20862
|
-
caseQueriesCollections;
|
|
20863
|
-
fieldId;
|
|
20864
|
-
constructor(router, sessionStorageService) {
|
|
20865
|
-
this.router = router;
|
|
20866
|
-
this.sessionStorageService = sessionStorageService;
|
|
20867
|
-
}
|
|
20868
|
-
generateCaseQueriesCollectionData(formGroup, queryCreateContext, queryItem, messageId // Get the message ID from route params (if present)
|
|
20869
|
-
) {
|
|
20870
|
-
let currentUserDetails;
|
|
20871
|
-
try {
|
|
20872
|
-
currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
20873
|
-
}
|
|
20874
|
-
catch (e) {
|
|
20875
|
-
console.error('Could not parse USER_DETAILS from session storage:', e);
|
|
20876
|
-
currentUserDetails = {};
|
|
20877
|
-
}
|
|
20878
|
-
const caseMessage = queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
20879
|
-
? QueryManagementUtils.getNewQueryData(formGroup, currentUserDetails)
|
|
20880
|
-
: QueryManagementUtils.getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails);
|
|
20881
|
-
const isNewQuery = queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
20882
|
-
// Check if the field ID has been set dynamically
|
|
20883
|
-
if (!this.fieldId) {
|
|
20884
|
-
console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
|
|
20885
|
-
this.router.navigate(['/', 'service-down']);
|
|
20886
|
-
throw new Error('Field ID for CaseQueriesCollection not found. Aborting query data generation.');
|
|
20887
|
-
}
|
|
20888
|
-
// Initialize new query data structure
|
|
20889
|
-
const newQueryData = {};
|
|
20890
|
-
if (this.caseQueriesCollections?.length) {
|
|
20891
|
-
let matchedCollection;
|
|
20892
|
-
// If it's not a new query, try to find the existing collection with the message ID
|
|
20893
|
-
if (!isNewQuery && messageId) {
|
|
20894
|
-
matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
|
|
20895
|
-
}
|
|
20896
|
-
if (matchedCollection) {
|
|
20897
|
-
// Append the new case message to the matched collection's caseMessages
|
|
20898
|
-
matchedCollection.caseMessages.push({
|
|
20899
|
-
id: null,
|
|
20900
|
-
value: caseMessage
|
|
20901
|
-
});
|
|
20902
|
-
// Add the matched collection to newQueryData
|
|
20903
|
-
newQueryData[this.fieldId] = {
|
|
20904
|
-
...matchedCollection, // Keep existing data intact
|
|
20905
|
-
caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
|
|
20906
|
-
};
|
|
20907
|
-
}
|
|
20908
|
-
else {
|
|
20909
|
-
// Use partyName from the first collection (assumption: all share the same party)
|
|
20910
|
-
const originalPartyName = this.caseQueriesCollections?.[0]?.partyName ?? currentUserDetails?.name;
|
|
20911
|
-
// If no collection matches, or it's a new query
|
|
20912
|
-
newQueryData[this.fieldId] = {
|
|
20913
|
-
partyName: originalPartyName,
|
|
20914
|
-
roleOnCase: '', // Not returned by CCD
|
|
20915
|
-
caseMessages: [
|
|
20916
|
-
{
|
|
20917
|
-
id: null,
|
|
20918
|
-
value: caseMessage
|
|
20919
|
-
}
|
|
20920
|
-
]
|
|
20921
|
-
};
|
|
20922
|
-
// If caseQueriesCollections is not empty, append its data
|
|
20923
|
-
newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
|
|
20924
|
-
}
|
|
20925
|
-
}
|
|
20926
|
-
else {
|
|
20927
|
-
// If there are no existing collections, create a new one (e.g., for new queries)
|
|
20928
|
-
newQueryData[this.fieldId] = {
|
|
20929
|
-
partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
|
|
20930
|
-
roleOnCase: '', // Not returned by CCD
|
|
20931
|
-
caseMessages: [
|
|
20932
|
-
{
|
|
20933
|
-
id: null,
|
|
20934
|
-
value: caseMessage
|
|
20935
|
-
}
|
|
20936
|
-
]
|
|
20937
|
-
};
|
|
20938
|
-
}
|
|
20939
|
-
return newQueryData;
|
|
20940
|
-
}
|
|
20941
|
-
setCaseQueriesCollectionData(eventData, queryCreateContext, caseDetails, messageId) {
|
|
20942
|
-
const resolvedFieldId = this.resolveFieldId(eventData, queryCreateContext, caseDetails, messageId);
|
|
20943
|
-
if (!resolvedFieldId) {
|
|
20944
|
-
console.error('Failed to resolve fieldId for CaseQueriesCollection. Cannot proceed.');
|
|
20945
|
-
return;
|
|
20946
|
-
}
|
|
20947
|
-
this.fieldId = resolvedFieldId;
|
|
20948
|
-
this.caseQueriesCollections = eventData.case_fields.reduce((acc, field) => {
|
|
20949
|
-
if (field.id === this.fieldId) {
|
|
20950
|
-
const extracted = QueryManagementUtils.extractCaseQueriesFromCaseField(field);
|
|
20951
|
-
if (extracted && typeof extracted === 'object') {
|
|
20952
|
-
acc.push(extracted);
|
|
20953
|
-
}
|
|
20954
|
-
}
|
|
20955
|
-
return acc;
|
|
20956
|
-
}, []);
|
|
20957
|
-
}
|
|
20958
|
-
resolveFieldId(eventData, queryCreateContext, caseDetails, messageId) {
|
|
20959
|
-
// Step 1: Filter candidate fields (must be editable CaseQueriesCollection fields)
|
|
20960
|
-
const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
|
|
20961
|
-
field.field_type.type === FIELD_TYPE_COMPLEX &&
|
|
20962
|
-
field.display_context !== DISPLAY_CONTEXT_READONLY);
|
|
20963
|
-
if (!candidateFields?.length) {
|
|
20964
|
-
console.warn('No editable CaseQueriesCollection fields found.');
|
|
20965
|
-
return null;
|
|
20966
|
-
}
|
|
20967
|
-
const numberOfCollections = candidateFields.length;
|
|
20968
|
-
const jurisdictionId = caseDetails?.case_type?.jurisdiction?.id ?? '';
|
|
20969
|
-
// Step 2: If messageId is present, try to locate the field containing that message
|
|
20970
|
-
if (messageId) {
|
|
20971
|
-
const fieldByMessage = candidateFields.find((field) => field?.value?.caseMessages?.some((msg) => msg?.value?.id === messageId));
|
|
20972
|
-
if (fieldByMessage) {
|
|
20973
|
-
return fieldByMessage.id; // Found the matching field by message ID
|
|
20974
|
-
}
|
|
20975
|
-
}
|
|
20976
|
-
// Step 3: Handle new queries
|
|
20977
|
-
if (queryCreateContext === QueryCreateContext.NEW_QUERY) {
|
|
20978
|
-
// If there's only one collection, use it
|
|
20979
|
-
if (numberOfCollections === 1) {
|
|
20980
|
-
return candidateFields[0].id;
|
|
20981
|
-
}
|
|
20982
|
-
// For multiple collections, use jurisdiction-based resolution strategy
|
|
20983
|
-
if (this.getCollectionSelectionMethod(jurisdictionId) === QM_SELECT_FIRST_COLLECTION) {
|
|
20984
|
-
// Choose the one with the lowest order from the first wizard page
|
|
20985
|
-
const firstOrdered = this.getCaseQueriesCollectionFieldOrderFromWizardPages(eventData);
|
|
20986
|
-
if (firstOrdered) {
|
|
20987
|
-
return firstOrdered.id;
|
|
20988
|
-
}
|
|
20989
|
-
}
|
|
20990
|
-
else {
|
|
20991
|
-
console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
|
|
20992
|
-
return null;
|
|
20993
|
-
}
|
|
20994
|
-
}
|
|
20995
|
-
// Step 4: Fallback — if none of the above succeeded
|
|
20996
|
-
console.warn('Could not determine fieldId for context:', queryCreateContext);
|
|
20997
|
-
return null;
|
|
20998
|
-
}
|
|
20999
|
-
getCaseQueriesCollectionFieldOrderFromWizardPages(eventData) {
|
|
21000
|
-
const candidateFields = eventData?.case_fields?.filter((field) => field.field_type.id === CASE_QUERIES_COLLECTION_ID &&
|
|
21001
|
-
field.field_type.type === FIELD_TYPE_COMPLEX &&
|
|
21002
|
-
field.display_context !== DISPLAY_CONTEXT_READONLY);
|
|
21003
|
-
if (!candidateFields?.length) {
|
|
21004
|
-
return undefined;
|
|
21005
|
-
}
|
|
21006
|
-
const firstPageFields = eventData?.wizard_pages?.[0]?.wizard_page_fields;
|
|
21007
|
-
if (!firstPageFields) {
|
|
21008
|
-
return undefined;
|
|
21009
|
-
}
|
|
21010
|
-
return candidateFields
|
|
21011
|
-
.map((field) => {
|
|
21012
|
-
const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
|
|
21013
|
-
return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
|
|
21014
|
-
})
|
|
21015
|
-
.sort((a, b) => a.order - b.order)[0]?.field;
|
|
21016
|
-
}
|
|
21017
|
-
getCollectionSelectionMethod(jurisdiction) {
|
|
21018
|
-
return jurisdiction.toUpperCase() === CIVIL_JURISDICTION ? QM_SELECT_FIRST_COLLECTION : QM_COLLECTION_PROMPT;
|
|
21019
|
-
}
|
|
21020
|
-
static ɵfac = function QueryManagementService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementService)(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
21021
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementService, factory: QueryManagementService.ɵfac, providedIn: 'root' });
|
|
21022
|
-
}
|
|
21023
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryManagementService, [{
|
|
21024
|
-
type: Injectable,
|
|
21025
|
-
args: [{ providedIn: 'root' }]
|
|
21026
|
-
}], () => [{ type: i1$1.Router }, { type: SessionStorageService }], null); })();
|
|
21027
|
-
|
|
21028
|
-
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
|
|
21029
|
-
i0.ɵɵelementContainerStart(0);
|
|
21030
|
-
i0.ɵɵelementStart(1, "p", 8)(2, "span", 9);
|
|
21031
|
-
i0.ɵɵtext(3);
|
|
21032
|
-
i0.ɵɵpipe(4, "rpxTranslate");
|
|
21033
|
-
i0.ɵɵelementEnd();
|
|
21034
|
-
i0.ɵɵtext(5);
|
|
21035
|
-
i0.ɵɵpipe(6, "rpxTranslate");
|
|
21036
|
-
i0.ɵɵelementEnd();
|
|
21037
|
-
i0.ɵɵelementContainerEnd();
|
|
21038
|
-
} if (rf & 2) {
|
|
21039
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
21040
|
-
i0.ɵɵadvance(3);
|
|
21041
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(4, 2, "Error:"), " ");
|
|
21042
|
-
i0.ɵɵadvance(2);
|
|
21043
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(6, 4, ctx_r0.qualifyingQuestionsErrorMessage.SELECT_AN_OPTION), " ");
|
|
21044
|
-
} }
|
|
21045
|
-
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
21046
|
-
i0.ɵɵelementContainerStart(0);
|
|
21047
|
-
i0.ɵɵelementStart(1, "div", 13);
|
|
21048
|
-
i0.ɵɵtext(2);
|
|
21049
|
-
i0.ɵɵpipe(3, "rpxTranslate");
|
|
21050
|
-
i0.ɵɵelementEnd();
|
|
21051
|
-
i0.ɵɵelementContainerEnd();
|
|
21052
|
-
} if (rf & 2) {
|
|
21053
|
-
i0.ɵɵadvance(2);
|
|
21054
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "If your issue is not covered by the options above, raise a query:"));
|
|
21055
|
-
} }
|
|
21056
|
-
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template(rf, ctx) { if (rf & 1) {
|
|
21057
|
-
const _r2 = i0.ɵɵgetCurrentView();
|
|
21058
|
-
i0.ɵɵelementContainerStart(0);
|
|
21059
|
-
i0.ɵɵtemplate(1, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_container_1_Template, 4, 3, "ng-container", 0);
|
|
21060
|
-
i0.ɵɵelementStart(2, "div", 10)(3, "input", 11);
|
|
21061
|
-
i0.ɵɵlistener("change", function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template_input_change_3_listener() { const qualifyingQuestion_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSelectionChange(qualifyingQuestion_r3)); });
|
|
21062
|
-
i0.ɵɵelementEnd();
|
|
21063
|
-
i0.ɵɵelementStart(4, "label", 12);
|
|
21064
|
-
i0.ɵɵtext(5);
|
|
21065
|
-
i0.ɵɵpipe(6, "rpxTranslate");
|
|
21066
|
-
i0.ɵɵelementEnd()();
|
|
21067
|
-
i0.ɵɵelementContainerEnd();
|
|
21068
|
-
} if (rf & 2) {
|
|
21069
|
-
const qualifyingQuestion_r3 = ctx.$implicit;
|
|
21070
|
-
const isLast_r4 = ctx.last;
|
|
21071
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
21072
|
-
i0.ɵɵadvance();
|
|
21073
|
-
i0.ɵɵproperty("ngIf", isLast_r4);
|
|
21074
|
-
i0.ɵɵadvance(2);
|
|
21075
|
-
i0.ɵɵpropertyInterpolate("id", qualifyingQuestion_r3.name);
|
|
21076
|
-
i0.ɵɵproperty("formControl", ctx_r0.qualifyingQuestionsControl)("value", qualifyingQuestion_r3);
|
|
21077
|
-
i0.ɵɵadvance();
|
|
21078
|
-
i0.ɵɵproperty("for", qualifyingQuestion_r3.name);
|
|
21079
|
-
i0.ɵɵadvance();
|
|
21080
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, qualifyingQuestion_r3.name));
|
|
21081
|
-
} }
|
|
21082
|
-
function QualifyingQuestionOptionsComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
21083
|
-
i0.ɵɵelementContainerStart(0);
|
|
21084
|
-
i0.ɵɵelementStart(1, "div", 1)(2, "fieldset", 2)(3, "legend", 3)(4, "h1", 4);
|
|
21085
|
-
i0.ɵɵtext(5);
|
|
21086
|
-
i0.ɵɵpipe(6, "rpxTranslate");
|
|
21087
|
-
i0.ɵɵelementEnd()();
|
|
21088
|
-
i0.ɵɵelementStart(7, "h2", 5);
|
|
21089
|
-
i0.ɵɵtext(8);
|
|
21090
|
-
i0.ɵɵpipe(9, "rpxTranslate");
|
|
21091
|
-
i0.ɵɵelementEnd();
|
|
21092
|
-
i0.ɵɵtemplate(10, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_10_Template, 7, 6, "ng-container", 0);
|
|
21093
|
-
i0.ɵɵelementStart(11, "div", 6);
|
|
21094
|
-
i0.ɵɵtemplate(12, QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template, 7, 8, "ng-container", 7);
|
|
21095
|
-
i0.ɵɵpipe(13, "async");
|
|
21096
|
-
i0.ɵɵelementEnd()()();
|
|
21097
|
-
i0.ɵɵelementContainerEnd();
|
|
21098
|
-
} if (rf & 2) {
|
|
21099
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
21100
|
-
i0.ɵɵadvance();
|
|
21101
|
-
i0.ɵɵclassProp("govuk-form-group--error", ctx_r0.displayError);
|
|
21102
|
-
i0.ɵɵadvance(4);
|
|
21103
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, "Raise a new query"), " ");
|
|
21104
|
-
i0.ɵɵadvance(3);
|
|
21105
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 8, "What do you need help to do?"), " ");
|
|
21106
|
-
i0.ɵɵadvance(2);
|
|
21107
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayError);
|
|
21108
|
-
i0.ɵɵadvance(2);
|
|
21109
|
-
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(13, 10, ctx_r0.qualifyingQuestions$));
|
|
21110
|
-
} }
|
|
21111
|
-
class QualifyingQuestionOptionsComponent {
|
|
21112
|
-
route;
|
|
21113
|
-
router;
|
|
21114
|
-
qualifyingQuestionService;
|
|
21115
|
-
qualifyingQuestionsControl;
|
|
21116
|
-
qualifyingQuestions$;
|
|
21117
|
-
questionSelected = new EventEmitter();
|
|
21118
|
-
qualifyingQuestionsErrorMessage = QualifyingQuestionsErrorMessage;
|
|
21119
|
-
caseId;
|
|
21120
|
-
constructor(route, router, qualifyingQuestionService) {
|
|
21121
|
-
this.route = route;
|
|
21122
|
-
this.router = router;
|
|
21123
|
-
this.qualifyingQuestionService = qualifyingQuestionService;
|
|
21124
|
-
}
|
|
21125
|
-
ngOnInit() {
|
|
21126
|
-
this.caseId = this.route.snapshot.params.cid;
|
|
21127
|
-
// Check if there's already a selected qualifying question from the service
|
|
21128
|
-
const savedSelection = this.qualifyingQuestionService.getQualifyingQuestionSelection();
|
|
21129
|
-
if (savedSelection) {
|
|
21130
|
-
this.qualifyingQuestionsControl.setValue(savedSelection);
|
|
21131
|
-
}
|
|
21132
|
-
}
|
|
21133
|
-
click() {
|
|
21134
|
-
this.router.navigate(['cases', 'case-details', this.caseId], { fragment: 'Queries' });
|
|
21135
|
-
}
|
|
21136
|
-
get displayError() {
|
|
21137
|
-
return this.qualifyingQuestionsControl.touched && this.qualifyingQuestionsControl.hasError('required');
|
|
21138
|
-
}
|
|
21139
|
-
onSelectionChange(qualifyingQuestion) {
|
|
21140
|
-
this.questionSelected.emit(qualifyingQuestion);
|
|
21141
|
-
}
|
|
21142
|
-
static ɵfac = function QualifyingQuestionOptionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QualifyingQuestionOptionsComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(QualifyingQuestionService)); };
|
|
21143
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionOptionsComponent, selectors: [["ccd-qualifying-question-options"]], inputs: { qualifyingQuestionsControl: "qualifyingQuestionsControl", qualifyingQuestions$: "qualifyingQuestions$" }, outputs: { questionSelected: "questionSelected" }, 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"], [1, "govuk-heading-m", "govuk-!-margin-top-10"], ["data-module", "govuk-radios", 1, "govuk-radios"], [4, "ngFor", "ngForOf"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["name", "qualifyingQuestionOption", "type", "radio", 1, "govuk-radios__input", 3, "change", "id", "formControl", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], [1, "qm-qualifying-question__divider"]], template: function QualifyingQuestionOptionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21144
|
-
i0.ɵɵtemplate(0, QualifyingQuestionOptionsComponent_ng_container_0_Template, 14, 12, "ng-container", 0);
|
|
21145
|
-
} if (rf & 2) {
|
|
21146
|
-
i0.ɵɵproperty("ngIf", ctx.qualifyingQuestionsControl);
|
|
21147
|
-
} }, dependencies: [i5.NgForOf, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.FormControlDirective, i5.AsyncPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
21148
|
-
}
|
|
21149
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionOptionsComponent, [{
|
|
21150
|
-
type: Component,
|
|
21151
|
-
args: [{ selector: 'ccd-qualifying-question-options', template: "<ng-container *ngIf=\"qualifyingQuestionsControl\">\n <div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"displayError\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ 'Raise a new query' | rpxTranslate }}\n </h1>\n </legend>\n <h2 class=\"govuk-heading-m govuk-!-margin-top-10\">\n {{ 'What do you need help to do?' | rpxTranslate }}\n </h2>\n\n <ng-container *ngIf=\"displayError\">\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{\n qualifyingQuestionsErrorMessage.SELECT_AN_OPTION | rpxTranslate }}\n </p>\n </ng-container>\n\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <ng-container *ngFor=\"let qualifyingQuestion of qualifyingQuestions$ | async; let isLast = last\">\n <ng-container *ngIf=\"isLast\">\n <div class=\"qm-qualifying-question__divider\">{{ 'If your issue is not covered by the options above, raise a query:' | rpxTranslate }}</div>\n </ng-container>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" \n id=\"{{qualifyingQuestion.name}}\" \n name=\"qualifyingQuestionOption\"\n type=\"radio\" [formControl]=\"qualifyingQuestionsControl\" \n [value]=\"qualifyingQuestion\"\n (change)=\"onSelectionChange(qualifyingQuestion)\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"qualifyingQuestion.name\">{{ qualifyingQuestion.name |\n rpxTranslate }}</label>\n </div>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</ng-container>\n" }]
|
|
21152
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: QualifyingQuestionService }], { qualifyingQuestionsControl: [{
|
|
21153
|
-
type: Input
|
|
21154
|
-
}], qualifyingQuestions$: [{
|
|
21155
|
-
type: Input
|
|
21156
|
-
}], questionSelected: [{
|
|
21157
|
-
type: Output
|
|
21158
|
-
}] }); })();
|
|
21159
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionOptionsComponent, { className: "QualifyingQuestionOptionsComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-options/qualifying-question-options.component.ts", lineNumber: 13 }); })();
|
|
21160
|
-
|
|
21161
|
-
function QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template(rf, ctx) { if (rf & 1) {
|
|
21162
|
-
i0.ɵɵelement(0, "ccd-read-collection-field", 2);
|
|
21163
|
-
} if (rf & 2) {
|
|
21164
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
21165
|
-
i0.ɵɵproperty("caseField", ctx_r0.caseFieldWithAttachments);
|
|
21166
|
-
} }
|
|
21167
|
-
function QueryAttachmentsReadComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
21168
|
-
i0.ɵɵelementContainerStart(0);
|
|
21169
|
-
i0.ɵɵtemplate(1, QueryAttachmentsReadComponent_ng_container_0_ccd_read_collection_field_1_Template, 1, 1, "ccd-read-collection-field", 1);
|
|
21170
|
-
i0.ɵɵelementContainerEnd();
|
|
21171
|
-
} if (rf & 2) {
|
|
21172
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
21173
|
-
i0.ɵɵadvance();
|
|
21174
|
-
i0.ɵɵproperty("ngIf", (ctx_r0.attachments == null ? null : ctx_r0.attachments.length) > 0);
|
|
21175
|
-
} }
|
|
21176
|
-
class QueryAttachmentsReadComponent {
|
|
21177
|
-
attachments;
|
|
21178
|
-
caseFieldWithAttachments;
|
|
21179
|
-
ngOnChanges() {
|
|
21180
|
-
this.caseFieldWithAttachments = Object.assign(new CaseField(), {
|
|
21181
|
-
id: '',
|
|
21182
|
-
label: '',
|
|
21183
|
-
hint_text: '',
|
|
21184
|
-
field_type: Object.assign(new FieldType(), {
|
|
21185
|
-
id: 'QueryDocuments',
|
|
21186
|
-
type: 'QueryDocuments',
|
|
21187
|
-
min: null,
|
|
21188
|
-
max: null,
|
|
21189
|
-
regular_expression: null,
|
|
21190
|
-
fixed_list_items: [],
|
|
21191
|
-
complex_fields: [],
|
|
21192
|
-
collection_field_type: Object.assign(new FieldType(), {
|
|
21193
|
-
id: 'Document',
|
|
21194
|
-
type: 'Document',
|
|
21195
|
-
min: null,
|
|
21196
|
-
max: null,
|
|
21197
|
-
regular_expression: null,
|
|
21198
|
-
fixed_list_items: [],
|
|
21199
|
-
complex_fields: [],
|
|
21200
|
-
collection_field_type: null
|
|
21201
|
-
})
|
|
21202
|
-
}),
|
|
21203
|
-
display_context_parameter: '#COLLECTION(allowInsert,allowUpdate)',
|
|
21204
|
-
value: []
|
|
21205
|
-
});
|
|
21206
|
-
this.caseFieldWithAttachments.value = this.attachments;
|
|
21207
|
-
}
|
|
21208
|
-
static ɵfac = function QueryAttachmentsReadComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryAttachmentsReadComponent)(); };
|
|
21209
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryAttachmentsReadComponent, selectors: [["ccd-query-attachments-read"]], inputs: { attachments: "attachments" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "caseField", 4, "ngIf"], [3, "caseField"]], template: function QueryAttachmentsReadComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21210
|
-
i0.ɵɵtemplate(0, QueryAttachmentsReadComponent_ng_container_0_Template, 2, 1, "ng-container", 0);
|
|
21211
|
-
} if (rf & 2) {
|
|
21212
|
-
i0.ɵɵproperty("ngIf", (ctx.attachments == null ? null : ctx.attachments.length) > 0);
|
|
21213
|
-
} }, styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"], encapsulation: 2 });
|
|
21214
|
-
}
|
|
21215
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryAttachmentsReadComponent, [{
|
|
21216
|
-
type: Component,
|
|
21217
|
-
args: [{ selector: 'ccd-query-attachments-read', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"attachments?.length > 0\">\n <ccd-read-collection-field\n *ngIf=\"attachments?.length > 0\"\n [caseField]=\"caseFieldWithAttachments\"\n >\n </ccd-read-collection-field>\n</ng-container>\n", styles: ["ccd-query-attachments-read .collection-field-table tr>td{border-bottom:none;padding-bottom:0}\n"] }]
|
|
21218
|
-
}], null, { attachments: [{
|
|
21219
|
-
type: Input
|
|
21220
|
-
}] }); })();
|
|
21221
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryAttachmentsReadComponent, { className: "QueryAttachmentsReadComponent", filePath: "lib/shared/components/palette/query-management/components/query-attachments-read/query-attachments-read.component.ts", lineNumber: 10 }); })();
|
|
21222
|
-
|
|
21223
|
-
function QueryCaseDetailsHeaderComponent_h1_0_Template(rf, ctx) { if (rf & 1) {
|
|
21224
|
-
i0.ɵɵelementStart(0, "h1", 2);
|
|
21225
|
-
i0.ɵɵtext(1);
|
|
21226
|
-
i0.ɵɵpipe(2, "ccdCaseReference");
|
|
21227
|
-
i0.ɵɵelementEnd();
|
|
21228
|
-
} if (rf & 2) {
|
|
21229
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
21230
|
-
i0.ɵɵadvance();
|
|
21231
|
-
i0.ɵɵtextInterpolate1("#", i0.ɵɵpipeBind1(2, 1, ctx_r0.caseDetails.case_id), "");
|
|
21232
|
-
} }
|
|
21233
|
-
function QueryCaseDetailsHeaderComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
21234
|
-
i0.ɵɵelementStart(0, "div", 3);
|
|
21235
|
-
i0.ɵɵelement(1, "ccd-label-field", 4);
|
|
21236
|
-
i0.ɵɵelementEnd();
|
|
21237
|
-
} if (rf & 2) {
|
|
21238
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
21239
|
-
i0.ɵɵadvance();
|
|
21240
|
-
i0.ɵɵproperty("caseField", ctx_r0.caseTitle)("caseFields", ctx_r0.caseFields);
|
|
21241
|
-
} }
|
|
21242
|
-
class QueryCaseDetailsHeaderComponent {
|
|
21243
|
-
caseDetails;
|
|
21244
|
-
caseTitle;
|
|
21245
|
-
caseFields;
|
|
21246
|
-
ngOnInit() {
|
|
21247
|
-
this.caseTitle = new CaseField();
|
|
21248
|
-
this.caseTitle.label = this.caseDetails?.state?.title_display;
|
|
21249
|
-
this.caseFields = this.getCaseFieldsInfo();
|
|
21250
|
-
}
|
|
21251
|
-
getCaseFieldsInfo() {
|
|
21252
|
-
const caseDataFields = this.caseDetails?.tabs?.reduce((acc, tab) => {
|
|
21253
|
-
return acc.concat(tab.fields);
|
|
21254
|
-
}, []);
|
|
21255
|
-
return caseDataFields.concat(this.caseDetails.metadataFields);
|
|
21256
|
-
}
|
|
21257
|
-
static ɵfac = function QueryCaseDetailsHeaderComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCaseDetailsHeaderComponent)(); };
|
|
21258
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCaseDetailsHeaderComponent, selectors: [["ccd-query-case-details-header"]], inputs: { caseDetails: "caseDetails" }, decls: 2, vars: 2, consts: [["class", "heading-h1", 4, "ngIf"], ["class", "case-title", 4, "ngIf"], [1, "heading-h1"], [1, "case-title"], [3, "caseField", "caseFields"]], template: function QueryCaseDetailsHeaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21259
|
-
i0.ɵɵtemplate(0, QueryCaseDetailsHeaderComponent_h1_0_Template, 3, 3, "h1", 0)(1, QueryCaseDetailsHeaderComponent_div_1_Template, 2, 2, "div", 1);
|
|
21260
|
-
} if (rf & 2) {
|
|
21261
|
-
i0.ɵɵproperty("ngIf", !ctx.caseTitle.label);
|
|
21262
|
-
i0.ɵɵadvance();
|
|
21263
|
-
i0.ɵɵproperty("ngIf", ctx.caseTitle.label);
|
|
21264
|
-
} }, dependencies: [i5.NgIf, LabelFieldComponent, CaseReferencePipe], encapsulation: 2 });
|
|
21265
|
-
}
|
|
21266
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCaseDetailsHeaderComponent, [{
|
|
21267
|
-
type: Component,
|
|
21268
|
-
args: [{ selector: 'ccd-query-case-details-header', template: "<h1 *ngIf=\"!caseTitle.label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n<div *ngIf=\"caseTitle.label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n" }]
|
|
21269
|
-
}], null, { caseDetails: [{
|
|
21270
|
-
type: Input
|
|
21271
|
-
}] }); })();
|
|
21272
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCaseDetailsHeaderComponent, { className: "QueryCaseDetailsHeaderComponent", filePath: "lib/shared/components/palette/query-management/components/query-case-details-header/query-case-details-header.component.ts", lineNumber: 10 }); })();
|
|
21273
|
-
|
|
21274
21229
|
function QueryCheckYourAnswersComponent_div_0_div_2_li_6_Template(rf, ctx) { if (rf & 1) {
|
|
21275
21230
|
i0.ɵɵelementStart(0, "li")(1, "a", 28);
|
|
21276
21231
|
i0.ɵɵtext(2);
|
|
@@ -21596,27 +21551,20 @@ class QueryCheckYourAnswersComponent {
|
|
|
21596
21551
|
casesService;
|
|
21597
21552
|
caseNotifier;
|
|
21598
21553
|
workAllocationService;
|
|
21554
|
+
sessionStorageService;
|
|
21599
21555
|
qualifyingQuestionService;
|
|
21600
|
-
queryManagementService;
|
|
21601
|
-
errorNotifierService;
|
|
21602
|
-
alertService;
|
|
21603
21556
|
RAISE_A_QUERY_EVENT_TRIGGER_ID = 'queryManagementRaiseQuery';
|
|
21604
21557
|
RESPOND_TO_QUERY_EVENT_TRIGGER_ID = 'queryManagementRespondQuery';
|
|
21605
21558
|
CASE_QUERIES_COLLECTION_ID = 'CaseQueriesCollection';
|
|
21606
|
-
static TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
|
|
21607
|
-
static TRIGGER_TEXT_START = 'Continue';
|
|
21608
21559
|
FIELD_TYPE_COMPLEX = 'Complex';
|
|
21609
21560
|
DISPLAY_CONTEXT_READONLY = 'READONLY';
|
|
21610
21561
|
QM_SELECT_FIRST_COLLECTION = 'selectFirstCollection';
|
|
21611
21562
|
QM_COLLECTION_PROMPT = 'promptQmCollection';
|
|
21612
21563
|
CIVIL_JURISDICTION = 'CIVIL';
|
|
21613
|
-
triggerTextStart = QueryCheckYourAnswersComponent.TRIGGER_TEXT_START;
|
|
21614
|
-
triggerTextIgnoreWarnings = QueryCheckYourAnswersComponent.TRIGGER_TEXT_CONTINUE;
|
|
21615
21564
|
formGroup;
|
|
21616
21565
|
queryItem;
|
|
21617
21566
|
queryCreateContext;
|
|
21618
21567
|
eventData = null;
|
|
21619
|
-
qmCaseQueriesCollectionData;
|
|
21620
21568
|
backClicked = new EventEmitter();
|
|
21621
21569
|
querySubmitted = new EventEmitter();
|
|
21622
21570
|
callbackConfirmationMessage = new EventEmitter();
|
|
@@ -21635,24 +21583,20 @@ class QueryCheckYourAnswersComponent {
|
|
|
21635
21583
|
filteredTasks = [];
|
|
21636
21584
|
readyToSubmit;
|
|
21637
21585
|
isSubmitting = false;
|
|
21638
|
-
messgaeId;
|
|
21639
21586
|
callbackErrorsSubject = new Subject();
|
|
21640
21587
|
error;
|
|
21641
|
-
constructor(route, router, casesService, caseNotifier, workAllocationService,
|
|
21588
|
+
constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, qualifyingQuestionService) {
|
|
21642
21589
|
this.route = route;
|
|
21643
21590
|
this.router = router;
|
|
21644
21591
|
this.casesService = casesService;
|
|
21645
21592
|
this.caseNotifier = caseNotifier;
|
|
21646
21593
|
this.workAllocationService = workAllocationService;
|
|
21594
|
+
this.sessionStorageService = sessionStorageService;
|
|
21647
21595
|
this.qualifyingQuestionService = qualifyingQuestionService;
|
|
21648
|
-
this.queryManagementService = queryManagementService;
|
|
21649
|
-
this.errorNotifierService = errorNotifierService;
|
|
21650
|
-
this.alertService = alertService;
|
|
21651
21596
|
}
|
|
21652
21597
|
ngOnInit() {
|
|
21653
21598
|
this.queryId = this.route.snapshot.params.qid;
|
|
21654
21599
|
this.tid = this.route.snapshot.queryParams?.tid;
|
|
21655
|
-
this.messgaeId = this.route.snapshot.params.dataid;
|
|
21656
21600
|
this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
|
|
21657
21601
|
this.caseDetails = caseDetails;
|
|
21658
21602
|
// Find the appropriate event trigger based on the queryCreateContext
|
|
@@ -21681,23 +21625,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21681
21625
|
}
|
|
21682
21626
|
},
|
|
21683
21627
|
error: (error) => {
|
|
21628
|
+
console.error('Error in searchTasksSubscription:', error);
|
|
21684
21629
|
this.readyToSubmit = false;
|
|
21685
|
-
if (error.status !== 401 && error.status !== 403) {
|
|
21686
|
-
this.errorNotifierService.announceError(error);
|
|
21687
|
-
this.alertService.error({ phrase: error.message });
|
|
21688
|
-
console.error('Error occurred while fetching event data:', error);
|
|
21689
|
-
this.callbackErrorsSubject.next(error);
|
|
21690
|
-
}
|
|
21691
|
-
else {
|
|
21692
|
-
this.errorMessages = [
|
|
21693
|
-
{
|
|
21694
|
-
title: 'Error',
|
|
21695
|
-
description: 'Something unexpected happened. Please try again later.',
|
|
21696
|
-
fieldId: 'field-id'
|
|
21697
|
-
}
|
|
21698
|
-
];
|
|
21699
|
-
}
|
|
21700
|
-
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21701
21630
|
}
|
|
21702
21631
|
});
|
|
21703
21632
|
}
|
|
@@ -21708,7 +21637,6 @@ class QueryCheckYourAnswersComponent {
|
|
|
21708
21637
|
ngOnDestroy() {
|
|
21709
21638
|
this.createEventSubscription?.unsubscribe();
|
|
21710
21639
|
this.searchTasksSubscription?.unsubscribe();
|
|
21711
|
-
this.callbackErrorsSubject?.unsubscribe();
|
|
21712
21640
|
}
|
|
21713
21641
|
goBack() {
|
|
21714
21642
|
this.backClicked.emit(true);
|
|
@@ -21717,7 +21645,20 @@ class QueryCheckYourAnswersComponent {
|
|
|
21717
21645
|
if (this.isSubmitting) {
|
|
21718
21646
|
return;
|
|
21719
21647
|
}
|
|
21720
|
-
|
|
21648
|
+
// Check if fieldId is null or undefined
|
|
21649
|
+
if (!this.fieldId) {
|
|
21650
|
+
console.error('Error: Field ID is missing. Cannot proceed with submission.');
|
|
21651
|
+
this.errorMessages = [
|
|
21652
|
+
{
|
|
21653
|
+
title: 'Error',
|
|
21654
|
+
description: 'This case is not configured for query management.',
|
|
21655
|
+
fieldId: 'field-id'
|
|
21656
|
+
}
|
|
21657
|
+
];
|
|
21658
|
+
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21659
|
+
return;
|
|
21660
|
+
}
|
|
21661
|
+
const data = this.generateCaseQueriesCollectionData();
|
|
21721
21662
|
const createEvent$ = this.createEvent(data);
|
|
21722
21663
|
this.isSubmitting = true;
|
|
21723
21664
|
if (this.queryCreateContext === QueryCreateContext.RESPOND) {
|
|
@@ -21778,7 +21719,172 @@ class QueryCheckYourAnswersComponent {
|
|
|
21778
21719
|
handleError(error) {
|
|
21779
21720
|
console.error('Error in API calls:', error);
|
|
21780
21721
|
this.isSubmitting = false;
|
|
21781
|
-
this.
|
|
21722
|
+
if (this.isServiceErrorFound(error)) {
|
|
21723
|
+
this.error = null;
|
|
21724
|
+
this.callbackErrorsSubject.next(error);
|
|
21725
|
+
}
|
|
21726
|
+
else {
|
|
21727
|
+
if (error && error.status !== 401 && error.status !== 403) {
|
|
21728
|
+
this.error = error;
|
|
21729
|
+
}
|
|
21730
|
+
else {
|
|
21731
|
+
this.router.navigate(['/', 'service-down']);
|
|
21732
|
+
}
|
|
21733
|
+
}
|
|
21734
|
+
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
21735
|
+
}
|
|
21736
|
+
generateCaseQueriesCollectionData() {
|
|
21737
|
+
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
21738
|
+
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
21739
|
+
? QueryManagementUtils.getNewQueryData(this.formGroup, currentUserDetails)
|
|
21740
|
+
: QueryManagementUtils.getRespondOrFollowupQueryData(this.formGroup, this.queryItem, currentUserDetails);
|
|
21741
|
+
const messageId = this.route.snapshot.params.dataid; // Get the message ID from route params (if present)
|
|
21742
|
+
const isNewQuery = this.queryCreateContext === QueryCreateContext.NEW_QUERY; // Check if this is a new query
|
|
21743
|
+
// Check if the field ID has been set dynamically
|
|
21744
|
+
if (!this.fieldId) {
|
|
21745
|
+
console.error('Error: Field ID for CaseQueriesCollection not found. Cannot proceed with data generation.');
|
|
21746
|
+
this.router.navigate(['/', 'service-down']);
|
|
21747
|
+
}
|
|
21748
|
+
// Initialize new query data structure
|
|
21749
|
+
const newQueryData = {};
|
|
21750
|
+
if (this.caseQueriesCollections?.length) {
|
|
21751
|
+
let matchedCollection;
|
|
21752
|
+
// If it's not a new query, try to find the existing collection with the message ID
|
|
21753
|
+
if (!isNewQuery && messageId) {
|
|
21754
|
+
matchedCollection = this.caseQueriesCollections.find((collection) => collection.caseMessages.some((message) => message.value.id === messageId));
|
|
21755
|
+
}
|
|
21756
|
+
if (matchedCollection) {
|
|
21757
|
+
// Append the new case message to the matched collection's caseMessages
|
|
21758
|
+
matchedCollection.caseMessages.push({
|
|
21759
|
+
id: null,
|
|
21760
|
+
value: caseMessage
|
|
21761
|
+
});
|
|
21762
|
+
// Add the matched collection to newQueryData
|
|
21763
|
+
newQueryData[this.fieldId] = {
|
|
21764
|
+
...matchedCollection, // Keep existing data intact
|
|
21765
|
+
caseMessages: [...matchedCollection.caseMessages] // Append the updated messages array
|
|
21766
|
+
};
|
|
21767
|
+
}
|
|
21768
|
+
else {
|
|
21769
|
+
// Use partyName from the first collection (assumption: all share the same party)
|
|
21770
|
+
const originalPartyName = this.caseQueriesCollections[0].partyName;
|
|
21771
|
+
// If no collection matches, or it's a new query
|
|
21772
|
+
newQueryData[this.fieldId] = {
|
|
21773
|
+
partyName: originalPartyName,
|
|
21774
|
+
roleOnCase: '', // Not returned by CCD
|
|
21775
|
+
caseMessages: [
|
|
21776
|
+
{
|
|
21777
|
+
id: null,
|
|
21778
|
+
value: caseMessage
|
|
21779
|
+
}
|
|
21780
|
+
]
|
|
21781
|
+
};
|
|
21782
|
+
// If caseQueriesCollections is not empty, append its data
|
|
21783
|
+
newQueryData[this.fieldId].caseMessages.push(...this.caseQueriesCollections.flatMap((collection) => collection.caseMessages));
|
|
21784
|
+
}
|
|
21785
|
+
}
|
|
21786
|
+
else {
|
|
21787
|
+
// If there are no existing collections, create a new one (e.g., for new queries)
|
|
21788
|
+
newQueryData[this.fieldId] = {
|
|
21789
|
+
partyName: currentUserDetails?.name || `${currentUserDetails?.forename} ${currentUserDetails?.surname}`, // Not returned by CCD
|
|
21790
|
+
roleOnCase: '', // Not returned by CCD
|
|
21791
|
+
caseMessages: [
|
|
21792
|
+
{
|
|
21793
|
+
id: null,
|
|
21794
|
+
value: caseMessage
|
|
21795
|
+
}
|
|
21796
|
+
]
|
|
21797
|
+
};
|
|
21798
|
+
}
|
|
21799
|
+
return newQueryData;
|
|
21800
|
+
}
|
|
21801
|
+
setCaseQueriesCollectionData() {
|
|
21802
|
+
if (this.eventData?.case_fields?.length) {
|
|
21803
|
+
// Workaround for multiple qmCaseQueriesCollections that are not to be appearing in the eventData
|
|
21804
|
+
// Counts number qmCaseQueriesCollections
|
|
21805
|
+
const numberOfCaseQueriesCollections = this.eventData?.case_fields?.filter((caseField) => caseField.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
|
|
21806
|
+
caseField.field_type.type === this.FIELD_TYPE_COMPLEX && caseField.display_context !== this.DISPLAY_CONTEXT_READONLY)?.length || 0;
|
|
21807
|
+
this.caseQueriesCollections = this.eventData.case_fields.reduce((acc, caseField) => {
|
|
21808
|
+
// Extract the ID based on conditions, updating this.fieldId dynamically
|
|
21809
|
+
this.extractCaseQueryId(caseField, numberOfCaseQueriesCollections);
|
|
21810
|
+
const extractedCaseQueriesFromCaseField = QueryManagementUtils.extractCaseQueriesFromCaseField(caseField);
|
|
21811
|
+
if (extractedCaseQueriesFromCaseField && typeof extractedCaseQueriesFromCaseField === 'object') {
|
|
21812
|
+
acc.push(extractedCaseQueriesFromCaseField);
|
|
21813
|
+
}
|
|
21814
|
+
return acc;
|
|
21815
|
+
}, []);
|
|
21816
|
+
}
|
|
21817
|
+
}
|
|
21818
|
+
extractCaseQueryId(data, count) {
|
|
21819
|
+
const { id, value } = data;
|
|
21820
|
+
const messageId = this.route.snapshot.params.dataid;
|
|
21821
|
+
// Check if the field_type matches CaseQueriesCollection and type is Complex
|
|
21822
|
+
if (data.field_type.id === this.CASE_QUERIES_COLLECTION_ID && data.field_type.type === this.FIELD_TYPE_COMPLEX) {
|
|
21823
|
+
if (this.isNewQueryContext(data)) {
|
|
21824
|
+
// If there is more than one qmCaseQueriesCollection, pick the one with the lowest order
|
|
21825
|
+
if (count > 1) {
|
|
21826
|
+
if (!this.handleMultipleCollections()) {
|
|
21827
|
+
return;
|
|
21828
|
+
}
|
|
21829
|
+
}
|
|
21830
|
+
else {
|
|
21831
|
+
// Set the field ID dynamically based on the extracted data
|
|
21832
|
+
this.fieldId = id; // Store the ID for use in generating newQueryData
|
|
21833
|
+
}
|
|
21834
|
+
}
|
|
21835
|
+
// If messageId is present, find the corresponding case message
|
|
21836
|
+
this.setMessageFieldId(messageId, value, id);
|
|
21837
|
+
}
|
|
21838
|
+
}
|
|
21839
|
+
setMessageFieldId(messageId, value, id) {
|
|
21840
|
+
if (messageId && value?.caseMessages) {
|
|
21841
|
+
// If a matching message is found, set the fieldId to the corresponding id
|
|
21842
|
+
const matchedMessage = value?.caseMessages?.find((message) => message.value.id === messageId);
|
|
21843
|
+
if (matchedMessage) {
|
|
21844
|
+
this.fieldId = id;
|
|
21845
|
+
}
|
|
21846
|
+
}
|
|
21847
|
+
}
|
|
21848
|
+
isNewQueryContext(data) {
|
|
21849
|
+
return this.queryCreateContext === QueryCreateContext.NEW_QUERY && data.display_context !== this.DISPLAY_CONTEXT_READONLY;
|
|
21850
|
+
}
|
|
21851
|
+
handleMultipleCollections() {
|
|
21852
|
+
const jurisdictionId = this.caseDetails?.case_type?.jurisdiction?.id;
|
|
21853
|
+
if (!jurisdictionId) {
|
|
21854
|
+
console.error('Jurisdiction ID is missing.');
|
|
21855
|
+
return false;
|
|
21856
|
+
}
|
|
21857
|
+
if (this.getCollectionSelectionMethod(jurisdictionId) === this.QM_SELECT_FIRST_COLLECTION) {
|
|
21858
|
+
// Pick the collection with the lowest order
|
|
21859
|
+
this.fieldId = this.getCaseQueriesCollectionFieldOrderFromWizardPages()?.id;
|
|
21860
|
+
}
|
|
21861
|
+
else {
|
|
21862
|
+
// Display Error, for now, until EXUI-2644 is implemented
|
|
21863
|
+
console.error(`Error: Multiple CaseQueriesCollections are not supported yet for the ${jurisdictionId} jurisdiction`);
|
|
21864
|
+
return false;
|
|
21865
|
+
}
|
|
21866
|
+
return true;
|
|
21867
|
+
}
|
|
21868
|
+
getCaseQueriesCollectionFieldOrderFromWizardPages() {
|
|
21869
|
+
const candidateFields = this.eventData?.case_fields?.filter((field) => field.field_type.id === this.CASE_QUERIES_COLLECTION_ID &&
|
|
21870
|
+
field.field_type.type === this.FIELD_TYPE_COMPLEX &&
|
|
21871
|
+
field.display_context !== this.DISPLAY_CONTEXT_READONLY);
|
|
21872
|
+
if (!candidateFields?.length) {
|
|
21873
|
+
return undefined;
|
|
21874
|
+
}
|
|
21875
|
+
const firstPageFields = this.eventData?.wizard_pages?.[0]?.wizard_page_fields;
|
|
21876
|
+
if (!firstPageFields) {
|
|
21877
|
+
return undefined;
|
|
21878
|
+
}
|
|
21879
|
+
return candidateFields
|
|
21880
|
+
.map((field) => {
|
|
21881
|
+
const wizardField = firstPageFields.find((f) => f.case_field_id === field.id);
|
|
21882
|
+
return { field, order: wizardField?.order ?? Number.MAX_SAFE_INTEGER };
|
|
21883
|
+
})
|
|
21884
|
+
.sort((a, b) => a.order - b.order)[0]?.field;
|
|
21885
|
+
}
|
|
21886
|
+
getCollectionSelectionMethod(jurisdiction) {
|
|
21887
|
+
return jurisdiction.toUpperCase() === this.CIVIL_JURISDICTION ? this.QM_SELECT_FIRST_COLLECTION : this.QM_COLLECTION_PROMPT;
|
|
21782
21888
|
}
|
|
21783
21889
|
getDocumentAttachments() {
|
|
21784
21890
|
const attachmentsValue = this.formGroup.get('attachments').value;
|
|
@@ -21790,14 +21896,8 @@ class QueryCheckYourAnswersComponent {
|
|
|
21790
21896
|
isServiceErrorFound(error) {
|
|
21791
21897
|
return !!(error?.callbackErrors?.length);
|
|
21792
21898
|
}
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
21796
|
-
}
|
|
21797
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
21798
|
-
}
|
|
21799
|
-
static ɵfac = function QueryCheckYourAnswersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(QualifyingQuestionService), i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(AlertService)); };
|
|
21800
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData", qmCaseQueriesCollectionData: "qmCaseQueriesCollectionData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21899
|
+
static ɵfac = function QueryCheckYourAnswersComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryCheckYourAnswersComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(QualifyingQuestionService)); };
|
|
21900
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCheckYourAnswersComponent, selectors: [["ccd-query-check-your-answers"]], inputs: { formGroup: "formGroup", queryItem: "queryItem", queryCreateContext: "queryCreateContext", eventData: "eventData" }, outputs: { backClicked: "backClicked", querySubmitted: "querySubmitted", callbackConfirmationMessage: "callbackConfirmationMessage" }, decls: 1, vars: 1, consts: [["defaultCheckYourAnswersTitle", ""], ["isHearingRelatedFalse", ""], ["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-two-thirds-from-desktop"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsSubject"], [4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfElse"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-summary-list govuk-!-margin-bottom-0", 4, "ngIf"], [1, "govuk-summary-list", "govuk-!-margin-bottom-0"], [1, "govuk-summary-list__row"], [1, "govuk-summary-list__key"], [1, "govuk-summary-list__value"], [1, "govuk-summary-list__actions"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", "govuk-!-margin-right-3", 3, "click"], ["data-module", "govuk-button", "type", "submit", 1, "govuk-button", 3, "click"], [3, "eventCompletionParams"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0)", 1, "validation-error", 3, "id"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "govuk-caption-l"], ["href", "javascript:void(0)", "class", "govuk-link", 3, "click", 4, "ngIf"], ["class", "govuk-summary-list__row", 4, "ngIf"], [1, "govuk-summary-list__value", "govuk-summary-list__value--documentAttached"], [3, "attachments", 4, "ngIf"], [3, "attachments"]], template: function QueryCheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21801
21901
|
i0.ɵɵtemplate(0, QueryCheckYourAnswersComponent_div_0_Template, 36, 25, "div", 2);
|
|
21802
21902
|
} if (rf & 2) {
|
|
21803
21903
|
i0.ɵɵproperty("ngIf", ctx.readyToSubmit);
|
|
@@ -21806,7 +21906,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21806
21906
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCheckYourAnswersComponent, [{
|
|
21807
21907
|
type: Component,
|
|
21808
21908
|
args: [{ selector: 'ccd-query-check-your-answers', template: "<div class=\"govuk-grid-row\" *ngIf=\"readyToSubmit\">\n <div class=\"govuk-grid-column-two-thirds-from-desktop\">\n <!-- Error message summary -->\n <div *ngIf=\"errorMessages.length > 0\" class=\"govuk-error-summary\"\n aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\"\n data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{ 'There is a problem' | rpxTranslate }}\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a [id]=\"'error-' + errorMessage.fieldId\" href=\"javascript:void(0)\"\n class=\"validation-error\">{{ errorMessage.description | rpxTranslate }}</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"callbackErrorsSubject\"></ccd-callback-errors>\n\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n </ng-container>\n\n <h1 class=\"govuk-heading-l\">\n <ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND; else defaultCheckYourAnswersTitle\">\n {{ 'Review query response details' | rpxTranslate }}\n </ng-container>\n\n <ng-template #defaultCheckYourAnswersTitle>\n {{ 'Review query details' | rpxTranslate }}\n </ng-template>\n </h1>\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <dl *ngIf=\"queryCreateContext !== queryCreateContextEnum.FOLLOWUP\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Submitted query' : 'Query subject' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? queryItem.subject : formGroup.get('subject')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" \n href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query detail' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('body')?.value }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.NEW_QUERY\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <ng-container *ngIf=\"formGroup.get('isHearingRelated')?.value === true; else isHearingRelatedFalse\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </ng-container>\n <ng-template #isHearingRelatedFalse>\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </ng-template>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n\n <div *ngIf=\"formGroup.get('isHearingRelated')?.value\" class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY\n ? 'What is the date of the hearing?'\n : 'What is the date of the hearing your query is related to?' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('hearingDate')?.value | date: 'dd MMM yyyy' }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-0\" *ngIf=\"this.formGroup.get('attachments').value.length > 0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ queryCreateContext === queryCreateContextEnum.NEW_QUERY ? 'Upload a file to the query' : 'Document attached' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value govuk-summary-list__value--documentAttached\">\n <ccd-query-attachments-read\n *ngIf=\"this.formGroup.get('attachments').value\"\n [attachments]=\"attachments\"\n >\n </ccd-query-attachments-read>\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <dl *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND\" class=\"govuk-summary-list govuk-!-margin-bottom-0\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n {{ 'Closing the query' | rpxTranslate }}\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ formGroup.get('closeQuery')?.value ? 'I want to close this query' : 'No answer' | rpxTranslate }}\n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a href=\"javascript:void(0)\" class=\"govuk-link\" (click)=\"goBack()\">\n {{ 'Change' | rpxTranslate }}\n </a>\n </dd>\n </div>\n </dl>\n\n <br>\n\n <div>\n <button class=\"govuk-button govuk-button--secondary govuk-!-margin-right-3\" data-module=\"govuk-button\"\n (click)=\"goBack()\">\n {{ 'Previous' | rpxTranslate }}\n </button>\n <button class=\"govuk-button\" data-module=\"govuk-button\" type=\"submit\" (click)=\"submit()\">\n {{ 'Submit' | rpxTranslate }}\n </button>\n </div>\n </div>\n\n <ccd-query-event-completion [eventCompletionParams]=\"eventCompletionParams\"> \n </ccd-query-event-completion>\n</div>\n", styles: [".govuk-summary-list__value--documentAttached{vertical-align:middle}\n"] }]
|
|
21809
|
-
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type:
|
|
21909
|
+
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CasesService }, { type: CaseNotifier }, { type: WorkAllocationService }, { type: SessionStorageService }, { type: QualifyingQuestionService }], { formGroup: [{
|
|
21810
21910
|
type: Input
|
|
21811
21911
|
}], queryItem: [{
|
|
21812
21912
|
type: Input
|
|
@@ -21814,8 +21914,6 @@ class QueryCheckYourAnswersComponent {
|
|
|
21814
21914
|
type: Input
|
|
21815
21915
|
}], eventData: [{
|
|
21816
21916
|
type: Input
|
|
21817
|
-
}], qmCaseQueriesCollectionData: [{
|
|
21818
|
-
type: Input
|
|
21819
21917
|
}], backClicked: [{
|
|
21820
21918
|
type: Output
|
|
21821
21919
|
}], querySubmitted: [{
|
|
@@ -21823,7 +21921,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
21823
21921
|
}], callbackConfirmationMessage: [{
|
|
21824
21922
|
type: Output
|
|
21825
21923
|
}] }); })();
|
|
21826
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber:
|
|
21924
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 28 }); })();
|
|
21827
21925
|
|
|
21828
21926
|
function QueryDetailsComponent_ng_container_0_p_1_Template(rf, ctx) { if (rf & 1) {
|
|
21829
21927
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -22775,36 +22873,12 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
22775
22873
|
i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("isHearingRelated").value);
|
|
22776
22874
|
} }
|
|
22777
22875
|
class QueryWriteRaiseQueryComponent {
|
|
22778
|
-
queryManagementService;
|
|
22779
|
-
route;
|
|
22780
22876
|
formGroup;
|
|
22781
22877
|
submitted;
|
|
22782
22878
|
caseDetails;
|
|
22783
22879
|
showForm;
|
|
22784
22880
|
serviceMessage;
|
|
22785
|
-
queryCreateContext;
|
|
22786
|
-
eventData = null;
|
|
22787
|
-
queryItem;
|
|
22788
|
-
validate;
|
|
22789
|
-
triggerSubmission;
|
|
22790
|
-
queryDataCreated = new EventEmitter();
|
|
22791
22881
|
raiseQueryErrorMessage = RaiseQueryErrorMessage;
|
|
22792
|
-
eventCompletionParams;
|
|
22793
|
-
messgaeId;
|
|
22794
|
-
constructor(queryManagementService, route) {
|
|
22795
|
-
this.queryManagementService = queryManagementService;
|
|
22796
|
-
this.route = route;
|
|
22797
|
-
}
|
|
22798
|
-
ngOnChanges() {
|
|
22799
|
-
this.messgaeId = this.route.snapshot.params.dataid;
|
|
22800
|
-
const isCollectionDataSet = this.setCaseQueriesCollectionData();
|
|
22801
|
-
if (isCollectionDataSet) {
|
|
22802
|
-
if (this.triggerSubmission) {
|
|
22803
|
-
const data = this.generateCaseQueriesCollectionData();
|
|
22804
|
-
this.queryDataCreated.emit(data);
|
|
22805
|
-
}
|
|
22806
|
-
}
|
|
22807
|
-
}
|
|
22808
22882
|
onSubjectInput() {
|
|
22809
22883
|
const control = this.formGroup.get('subject');
|
|
22810
22884
|
const value = control?.value;
|
|
@@ -22822,19 +22896,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22822
22896
|
}
|
|
22823
22897
|
return '';
|
|
22824
22898
|
}
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
22828
|
-
return false;
|
|
22829
|
-
}
|
|
22830
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
22831
|
-
return true;
|
|
22832
|
-
}
|
|
22833
|
-
generateCaseQueriesCollectionData() {
|
|
22834
|
-
return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messgaeId);
|
|
22835
|
-
}
|
|
22836
|
-
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(i0.ɵɵdirectiveInject(QueryManagementService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
22837
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm", serviceMessage: "serviceMessage", queryCreateContext: "queryCreateContext", eventData: "eventData", queryItem: "queryItem", validate: "validate", triggerSubmission: "triggerSubmission" }, outputs: { queryDataCreated: "queryDataCreated" }, features: [i0.ɵɵNgOnChangesFeature], decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [3, "caseDetails"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [3, "content"], [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", "id", "subject", "formControlName", "subject", "maxlength", "200", "aria-describedby", "subject-error", 1, "govuk-input", 3, "input"], ["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"], ["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) {
|
|
22899
|
+
static ɵfac = function QueryWriteRaiseQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRaiseQueryComponent)(); };
|
|
22900
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm", serviceMessage: "serviceMessage" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [3, "caseDetails"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [3, "content"], [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", "id", "subject", "formControlName", "subject", "maxlength", "200", "aria-describedby", "subject-error", 1, "govuk-input", 3, "input"], ["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"], ["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) {
|
|
22838
22901
|
i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "div", 1);
|
|
22839
22902
|
i0.ɵɵtext(3);
|
|
22840
22903
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -22863,7 +22926,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22863
22926
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
|
|
22864
22927
|
type: Component,
|
|
22865
22928
|
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\" *ngIf=\"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-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <ccd-markdown\n [content]=\"serviceMessage | rpxTranslate\">\n </ccd-markdown>\n </strong>\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') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\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" }]
|
|
22866
|
-
}],
|
|
22929
|
+
}], null, { formGroup: [{
|
|
22867
22930
|
type: Input
|
|
22868
22931
|
}], submitted: [{
|
|
22869
22932
|
type: Input
|
|
@@ -22873,20 +22936,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
22873
22936
|
type: Input
|
|
22874
22937
|
}], serviceMessage: [{
|
|
22875
22938
|
type: Input
|
|
22876
|
-
}], queryCreateContext: [{
|
|
22877
|
-
type: Input
|
|
22878
|
-
}], eventData: [{
|
|
22879
|
-
type: Input
|
|
22880
|
-
}], queryItem: [{
|
|
22881
|
-
type: Input
|
|
22882
|
-
}], validate: [{
|
|
22883
|
-
type: Input
|
|
22884
|
-
}], triggerSubmission: [{
|
|
22885
|
-
type: Input
|
|
22886
|
-
}], queryDataCreated: [{
|
|
22887
|
-
type: Output
|
|
22888
22939
|
}] }); })();
|
|
22889
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber:
|
|
22940
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 8 }); })();
|
|
22890
22941
|
|
|
22891
22942
|
function QueryWriteRespondToQueryComponent_ccd_query_case_details_header_9_Template(rf, ctx) { if (rf & 1) {
|
|
22892
22943
|
i0.ɵɵelement(0, "ccd-query-case-details-header", 8);
|
|
@@ -22968,16 +23019,12 @@ function QueryWriteRespondToQueryComponent_ng_container_13_Template(rf, ctx) { i
|
|
|
22968
23019
|
class QueryWriteRespondToQueryComponent {
|
|
22969
23020
|
caseNotifier;
|
|
22970
23021
|
route;
|
|
22971
|
-
queryManagementService;
|
|
22972
23022
|
queryItem;
|
|
22973
23023
|
formGroup;
|
|
22974
23024
|
queryCreateContext;
|
|
22975
23025
|
submitted = false;
|
|
22976
23026
|
caseQueriesCollections;
|
|
22977
23027
|
showForm;
|
|
22978
|
-
triggerSubmission;
|
|
22979
|
-
eventData = null;
|
|
22980
|
-
queryDataCreated = new EventEmitter();
|
|
22981
23028
|
hasRespondedToQueryTask = new EventEmitter();
|
|
22982
23029
|
queryCreateContextEnum = QueryCreateContext;
|
|
22983
23030
|
raiseQueryErrorMessages = RaiseQueryErrorMessage;
|
|
@@ -22987,13 +23034,11 @@ class QueryWriteRespondToQueryComponent {
|
|
|
22987
23034
|
queryResponseStatus;
|
|
22988
23035
|
queryListData;
|
|
22989
23036
|
hasRespondedToQuery = false;
|
|
22990
|
-
messgaeId;
|
|
22991
23037
|
static QUERY_ITEM_RESPOND = '3';
|
|
22992
23038
|
static QUERY_ITEM_FOLLOWUP = '4';
|
|
22993
|
-
constructor(caseNotifier, route
|
|
23039
|
+
constructor(caseNotifier, route) {
|
|
22994
23040
|
this.caseNotifier = caseNotifier;
|
|
22995
23041
|
this.route = route;
|
|
22996
|
-
this.queryManagementService = queryManagementService;
|
|
22997
23042
|
}
|
|
22998
23043
|
ngOnInit() {
|
|
22999
23044
|
this.queryItemId = this.route.snapshot.params.qid;
|
|
@@ -23035,31 +23080,13 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23035
23080
|
: matchingMessage?.id;
|
|
23036
23081
|
this.queryListData = queryWithChildren?.queries.find((query) => query?.id === targetId);
|
|
23037
23082
|
this.queryResponseStatus = this.queryListData?.responseStatus;
|
|
23038
|
-
const isCollectionDataSet = this.setCaseQueriesCollectionData();
|
|
23039
|
-
if (isCollectionDataSet) {
|
|
23040
|
-
if (this.triggerSubmission) {
|
|
23041
|
-
const data = this.generateCaseQueriesCollectionData();
|
|
23042
|
-
this.queryDataCreated.emit(data);
|
|
23043
|
-
}
|
|
23044
|
-
}
|
|
23045
23083
|
}
|
|
23046
23084
|
hasResponded(value) {
|
|
23047
23085
|
this.hasRespondedToQuery = value;
|
|
23048
23086
|
this.hasRespondedToQueryTask.emit(value);
|
|
23049
23087
|
}
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
console.warn('Event data not available; skipping collection setup.');
|
|
23053
|
-
return false;
|
|
23054
|
-
}
|
|
23055
|
-
this.queryManagementService.setCaseQueriesCollectionData(this.eventData, this.queryCreateContext, this.caseDetails, this.messgaeId);
|
|
23056
|
-
return true;
|
|
23057
|
-
}
|
|
23058
|
-
generateCaseQueriesCollectionData() {
|
|
23059
|
-
return this.queryManagementService.generateCaseQueriesCollectionData(this.formGroup, this.queryCreateContext, this.queryItem, this.messgaeId);
|
|
23060
|
-
}
|
|
23061
|
-
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(QueryManagementService)); };
|
|
23062
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", caseQueriesCollections: "caseQueriesCollections", showForm: "showForm", triggerSubmission: "triggerSubmission", eventData: "eventData" }, outputs: { queryDataCreated: "queryDataCreated", hasRespondedToQueryTask: "hasRespondedToQueryTask" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 11, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], [3, "hasResponded", "query", "queryResponseStatus"], ["class", "query-respond", 4, "ngIf"], [4, "ngIf"], [3, "caseDetails"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [3, "formGroup", 4, "ngIf"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23088
|
+
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
23089
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", caseQueriesCollections: "caseQueriesCollections", showForm: "showForm" }, outputs: { hasRespondedToQueryTask: "hasRespondedToQueryTask" }, features: [i0.ɵɵNgOnChangesFeature], decls: 14, vars: 11, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails", 4, "ngIf"], [3, "hasResponded", "query", "queryResponseStatus"], ["class", "query-respond", 4, "ngIf"], [4, "ngIf"], [3, "caseDetails"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [3, "formGroup", 4, "ngIf"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
23063
23090
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 0)(2, "div", 1);
|
|
23064
23091
|
i0.ɵɵtext(3);
|
|
23065
23092
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -23093,7 +23120,7 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23093
23120
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRespondToQueryComponent, [{
|
|
23094
23121
|
type: Component,
|
|
23095
23122
|
args: [{ selector: 'ccd-query-write-respond-to-query', template: "<div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Respond to a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-0\">{{ 'Query details' | rpxTranslate }}</h1>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryListData\"\n [queryResponseStatus]=\"queryResponseStatus\"\n (hasResponded)=\"hasResponded($event)\"></ccd-query-details>\n </div>\n</div>\n<div class=\"query-respond\" *ngIf=\"showForm\">\n <div *ngIf=\"!hasRespondedToQuery\">\n <h1 class=\"govuk-heading-m\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Respond to a query' : 'Ask a follow-up question' | rpxTranslate }}\n </h1>\n\n <div [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group body-textarea\"\n [class.govuk-form-group--error]=\"submitted && formGroup.get('body')?.hasError('required')\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query Body' | rpxTranslate }}\n </label>\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body')?.hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ queryCreateContext === queryCreateContextEnum.RESPOND ? raiseQueryErrorMessages.RESPOND_QUERY_BODY : raiseQueryErrorMessages.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\" class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body')?.hasError('required')\" id=\"body\"\n name=\"body\" rows=\"5\" aria-describedby=\"body-hint body-error\">\n </textarea>\n </div>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"queryCreateContext === queryCreateContextEnum.RESPOND\">\n <ccd-close-query *ngIf=\"!hasRespondedToQuery\"\n [formGroup]=\"formGroup\">\n </ccd-close-query>\n</ng-container>", styles: [".query-respond{width:100%;max-width:720px}\n"] }]
|
|
23096
|
-
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }
|
|
23123
|
+
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }], { queryItem: [{
|
|
23097
23124
|
type: Input
|
|
23098
23125
|
}], formGroup: [{
|
|
23099
23126
|
type: Input
|
|
@@ -23105,16 +23132,10 @@ class QueryWriteRespondToQueryComponent {
|
|
|
23105
23132
|
type: Input
|
|
23106
23133
|
}], showForm: [{
|
|
23107
23134
|
type: Input
|
|
23108
|
-
}], triggerSubmission: [{
|
|
23109
|
-
type: Input
|
|
23110
|
-
}], eventData: [{
|
|
23111
|
-
type: Input
|
|
23112
|
-
}], queryDataCreated: [{
|
|
23113
|
-
type: Output
|
|
23114
23135
|
}], hasRespondedToQueryTask: [{
|
|
23115
23136
|
type: Output
|
|
23116
23137
|
}] }); })();
|
|
23117
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber:
|
|
23138
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber: 14 }); })();
|
|
23118
23139
|
|
|
23119
23140
|
function QueryConfirmationComponent_main_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
23120
23141
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -23331,32 +23352,23 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
23331
23352
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
23332
23353
|
} }
|
|
23333
23354
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
23334
|
-
i0.ɵɵelementStart(0, "div")(1, "
|
|
23355
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 10);
|
|
23335
23356
|
i0.ɵɵtext(2);
|
|
23336
23357
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
23337
23358
|
i0.ɵɵelementEnd();
|
|
23338
|
-
i0.ɵɵelementStart(4, "p"
|
|
23359
|
+
i0.ɵɵelementStart(4, "p");
|
|
23339
23360
|
i0.ɵɵtext(5);
|
|
23340
23361
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
23341
|
-
i0.ɵɵelementEnd();
|
|
23342
|
-
i0.ɵɵelementStart(7, "p");
|
|
23343
|
-
i0.ɵɵtext(8);
|
|
23344
|
-
i0.ɵɵpipe(9, "rpxTranslate");
|
|
23345
23362
|
i0.ɵɵelementEnd()();
|
|
23346
23363
|
} if (rf & 2) {
|
|
23347
|
-
|
|
23348
|
-
i0.ɵɵ
|
|
23349
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(10, _c0$B, ctx_r1.caseId, ctx_r1.query.id));
|
|
23350
|
-
i0.ɵɵadvance();
|
|
23351
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, "Ask a follow-up question"), " ");
|
|
23352
|
-
i0.ɵɵadvance(3);
|
|
23353
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, "Your query is under review"));
|
|
23364
|
+
i0.ɵɵadvance(2);
|
|
23365
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Your query is under review"));
|
|
23354
23366
|
i0.ɵɵadvance(3);
|
|
23355
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
23367
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "Our team will read your query and respond. Do not submit the same query more than once."));
|
|
23356
23368
|
} }
|
|
23357
23369
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
23358
23370
|
i0.ɵɵelementContainerStart(0);
|
|
23359
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 2)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template,
|
|
23371
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_container_1_Template, 4, 7, "ng-container", 2)(2, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_Template, 7, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
23360
23372
|
i0.ɵɵelementContainerEnd();
|
|
23361
23373
|
} if (rf & 2) {
|
|
23362
23374
|
const queryIsInReview_r5 = i0.ɵɵreference(3);
|
|
@@ -23391,7 +23403,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if
|
|
|
23391
23403
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23392
23404
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
23393
23405
|
i0.ɵɵadvance();
|
|
23394
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed
|
|
23406
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && !ctx_r1.isQueryClosed);
|
|
23395
23407
|
i0.ɵɵadvance();
|
|
23396
23408
|
i0.ɵɵproperty("ngIf", !ctx_r1.isInternalUser() && ctx_r1.isQueryClosed);
|
|
23397
23409
|
} }
|
|
@@ -23459,7 +23471,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
23459
23471
|
}
|
|
23460
23472
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
23461
23473
|
type: Component,
|
|
23462
|
-
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed
|
|
23474
|
+
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!isInternalUser() && isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by court staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
|
|
23463
23475
|
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
23464
23476
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 15 }); })();
|
|
23465
23477
|
|
|
@@ -30726,8 +30738,6 @@ class PaletteModule {
|
|
|
30726
30738
|
CommonDataService,
|
|
30727
30739
|
LinkedCasesService,
|
|
30728
30740
|
QualifyingQuestionService,
|
|
30729
|
-
QueryManagementUtils,
|
|
30730
|
-
QueryManagementService,
|
|
30731
30741
|
{ provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
|
|
30732
30742
|
], imports: [CommonModule,
|
|
30733
30743
|
RouterModule,
|
|
@@ -30743,6 +30753,7 @@ class PaletteModule {
|
|
|
30743
30753
|
FormModule,
|
|
30744
30754
|
TabsModule,
|
|
30745
30755
|
LabelSubstitutorModule,
|
|
30756
|
+
TranslatedMarkdownModule,
|
|
30746
30757
|
MarkdownModule.forChild(),
|
|
30747
30758
|
NgxMatDatetimePickerModule,
|
|
30748
30759
|
NgxMatTimepickerModule,
|
|
@@ -30788,6 +30799,7 @@ class PaletteModule {
|
|
|
30788
30799
|
FormModule,
|
|
30789
30800
|
TabsModule,
|
|
30790
30801
|
LabelSubstitutorModule,
|
|
30802
|
+
TranslatedMarkdownModule,
|
|
30791
30803
|
MarkdownModule.forChild(),
|
|
30792
30804
|
NgxMatDatetimePickerModule,
|
|
30793
30805
|
NgxMatTimepickerModule,
|
|
@@ -30845,8 +30857,6 @@ class PaletteModule {
|
|
|
30845
30857
|
CommonDataService,
|
|
30846
30858
|
LinkedCasesService,
|
|
30847
30859
|
QualifyingQuestionService,
|
|
30848
|
-
QueryManagementUtils,
|
|
30849
|
-
QueryManagementService,
|
|
30850
30860
|
{ provide: MAT_LEGACY_DATE_LOCALE, useValue: 'en-GB' }
|
|
30851
30861
|
],
|
|
30852
30862
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
@@ -30998,7 +31008,8 @@ class PaletteModule {
|
|
|
30998
31008
|
BodyModule,
|
|
30999
31009
|
FormModule,
|
|
31000
31010
|
TabsModule,
|
|
31001
|
-
LabelSubstitutorModule,
|
|
31011
|
+
LabelSubstitutorModule,
|
|
31012
|
+
TranslatedMarkdownModule, i2$1.MarkdownModule, NgxMatDatetimePickerModule,
|
|
31002
31013
|
NgxMatTimepickerModule,
|
|
31003
31014
|
NgxMatNativeDateModule,
|
|
31004
31015
|
MatLegacyFormFieldModule,
|
|
@@ -40253,5 +40264,5 @@ class TestRouteSnapshotBuilder {
|
|
|
40253
40264
|
* Generated bundle index. Do not edit.
|
|
40254
40265
|
*/
|
|
40255
40266
|
|
|
40256
|
-
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewFolderToggleComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, CloseQueryComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem,
|
|
40267
|
+
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewFolderToggleComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, CloseQueryComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RespondToQueryErrorMessages, RetryUtil, RouterHelperService, RouterLinkComponent, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, TranslatedMarkdownDirective, TranslatedMarkdownModule, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagAddTranslationErrorMessage, UpdateFlagAddTranslationFormComponent, UpdateFlagAddTranslationStep, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, UpdateFlagTitleDisplayPipe, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
|
|
40257
40268
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map
|