@hmcts/ccd-case-ui-toolkit 7.0.37 → 7.0.38-client-context-2
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/esm2020/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +11 -11
- package/esm2020/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +83 -38
- package/esm2020/lib/shared/components/case-editor/case-editor.module.mjs +6 -5
- package/esm2020/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +16 -14
- package/esm2020/lib/shared/components/case-editor/services/case-worker.service.mjs +3 -3
- package/esm2020/lib/shared/components/case-editor/services/cases.service.mjs +53 -27
- package/esm2020/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +14 -6
- package/esm2020/lib/shared/components/event-start/event-guard/event-start.guard.mjs +13 -5
- package/esm2020/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +11 -3
- package/esm2020/lib/shared/components/palette/address/write-address-field.component.mjs +3 -5
- package/esm2020/lib/shared/components/palette/base-field/abstract-form-field.component.mjs +1 -1
- package/esm2020/lib/shared/components/palette/case-flag/write-case-flag-field.component.mjs +1 -1
- package/esm2020/lib/shared/components/palette/collection/write-collection-field.component.mjs +2 -4
- package/esm2020/lib/shared/components/palette/complex/write-complex-field.component.mjs +2 -4
- package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +2 -2
- package/esm2020/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.mjs +5 -5
- package/esm2020/lib/shared/components/palette/markdown/markdown.component.mjs +43 -3
- package/esm2020/lib/shared/components/palette/query-management/components/query-list/query-list.component.mjs +2 -2
- package/esm2020/lib/shared/components/palette/text/write-text-field.component.mjs +1 -1
- package/esm2020/lib/shared/components/palette/utils/first-error.pipe.mjs +4 -1
- package/esm2020/lib/shared/components/search-result/search-result.component.mjs +2 -2
- package/esm2020/lib/shared/domain/definition/case-field.model.mjs +4 -2
- package/esm2020/lib/shared/domain/work-allocation/Task.mjs +1 -1
- package/esm2020/lib/shared/services/fields/fields.utils.mjs +8 -1
- package/esm2020/lib/shared/services/form/field-type-sanitiser.mjs +13 -2
- package/esm2020/lib/shared/services/form/form-validators.service.mjs +28 -2
- package/esm2020/lib/shared/services/profile/profile.service.mjs +2 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +366 -169
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +351 -169
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts +8 -3
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +1 -2
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts +2 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts +1 -0
- package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts +1 -2
- package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/base-field/abstract-form-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +0 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/write-collection-field.component.d.ts +1 -2
- package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/write-complex-field.component.d.ts +1 -2
- package/lib/shared/components/palette/complex/write-complex-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/markdown/markdown.component.d.ts +6 -1
- package/lib/shared/components/palette/markdown/markdown.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/first-error.pipe.d.ts.map +1 -1
- package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
- package/lib/shared/domain/work-allocation/Task.d.ts +4 -0
- package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +2 -0
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/lib/shared/services/form/field-type-sanitiser.d.ts +1 -0
- package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
- package/lib/shared/services/form/form-validators.service.d.ts +4 -0
- package/lib/shared/services/form/form-validators.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, Injector, ViewChild, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { Component, Input, EventEmitter, Output, NgModule, ViewEncapsulation, forwardRef, Pipe, ViewChildren, ContentChildren, Injectable, Inject, ChangeDetectorRef, Directive, InjectionToken, Injector, ViewChild, HostListener, ViewContainerRef, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, AsyncPipe, CurrencyPipe, formatDate } from '@angular/common';
|
|
5
5
|
import * as i1 from 'rpx-xui-translation';
|
|
@@ -29,6 +29,7 @@ import * as i2 from '@nicky-lenaers/ngx-scroll-to';
|
|
|
29
29
|
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|
30
30
|
import * as i1$4 from 'ngx-md';
|
|
31
31
|
import { NgxMdModule } from 'ngx-md';
|
|
32
|
+
import * as marked from 'marked';
|
|
32
33
|
import * as i5 from '@angular/material/legacy-autocomplete';
|
|
33
34
|
import { MatLegacyAutocompleteModule } from '@angular/material/legacy-autocomplete';
|
|
34
35
|
import * as i6 from '@angular/material/legacy-core';
|
|
@@ -127,11 +128,11 @@ function FooterComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
127
128
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 13, ctx_r1.workhours));
|
|
128
129
|
} }
|
|
129
130
|
const _c0$14 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
130
|
-
const _c1$
|
|
131
|
+
const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
131
132
|
class FooterComponent {
|
|
132
133
|
}
|
|
133
134
|
FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
134
|
-
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$
|
|
135
|
+
FooterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
|
|
135
136
|
i0.ɵɵprojectionDef(_c0$14);
|
|
136
137
|
i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
|
|
137
138
|
i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2);
|
|
@@ -191,7 +192,7 @@ function HeaderBarComponent_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
191
192
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, ctx_r2.title));
|
|
192
193
|
} }
|
|
193
194
|
const _c0$13 = [[["", "headerNavigation", ""]]];
|
|
194
|
-
const _c1$
|
|
195
|
+
const _c1$t = ["[headerNavigation]"];
|
|
195
196
|
class HeaderBarComponent {
|
|
196
197
|
constructor() {
|
|
197
198
|
this.signOutRequest = new EventEmitter();
|
|
@@ -201,7 +202,7 @@ class HeaderBarComponent {
|
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
204
|
HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
204
|
-
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$
|
|
205
|
+
HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
205
206
|
i0.ɵɵprojectionDef(_c0$13);
|
|
206
207
|
i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
|
|
207
208
|
i0.ɵɵtemplate(3, HeaderBarComponent_div_3_Template, 5, 3, "div", 3);
|
|
@@ -252,11 +253,11 @@ HeaderBarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBa
|
|
|
252
253
|
}] }); })();
|
|
253
254
|
|
|
254
255
|
const _c0$12 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
255
|
-
const _c1$
|
|
256
|
+
const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
256
257
|
class NavigationComponent {
|
|
257
258
|
}
|
|
258
259
|
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
259
|
-
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$
|
|
260
|
+
NavigationComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
260
261
|
i0.ɵɵprojectionDef(_c0$12);
|
|
261
262
|
i0.ɵɵelementStart(0, "div")(1, "nav", 0);
|
|
262
263
|
i0.ɵɵprojection(2);
|
|
@@ -367,11 +368,11 @@ HeadersModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModu
|
|
|
367
368
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
|
|
368
369
|
|
|
369
370
|
const _c0$11 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
370
|
-
const _c1$
|
|
371
|
+
const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
371
372
|
class BodyComponent {
|
|
372
373
|
}
|
|
373
374
|
BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
374
|
-
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$
|
|
375
|
+
BodyComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
|
|
375
376
|
i0.ɵɵprojectionDef(_c0$11);
|
|
376
377
|
i0.ɵɵelementStart(0, "div", 0);
|
|
377
378
|
i0.ɵɵprojection(1);
|
|
@@ -981,11 +982,11 @@ NotificationBannerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
981
982
|
}] }); })();
|
|
982
983
|
|
|
983
984
|
const _c0$_ = function (a0) { return { "js-hidden": a0 }; };
|
|
984
|
-
const _c1$
|
|
985
|
+
const _c1$q = ["*"];
|
|
985
986
|
class TabComponent {
|
|
986
987
|
}
|
|
987
988
|
TabComponent.ɵfac = function TabComponent_Factory(t) { return new (t || TabComponent)(); };
|
|
988
|
-
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$
|
|
989
|
+
TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["cut-tab"]], inputs: { id: "id", title: "title", selected: "selected" }, ngContentSelectors: _c1$q, decls: 2, vars: 5, consts: [["role", "tabpanel", 1, "tabs-panel", 3, "id", "ngClass"]], template: function TabComponent_Template(rf, ctx) { if (rf & 1) {
|
|
989
990
|
i0.ɵɵprojectionDef();
|
|
990
991
|
i0.ɵɵelementStart(0, "div", 0);
|
|
991
992
|
i0.ɵɵprojection(1);
|
|
@@ -1006,8 +1007,8 @@ TabComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TabComponent,
|
|
|
1006
1007
|
}] }); })();
|
|
1007
1008
|
|
|
1008
1009
|
const _c0$Z = ["tab"];
|
|
1009
|
-
const _c1$
|
|
1010
|
-
const _c2$
|
|
1010
|
+
const _c1$p = function () { return ["."]; };
|
|
1011
|
+
const _c2$4 = function (a0) { return { "tabs-toggle-selected": a0 }; };
|
|
1011
1012
|
function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
|
|
1012
1013
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
1013
1014
|
i0.ɵɵelementStart(0, "li", 4)(1, "a", 5, 6);
|
|
@@ -1018,7 +1019,7 @@ function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
1018
1019
|
} if (rf & 2) {
|
|
1019
1020
|
const panel_r1 = ctx.$implicit;
|
|
1020
1021
|
i0.ɵɵadvance(1);
|
|
1021
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$
|
|
1022
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction0(8, _c1$p))("fragment", panel_r1.id)("ngClass", i0.ɵɵpureFunction1(9, _c2$4, panel_r1.selected));
|
|
1022
1023
|
i0.ɵɵattribute("aria-controls", panel_r1.id)("aria-selected", panel_r1.selected);
|
|
1023
1024
|
i0.ɵɵadvance(2);
|
|
1024
1025
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, panel_r1.title));
|
|
@@ -2736,6 +2737,9 @@ class FirstErrorPipe {
|
|
|
2736
2737
|
else if (keys[0] === 'pattern') {
|
|
2737
2738
|
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
2738
2739
|
}
|
|
2740
|
+
else if (keys[0] === 'markDownPattern') {
|
|
2741
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
2742
|
+
}
|
|
2739
2743
|
else if (keys[0] === 'minlength') {
|
|
2740
2744
|
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
2741
2745
|
}
|
|
@@ -3043,7 +3047,9 @@ class CaseField {
|
|
|
3043
3047
|
}
|
|
3044
3048
|
}
|
|
3045
3049
|
set list_items(items) {
|
|
3046
|
-
this._list_items
|
|
3050
|
+
if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
|
|
3051
|
+
this._list_items = items;
|
|
3052
|
+
}
|
|
3047
3053
|
}
|
|
3048
3054
|
get dateTimeEntryFormat() {
|
|
3049
3055
|
if (this.isComplexDisplay()) {
|
|
@@ -3903,6 +3909,13 @@ class FieldsUtils {
|
|
|
3903
3909
|
return '';
|
|
3904
3910
|
}
|
|
3905
3911
|
}
|
|
3912
|
+
static getUserTaskFromClientContext(clientContextStr) {
|
|
3913
|
+
if (clientContextStr) {
|
|
3914
|
+
let clientContext = JSON.parse(clientContextStr);
|
|
3915
|
+
return clientContext.client_context.user_task;
|
|
3916
|
+
}
|
|
3917
|
+
return null;
|
|
3918
|
+
}
|
|
3906
3919
|
buildCanShowPredicate(eventTrigger, form) {
|
|
3907
3920
|
const currentState = this.getCurrentEventState(eventTrigger, form);
|
|
3908
3921
|
return (page) => {
|
|
@@ -4553,6 +4566,7 @@ class FormValidatorsService {
|
|
|
4553
4566
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES.indexOf(caseField.field_type.type) === -1) {
|
|
4554
4567
|
const validators = [Validators.required];
|
|
4555
4568
|
if (caseField.field_type.type === 'Text') {
|
|
4569
|
+
validators.push(this.markDownPatternValidator());
|
|
4556
4570
|
if (caseField.field_type.regular_expression) {
|
|
4557
4571
|
validators.push(Validators.pattern(caseField.field_type.regular_expression));
|
|
4558
4572
|
}
|
|
@@ -4566,22 +4580,37 @@ class FormValidatorsService {
|
|
|
4566
4580
|
validators.push(Validators.maxLength(caseField.field_type.max));
|
|
4567
4581
|
}
|
|
4568
4582
|
}
|
|
4583
|
+
if (caseField.field_type.type === 'TextArea') {
|
|
4584
|
+
validators.push(this.emptyValidator());
|
|
4585
|
+
validators.push(this.markDownPatternValidator());
|
|
4586
|
+
}
|
|
4569
4587
|
if (control.validator) {
|
|
4570
4588
|
validators.push(control.validator);
|
|
4571
4589
|
}
|
|
4572
4590
|
control.setValidators(validators);
|
|
4573
4591
|
}
|
|
4592
|
+
else if (caseField.display_context === 'OPTIONAL' && (caseField.field_type.type === 'Text' || caseField.field_type.type === 'TextArea')
|
|
4593
|
+
|| (caseField.display_context === 'COMPLEX' && caseField.field_type.type === 'Complex')) {
|
|
4594
|
+
control.setValidators(this.markDownPatternValidator());
|
|
4595
|
+
}
|
|
4574
4596
|
return control;
|
|
4575
4597
|
}
|
|
4576
4598
|
static emptyValidator() {
|
|
4577
4599
|
const validator = (control) => {
|
|
4578
|
-
if (control
|
|
4600
|
+
if (control?.value?.toString().trim().length === 0) {
|
|
4579
4601
|
return { required: {} };
|
|
4580
4602
|
}
|
|
4581
4603
|
return null;
|
|
4582
4604
|
};
|
|
4583
4605
|
return validator;
|
|
4584
4606
|
}
|
|
4607
|
+
static markDownPatternValidator() {
|
|
4608
|
+
const pattern = /(\[[^\]]{0,500}\]\([^)]{0,500}\)|!\[[^\]]{0,500}\]\([^)]{0,500}\)|<img[^>]{0,500}>|<a[^>]{0,500}>.*?<\/a>)/;
|
|
4609
|
+
return (control) => {
|
|
4610
|
+
const value = control?.value?.toString().trim();
|
|
4611
|
+
return (value && pattern.test(value)) ? { markDownPattern: {} } : null;
|
|
4612
|
+
};
|
|
4613
|
+
}
|
|
4585
4614
|
// TODO: Strip this out as it's only here for the moment because
|
|
4586
4615
|
// the service is being injected all over the place but it doesn't
|
|
4587
4616
|
// need to be as FormValidatorsService.addValidators is perfectly
|
|
@@ -4589,10 +4618,20 @@ class FormValidatorsService {
|
|
|
4589
4618
|
addValidators(caseField, control) {
|
|
4590
4619
|
return FormValidatorsService.addValidators(caseField, control);
|
|
4591
4620
|
}
|
|
4621
|
+
addMarkDownValidators(formGroup, controlPath) {
|
|
4622
|
+
const control = formGroup.get(controlPath);
|
|
4623
|
+
if (control) {
|
|
4624
|
+
control.setValidators(FormValidatorsService.markDownPatternValidator());
|
|
4625
|
+
control.updateValueAndValidity();
|
|
4626
|
+
}
|
|
4627
|
+
return control;
|
|
4628
|
+
}
|
|
4592
4629
|
}
|
|
4593
4630
|
FormValidatorsService.CUSTOM_VALIDATED_TYPES = [
|
|
4594
4631
|
'Date', 'MoneyGBP', 'Label', 'JudicialUser'
|
|
4595
4632
|
];
|
|
4633
|
+
FormValidatorsService.DEFAULT_INPUT_TEXT = 'text';
|
|
4634
|
+
FormValidatorsService.DEFAULT_INPUT_TEXTAREA = 'textAreas';
|
|
4596
4635
|
FormValidatorsService.ɵfac = function FormValidatorsService_Factory(t) { return new (t || FormValidatorsService)(); };
|
|
4597
4636
|
FormValidatorsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormValidatorsService, factory: FormValidatorsService.ɵfac });
|
|
4598
4637
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormValidatorsService, [{
|
|
@@ -5216,7 +5255,8 @@ class FieldTypeSanitiser {
|
|
|
5216
5255
|
if (!data || !caseFields) {
|
|
5217
5256
|
return;
|
|
5218
5257
|
}
|
|
5219
|
-
caseFields.
|
|
5258
|
+
caseFields = this.ensureDynamicMultiSelectListPopulated(caseFields);
|
|
5259
|
+
caseFields.forEach((caseField) => {
|
|
5220
5260
|
// tslint:disable-next-line:switch-default
|
|
5221
5261
|
switch (caseField.field_type.type) {
|
|
5222
5262
|
case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
|
|
@@ -5239,6 +5279,16 @@ class FieldTypeSanitiser {
|
|
|
5239
5279
|
}
|
|
5240
5280
|
});
|
|
5241
5281
|
}
|
|
5282
|
+
ensureDynamicMultiSelectListPopulated(caseFields) {
|
|
5283
|
+
return caseFields.map((field) => {
|
|
5284
|
+
if (field.field_type.type !== 'Complex') {
|
|
5285
|
+
return field;
|
|
5286
|
+
}
|
|
5287
|
+
const complexFieldsUpdated = field.field_type.complex_fields.map((complexField) => complexField.field_type.type === FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST && complexField.display_context !== 'HIDDEN' && field._value?.[complexField.id]
|
|
5288
|
+
? { ...complexField, list_items: field._value[complexField.id]?.list_items } : complexField);
|
|
5289
|
+
return { ...field, field_type: { ...field.field_type, complex_fields: complexFieldsUpdated } };
|
|
5290
|
+
});
|
|
5291
|
+
}
|
|
5242
5292
|
convertArrayToDynamicListOutput(field, data) {
|
|
5243
5293
|
const values = data[field.id];
|
|
5244
5294
|
if (Array.isArray(values)) {
|
|
@@ -6758,6 +6808,7 @@ class ProfileService {
|
|
|
6758
6808
|
.set('experimental', 'true')
|
|
6759
6809
|
.set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
|
|
6760
6810
|
.set('Content-Type', 'application/json');
|
|
6811
|
+
// Not adding client context header because header is added to call immediately afterwards
|
|
6761
6812
|
return this.httpService
|
|
6762
6813
|
.get(url, { headers, observe: 'body' })
|
|
6763
6814
|
.pipe(map((p) => plainToClass(Profile, p)));
|
|
@@ -7624,6 +7675,7 @@ class CasesService {
|
|
|
7624
7675
|
let headers = new HttpHeaders();
|
|
7625
7676
|
headers = headers.set('experimental', 'true');
|
|
7626
7677
|
headers = headers.set('Content-Type', 'application/json');
|
|
7678
|
+
headers = this.addClientContextHeader(headers);
|
|
7627
7679
|
if (Draft.isDraft(caseId)) {
|
|
7628
7680
|
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
|
|
7629
7681
|
}
|
|
@@ -7634,9 +7686,10 @@ class CasesService {
|
|
|
7634
7686
|
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
|
|
7635
7687
|
}
|
|
7636
7688
|
return this.http
|
|
7637
|
-
.get(url, { headers, observe: '
|
|
7638
|
-
.pipe(map(
|
|
7639
|
-
|
|
7689
|
+
.get(url, { headers, observe: 'response' })
|
|
7690
|
+
.pipe(map((response) => {
|
|
7691
|
+
this.updateClientContextStorage(response.headers);
|
|
7692
|
+
return FieldsUtils.handleNestedDynamicLists(response.body);
|
|
7640
7693
|
}), catchError(error => {
|
|
7641
7694
|
this.errorService.setError(error);
|
|
7642
7695
|
return throwError(error);
|
|
@@ -7645,13 +7698,17 @@ class CasesService {
|
|
|
7645
7698
|
createEvent(caseDetails, eventData) {
|
|
7646
7699
|
const caseId = caseDetails.case_id;
|
|
7647
7700
|
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
|
|
7648
|
-
|
|
7701
|
+
let headers = new HttpHeaders()
|
|
7649
7702
|
.set('experimental', 'true')
|
|
7650
7703
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
7651
7704
|
.set('Content-Type', 'application/json');
|
|
7705
|
+
headers = this.addClientContextHeader(headers);
|
|
7652
7706
|
return this.http
|
|
7653
|
-
.post(url, eventData, { headers, observe: '
|
|
7654
|
-
.pipe(
|
|
7707
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
7708
|
+
.pipe(map((response) => {
|
|
7709
|
+
this.updateClientContextStorage(response.headers);
|
|
7710
|
+
return response.body;
|
|
7711
|
+
}), catchError(error => {
|
|
7655
7712
|
this.errorService.setError(error);
|
|
7656
7713
|
return throwError(error);
|
|
7657
7714
|
}));
|
|
@@ -7659,13 +7716,17 @@ class CasesService {
|
|
|
7659
7716
|
validateCase(ctid, eventData, pageId) {
|
|
7660
7717
|
const pageIdString = pageId ? `?pageId=${pageId}` : '';
|
|
7661
7718
|
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
|
|
7662
|
-
|
|
7719
|
+
let headers = new HttpHeaders()
|
|
7663
7720
|
.set('experimental', 'true')
|
|
7664
7721
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
7665
7722
|
.set('Content-Type', 'application/json');
|
|
7723
|
+
headers = this.addClientContextHeader(headers);
|
|
7666
7724
|
return this.http
|
|
7667
|
-
.post(url, eventData, { headers, observe: '
|
|
7668
|
-
.pipe(
|
|
7725
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
7726
|
+
.pipe(map((response) => {
|
|
7727
|
+
this.updateClientContextStorage(response.headers);
|
|
7728
|
+
return response.body;
|
|
7729
|
+
}), catchError(error => {
|
|
7669
7730
|
this.errorService.setError(error);
|
|
7670
7731
|
return throwError(error);
|
|
7671
7732
|
}));
|
|
@@ -7676,26 +7737,34 @@ class CasesService {
|
|
|
7676
7737
|
ignoreWarning = 'true';
|
|
7677
7738
|
}
|
|
7678
7739
|
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
7679
|
-
|
|
7740
|
+
let headers = new HttpHeaders()
|
|
7680
7741
|
.set('experimental', 'true')
|
|
7681
7742
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
7682
7743
|
.set('Content-Type', 'application/json');
|
|
7744
|
+
headers = this.addClientContextHeader(headers);
|
|
7683
7745
|
return this.http
|
|
7684
|
-
.post(url, eventData, { headers, observe: '
|
|
7685
|
-
.pipe(
|
|
7746
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
7747
|
+
.pipe(map((response) => {
|
|
7748
|
+
this.updateClientContextStorage(response.headers);
|
|
7749
|
+
return response.body;
|
|
7750
|
+
}), catchError(error => {
|
|
7686
7751
|
this.errorService.setError(error);
|
|
7687
7752
|
return throwError(error);
|
|
7688
7753
|
}));
|
|
7689
7754
|
}
|
|
7690
7755
|
getPrintDocuments(caseId) {
|
|
7691
7756
|
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
|
|
7692
|
-
|
|
7757
|
+
let headers = new HttpHeaders()
|
|
7693
7758
|
.set('experimental', 'true')
|
|
7694
7759
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
7695
7760
|
.set('Content-Type', 'application/json');
|
|
7761
|
+
headers = this.addClientContextHeader(headers);
|
|
7696
7762
|
return this.http
|
|
7697
|
-
.get(url, { headers, observe: '
|
|
7698
|
-
.pipe(map(
|
|
7763
|
+
.get(url, { headers, observe: 'response' })
|
|
7764
|
+
.pipe(map((response) => {
|
|
7765
|
+
this.updateClientContextStorage(response.headers);
|
|
7766
|
+
return response.body.documentResources;
|
|
7767
|
+
}), catchError(error => {
|
|
7699
7768
|
this.errorService.setError(error);
|
|
7700
7769
|
return throwError(error);
|
|
7701
7770
|
}));
|
|
@@ -7728,17 +7797,6 @@ class CasesService {
|
|
|
7728
7797
|
wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
|
|
7729
7798
|
});
|
|
7730
7799
|
}
|
|
7731
|
-
/*
|
|
7732
|
-
Checks if the user has role of pui-case-manager and returns true or false
|
|
7733
|
-
*/
|
|
7734
|
-
isPuiCaseManager() {
|
|
7735
|
-
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
7736
|
-
if (userInfoStr) {
|
|
7737
|
-
const userInfo = JSON.parse(userInfoStr);
|
|
7738
|
-
return userInfo && userInfo.roles && (userInfo.roles.indexOf(CasesService.PUI_CASE_MANAGER) !== -1);
|
|
7739
|
-
}
|
|
7740
|
-
return false;
|
|
7741
|
-
}
|
|
7742
7800
|
getCourtOrHearingCentreName(locationId) {
|
|
7743
7801
|
return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
|
|
7744
7802
|
}
|
|
@@ -7805,6 +7863,25 @@ class CasesService {
|
|
|
7805
7863
|
.get(url)
|
|
7806
7864
|
.pipe(catchError(error => throwError(error)));
|
|
7807
7865
|
}
|
|
7866
|
+
addClientContextHeader(headers) {
|
|
7867
|
+
const clientContextDetails = this.sessionStorageService.getItem('clientContext');
|
|
7868
|
+
if (clientContextDetails) {
|
|
7869
|
+
// may require URI encoding in certain circumstances
|
|
7870
|
+
const clientContext = window.btoa(clientContextDetails);
|
|
7871
|
+
if (clientContext) {
|
|
7872
|
+
headers = headers.set('Client-Context', clientContext);
|
|
7873
|
+
}
|
|
7874
|
+
}
|
|
7875
|
+
return headers;
|
|
7876
|
+
}
|
|
7877
|
+
updateClientContextStorage(headers) {
|
|
7878
|
+
// for mocking - TODO: Kasi Remove/Uncomment for testing
|
|
7879
|
+
// headers = this.setMockClientContextHeader(headers);
|
|
7880
|
+
if (headers && headers.get('Client-Context')) {
|
|
7881
|
+
const clientContextString = window.atob(headers.get('Client-Context'));
|
|
7882
|
+
this.sessionStorageService.setItem('clientContext', clientContextString);
|
|
7883
|
+
}
|
|
7884
|
+
}
|
|
7808
7885
|
}
|
|
7809
7886
|
// Internal (UI) API
|
|
7810
7887
|
CasesService.V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
|
|
@@ -8138,9 +8215,9 @@ class CaseworkerService {
|
|
|
8138
8215
|
this.errorService = errorService;
|
|
8139
8216
|
}
|
|
8140
8217
|
getCaseworkers(serviceId) {
|
|
8141
|
-
const url = `${this.appConfig.getWorkAllocationApiUrl()}/
|
|
8218
|
+
const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
|
|
8142
8219
|
return this.http
|
|
8143
|
-
.post(url, {
|
|
8220
|
+
.post(url, { services: [serviceId] })
|
|
8144
8221
|
.pipe(catchError(error => {
|
|
8145
8222
|
this.errorService.setError(error);
|
|
8146
8223
|
return throwError(error);
|
|
@@ -8295,8 +8372,9 @@ class EventCompletionStateMachineService {
|
|
|
8295
8372
|
entryActionForStateCompleteEventAndTask(state, context) {
|
|
8296
8373
|
// Trigger final state to complete processing of state machine
|
|
8297
8374
|
state.trigger(EventCompletionStates.Final);
|
|
8298
|
-
const
|
|
8299
|
-
|
|
8375
|
+
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8376
|
+
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8377
|
+
if (userTask?.task_data) {
|
|
8300
8378
|
context.sessionStorageService.setItem('assignNeeded', 'false');
|
|
8301
8379
|
// just set event can be completed
|
|
8302
8380
|
context.component.eventCanBeCompleted.emit(true);
|
|
@@ -8315,9 +8393,9 @@ class EventCompletionStateMachineService {
|
|
|
8315
8393
|
entryActionForStateTaskUnassigned(state, context) {
|
|
8316
8394
|
// Trigger final state to complete processing of state machine
|
|
8317
8395
|
state.trigger(EventCompletionStates.Final);
|
|
8318
|
-
|
|
8319
|
-
const
|
|
8320
|
-
if (
|
|
8396
|
+
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8397
|
+
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8398
|
+
if (userTask?.task_data) {
|
|
8321
8399
|
context.sessionStorageService.setItem('assignNeeded', 'true');
|
|
8322
8400
|
context.component.eventCanBeCompleted.emit(true);
|
|
8323
8401
|
}
|
|
@@ -8352,6 +8430,12 @@ class EventCompletionStateMachineService {
|
|
|
8352
8430
|
addTransitionsForStateTaskUnassigned() {
|
|
8353
8431
|
this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
|
|
8354
8432
|
}
|
|
8433
|
+
taskPresentInSessionStorage(context) {
|
|
8434
|
+
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8435
|
+
console.log('clienht cintedt ', clientContextStr);
|
|
8436
|
+
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8437
|
+
return !!userTask.task_data;
|
|
8438
|
+
}
|
|
8355
8439
|
}
|
|
8356
8440
|
EventCompletionStateMachineService.ɵfac = function EventCompletionStateMachineService_Factory(t) { return new (t || EventCompletionStateMachineService)(); };
|
|
8357
8441
|
EventCompletionStateMachineService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
|
|
@@ -8810,11 +8894,9 @@ class CaseEditComponent {
|
|
|
8810
8894
|
this.isSubmitting = true;
|
|
8811
8895
|
// We have to run the event completion checks if task in session storage
|
|
8812
8896
|
// and if the task is in session storage, then is it associated to the case
|
|
8813
|
-
|
|
8814
|
-
const
|
|
8815
|
-
|
|
8816
|
-
taskInSessionStorage = JSON.parse(taskStr);
|
|
8817
|
-
}
|
|
8897
|
+
const clientContextStr = this.sessionStorageService.getItem('clientContext');
|
|
8898
|
+
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8899
|
+
const taskInSessionStorage = userTask ? userTask.task_data : null;
|
|
8818
8900
|
if (taskInSessionStorage && taskInSessionStorage.case_id === this.getCaseId(caseDetails)) {
|
|
8819
8901
|
// Show event completion component to perform event completion checks
|
|
8820
8902
|
this.eventCompletionParams = ({
|
|
@@ -9013,14 +9095,16 @@ class CaseEditComponent {
|
|
|
9013
9095
|
});
|
|
9014
9096
|
}
|
|
9015
9097
|
postCompleteTaskIfRequired() {
|
|
9016
|
-
const
|
|
9098
|
+
const clientContextStr = this.sessionStorageService.getItem('clientContext');
|
|
9099
|
+
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9100
|
+
const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
|
|
9017
9101
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
|
|
9018
|
-
if (
|
|
9019
|
-
const task = JSON.parse(taskStr);
|
|
9102
|
+
if (task && assignNeeded && taskToBeCompleted) {
|
|
9103
|
+
// const task: Task = JSON.parse(taskStr);
|
|
9020
9104
|
return this.workAllocationService.assignAndCompleteTask(task.id);
|
|
9021
9105
|
}
|
|
9022
|
-
else if (
|
|
9023
|
-
const task = JSON.parse(taskStr);
|
|
9106
|
+
else if (task && taskToBeCompleted) {
|
|
9107
|
+
// const task: Task = JSON.parse(taskStr);
|
|
9024
9108
|
return this.workAllocationService.completeTask(task.id);
|
|
9025
9109
|
}
|
|
9026
9110
|
return of(true);
|
|
@@ -10544,8 +10628,12 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
10544
10628
|
}
|
|
10545
10629
|
onContinue() {
|
|
10546
10630
|
// Get task details
|
|
10547
|
-
const
|
|
10548
|
-
|
|
10631
|
+
const clientContextStr = this.sessionStorageService.getItem('clientContext');
|
|
10632
|
+
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
10633
|
+
const task = userTask ? userTask.task_data : null;
|
|
10634
|
+
// not complete_task not utilised here as related to event completion
|
|
10635
|
+
// service wanting task associated with event to not be completed not directly relevant
|
|
10636
|
+
if (task) {
|
|
10549
10637
|
this.sessionStorageService.setItem('assignNeeded', 'true');
|
|
10550
10638
|
// set event can be completed to true
|
|
10551
10639
|
this.parentComponent.eventCanBeCompleted.emit(true);
|
|
@@ -10905,7 +10993,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
|
|
|
10905
10993
|
}
|
|
10906
10994
|
}
|
|
10907
10995
|
WriteComplexFieldComponent.ɵfac = function WriteComplexFieldComponent_Factory(t) { return new (t || WriteComplexFieldComponent)(i0.ɵɵdirectiveInject(IsCompoundPipe), i0.ɵɵdirectiveInject(FormValidatorsService)); };
|
|
10908
|
-
WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteComplexFieldComponent, selectors: [["ccd-write-complex-type-field"]], inputs: { caseFields: "caseFields",
|
|
10996
|
+
WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteComplexFieldComponent, selectors: [["ccd-write-complex-type-field"]], inputs: { caseFields: "caseFields", renderLabel: "renderLabel", ignoreMandatory: "ignoreMandatory" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 3, consts: [[1, "form-group", 3, "id"], ["class", "heading-h2", 4, "ngIf"], [3, "ngSwitch", 4, "ngFor", "ngForOf"], [1, "heading-h2"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "withLabel", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "withLabel"], ["ccdLabelSubstitutor", "", 3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"]], template: function WriteComplexFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10909
10997
|
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
|
|
10910
10998
|
i0.ɵɵtemplate(3, WriteComplexFieldComponent_h2_3_Template, 3, 3, "h2", 1);
|
|
10911
10999
|
i0.ɵɵelementEnd();
|
|
@@ -10923,8 +11011,6 @@ WriteComplexFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
10923
11011
|
args: [{ selector: 'ccd-write-complex-type-field', template: "<div class=\"form-group\" [id]=\"id()\">\n <fieldset>\n <legend><h2 *ngIf=\"renderLabel\" class=\"heading-h2\">{{(caseField | ccdFieldLabel)}}</h2></legend>\n <ng-container [ngSwitch]=\"field | ccdIsReadOnly\" *ngFor=\"let field of complexFields\">\n <ccd-field-read *ngSwitchCase=\"true\"\n ccdLabelSubstitutor\n [caseField]=\"buildField(field)\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [withLabel]=\"true\">\n </ccd-field-read>\n <ccd-field-write *ngSwitchCase=\"false\"\n ccdLabelSubstitutor\n [caseField]=\"field\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"complexGroup\"\n [idPrefix]=\"buildIdPrefix(field)\"\n [hidden]=\"field.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </ng-container>\n </fieldset>\n</div>\n", styles: [".complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}\n"] }]
|
|
10924
11012
|
}], function () { return [{ type: IsCompoundPipe }, { type: FormValidatorsService }]; }, { caseFields: [{
|
|
10925
11013
|
type: Input
|
|
10926
|
-
}], formGroup: [{
|
|
10927
|
-
type: Input
|
|
10928
11014
|
}], renderLabel: [{
|
|
10929
11015
|
type: Input
|
|
10930
11016
|
}], ignoreMandatory: [{
|
|
@@ -10942,8 +11028,8 @@ function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) { if (r
|
|
|
10942
11028
|
i0.ɵɵadvance(1);
|
|
10943
11029
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r5.errorMessage));
|
|
10944
11030
|
} }
|
|
10945
|
-
const _c1$
|
|
10946
|
-
const _c2$
|
|
11031
|
+
const _c1$o = function (a0) { return { "form-group-error": a0 }; };
|
|
11032
|
+
const _c2$3 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
10947
11033
|
function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
10948
11034
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
10949
11035
|
i0.ɵɵelementStart(0, "div", 8)(1, "label", 9)(2, "span", 10);
|
|
@@ -10959,7 +11045,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
|
|
|
10959
11045
|
i0.ɵɵelementEnd()();
|
|
10960
11046
|
} if (rf & 2) {
|
|
10961
11047
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
10962
|
-
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
11048
|
+
i0.ɵɵproperty("id", ctx_r2.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r2.missingPostcode));
|
|
10963
11049
|
i0.ɵɵadvance(1);
|
|
10964
11050
|
i0.ɵɵproperty("for", ctx_r2.createElementId("postcodeInput"));
|
|
10965
11051
|
i0.ɵɵadvance(2);
|
|
@@ -10967,7 +11053,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
|
|
|
10967
11053
|
i0.ɵɵadvance(2);
|
|
10968
11054
|
i0.ɵɵproperty("ngIf", ctx_r2.missingPostcode);
|
|
10969
11055
|
i0.ɵɵadvance(1);
|
|
10970
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$
|
|
11056
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$3, ctx_r2.missingPostcode))("id", ctx_r2.createElementId("postcodeInput"))("formControl", ctx_r2.postcode);
|
|
10971
11057
|
i0.ɵɵadvance(2);
|
|
10972
11058
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 11, "Find address"));
|
|
10973
11059
|
} }
|
|
@@ -11005,7 +11091,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) { if (rf & 1)
|
|
|
11005
11091
|
i0.ɵɵelementEnd()();
|
|
11006
11092
|
} if (rf & 2) {
|
|
11007
11093
|
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
11008
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$
|
|
11094
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r3.noAddressSelected));
|
|
11009
11095
|
i0.ɵɵadvance(1);
|
|
11010
11096
|
i0.ɵɵproperty("for", ctx_r3.createElementId("addressList"));
|
|
11011
11097
|
i0.ɵɵadvance(2);
|
|
@@ -11175,7 +11261,7 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
11175
11261
|
let _t;
|
|
11176
11262
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
11177
11263
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.focusElementDirectives = _t);
|
|
11178
|
-
} },
|
|
11264
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 4, vars: 9, consts: [[1, "form-group", 3, "id"], [4, "ngIf"], [3, "hidden", "caseField", "renderLabel", "parent", "formGroup", "ignoreMandatory", "idPrefix"], ["writeComplexFieldComponent", ""], [1, "heading-h2"], ["class", "form-group bottom-30 postcodeLookup", 3, "id", "ngClass", 4, "ngIf"], ["class", "form-group", "id", "selectAddress", 3, "ngClass", 4, "ngIf"], ["class", "manual-link bottom-30", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], [1, "form-group", "bottom-30", "postcodeLookup", 3, "id", "ngClass"], [3, "for"], [1, "form-label"], ["class", "error-message", 4, "ngIf"], ["type", "text", "name", "postcode", 1, "form-control", "postcodeinput", "inline-block", 3, "ngClass", "id", "formControl"], ["type", "button", 1, "button", "button-30", 3, "click"], [1, "error-message"], ["id", "selectAddress", 1, "form-group", 3, "ngClass"], ["name", "address", "focusElement", "", 1, "form-control", "ccd-dropdown", "addressList", 3, "id", "formControl", "change"], [3, "ngValue", 4, "ngFor", "ngForOf"], [3, "ngValue"], ["href", "javascript:void(0)", 1, "manual-link", "bottom-30", 3, "click"]], template: function WriteAddressFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11179
11265
|
i0.ɵɵelementStart(0, "div", 0);
|
|
11180
11266
|
i0.ɵɵtemplate(1, WriteAddressFieldComponent_div_1_Template, 7, 6, "div", 1);
|
|
11181
11267
|
i0.ɵɵelement(2, "ccd-write-complex-type-field", 2, 3);
|
|
@@ -11196,8 +11282,6 @@ WriteAddressFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
11196
11282
|
}], focusElementDirectives: [{
|
|
11197
11283
|
type: ViewChildren,
|
|
11198
11284
|
args: [FocusElementDirective]
|
|
11199
|
-
}], formGroup: [{
|
|
11200
|
-
type: Input
|
|
11201
11285
|
}] }); })();
|
|
11202
11286
|
|
|
11203
11287
|
var PaletteContext;
|
|
@@ -12422,7 +12506,7 @@ function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
12422
12506
|
i0.ɵɵadvance(1);
|
|
12423
12507
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label), " ");
|
|
12424
12508
|
} }
|
|
12425
|
-
const _c1$
|
|
12509
|
+
const _c1$n = function (a0) { return { "form-group-error": a0 }; };
|
|
12426
12510
|
class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
12427
12511
|
ngOnInit() {
|
|
12428
12512
|
if (this.caseField.value) {
|
|
@@ -12483,7 +12567,7 @@ WriteCaseLinkFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
12483
12567
|
i0.ɵɵelement(5, "input", 5);
|
|
12484
12568
|
i0.ɵɵelementEnd();
|
|
12485
12569
|
} if (rf & 2) {
|
|
12486
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
12570
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
12487
12571
|
i0.ɵɵadvance(1);
|
|
12488
12572
|
i0.ɵɵproperty("for", ctx.id());
|
|
12489
12573
|
i0.ɵɵadvance(1);
|
|
@@ -12515,7 +12599,7 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf
|
|
|
12515
12599
|
i0.ɵɵadvance(4);
|
|
12516
12600
|
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$T, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
|
|
12517
12601
|
} }
|
|
12518
|
-
const _c1$
|
|
12602
|
+
const _c1$m = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
12519
12603
|
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
12520
12604
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
12521
12605
|
i0.ɵɵelement(2, "ccd-field-read", 7);
|
|
@@ -12525,7 +12609,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
|
|
|
12525
12609
|
const i_r5 = ctx.index;
|
|
12526
12610
|
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
12527
12611
|
i0.ɵɵadvance(2);
|
|
12528
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$
|
|
12612
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$m, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
|
|
12529
12613
|
} }
|
|
12530
12614
|
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
|
|
12531
12615
|
i0.ɵɵelementStart(0, "tbody");
|
|
@@ -13018,7 +13102,7 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
|
|
|
13018
13102
|
} if (rf & 2) {
|
|
13019
13103
|
let _t;
|
|
13020
13104
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
|
|
13021
|
-
} }, inputs: { caseFields: "caseFields"
|
|
13105
|
+
} }, inputs: { caseFields: "caseFields" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 11, consts: [[1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], [1, "heading-h2", "error-spacing"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "disabled", "click"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [1, "error-message"], [1, "form-group", 3, "hidden"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf"], ["collectionItem", ""], [1, "collection-title"], [1, "float-left"], [3, "for"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "disabled", "click"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
13022
13106
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
|
|
13023
13107
|
i0.ɵɵtext(3);
|
|
13024
13108
|
i0.ɵɵpipe(4, "ccdFieldLabel");
|
|
@@ -13052,8 +13136,6 @@ WriteCollectionFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
|
|
|
13052
13136
|
args: [{ selector: 'ccd-write-collection-field', template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text | rpxTranslate }}</span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value && caseField.value.length\">\n <div *ngFor=\"let item of collItems; let i = index\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <label [for]=\"item.prefix + i\"><h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3></label>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value && caseField.value.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width: 641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
13053
13137
|
}], function () { return [{ type: i1$3.MatLegacyDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }]; }, { caseFields: [{
|
|
13054
13138
|
type: Input
|
|
13055
|
-
}], formGroup: [{
|
|
13056
|
-
type: Input
|
|
13057
13139
|
}], items: [{
|
|
13058
13140
|
type: ViewChildren,
|
|
13059
13141
|
args: ['collectionItem']
|
|
@@ -13348,7 +13430,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
|
|
|
13348
13430
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
13349
13431
|
i0.ɵɵproperty("caseField", ctx_r2.caseField);
|
|
13350
13432
|
} }
|
|
13351
|
-
const _c1$
|
|
13433
|
+
const _c1$l = function (a0) { return { "form-group-error bottom-30": a0 }; };
|
|
13352
13434
|
class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
13353
13435
|
constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService, jurisdictionService) {
|
|
13354
13436
|
super();
|
|
@@ -13679,7 +13761,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
13679
13761
|
i0.ɵɵpipe(17, "rpxTranslate");
|
|
13680
13762
|
i0.ɵɵelementEnd()();
|
|
13681
13763
|
} if (rf & 2) {
|
|
13682
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$
|
|
13764
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
|
|
13683
13765
|
i0.ɵɵadvance(1);
|
|
13684
13766
|
i0.ɵɵproperty("for", ctx.id());
|
|
13685
13767
|
i0.ɵɵadvance(1);
|
|
@@ -13704,7 +13786,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
13704
13786
|
} }, encapsulation: 2 });
|
|
13705
13787
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
|
|
13706
13788
|
type: Component,
|
|
13707
|
-
args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"fileUploadMessages && !valid\">{{fileUploadMessages | rpxTranslate}}</span>\n\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n
|
|
13789
|
+
args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"fileUploadMessages && !valid\">{{fileUploadMessages | rpxTranslate}}</span>\n\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
|
|
13708
13790
|
}], function () { return [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }]; }, { fileInput: [{
|
|
13709
13791
|
type: ViewChild,
|
|
13710
13792
|
args: ['fileInput', { static: false }]
|
|
@@ -13877,13 +13959,47 @@ class MarkdownComponent {
|
|
|
13877
13959
|
this._markdown = _markdown;
|
|
13878
13960
|
this.router = router;
|
|
13879
13961
|
this.renderer = renderer;
|
|
13962
|
+
this.renderUrlToTextFeature = true;
|
|
13880
13963
|
}
|
|
13881
13964
|
ngOnInit() {
|
|
13882
13965
|
this.content = this.content.replace(/ \n/g, '<br>');
|
|
13966
|
+
if (this.renderUrlToTextFeature) {
|
|
13967
|
+
this.renderUrlToText();
|
|
13968
|
+
}
|
|
13969
|
+
}
|
|
13970
|
+
onMarkdownClick(event) {
|
|
13971
|
+
// If we don't have an anchor tag, we don't need to do anything.
|
|
13972
|
+
if (event.target instanceof HTMLAnchorElement === false) {
|
|
13973
|
+
return;
|
|
13974
|
+
}
|
|
13975
|
+
return true;
|
|
13976
|
+
}
|
|
13977
|
+
renderUrlToText() {
|
|
13978
|
+
const renderer = new marked.Renderer();
|
|
13979
|
+
renderer.link = (href, title, text) => {
|
|
13980
|
+
if (!text || text === href) {
|
|
13981
|
+
return this.isAllowedUrl(href) ? `<a href="${href}">${href}</a>` : href;
|
|
13982
|
+
}
|
|
13983
|
+
return this.detectMarkdownLinks(this.content) ? `<a href="${href}">${text}</a>` : text;
|
|
13984
|
+
};
|
|
13985
|
+
marked.setOptions({
|
|
13986
|
+
renderer: renderer
|
|
13987
|
+
});
|
|
13988
|
+
}
|
|
13989
|
+
isAllowedUrl(url) {
|
|
13990
|
+
const currentOrigin = window.location.origin;
|
|
13991
|
+
const urlOrigin = new URL(url, window.location.href).origin;
|
|
13992
|
+
return urlOrigin === currentOrigin || url.startsWith('/'); // Check if same origin or relative
|
|
13993
|
+
}
|
|
13994
|
+
detectMarkdownLinks(inputString) {
|
|
13995
|
+
const markdownLinkRegex = /\[([^\]]+)\]\(?([^ )]+)\)/g;
|
|
13996
|
+
return markdownLinkRegex.test(inputString);
|
|
13883
13997
|
}
|
|
13884
13998
|
}
|
|
13885
13999
|
MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) { return new (t || MarkdownComponent)(i0.ɵɵdirectiveInject(i1$4.NgxMdService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i0.Renderer2)); };
|
|
13886
|
-
MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]],
|
|
14000
|
+
MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownComponent, selectors: [["ccd-markdown"]], hostBindings: function MarkdownComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
14001
|
+
i0.ɵɵlistener("click", function MarkdownComponent_click_HostBindingHandler($event) { return ctx.onMarkdownClick($event); });
|
|
14002
|
+
} }, inputs: { content: "content", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink", renderUrlToTextFeature: "renderUrlToTextFeature" }, decls: 4, vars: 6, consts: [[1, "markdown", 3, "sanitizeHtml", "data"]], template: function MarkdownComponent_Template(rf, ctx) { if (rf & 1) {
|
|
13887
14003
|
i0.ɵɵelementStart(0, "div");
|
|
13888
14004
|
i0.ɵɵelement(1, "markdown", 0);
|
|
13889
14005
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -13900,6 +14016,11 @@ MarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MarkdownC
|
|
|
13900
14016
|
type: Input
|
|
13901
14017
|
}], markdownUseHrefAsRouterLink: [{
|
|
13902
14018
|
type: Input
|
|
14019
|
+
}], renderUrlToTextFeature: [{
|
|
14020
|
+
type: Input
|
|
14021
|
+
}], onMarkdownClick: [{
|
|
14022
|
+
type: HostListener,
|
|
14023
|
+
args: ['click', ['$event']]
|
|
13903
14024
|
}] }); })();
|
|
13904
14025
|
|
|
13905
14026
|
class FixedListPipe {
|
|
@@ -14009,7 +14130,7 @@ function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, c
|
|
|
14009
14130
|
i0.ɵɵadvance(1);
|
|
14010
14131
|
i0.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14011
14132
|
i0.ɵɵadvance(1);
|
|
14012
|
-
i0.ɵɵproperty("content", checkbox_r4.label);
|
|
14133
|
+
i0.ɵɵproperty("content", checkbox_r4.label)("renderUrlToTextFeature", false);
|
|
14013
14134
|
} }
|
|
14014
14135
|
const _c0$P = function (a0) { return { "error": a0 }; };
|
|
14015
14136
|
class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
|
|
@@ -14073,13 +14194,13 @@ class WriteDynamicMultiSelectListFieldComponent extends AbstractFieldWriteCompon
|
|
|
14073
14194
|
}
|
|
14074
14195
|
}
|
|
14075
14196
|
WriteDynamicMultiSelectListFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory; return function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory || (ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent)))(t || WriteDynamicMultiSelectListFieldComponent); }; }();
|
|
14076
|
-
WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14197
|
+
WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"], [3, "content", "renderUrlToTextFeature"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14077
14198
|
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
|
|
14078
14199
|
i0.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14079
14200
|
i0.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14080
14201
|
i0.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14081
14202
|
i0.ɵɵelementEnd();
|
|
14082
|
-
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5,
|
|
14203
|
+
i0.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 7, "ng-container", 4);
|
|
14083
14204
|
i0.ɵɵelementEnd()();
|
|
14084
14205
|
} if (rf & 2) {
|
|
14085
14206
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$P, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
@@ -14094,7 +14215,7 @@ WriteDynamicMultiSelectListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineCom
|
|
|
14094
14215
|
} }, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, MarkdownComponent, FieldLabelPipe, FirstErrorPipe], styles: ["ccd-markdown[_ngcontent-%COMP%]{display:inline-block}"] });
|
|
14095
14216
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14096
14217
|
type: Component,
|
|
14097
|
-
args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
|
|
14218
|
+
args: [{ selector: 'ccd-write-dynamic-multi-select-list-field', template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'error': !checkboxes.valid && checkboxes.touched}\" [id]=\"id()\">\n\n <fieldset>\n\n <legend>\n <span *ngIf=\"caseField.label\" class=\"form-label\">{{caseField | ccdFieldLabel}}</span>\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">{{caseField.hint_text}}</span>\n <span *ngIf=\"checkboxes.errors && checkboxes.touched\" class=\"error-message\">{{checkboxes.errors |\n ccdFirstError}}</span>\n </legend>\n\n <ng-container *ngFor=\"let checkbox of caseField.list_items\">\n\n <div class=\"multiple-choice\">\n <input class=\"form-control\" id=\"{{ createElementId(checkbox.code) }}\" name=\"{{ id() }}\" type=\"checkbox\"\n [value]=\"checkbox.code\" [checked]=\"isSelected(checkbox.code)\" (change)=\"onCheckChange($event)\">\n <label class=\"form-label\" for=\"{{ createElementId(checkbox.code) }}\">\n <ccd-markdown [content]=\"checkbox.label\" [renderUrlToTextFeature]=\"false\"></ccd-markdown>\n </label>\n </div>\n\n </ng-container>\n\n </fieldset>\n\n</div>\n", styles: ["ccd-markdown{display:inline-block}\n"] }]
|
|
14098
14219
|
}], null, null); })();
|
|
14099
14220
|
|
|
14100
14221
|
class DynamicRadioListPipe {
|
|
@@ -14215,7 +14336,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
|
|
|
14215
14336
|
i0.ɵɵadvance(1);
|
|
14216
14337
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r5.label));
|
|
14217
14338
|
} }
|
|
14218
|
-
const _c1$
|
|
14339
|
+
const _c1$k = function (a0) { return { "form-group-error": a0 }; };
|
|
14219
14340
|
class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
14220
14341
|
ngOnInit() {
|
|
14221
14342
|
/**
|
|
@@ -14253,7 +14374,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent
|
|
|
14253
14374
|
i0.ɵɵelementContainerEnd();
|
|
14254
14375
|
i0.ɵɵelementEnd()();
|
|
14255
14376
|
} if (rf & 2) {
|
|
14256
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$
|
|
14377
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$k, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
14257
14378
|
i0.ɵɵadvance(3);
|
|
14258
14379
|
i0.ɵɵproperty("for", ctx.id());
|
|
14259
14380
|
i0.ɵɵadvance(1);
|
|
@@ -14334,7 +14455,7 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
14334
14455
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
|
|
14335
14456
|
} }
|
|
14336
14457
|
const _c0$N = function (a0) { return { "form-group-error": a0 }; };
|
|
14337
|
-
const _c1$
|
|
14458
|
+
const _c1$j = function (a0) { return { "govuk-input--error": a0 }; };
|
|
14338
14459
|
class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
|
|
14339
14460
|
ngOnInit() {
|
|
14340
14461
|
this.emailControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -14360,7 +14481,7 @@ WriteEmailFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
14360
14481
|
i0.ɵɵadvance(1);
|
|
14361
14482
|
i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
|
|
14362
14483
|
i0.ɵɵadvance(1);
|
|
14363
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
14484
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
|
|
14364
14485
|
} }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
14365
14486
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
|
|
14366
14487
|
type: Component,
|
|
@@ -14571,7 +14692,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
|
|
|
14571
14692
|
i0.ɵɵadvance(1);
|
|
14572
14693
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 7, radioButton_r4.label));
|
|
14573
14694
|
} }
|
|
14574
|
-
const _c1$
|
|
14695
|
+
const _c1$i = function (a0) { return { "form-group-error": a0 }; };
|
|
14575
14696
|
class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
14576
14697
|
ngOnInit() {
|
|
14577
14698
|
const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
|
|
@@ -14591,7 +14712,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
14591
14712
|
i0.ɵɵelementContainerEnd();
|
|
14592
14713
|
i0.ɵɵelementEnd()();
|
|
14593
14714
|
} if (rf & 2) {
|
|
14594
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
14715
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$i, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
14595
14716
|
i0.ɵɵadvance(3);
|
|
14596
14717
|
i0.ɵɵproperty("for", ctx.id());
|
|
14597
14718
|
i0.ɵɵadvance(1);
|
|
@@ -14713,7 +14834,7 @@ function WriteJudicialUserFieldComponent_mat_option_11_Template(rf, ctx) { if (r
|
|
|
14713
14834
|
i0.ɵɵtext(1, " Invalid search term ");
|
|
14714
14835
|
i0.ɵɵelementEnd();
|
|
14715
14836
|
} }
|
|
14716
|
-
const _c1$
|
|
14837
|
+
const _c1$h = function (a0) { return { "form-group-error": a0 }; };
|
|
14717
14838
|
class WriteJudicialUserFieldComponent extends WriteComplexFieldComponent {
|
|
14718
14839
|
constructor(jurisdictionService, sessionStorageService, caseFlagRefDataService, compoundPipe, validatorsService) {
|
|
14719
14840
|
super(compoundPipe, validatorsService);
|
|
@@ -14860,7 +14981,7 @@ WriteJudicialUserFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ t
|
|
|
14860
14981
|
i0.ɵɵelementEnd()();
|
|
14861
14982
|
} if (rf & 2) {
|
|
14862
14983
|
const _r3 = i0.ɵɵreference(7);
|
|
14863
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$
|
|
14984
|
+
i0.ɵɵproperty("formGroup", ctx.formGroup)("ngClass", i0.ɵɵpureFunction1(15, _c1$h, !!ctx.judicialUserControl && ctx.errors));
|
|
14864
14985
|
i0.ɵɵadvance(1);
|
|
14865
14986
|
i0.ɵɵproperty("for", ctx.id());
|
|
14866
14987
|
i0.ɵɵadvance(1);
|
|
@@ -15550,7 +15671,7 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
|
|
|
15550
15671
|
i0.ɵɵadvance(1);
|
|
15551
15672
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r19));
|
|
15552
15673
|
} }
|
|
15553
|
-
const _c1$
|
|
15674
|
+
const _c1$g = function (a0) { return { "table-group-error": a0 }; };
|
|
15554
15675
|
function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
15555
15676
|
const _r21 = i0.ɵɵgetCurrentView();
|
|
15556
15677
|
i0.ɵɵelementStart(0, "tr", 10)(1, "td", 38);
|
|
@@ -15581,7 +15702,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
|
15581
15702
|
const case_r16 = ctx.$implicit;
|
|
15582
15703
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
15583
15704
|
i0.ɵɵadvance(2);
|
|
15584
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$
|
|
15705
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r2.caseSelectionError && case_r16.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
|
|
15585
15706
|
i0.ɵɵadvance(2);
|
|
15586
15707
|
i0.ɵɵtextInterpolate1("", case_r16.caseName, " ");
|
|
15587
15708
|
i0.ɵɵadvance(2);
|
|
@@ -17481,7 +17602,7 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
17481
17602
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label), " ");
|
|
17482
17603
|
} }
|
|
17483
17604
|
const _c0$F = function (a0) { return { "form-group-error": a0 }; };
|
|
17484
|
-
const _c1$
|
|
17605
|
+
const _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
|
|
17485
17606
|
class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
|
|
17486
17607
|
ngOnInit() {
|
|
17487
17608
|
this.numberControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -17507,7 +17628,7 @@ WriteNumberFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: W
|
|
|
17507
17628
|
i0.ɵɵadvance(1);
|
|
17508
17629
|
i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
|
|
17509
17630
|
i0.ɵɵadvance(1);
|
|
17510
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
17631
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
|
|
17511
17632
|
} }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
17512
17633
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
|
|
17513
17634
|
type: Component,
|
|
@@ -18148,7 +18269,7 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
18148
18269
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label), " ");
|
|
18149
18270
|
} }
|
|
18150
18271
|
const _c0$D = function (a0) { return { "form-group-error": a0 }; };
|
|
18151
|
-
const _c1$
|
|
18272
|
+
const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
18152
18273
|
class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
|
|
18153
18274
|
ngOnInit() {
|
|
18154
18275
|
this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -18174,7 +18295,7 @@ WritePhoneUKFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
18174
18295
|
i0.ɵɵadvance(1);
|
|
18175
18296
|
i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
|
|
18176
18297
|
i0.ɵɵadvance(1);
|
|
18177
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
18298
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
|
|
18178
18299
|
} }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
18179
18300
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
|
|
18180
18301
|
type: Component,
|
|
@@ -19556,10 +19677,10 @@ QueryListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryLis
|
|
|
19556
19677
|
i0.ɵɵtemplate(0, QueryListComponent_ng_container_0_Template, 10, 3, "ng-container", 0);
|
|
19557
19678
|
} if (rf & 2) {
|
|
19558
19679
|
i0.ɵɵproperty("ngIf", ctx.queryListData);
|
|
19559
|
-
} }, dependencies: [i4.NgForOf, i4.NgIf, i4.DatePipe, i1.RpxTranslatePipe], styles: ["@charset \"UTF-8\";.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{padding-left:10px}.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{padding-right:10px}.query-list__cell--first[_ngcontent-%COMP%]{width:33%}[aria-sort] button[_ngcontent-%COMP%], [aria-sort] button[_ngcontent-%COMP%]:hover, [aria-sort] button[_ngcontent-%COMP%]:hover
|
|
19680
|
+
} }, dependencies: [i4.NgForOf, i4.NgIf, i4.DatePipe, i1.RpxTranslatePipe], styles: ["@charset \"UTF-8\";.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{padding-left:10px}.query-list__row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{padding-right:10px}.query-list__cell--first[_ngcontent-%COMP%]{width:33%}[aria-sort] button[_ngcontent-%COMP%], [aria-sort] button[_ngcontent-%COMP%]:hover, [aria-sort] button[_ngcontent-%COMP%]:hover:hover{background-color:transparent;border-width:0;box-shadow:0 0;color:#000;cursor:pointer;font-family:inherit;font-weight:inherit;padding:0 10px 0 0;position:relative;text-align:inherit;font-size:1em;margin:0}[aria-sort] button[_ngcontent-%COMP%]:focus, [aria-sort] button[_ngcontent-%COMP%]:hover:focus{background-color:#fd0;color:#000;box-shadow:0 -2px #fd0,0 4px #000;outline:none}[aria-sort][_ngcontent-%COMP%]:first-child button{right:auto}[aria-sort] button[_ngcontent-%COMP%]:before{content:\" \\25bc\";position:absolute;right:-1px;top:9px;font-size:.5em}[aria-sort] button[_ngcontent-%COMP%]:after{content:\" \\25b2\";position:absolute;right:-1px;top:1px;font-size:.5em}[aria-sort=ascending] button[_ngcontent-%COMP%]:before, [aria-sort=descending] button[_ngcontent-%COMP%]:before{content:none}[aria-sort=ascending] button[_ngcontent-%COMP%]:after{content:\" \\25b2\";font-size:.8em;position:absolute;right:-5px;top:2px}[aria-sort=descending] button[_ngcontent-%COMP%]:after{content:\" \\25bc\";font-size:.8em;position:absolute;right:-5px;top:2px}"] });
|
|
19560
19681
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryListComponent, [{
|
|
19561
19682
|
type: Component,
|
|
19562
|
-
args: [{ selector: 'ccd-query-list', template: "<ng-container *ngIf=\"queryListData\">\n <table class=\"govuk-table query-list__table\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ queryListData.partyName }}</div>\n </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row query-list__row\">\n <th scope=\"col\" class=\"govuk-table__header\" [attr.aria-sort]=\"getAriaSortHeaderValue(col)\"\n *ngFor=\"let col of displayedColumns; let i = index;\">\n <button type=\"button\" [attr.data-index]=\"i\" aria-sort=\"none\" (click)=\"sortTable(col)\" href=\"javascript:void(0)\">\n {{ col.displayName | rpxTranslate }}\n </button>\n </th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row query-list__row\"\n *ngFor=\"let message of queryListData.queries\"\n >\n <td class=\"govuk-table__cell query-list__cell query-list__cell--first\">\n <a href=\"javascript:void(0)\" (click)=\"showDetails(message)\">{{ message.subject }}</a>\n </td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedBy }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastResponseDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.responseStatus | rpxTranslate }}</td>\n </tr>\n </tbody>\n </table>\n</ng-container>\n", styles: ["@charset \"UTF-8\";.query-list__row>*:first-child{padding-left:10px}.query-list__row>*:last-child{padding-right:10px}.query-list__cell--first{width:33%}[aria-sort] button,[aria-sort] button:hover,[aria-sort] button:hover
|
|
19683
|
+
args: [{ selector: 'ccd-query-list', template: "<ng-container *ngIf=\"queryListData\">\n <table class=\"govuk-table query-list__table\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ queryListData.partyName }}</div>\n </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row query-list__row\">\n <th scope=\"col\" class=\"govuk-table__header\" [attr.aria-sort]=\"getAriaSortHeaderValue(col)\"\n *ngFor=\"let col of displayedColumns; let i = index;\">\n <button type=\"button\" [attr.data-index]=\"i\" aria-sort=\"none\" (click)=\"sortTable(col)\" href=\"javascript:void(0)\">\n {{ col.displayName | rpxTranslate }}\n </button>\n </th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row query-list__row\"\n *ngFor=\"let message of queryListData.queries\"\n >\n <td class=\"govuk-table__cell query-list__cell query-list__cell--first\">\n <a href=\"javascript:void(0)\" (click)=\"showDetails(message)\">{{ message.subject }}</a>\n </td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedBy }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastSubmittedDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.lastResponseDate | date: 'dd MMM YYYY' }}</td>\n <td class=\"govuk-table__cell query-list__cell\">{{ message.responseStatus | rpxTranslate }}</td>\n </tr>\n </tbody>\n </table>\n</ng-container>\n", styles: ["@charset \"UTF-8\";.query-list__row>*:first-child{padding-left:10px}.query-list__row>*:last-child{padding-right:10px}.query-list__cell--first{width:33%}[aria-sort] button,[aria-sort] button:hover,[aria-sort] button:hover:hover{background-color:transparent;border-width:0;box-shadow:0 0;color:#000;cursor:pointer;font-family:inherit;font-weight:inherit;padding:0 10px 0 0;position:relative;text-align:inherit;font-size:1em;margin:0}[aria-sort] button:focus,[aria-sort] button:hover:focus{background-color:#fd0;color:#000;box-shadow:0 -2px #fd0,0 4px #000;outline:none}[aria-sort]:first-child button{right:auto}[aria-sort] button:before{content:\" \\25bc\";position:absolute;right:-1px;top:9px;font-size:.5em}[aria-sort] button:after{content:\" \\25b2\";position:absolute;right:-1px;top:1px;font-size:.5em}[aria-sort=ascending] button:before,[aria-sort=descending] button:before{content:none}[aria-sort=ascending] button:after{content:\" \\25b2\";font-size:.8em;position:absolute;right:-5px;top:2px}[aria-sort=descending] button:after{content:\" \\25bc\";font-size:.8em;position:absolute;right:-5px;top:2px}\n"] }]
|
|
19563
19684
|
}], null, { caseQueriesCollection: [{
|
|
19564
19685
|
type: Input
|
|
19565
19686
|
}], selectedQuery: [{
|
|
@@ -20190,7 +20311,7 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
20190
20311
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label), " ");
|
|
20191
20312
|
} }
|
|
20192
20313
|
const _c0$A = function (a0) { return { "form-group-error": a0 }; };
|
|
20193
|
-
const _c1$
|
|
20314
|
+
const _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
|
|
20194
20315
|
class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
20195
20316
|
constructor(browserService) {
|
|
20196
20317
|
super();
|
|
@@ -20228,7 +20349,7 @@ WriteTextAreaFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
20228
20349
|
i0.ɵɵadvance(1);
|
|
20229
20350
|
i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
|
|
20230
20351
|
i0.ɵɵadvance(1);
|
|
20231
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
20352
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
|
|
20232
20353
|
} }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
20233
20354
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextAreaFieldComponent, [{
|
|
20234
20355
|
type: Component,
|
|
@@ -20286,7 +20407,7 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
20286
20407
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label), " ");
|
|
20287
20408
|
} }
|
|
20288
20409
|
const _c0$z = function (a0) { return { "form-group-error": a0 }; };
|
|
20289
|
-
const _c1$
|
|
20410
|
+
const _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
|
|
20290
20411
|
class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
20291
20412
|
ngOnInit() {
|
|
20292
20413
|
this.textControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -20316,7 +20437,7 @@ WriteTextFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wri
|
|
|
20316
20437
|
i0.ɵɵadvance(1);
|
|
20317
20438
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
20318
20439
|
i0.ɵɵadvance(1);
|
|
20319
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
20440
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
20320
20441
|
} }, dependencies: [i4.NgClass, i4.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
20321
20442
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
|
|
20322
20443
|
type: Component,
|
|
@@ -20489,7 +20610,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
20489
20610
|
i0.ɵɵadvance(1);
|
|
20490
20611
|
i0.ɵɵtextInterpolate(ctx_r3.caseField.label ? i0.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4) : value_r4);
|
|
20491
20612
|
} }
|
|
20492
|
-
const _c1$
|
|
20613
|
+
const _c1$b = function (a0) { return { "form-group-error": a0 }; };
|
|
20493
20614
|
class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
20494
20615
|
constructor(yesNoService) {
|
|
20495
20616
|
super();
|
|
@@ -20511,7 +20632,7 @@ WriteYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Wr
|
|
|
20511
20632
|
i0.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template, 5, 14, "div", 6);
|
|
20512
20633
|
i0.ɵɵelementEnd()()();
|
|
20513
20634
|
} if (rf & 2) {
|
|
20514
|
-
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
20635
|
+
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
|
|
20515
20636
|
i0.ɵɵadvance(3);
|
|
20516
20637
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
20517
20638
|
i0.ɵɵadvance(1);
|
|
@@ -20868,7 +20989,7 @@ function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
|
|
|
20868
20989
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
20869
20990
|
i0.ɵɵelementContainer(0);
|
|
20870
20991
|
} }
|
|
20871
|
-
const _c1$
|
|
20992
|
+
const _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
|
|
20872
20993
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
20873
20994
|
i0.ɵɵelementContainerStart(0);
|
|
20874
20995
|
i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
|
|
@@ -20879,7 +21000,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
|
|
|
20879
21000
|
i0.ɵɵnextContext();
|
|
20880
21001
|
const _r1 = i0.ɵɵreference(13);
|
|
20881
21002
|
i0.ɵɵadvance(1);
|
|
20882
|
-
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$
|
|
21003
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
|
|
20883
21004
|
} }
|
|
20884
21005
|
function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
|
|
20885
21006
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
@@ -21048,7 +21169,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
|
|
|
21048
21169
|
i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
|
|
21049
21170
|
} }
|
|
21050
21171
|
const _c0$t = [[["", "trigger", ""]]];
|
|
21051
|
-
const _c1$
|
|
21172
|
+
const _c1$9 = ["[trigger]"];
|
|
21052
21173
|
class CaseFileViewOverlayMenuComponent {
|
|
21053
21174
|
constructor() {
|
|
21054
21175
|
this.title = '';
|
|
@@ -21062,7 +21183,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
21062
21183
|
}
|
|
21063
21184
|
}
|
|
21064
21185
|
CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
|
|
21065
|
-
CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$
|
|
21186
|
+
CaseFileViewOverlayMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21066
21187
|
i0.ɵɵprojectionDef(_c0$t);
|
|
21067
21188
|
i0.ɵɵelementStart(0, "div")(1, "button", 0, 1);
|
|
21068
21189
|
i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
|
|
@@ -23131,7 +23252,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_div_8_Template(rf, ctx) {
|
|
|
23131
23252
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, "This flag should only be visible to HMCTS Staff"), " ");
|
|
23132
23253
|
} }
|
|
23133
23254
|
const _c0$o = function (a0) { return { "form-group-error": a0 }; };
|
|
23134
|
-
const _c1$
|
|
23255
|
+
const _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
23135
23256
|
function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
23136
23257
|
i0.ɵɵelementStart(0, "div", 18)(1, "div", 3)(2, "label", 19);
|
|
23137
23258
|
i0.ɵɵtext(3);
|
|
@@ -23151,7 +23272,7 @@ function SelectFlagTypeComponent_ng_container_0_div_11_Template(rf, ctx) { if (r
|
|
|
23151
23272
|
i0.ɵɵadvance(3);
|
|
23152
23273
|
i0.ɵɵproperty("ngIf", ctx_r7.flagTypeErrorMessage.length > 0);
|
|
23153
23274
|
i0.ɵɵadvance(1);
|
|
23154
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
23275
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c1$8, ctx_r7.flagTypeErrorMessage.length > 0))("name", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION)("formControlName", ctx_r7.caseFlagFormField.OTHER_FLAG_DESCRIPTION);
|
|
23155
23276
|
i0.ɵɵadvance(1);
|
|
23156
23277
|
i0.ɵɵproperty("ngIf", !ctx_r7.isDisplayContextParameterExternal && !ctx_r7.isCaseLevelFlag && ctx_r7.isDisplayContextParameter2Point1Enabled);
|
|
23157
23278
|
} }
|
|
@@ -23651,7 +23772,7 @@ function UpdateFlagComponent_div_22_Template(rf, ctx) { if (rf & 1) {
|
|
|
23651
23772
|
i0.ɵɵadvance(3);
|
|
23652
23773
|
i0.ɵɵproperty("ngIf", ctx_r9.selectedFlag.flagDetailDisplay.flagDetail.status === "Active");
|
|
23653
23774
|
} }
|
|
23654
|
-
const _c1$
|
|
23775
|
+
const _c1$7 = function (a0) { return { "form-group-error": a0 }; };
|
|
23655
23776
|
class UpdateFlagComponent {
|
|
23656
23777
|
constructor(rpxTranslationService) {
|
|
23657
23778
|
this.rpxTranslationService = rpxTranslationService;
|
|
@@ -23853,7 +23974,7 @@ UpdateFlagComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateF
|
|
|
23853
23974
|
const _r3 = i0.ɵɵreference(17);
|
|
23854
23975
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
23855
23976
|
i0.ɵɵadvance(2);
|
|
23856
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$
|
|
23977
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c1$7, ctx.errorMessages.length > 0));
|
|
23857
23978
|
i0.ɵɵadvance(3);
|
|
23858
23979
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 13, ctx.updateFlagTitle), " ");
|
|
23859
23980
|
i0.ɵɵadvance(2);
|
|
@@ -25123,7 +25244,7 @@ const CUSTOM_MOMENT_FORMATS = {
|
|
|
25123
25244
|
};
|
|
25124
25245
|
|
|
25125
25246
|
const _c0$h = ["picker"];
|
|
25126
|
-
const _c1$
|
|
25247
|
+
const _c1$6 = ["input"];
|
|
25127
25248
|
function DatetimePickerComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
25128
25249
|
i0.ɵɵelementStart(0, "span", 11);
|
|
25129
25250
|
i0.ɵɵtext(1);
|
|
@@ -25172,7 +25293,7 @@ function DatetimePickerComponent_span_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
25172
25293
|
i0.ɵɵadvance(1);
|
|
25173
25294
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "This date is later than the maximum date allowed"));
|
|
25174
25295
|
} }
|
|
25175
|
-
const _c2$
|
|
25296
|
+
const _c2$2 = function (a0) { return { "form-group-error": a0 }; };
|
|
25176
25297
|
class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
25177
25298
|
constructor(formatTranslationService, ngxMatDateFormats) {
|
|
25178
25299
|
super();
|
|
@@ -25337,7 +25458,7 @@ class DatetimePickerComponent extends AbstractFormFieldComponent {
|
|
|
25337
25458
|
DatetimePickerComponent.ɵfac = function DatetimePickerComponent_Factory(t) { return new (t || DatetimePickerComponent)(i0.ɵɵdirectiveInject(FormatTranslatorService), i0.ɵɵdirectiveInject(NGX_MAT_DATE_FORMATS)); };
|
|
25338
25459
|
DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DatetimePickerComponent, selectors: [["ccd-datetime-picker"]], viewQuery: function DatetimePickerComponent_Query(rf, ctx) { if (rf & 1) {
|
|
25339
25460
|
i0.ɵɵviewQuery(_c0$h, 5);
|
|
25340
|
-
i0.ɵɵviewQuery(_c1$
|
|
25461
|
+
i0.ɵɵviewQuery(_c1$6, 5);
|
|
25341
25462
|
} if (rf & 2) {
|
|
25342
25463
|
let _t;
|
|
25343
25464
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.datetimePicker = _t.first);
|
|
@@ -25369,7 +25490,7 @@ DatetimePickerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Dat
|
|
|
25369
25490
|
i0.ɵɵelementEnd()()()()()();
|
|
25370
25491
|
} if (rf & 2) {
|
|
25371
25492
|
const _r6 = i0.ɵɵreference(13);
|
|
25372
|
-
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$
|
|
25493
|
+
i0.ɵɵproperty("id", ctx.caseField.id)("ngClass", i0.ɵɵpureFunction1(24, _c2$2, ctx.dateControl && !ctx.dateControl.valid && ctx.dateControl.dirty));
|
|
25373
25494
|
i0.ɵɵadvance(3);
|
|
25374
25495
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
25375
25496
|
i0.ɵɵadvance(1);
|
|
@@ -25593,7 +25714,7 @@ function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
25593
25714
|
i0.ɵɵadvance(3);
|
|
25594
25715
|
i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
|
|
25595
25716
|
} }
|
|
25596
|
-
const _c1$
|
|
25717
|
+
const _c1$5 = function (a0) { return { "EventLogTable-Selected": a0 }; };
|
|
25597
25718
|
function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
|
|
25598
25719
|
const _r18 = i0.ɵɵgetCurrentView();
|
|
25599
25720
|
i0.ɵɵelementStart(0, "tr", 4);
|
|
@@ -25624,7 +25745,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
|
|
|
25624
25745
|
} if (rf & 2) {
|
|
25625
25746
|
const event_r1 = ctx.$implicit;
|
|
25626
25747
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
25627
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$
|
|
25748
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c1$5, ctx_r0.selected === event_r1));
|
|
25628
25749
|
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
|
|
25629
25750
|
i0.ɵɵadvance(2);
|
|
25630
25751
|
i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
|
|
@@ -27539,6 +27660,30 @@ function CaseEditSubmitComponent_div_0_ng_container_13_Template(rf, ctx) { if (r
|
|
|
27539
27660
|
i0.ɵɵadvance(3);
|
|
27540
27661
|
i0.ɵɵproperty("ngForOf", ctx_r8.showSummaryFields);
|
|
27541
27662
|
} }
|
|
27663
|
+
function CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template(rf, ctx) { if (rf & 1) {
|
|
27664
|
+
i0.ɵɵelementStart(0, "span", 48);
|
|
27665
|
+
i0.ɵɵtext(1);
|
|
27666
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
27667
|
+
i0.ɵɵpipe(3, "ccdFirstError");
|
|
27668
|
+
i0.ɵɵelementEnd();
|
|
27669
|
+
} if (rf & 2) {
|
|
27670
|
+
const ctx_r36 = i0.ɵɵnextContext(3);
|
|
27671
|
+
i0.ɵɵadvance(1);
|
|
27672
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r36.summary.errors, ctx_r36.eventSummaryLabel)), " ");
|
|
27673
|
+
} }
|
|
27674
|
+
function CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template(rf, ctx) { if (rf & 1) {
|
|
27675
|
+
i0.ɵɵelementStart(0, "span", 48);
|
|
27676
|
+
i0.ɵɵtext(1);
|
|
27677
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
27678
|
+
i0.ɵɵpipe(3, "ccdFirstError");
|
|
27679
|
+
i0.ɵɵelementEnd();
|
|
27680
|
+
} if (rf & 2) {
|
|
27681
|
+
const ctx_r37 = i0.ɵɵnextContext(3);
|
|
27682
|
+
i0.ɵɵadvance(1);
|
|
27683
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind2(3, 3, ctx_r37.description.errors, ctx_r37.eventDescriptionLabel)), " ");
|
|
27684
|
+
} }
|
|
27685
|
+
const _c1$4 = function (a0) { return { "form-group-error": a0 }; };
|
|
27686
|
+
const _c2$1 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
27542
27687
|
function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (rf & 1) {
|
|
27543
27688
|
i0.ɵɵelementContainerStart(0);
|
|
27544
27689
|
i0.ɵɵelementStart(1, "fieldset", 39);
|
|
@@ -27548,19 +27693,35 @@ function CaseEditSubmitComponent_div_0_ng_container_14_Template(rf, ctx) { if (r
|
|
|
27548
27693
|
i0.ɵɵelementStart(6, "span", 43);
|
|
27549
27694
|
i0.ɵɵtext(7, "A few words describing the purpose of the event.");
|
|
27550
27695
|
i0.ɵɵelementEnd()();
|
|
27551
|
-
i0.ɵɵ
|
|
27696
|
+
i0.ɵɵtemplate(8, CaseEditSubmitComponent_div_0_ng_container_14_span_8_Template, 4, 6, "span", 44);
|
|
27697
|
+
i0.ɵɵelement(9, "input", 45);
|
|
27552
27698
|
i0.ɵɵelementEnd();
|
|
27553
|
-
i0.ɵɵelementStart(
|
|
27554
|
-
i0.ɵɵtext(
|
|
27699
|
+
i0.ɵɵelementStart(10, "div", 41)(11, "label", 46);
|
|
27700
|
+
i0.ɵɵtext(12, "Event description (optional)");
|
|
27555
27701
|
i0.ɵɵelementEnd();
|
|
27556
|
-
i0.ɵɵ
|
|
27702
|
+
i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_14_span_13_Template, 4, 6, "span", 44);
|
|
27703
|
+
i0.ɵɵelement(14, "textarea", 47);
|
|
27557
27704
|
i0.ɵɵelementEnd()();
|
|
27558
27705
|
i0.ɵɵelementContainerEnd();
|
|
27706
|
+
} if (rf & 2) {
|
|
27707
|
+
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
27708
|
+
i0.ɵɵadvance(3);
|
|
27709
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c1$4, !!ctx_r9.summary && !ctx_r9.summary.valid && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
|
|
27710
|
+
i0.ɵɵadvance(5);
|
|
27711
|
+
i0.ɵɵproperty("ngIf", (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched));
|
|
27712
|
+
i0.ɵɵadvance(1);
|
|
27713
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c2$1, (ctx_r9.summary == null ? null : ctx_r9.summary.errors) && (ctx_r9.summary.dirty || ctx_r9.summary.touched)));
|
|
27714
|
+
i0.ɵɵadvance(1);
|
|
27715
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$4, !!ctx_r9.description && !ctx_r9.description.valid && (ctx_r9.description.dirty || ctx_r9.description.touched)));
|
|
27716
|
+
i0.ɵɵadvance(3);
|
|
27717
|
+
i0.ɵɵproperty("ngIf", (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched));
|
|
27718
|
+
i0.ɵɵadvance(1);
|
|
27719
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c2$1, (ctx_r9.description == null ? null : ctx_r9.description.errors) && (ctx_r9.description.dirty || ctx_r9.description.touched)));
|
|
27559
27720
|
} }
|
|
27560
27721
|
function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1) {
|
|
27561
|
-
const
|
|
27562
|
-
i0.ɵɵelementStart(0, "button",
|
|
27563
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
27722
|
+
const _r39 = i0.ɵɵgetCurrentView();
|
|
27723
|
+
i0.ɵɵelementStart(0, "button", 49);
|
|
27724
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r38.previous()); });
|
|
27564
27725
|
i0.ɵɵtext(1);
|
|
27565
27726
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
27566
27727
|
i0.ɵɵelementEnd();
|
|
@@ -27571,7 +27732,7 @@ function CaseEditSubmitComponent_div_0_button_16_Template(rf, ctx) { if (rf & 1)
|
|
|
27571
27732
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, "Previous"), " ");
|
|
27572
27733
|
} }
|
|
27573
27734
|
function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
27574
|
-
const
|
|
27735
|
+
const _r41 = i0.ɵɵgetCurrentView();
|
|
27575
27736
|
i0.ɵɵelementStart(0, "div")(1, "h1", 2);
|
|
27576
27737
|
i0.ɵɵtext(2);
|
|
27577
27738
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -27581,13 +27742,13 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
27581
27742
|
i0.ɵɵtemplate(7, CaseEditSubmitComponent_div_0_ng_template_7_Template, 1, 1, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
|
|
27582
27743
|
i0.ɵɵelement(9, "ccd-case-edit-generic-errors", 6);
|
|
27583
27744
|
i0.ɵɵelementStart(10, "ccd-callback-errors", 7);
|
|
27584
|
-
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(
|
|
27745
|
+
i0.ɵɵlistener("callbackErrorsContext", function CaseEditSubmitComponent_div_0_Template_ccd_callback_errors_callbackErrorsContext_10_listener($event) { i0.ɵɵrestoreView(_r41); const ctx_r40 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r40.callbackErrorsNotify($event)); });
|
|
27585
27746
|
i0.ɵɵelementEnd();
|
|
27586
27747
|
i0.ɵɵelementStart(11, "form", 8);
|
|
27587
|
-
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(
|
|
27748
|
+
i0.ɵɵlistener("submit", function CaseEditSubmitComponent_div_0_Template_form_submit_11_listener() { i0.ɵɵrestoreView(_r41); const ctx_r42 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r42.submit()); });
|
|
27588
27749
|
i0.ɵɵtemplate(12, CaseEditSubmitComponent_div_0_ng_container_12_Template, 8, 5, "ng-container", 0);
|
|
27589
27750
|
i0.ɵɵtemplate(13, CaseEditSubmitComponent_div_0_ng_container_13_Template, 4, 1, "ng-container", 0);
|
|
27590
|
-
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template,
|
|
27751
|
+
i0.ɵɵtemplate(14, CaseEditSubmitComponent_div_0_ng_container_14_Template, 15, 14, "ng-container", 0);
|
|
27591
27752
|
i0.ɵɵelementStart(15, "div", 9);
|
|
27592
27753
|
i0.ɵɵtemplate(16, CaseEditSubmitComponent_div_0_button_16_Template, 3, 4, "button", 10);
|
|
27593
27754
|
i0.ɵɵelementStart(17, "button", 11);
|
|
@@ -27595,7 +27756,7 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
27595
27756
|
i0.ɵɵpipe(19, "rpxTranslate");
|
|
27596
27757
|
i0.ɵɵelementEnd()();
|
|
27597
27758
|
i0.ɵɵelementStart(20, "p", 12)(21, "a", 13);
|
|
27598
|
-
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(
|
|
27759
|
+
i0.ɵɵlistener("click", function CaseEditSubmitComponent_div_0_Template_a_click_21_listener() { i0.ɵɵrestoreView(_r41); const ctx_r43 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r43.cancel()); });
|
|
27599
27760
|
i0.ɵɵtext(22);
|
|
27600
27761
|
i0.ɵɵpipe(23, "rpxTranslate");
|
|
27601
27762
|
i0.ɵɵelementEnd()()()();
|
|
@@ -27631,9 +27792,9 @@ function CaseEditSubmitComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
27631
27792
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(23, 20, ctx_r0.getCancelText()));
|
|
27632
27793
|
} }
|
|
27633
27794
|
function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) { if (rf & 1) {
|
|
27634
|
-
const
|
|
27635
|
-
i0.ɵɵelementStart(0, "ccd-case-event-completion",
|
|
27636
|
-
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(
|
|
27795
|
+
const _r45 = i0.ɵɵgetCurrentView();
|
|
27796
|
+
i0.ɵɵelementStart(0, "ccd-case-event-completion", 50);
|
|
27797
|
+
i0.ɵɵlistener("eventCanBeCompleted", function CaseEditSubmitComponent_ccd_case_event_completion_1_Template_ccd_case_event_completion_eventCanBeCompleted_0_listener($event) { i0.ɵɵrestoreView(_r45); const ctx_r44 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r44.onEventCanBeCompleted($event)); });
|
|
27637
27798
|
i0.ɵɵelementEnd();
|
|
27638
27799
|
} if (rf & 2) {
|
|
27639
27800
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -27641,14 +27802,17 @@ function CaseEditSubmitComponent_ccd_case_event_completion_1_Template(rf, ctx) {
|
|
|
27641
27802
|
} }
|
|
27642
27803
|
// @dynamic
|
|
27643
27804
|
class CaseEditSubmitComponent {
|
|
27644
|
-
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier) {
|
|
27805
|
+
constructor(caseEdit, fieldsUtils, caseFieldService, route, orderService, profileNotifier, formValidatorsService) {
|
|
27645
27806
|
this.caseEdit = caseEdit;
|
|
27646
27807
|
this.fieldsUtils = fieldsUtils;
|
|
27647
27808
|
this.caseFieldService = caseFieldService;
|
|
27648
27809
|
this.route = route;
|
|
27649
27810
|
this.orderService = orderService;
|
|
27650
27811
|
this.profileNotifier = profileNotifier;
|
|
27812
|
+
this.formValidatorsService = formValidatorsService;
|
|
27651
27813
|
this.paletteContext = PaletteContext.CHECK_YOUR_ANSWER;
|
|
27814
|
+
this.eventSummaryLabel = 'Event summary';
|
|
27815
|
+
this.eventDescriptionLabel = 'Event description';
|
|
27652
27816
|
}
|
|
27653
27817
|
get isDisabled() {
|
|
27654
27818
|
// EUI-3452.
|
|
@@ -27658,7 +27822,7 @@ class CaseEditSubmitComponent {
|
|
|
27658
27822
|
return this.caseEdit.isSubmitting || this.hasErrors;
|
|
27659
27823
|
}
|
|
27660
27824
|
ngOnInit() {
|
|
27661
|
-
this.profileSubscription = this.profileNotifier.profile.subscribe(_ => this.profile = _);
|
|
27825
|
+
this.profileSubscription = this.profileNotifier.profile.subscribe((_) => this.profile = _);
|
|
27662
27826
|
this.eventTrigger = this.caseEdit.eventTrigger;
|
|
27663
27827
|
this.triggerText = this.eventTrigger.end_button_label || CallbackErrorsComponent.TRIGGER_TEXT_SUBMIT;
|
|
27664
27828
|
this.editForm = this.caseEdit.form;
|
|
@@ -27672,10 +27836,12 @@ class CaseEditSubmitComponent {
|
|
|
27672
27836
|
// Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
|
|
27673
27837
|
// a FlagLauncher field in the event trigger
|
|
27674
27838
|
this.caseEdit.isCaseFlagSubmission =
|
|
27675
|
-
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
|
|
27839
|
+
this.eventTrigger.case_fields.some((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']));
|
|
27676
27840
|
this.caseEdit.isLinkedCasesSubmission =
|
|
27677
27841
|
this.eventTrigger.case_fields.some(caseField => FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']));
|
|
27678
27842
|
this.pageTitle = this.getPageTitle();
|
|
27843
|
+
this.summary = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.summary');
|
|
27844
|
+
this.description = this.formValidatorsService.addMarkDownValidators(this.editForm, 'event.description');
|
|
27679
27845
|
}
|
|
27680
27846
|
ngOnDestroy() {
|
|
27681
27847
|
/* istanbul ignore else */
|
|
@@ -27684,12 +27850,14 @@ class CaseEditSubmitComponent {
|
|
|
27684
27850
|
}
|
|
27685
27851
|
}
|
|
27686
27852
|
submit() {
|
|
27687
|
-
this.
|
|
27688
|
-
|
|
27689
|
-
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
27853
|
+
if (this.summary.valid && this.description.valid) {
|
|
27854
|
+
this.caseEdit.submitForm({
|
|
27855
|
+
eventTrigger: this.eventTrigger,
|
|
27856
|
+
form: this.editForm,
|
|
27857
|
+
submit: this.caseEdit.submit,
|
|
27858
|
+
caseDetails: this.caseEdit.caseDetails
|
|
27859
|
+
});
|
|
27860
|
+
}
|
|
27693
27861
|
}
|
|
27694
27862
|
onEventCanBeCompleted(eventCanBeCompleted) {
|
|
27695
27863
|
this.caseEdit.onEventCanBeCompleted({
|
|
@@ -27697,7 +27865,7 @@ class CaseEditSubmitComponent {
|
|
|
27697
27865
|
eventCanBeCompleted,
|
|
27698
27866
|
caseDetails: this.caseEdit.caseDetails,
|
|
27699
27867
|
form: this.editForm,
|
|
27700
|
-
submit: this.caseEdit.submit
|
|
27868
|
+
submit: this.caseEdit.submit
|
|
27701
27869
|
});
|
|
27702
27870
|
}
|
|
27703
27871
|
getPageTitle() {
|
|
@@ -27772,7 +27940,7 @@ class CaseEditSubmitComponent {
|
|
|
27772
27940
|
}
|
|
27773
27941
|
}
|
|
27774
27942
|
readOnlySummaryFieldsToDisplayExists() {
|
|
27775
|
-
return this.eventTrigger.case_fields.some(field => field.show_summary_content_option >= 0);
|
|
27943
|
+
return this.eventTrigger.case_fields.some((field) => field.show_summary_content_option >= 0);
|
|
27776
27944
|
}
|
|
27777
27945
|
showEventNotes() {
|
|
27778
27946
|
// Display event notes related controls only if the following conditions are met
|
|
@@ -27787,7 +27955,7 @@ class CaseEditSubmitComponent {
|
|
|
27787
27955
|
}
|
|
27788
27956
|
getLastPageShown() {
|
|
27789
27957
|
let lastPage;
|
|
27790
|
-
this.wizard.reverse().forEach(page => {
|
|
27958
|
+
this.wizard.reverse().forEach((page) => {
|
|
27791
27959
|
if (!lastPage && this.isShown(page)) {
|
|
27792
27960
|
lastPage = page;
|
|
27793
27961
|
}
|
|
@@ -27806,7 +27974,7 @@ class CaseEditSubmitComponent {
|
|
|
27806
27974
|
}
|
|
27807
27975
|
isShown(page) {
|
|
27808
27976
|
const fields = this.fieldsUtils
|
|
27809
|
-
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls
|
|
27977
|
+
.mergeCaseFieldsAndFormFields(this.eventTrigger.case_fields, this.editForm.controls.data.value);
|
|
27810
27978
|
return page.parsedShowCondition.match(fields);
|
|
27811
27979
|
}
|
|
27812
27980
|
canShowFieldInCYA(field) {
|
|
@@ -27815,7 +27983,7 @@ class CaseEditSubmitComponent {
|
|
|
27815
27983
|
sortFieldsByShowSummaryContent(fields) {
|
|
27816
27984
|
return this.orderService
|
|
27817
27985
|
.sort(fields, CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION)
|
|
27818
|
-
.filter(cf => cf.show_summary_content_option);
|
|
27986
|
+
.filter((cf) => cf.show_summary_content_option);
|
|
27819
27987
|
}
|
|
27820
27988
|
getCaseFields() {
|
|
27821
27989
|
if (this.caseEdit.caseDetails) {
|
|
@@ -27834,9 +28002,7 @@ class CaseEditSubmitComponent {
|
|
|
27834
28002
|
if (this.eventTrigger.can_save_draft) {
|
|
27835
28003
|
return 'Return to case list';
|
|
27836
28004
|
}
|
|
27837
|
-
|
|
27838
|
-
return 'Cancel';
|
|
27839
|
-
}
|
|
28005
|
+
return 'Cancel';
|
|
27840
28006
|
}
|
|
27841
28007
|
}
|
|
27842
28008
|
CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
@@ -27850,8 +28016,8 @@ CaseEditSubmitComponent.SHOW_SUMMARY_CONTENT_COMPARE_FUNCTION = (a, b) => {
|
|
|
27850
28016
|
}
|
|
27851
28017
|
return a.show_summary_content_option - b.show_summary_content_option;
|
|
27852
28018
|
};
|
|
27853
|
-
CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier)); };
|
|
27854
|
-
CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
|
|
28019
|
+
CaseEditSubmitComponent.ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(FormValidatorsService)); };
|
|
28020
|
+
CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], [3, "error"], [3, "callbackErrorsSubject", "callbackErrorsContext"], [1, "check-your-answers", 3, "formGroup", "submit"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
|
|
27855
28021
|
i0.ɵɵtemplate(0, CaseEditSubmitComponent_div_0_Template, 24, 22, "div", 0);
|
|
27856
28022
|
i0.ɵɵtemplate(1, CaseEditSubmitComponent_ccd_case_event_completion_1_Template, 1, 1, "ccd-case-event-completion", 1);
|
|
27857
28023
|
} if (rf & 2) {
|
|
@@ -27861,8 +28027,8 @@ CaseEditSubmitComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Cas
|
|
|
27861
28027
|
} }, styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
|
|
27862
28028
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
|
|
27863
28029
|
type: Component,
|
|
27864
|
-
args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n
|
|
27865
|
-
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }]; }, null); })();
|
|
28030
|
+
args: [{ selector: 'ccd-case-edit-submit', template: "<div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
|
|
28031
|
+
}], function () { return [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }]; }, null); })();
|
|
27866
28032
|
|
|
27867
28033
|
function CaseProgressComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
27868
28034
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
@@ -28218,7 +28384,7 @@ i0.ɵɵsetComponentScope(CaseEditConfirmComponent, function () { return [i4.NgIf
|
|
|
28218
28384
|
i0.ɵɵsetComponentScope(CaseEditPageComponent, function () { return [i4.NgForOf, i4.NgIf, i3.ɵNgNoValidate, i3.NgControlStatusGroup, i3.FormGroupDirective, CallbackErrorsComponent, MarkdownComponent, CaseEventCompletionComponent, CaseEditFormComponent,
|
|
28219
28385
|
CaseEditGenericErrorsComponent]; }, function () { return [i4.AsyncPipe, CaseReferencePipe, CcdCaseTitlePipe, i1.RpxTranslatePipe]; });
|
|
28220
28386
|
i0.ɵɵsetComponentScope(CaseEditFormComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.NgControlStatusGroup, i3.FormGroupDirective, LabelSubstitutorDirective, ConditionalShowFormDirective, FieldReadComponent, FieldWriteComponent]; }, function () { return [IsCompoundPipe, IsReadOnlyAndNotCollectionPipe]; });
|
|
28221
|
-
i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
|
|
28387
|
+
i0.ɵɵsetComponentScope(CaseEditSubmitComponent, function () { return [i4.NgClass, i4.NgForOf, i4.NgIf, i4.NgSwitch, i4.NgSwitchCase, i3.ɵNgNoValidate, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MaxLengthValidator, i3.FormGroupDirective, i3.FormControlName, i3.FormGroupName, LabelSubstitutorDirective, CallbackErrorsComponent, MarkdownComponent, FieldReadComponent, CaseEventCompletionComponent, CaseEditGenericErrorsComponent]; }, function () { return [FirstErrorPipe, IsCompoundPipe, CaseReferencePipe, CcdCaseTitlePipe, CcdCYAPageLabelFilterPipe, ReadFieldsFilterPipe, CcdPageFieldsPipe, i1.RpxTranslatePipe]; });
|
|
28222
28388
|
i0.ɵɵsetComponentScope(CaseCreateComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
28223
28389
|
i0.ɵɵsetComponentScope(CaseProgressComponent, function () { return [i4.NgIf, CaseEditComponent]; }, []);
|
|
28224
28390
|
|
|
@@ -32191,18 +32357,26 @@ class EventStartGuard {
|
|
|
32191
32357
|
task = tasksAssignedToUser[0];
|
|
32192
32358
|
}
|
|
32193
32359
|
// if one task assigned to user, allow user to complete event
|
|
32194
|
-
|
|
32360
|
+
const storeClientContext = {
|
|
32361
|
+
client_context: {
|
|
32362
|
+
user_task: {
|
|
32363
|
+
task_data: task,
|
|
32364
|
+
complete_task: true
|
|
32365
|
+
}
|
|
32366
|
+
}
|
|
32367
|
+
};
|
|
32368
|
+
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
32195
32369
|
return true;
|
|
32196
32370
|
}
|
|
32197
32371
|
}
|
|
32198
32372
|
removeTaskFromSessionStorage() {
|
|
32199
|
-
this.sessionStorageService.removeItem(EventStartGuard.
|
|
32373
|
+
this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
|
|
32200
32374
|
}
|
|
32201
32375
|
checkForTasks(payload, caseId, eventId, taskId) {
|
|
32202
32376
|
if (taskId && payload?.tasks?.length > 0) {
|
|
32203
32377
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
32204
32378
|
if (task) {
|
|
32205
|
-
this.sessionStorageService.setItem(EventStartGuard.
|
|
32379
|
+
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(task));
|
|
32206
32380
|
}
|
|
32207
32381
|
else {
|
|
32208
32382
|
this.removeTaskFromSessionStorage();
|
|
@@ -32224,7 +32398,7 @@ class EventStartGuard {
|
|
|
32224
32398
|
}
|
|
32225
32399
|
}
|
|
32226
32400
|
}
|
|
32227
|
-
EventStartGuard.
|
|
32401
|
+
EventStartGuard.CLIENT_CONTEXT = 'clientContext';
|
|
32228
32402
|
EventStartGuard.ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
32229
32403
|
EventStartGuard.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
|
|
32230
32404
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartGuard, [{
|
|
@@ -32362,9 +32536,17 @@ class EventStartStateMachineService {
|
|
|
32362
32536
|
task = context.tasks[0];
|
|
32363
32537
|
}
|
|
32364
32538
|
const taskStr = JSON.stringify(task);
|
|
32365
|
-
console.log('entryActionForStateOneTaskAssignedToUser: setting
|
|
32539
|
+
console.log('entryActionForStateOneTaskAssignedToUser: setting client context task_data to ' + taskStr);
|
|
32366
32540
|
// Store task to session
|
|
32367
|
-
|
|
32541
|
+
const clientContext = {
|
|
32542
|
+
client_context: {
|
|
32543
|
+
user_task: {
|
|
32544
|
+
task_data: task,
|
|
32545
|
+
complete_task: true
|
|
32546
|
+
}
|
|
32547
|
+
}
|
|
32548
|
+
};
|
|
32549
|
+
context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
|
|
32368
32550
|
// Allow user to perform the event
|
|
32369
32551
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
32370
32552
|
}
|
|
@@ -35326,10 +35508,10 @@ SearchResultComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Searc
|
|
|
35326
35508
|
i0.ɵɵproperty("ngIf", ctx.hasResults());
|
|
35327
35509
|
i0.ɵɵadvance(1);
|
|
35328
35510
|
i0.ɵɵproperty("ngIf", !(ctx.hasResults() || ctx.hasDrafts()));
|
|
35329
|
-
} }, styles: ["table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{vertical-align:top}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:16px;word-wrap:break-word}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:left}table[_ngcontent-%COMP%] .caseid-col[_ngcontent-%COMP%]{white-space:nowrap}.notification[_ngcontent-%COMP%]{text-align:center;padding:30px 0;margin-top:75px}a[_ngcontent-%COMP%]:hover{color:#005ea5}.search-result-reset-link[_ngcontent-%COMP%]{padding-right:15px;padding-left:15px}.search-result-column-header[_ngcontent-%COMP%]{width:
|
|
35511
|
+
} }, styles: ["table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{vertical-align:top}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:16px;word-wrap:break-word}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:left}table[_ngcontent-%COMP%] .caseid-col[_ngcontent-%COMP%]{white-space:nowrap}.notification[_ngcontent-%COMP%]{text-align:center;padding:30px 0;margin-top:75px}a[_ngcontent-%COMP%]:hover{color:#005ea5}.search-result-reset-link[_ngcontent-%COMP%]{padding-right:15px;padding-left:15px}.search-result-column-header[_ngcontent-%COMP%]{width:unset;table-layout:normal}.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:table-cell;width:auto}@media screen and (max-width: 379px){.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:block;float:right}}.search-result-column-label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort[_ngcontent-%COMP%]{font-size:16px}.sort-widget[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium[_ngcontent-%COMP%]{margin-top:-20px}.govuk-table__checkbox[_ngcontent-%COMP%]{vertical-align:middle;padding-left:3px}#search-result-heading__text[_ngcontent-%COMP%]:focus{outline:none}"] });
|
|
35330
35512
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
35331
35513
|
type: Component,
|
|
35332
|
-
args: [{ selector: 'ccd-search-result', template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\"\n [attr.aria-label]=\"getTotalResults() + ' results have been found' | rpxTranslate\" role=\"status\">\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\">\n </label>\n </div>\n </th>\n <th *ngFor=\"let col of resultView.columns\">\n <table class=\"search-result-column-header\"\n [attr.aria-label]=\"('Sort by ' + col.label + ' ' + isSortAscending(col)? 'ascending' : 'descending') | rpxTranslate\">\n <tr>\n <th>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </th>\n </tr>\n </table>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\"></th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:
|
|
35514
|
+
args: [{ selector: 'ccd-search-result', template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\"\n [attr.aria-label]=\"getTotalResults() + ' results have been found' | rpxTranslate\" role=\"status\">\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\">\n </label>\n </div>\n </th>\n <th *ngFor=\"let col of resultView.columns\">\n <table class=\"search-result-column-header\"\n [attr.aria-label]=\"('Sort by ' + col.label + ' ' + isSortAscending(col)? 'ascending' : 'descending') | rpxTranslate\">\n <tr>\n <th>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </th>\n </tr>\n </table>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\"></th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width: 379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
|
|
35333
35515
|
}], function () { return [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }]; }, { caseLinkUrlTemplate: [{
|
|
35334
35516
|
type: Input
|
|
35335
35517
|
}], jurisdiction: [{
|