@hmcts/ccd-case-ui-toolkit 6.10.6-angular-upgrade-r4 → 6.10.7-rollback-case-link
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +240 -2881
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +1 -9
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +7 -17
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +1 -28
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -10
- package/esm2015/lib/shared/components/palette/base-field/abstract-form-field.component.js +2 -4
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.js +4 -4
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +4 -4
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.js +3 -4
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +26 -25
- package/esm2015/lib/shared/components/palette/case-link/index.js +1 -4
- package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +8 -28
- package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +66 -77
- package/esm2015/lib/shared/components/palette/palette.module.js +22 -68
- package/esm2015/lib/shared/components/palette/palette.service.js +4 -12
- package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +1 -10
- package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
- package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +1 -5
- package/esm2015/lib/shared/pipes/index.js +1 -2
- package/esm2015/lib/shared/pipes/pipes.module.js +4 -8
- package/esm2015/lib/shared/services/fields/fields.utils.js +1 -7
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +233 -2585
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +0 -5
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +0 -2
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts +0 -7
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/page-validation.service.d.ts +0 -1
- package/lib/shared/components/case-editor/services/page-validation.service.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-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/index.d.ts +0 -3
- package/lib/shared/components/palette/case-link/index.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts +0 -3
- package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +4 -13
- package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts +58 -67
- package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +0 -1
- package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
- package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
- package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
- package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
- package/lib/shared/pipes/index.d.ts +0 -1
- package/lib/shared/pipes/index.d.ts.map +1 -1
- package/lib/shared/pipes/pipes.module.d.ts +2 -3
- package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +0 -1
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +0 -125
- package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +0 -198
- package/esm2015/lib/shared/components/palette/case-link/components/index.js +0 -10
- package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +0 -497
- package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +0 -221
- package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +0 -286
- package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +0 -76
- package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +0 -178
- package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +0 -216
- package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +0 -265
- package/esm2015/lib/shared/components/palette/case-link/domain/index.js +0 -3
- package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +0 -2
- package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +0 -19
- package/esm2015/lib/shared/components/palette/case-link/enums/index.js +0 -2
- package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +0 -33
- package/esm2015/lib/shared/components/palette/case-link/services/index.js +0 -2
- package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +0 -134
- package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +0 -27
- package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +0 -23
- package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +0 -2
- package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts +0 -19
- package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +0 -18
- package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/index.d.ts +0 -10
- package/lib/shared/components/palette/case-link/components/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +0 -45
- package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +0 -42
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +0 -45
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +0 -12
- package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +0 -37
- package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +0 -38
- package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +0 -45
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/domain/index.d.ts +0 -3
- package/lib/shared/components/palette/case-link/domain/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +0 -12
- package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +0 -65
- package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/enums/index.d.ts +0 -2
- package/lib/shared/components/palette/case-link/enums/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +0 -29
- package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/services/index.d.ts +0 -2
- package/lib/shared/components/palette/case-link/services/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +0 -50
- package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +0 -10
- package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +0 -1
- package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +0 -11
- package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +0 -1
- package/lib/shared/pipes/link-cases-reason-code/index.d.ts +0 -2
- package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +0 -1
|
@@ -7,7 +7,7 @@ import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
|
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
8
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import polling from 'rx-polling';
|
|
10
|
-
import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer,
|
|
10
|
+
import { throwError, Subject, EMPTY, Observable, of, BehaviorSubject, timer, fromEvent } from 'rxjs';
|
|
11
11
|
import * as i1$2 from '@angular/common/http';
|
|
12
12
|
import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
13
13
|
import { catchError, map, publish, refCount, debounceTime, delay, distinctUntilChanged, finalize, publishReplay, take, tap, first, switchMap, takeUntil, filter } from 'rxjs/operators';
|
|
@@ -37,7 +37,7 @@ import * as i3$1 from '@angular/material/input';
|
|
|
37
37
|
import { MatInputModule } from '@angular/material/input';
|
|
38
38
|
import * as i3 from '@hmcts/ccpay-web-component';
|
|
39
39
|
import { PaymentLibModule } from '@hmcts/ccpay-web-component';
|
|
40
|
-
import * as
|
|
40
|
+
import * as i11 from '@hmcts/media-viewer';
|
|
41
41
|
import { MediaViewerModule } from '@hmcts/media-viewer';
|
|
42
42
|
import * as i2$1 from '@nicky-lenaers/ngx-scroll-to';
|
|
43
43
|
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|
@@ -115,13 +115,13 @@ function FooterComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
115
115
|
i0.ɵɵadvance(3);
|
|
116
116
|
i0.ɵɵtextInterpolate(ctx_r1.workhours);
|
|
117
117
|
} }
|
|
118
|
-
const _c0$
|
|
118
|
+
const _c0$Y = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
119
119
|
const _c1$r = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
120
120
|
class FooterComponent {
|
|
121
121
|
}
|
|
122
122
|
FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
123
123
|
FooterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$r, 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) {
|
|
124
|
-
i0.ɵɵprojectionDef(_c0$
|
|
124
|
+
i0.ɵɵprojectionDef(_c0$Y);
|
|
125
125
|
i0.ɵɵelementStart(0, "footer", 0);
|
|
126
126
|
i0.ɵɵelementStart(1, "div", 1);
|
|
127
127
|
i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 15, 0, "div", 2);
|
|
@@ -188,7 +188,7 @@ function HeaderBarComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
188
188
|
i0.ɵɵadvance(3);
|
|
189
189
|
i0.ɵɵtextInterpolate(ctx_r2.title);
|
|
190
190
|
} }
|
|
191
|
-
const _c0$
|
|
191
|
+
const _c0$X = [[["", "headerNavigation", ""]]];
|
|
192
192
|
const _c1$q = ["[headerNavigation]"];
|
|
193
193
|
class HeaderBarComponent {
|
|
194
194
|
constructor() {
|
|
@@ -200,7 +200,7 @@ class HeaderBarComponent {
|
|
|
200
200
|
}
|
|
201
201
|
HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
202
202
|
HeaderBarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$q, decls: 15, vars: 8, 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) {
|
|
203
|
-
i0.ɵɵprojectionDef(_c0$
|
|
203
|
+
i0.ɵɵprojectionDef(_c0$X);
|
|
204
204
|
i0.ɵɵelementStart(0, "header", 0);
|
|
205
205
|
i0.ɵɵelementStart(1, "div", 1);
|
|
206
206
|
i0.ɵɵelementStart(2, "div", 2);
|
|
@@ -257,13 +257,13 @@ HeaderBarComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HeaderBarComponent, se
|
|
|
257
257
|
type: Output
|
|
258
258
|
}] }); })();
|
|
259
259
|
|
|
260
|
-
const _c0$
|
|
260
|
+
const _c0$W = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
261
261
|
const _c1$p = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
262
262
|
class NavigationComponent {
|
|
263
263
|
}
|
|
264
264
|
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
265
265
|
NavigationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$p, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
266
|
-
i0.ɵɵprojectionDef(_c0$
|
|
266
|
+
i0.ɵɵprojectionDef(_c0$W);
|
|
267
267
|
i0.ɵɵelementStart(0, "div");
|
|
268
268
|
i0.ɵɵelementStart(1, "nav", 0);
|
|
269
269
|
i0.ɵɵprojection(2);
|
|
@@ -380,13 +380,13 @@ HeadersModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[CommonModule, RouterMod
|
|
|
380
380
|
}]
|
|
381
381
|
}], null, null); })();
|
|
382
382
|
|
|
383
|
-
const _c0$
|
|
383
|
+
const _c0$V = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
384
384
|
const _c1$o = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
385
385
|
class BodyComponent {
|
|
386
386
|
}
|
|
387
387
|
BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
388
388
|
BodyComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$o, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
|
|
389
|
-
i0.ɵɵprojectionDef(_c0$
|
|
389
|
+
i0.ɵɵprojectionDef(_c0$V);
|
|
390
390
|
i0.ɵɵelementStart(0, "div", 0);
|
|
391
391
|
i0.ɵɵprojection(1);
|
|
392
392
|
i0.ɵɵprojection(2, 1);
|
|
@@ -403,7 +403,7 @@ BodyComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [
|
|
|
403
403
|
}]
|
|
404
404
|
}], null, null); })();
|
|
405
405
|
|
|
406
|
-
const _c0$
|
|
406
|
+
const _c0$U = function (a0) { return { "govuk-input--error": a0 }; };
|
|
407
407
|
function DateInputComponent_div_16_Template(rf, ctx) { if (rf & 1) {
|
|
408
408
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
409
409
|
i0.ɵɵelementStart(0, "div", 12);
|
|
@@ -419,7 +419,7 @@ function DateInputComponent_div_16_Template(rf, ctx) { if (rf & 1) {
|
|
|
419
419
|
i0.ɵɵadvance(1);
|
|
420
420
|
i0.ɵɵproperty("for", ctx_r3.hourId());
|
|
421
421
|
i0.ɵɵadvance(2);
|
|
422
|
-
i0.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0.ɵɵpureFunction1(5, _c0$
|
|
422
|
+
i0.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0.ɵɵpureFunction1(5, _c0$U, ctx_r3.isInvalid));
|
|
423
423
|
} }
|
|
424
424
|
function DateInputComponent_div_17_Template(rf, ctx) { if (rf & 1) {
|
|
425
425
|
const _r13 = i0.ɵɵgetCurrentView();
|
|
@@ -436,7 +436,7 @@ function DateInputComponent_div_17_Template(rf, ctx) { if (rf & 1) {
|
|
|
436
436
|
i0.ɵɵadvance(1);
|
|
437
437
|
i0.ɵɵproperty("for", ctx_r4.minuteId());
|
|
438
438
|
i0.ɵɵadvance(2);
|
|
439
|
-
i0.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0.ɵɵpureFunction1(5, _c0$
|
|
439
|
+
i0.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0.ɵɵpureFunction1(5, _c0$U, ctx_r4.isInvalid));
|
|
440
440
|
} }
|
|
441
441
|
function DateInputComponent_div_18_Template(rf, ctx) { if (rf & 1) {
|
|
442
442
|
const _r18 = i0.ɵɵgetCurrentView();
|
|
@@ -453,7 +453,7 @@ function DateInputComponent_div_18_Template(rf, ctx) { if (rf & 1) {
|
|
|
453
453
|
i0.ɵɵadvance(1);
|
|
454
454
|
i0.ɵɵproperty("for", ctx_r5.secondId());
|
|
455
455
|
i0.ɵɵadvance(2);
|
|
456
|
-
i0.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0.ɵɵpureFunction1(5, _c0$
|
|
456
|
+
i0.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0.ɵɵpureFunction1(5, _c0$U, ctx_r5.isInvalid));
|
|
457
457
|
} }
|
|
458
458
|
class DateInputComponent {
|
|
459
459
|
constructor() {
|
|
@@ -682,15 +682,15 @@ DateInputComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DateInputComponent, se
|
|
|
682
682
|
i0.ɵɵadvance(2);
|
|
683
683
|
i0.ɵɵproperty("for", ctx.dayId());
|
|
684
684
|
i0.ɵɵadvance(2);
|
|
685
|
-
i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(18, _c0$
|
|
685
|
+
i0.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0.ɵɵpureFunction1(18, _c0$U, ctx.isInvalid));
|
|
686
686
|
i0.ɵɵadvance(3);
|
|
687
687
|
i0.ɵɵproperty("for", ctx.monthId());
|
|
688
688
|
i0.ɵɵadvance(2);
|
|
689
|
-
i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(20, _c0$
|
|
689
|
+
i0.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0.ɵɵpureFunction1(20, _c0$U, ctx.isInvalid));
|
|
690
690
|
i0.ɵɵadvance(3);
|
|
691
691
|
i0.ɵɵproperty("for", ctx.yearId());
|
|
692
692
|
i0.ɵɵadvance(2);
|
|
693
|
-
i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(22, _c0$
|
|
693
|
+
i0.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0.ɵɵpureFunction1(22, _c0$U, ctx.isInvalid));
|
|
694
694
|
i0.ɵɵadvance(2);
|
|
695
695
|
i0.ɵɵproperty("ngIf", ctx.isDateTime);
|
|
696
696
|
i0.ɵɵadvance(1);
|
|
@@ -760,7 +760,7 @@ function AlertComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
760
760
|
i0.ɵɵelementEnd();
|
|
761
761
|
i0.ɵɵelementContainerEnd();
|
|
762
762
|
} }
|
|
763
|
-
const _c0$
|
|
763
|
+
const _c0$T = ["*"];
|
|
764
764
|
var AlertMessageType;
|
|
765
765
|
(function (AlertMessageType) {
|
|
766
766
|
AlertMessageType["WARNING"] = "warning";
|
|
@@ -780,7 +780,7 @@ AlertComponent.TYPE_SUCCESS = 'success';
|
|
|
780
780
|
AlertComponent.TYPE_ERROR = 'error';
|
|
781
781
|
AlertComponent.TYPE_INFORMATION = 'information';
|
|
782
782
|
AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
|
|
783
|
-
AlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$
|
|
783
|
+
AlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$T, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) { if (rf & 1) {
|
|
784
784
|
i0.ɵɵprojectionDef();
|
|
785
785
|
i0.ɵɵelementStart(0, "div", 0);
|
|
786
786
|
i0.ɵɵelementContainerStart(1, 1);
|
|
@@ -1011,7 +1011,7 @@ NotificationBannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NotificationB
|
|
|
1011
1011
|
type: Output
|
|
1012
1012
|
}] }); })();
|
|
1013
1013
|
|
|
1014
|
-
const _c0$
|
|
1014
|
+
const _c0$S = function (a0) { return { "js-hidden": a0 }; };
|
|
1015
1015
|
const _c1$n = ["*"];
|
|
1016
1016
|
class TabComponent {
|
|
1017
1017
|
}
|
|
@@ -1022,7 +1022,7 @@ TabComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["
|
|
|
1022
1022
|
i0.ɵɵprojection(1);
|
|
1023
1023
|
i0.ɵɵelementEnd();
|
|
1024
1024
|
} if (rf & 2) {
|
|
1025
|
-
i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c0$
|
|
1025
|
+
i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c0$S, !ctx.selected));
|
|
1026
1026
|
i0.ɵɵattribute("aria-hidden", !ctx.selected);
|
|
1027
1027
|
} }, directives: [i1.NgClass], styles: [".tabs-toggle[_ngcontent-%COMP%]{display:block;padding:10px 15px 3px;margin-bottom:8px}.tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{color:#0b0c0c;text-decoration:none;border-bottom:none}.tabs-toggle[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#005ea5}@media (max-width:640px){.tabs-list[_ngcontent-%COMP%]{border-bottom:1px solid #bfc1c3;margin-left:-15px;margin-right:-15px}.tabs-toggle[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3}.tabs-toggle[_ngcontent-%COMP%]:focus{color:#0b0c0c;outline:none}}@media (min-width:641px){.tabs-panel[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3;clear:both;overflow:hidden}.tabs-list[_ngcontent-%COMP%]{float:left}.tabs-list-item[_ngcontent-%COMP%]{float:left;position:relative;bottom:-1px;padding-top:10px}.tabs-toggle[_ngcontent-%COMP%]{background-color:#dee0e2;border:1px solid transparent;float:left;margin:0 6px 0 0;text-decoration:none}.tabs-toggle[_ngcontent-%COMP%]:visited{color:#005ea5}.tabs-toggle-selected[_ngcontent-%COMP%], .tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{background-color:#fff;border-bottom:0;border-color:#bfc1c3;padding-bottom:11px;margin-bottom:0;color:#0b0c0c}}"] });
|
|
1028
1028
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TabComponent, [{
|
|
@@ -1042,7 +1042,7 @@ TabComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabComponent, selectors: [["
|
|
|
1042
1042
|
type: Input
|
|
1043
1043
|
}] }); })();
|
|
1044
1044
|
|
|
1045
|
-
const _c0$
|
|
1045
|
+
const _c0$R = ["tab"];
|
|
1046
1046
|
const _c1$m = function () { return ["."]; };
|
|
1047
1047
|
const _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
|
|
1048
1048
|
function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -1087,7 +1087,7 @@ TabsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TabsComponent, selectors: [
|
|
|
1087
1087
|
let _t;
|
|
1088
1088
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.panels = _t);
|
|
1089
1089
|
} }, viewQuery: function TabsComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1090
|
-
i0.ɵɵviewQuery(_c0$
|
|
1090
|
+
i0.ɵɵviewQuery(_c0$R, 1);
|
|
1091
1091
|
} if (rf & 2) {
|
|
1092
1092
|
let _t;
|
|
1093
1093
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabs = _t);
|
|
@@ -1152,7 +1152,7 @@ TabsModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
|
|
|
1152
1152
|
}]
|
|
1153
1153
|
}], null, null); })();
|
|
1154
1154
|
|
|
1155
|
-
const _c0$
|
|
1155
|
+
const _c0$Q = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
|
|
1156
1156
|
class ActivityBannerComponent {
|
|
1157
1157
|
constructor() { }
|
|
1158
1158
|
ngOnInit() {
|
|
@@ -1169,7 +1169,7 @@ ActivityBannerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ActivityBannerCom
|
|
|
1169
1169
|
i0.ɵɵelementEnd();
|
|
1170
1170
|
i0.ɵɵelementEnd();
|
|
1171
1171
|
} if (rf & 2) {
|
|
1172
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(4, _c0$
|
|
1172
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(4, _c0$Q, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
|
|
1173
1173
|
i0.ɵɵadvance(2);
|
|
1174
1174
|
i0.ɵɵpropertyInterpolate("alt", ctx.description);
|
|
1175
1175
|
i0.ɵɵpropertyInterpolate("src", ctx.imageLink, i0.ɵɵsanitizeUrl);
|
|
@@ -2592,14 +2592,6 @@ class IsCompoundPipe {
|
|
|
2592
2592
|
if (!field || !field.field_type || !field.field_type.type) {
|
|
2593
2593
|
return false;
|
|
2594
2594
|
}
|
|
2595
|
-
// Case link tab spacing alignment fix
|
|
2596
|
-
// This Pipe needs to be re-visited
|
|
2597
|
-
// to make it more generic to support and fix alignments issues for multiple tabs
|
|
2598
|
-
if (field.field_type.collection_field_type &&
|
|
2599
|
-
field.field_type.collection_field_type.id &&
|
|
2600
|
-
field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
|
|
2601
|
-
return true;
|
|
2602
|
-
}
|
|
2603
2595
|
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
2604
2596
|
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
2605
2597
|
return false;
|
|
@@ -2609,7 +2601,6 @@ class IsCompoundPipe {
|
|
|
2609
2601
|
return false;
|
|
2610
2602
|
}
|
|
2611
2603
|
}
|
|
2612
|
-
IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
|
|
2613
2604
|
IsCompoundPipe.COMPOUND_TYPES = [
|
|
2614
2605
|
'Complex',
|
|
2615
2606
|
'Label',
|
|
@@ -3310,12 +3301,6 @@ class FieldsUtils {
|
|
|
3310
3301
|
static isCollectionWithValue(pageFormFields) {
|
|
3311
3302
|
return pageFormFields[0]['value'] !== undefined;
|
|
3312
3303
|
}
|
|
3313
|
-
static isLinkedCasesCaseField(caseField) {
|
|
3314
|
-
if (!caseField) {
|
|
3315
|
-
return false;
|
|
3316
|
-
}
|
|
3317
|
-
return caseField.field_type.collection_field_type.id === 'CaseLink';
|
|
3318
|
-
}
|
|
3319
3304
|
static cloneObject(obj) {
|
|
3320
3305
|
return Object.assign({}, obj);
|
|
3321
3306
|
}
|
|
@@ -4217,9 +4202,7 @@ class AbstractFormFieldComponent {
|
|
|
4217
4202
|
}
|
|
4218
4203
|
addControlToFormGroup(control, parent, replace) {
|
|
4219
4204
|
if (replace) {
|
|
4220
|
-
if (this.caseField.field_type && this.caseField.field_type.
|
|
4221
|
-
&& this.caseField.field_type.collection_field_type.id === 'CaseLink'
|
|
4222
|
-
&& this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
|
|
4205
|
+
if (this.caseField.field_type && this.caseField.field_type.id === 'CaseLink' && this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
|
|
4223
4206
|
parent.setControl('CaseReference', control['controls']['CaseReference']);
|
|
4224
4207
|
}
|
|
4225
4208
|
else {
|
|
@@ -7201,33 +7184,6 @@ class CasesService {
|
|
|
7201
7184
|
return throwError(error);
|
|
7202
7185
|
}), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
7203
7186
|
}
|
|
7204
|
-
/**
|
|
7205
|
-
* TODO: Gets case link responses
|
|
7206
|
-
* @returns case link responses
|
|
7207
|
-
*/
|
|
7208
|
-
getCaseLinkResponses() {
|
|
7209
|
-
const headers = new HttpHeaders()
|
|
7210
|
-
.set('experimental', 'true')
|
|
7211
|
-
.set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
|
|
7212
|
-
.set('Content-Type', 'application/json');
|
|
7213
|
-
const loadingToken = this.loadingService.register();
|
|
7214
|
-
return this.http
|
|
7215
|
-
.get('assets/getCaseReasons.json', { headers, observe: 'body' })
|
|
7216
|
-
.pipe(map((reasons) => {
|
|
7217
|
-
return reasons.sort((reasonA, reasonB) => reasonA.value_en > reasonB.value_en ? 1 : -1);
|
|
7218
|
-
}), catchError(error => {
|
|
7219
|
-
this.errorService.setError(error);
|
|
7220
|
-
return throwError(error);
|
|
7221
|
-
}), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
7222
|
-
}
|
|
7223
|
-
getLinkedCases(caseId) {
|
|
7224
|
-
const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
|
|
7225
|
-
return this.http
|
|
7226
|
-
.get(url)
|
|
7227
|
-
.pipe(catchError(error => {
|
|
7228
|
-
return throwError(error);
|
|
7229
|
-
}));
|
|
7230
|
-
}
|
|
7231
7187
|
getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
7232
7188
|
ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
|
|
7233
7189
|
const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
|
|
@@ -7975,8 +7931,7 @@ class PageValidationService {
|
|
|
7975
7931
|
.filter(caseField => !this.isHidden(caseField, editForm))
|
|
7976
7932
|
.every(caseField => {
|
|
7977
7933
|
const theControl = editForm.controls['data'].get(caseField.id);
|
|
7978
|
-
return this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl)
|
|
7979
|
-
this.checkCaseLinksCollectionField(caseField, theControl);
|
|
7934
|
+
return this.checkDocumentField(caseField, theControl) && this.checkOptionalField(caseField, theControl);
|
|
7980
7935
|
});
|
|
7981
7936
|
}
|
|
7982
7937
|
isHidden(caseField, editForm, path) {
|
|
@@ -8004,13 +7959,6 @@ class PageValidationService {
|
|
|
8004
7959
|
checkMandatoryField(caseField, theControl) {
|
|
8005
7960
|
return this.caseFieldService.isMandatory(caseField) && theControl === null;
|
|
8006
7961
|
}
|
|
8007
|
-
checkCaseLinksCollectionField(caseField, theControl) {
|
|
8008
|
-
if (caseField && caseField.id === 'caseLinks') {
|
|
8009
|
-
return theControl && theControl.value && Array.isArray(theControl.value) &&
|
|
8010
|
-
theControl.value.length ? true : false;
|
|
8011
|
-
}
|
|
8012
|
-
return true;
|
|
8013
|
-
}
|
|
8014
7962
|
}
|
|
8015
7963
|
PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0.ɵɵinject(CaseFieldService)); };
|
|
8016
7964
|
PageValidationService.ɵprov = i0.ɵɵdefineInjectable({ token: PageValidationService, factory: PageValidationService.ɵfac });
|
|
@@ -8389,12 +8337,10 @@ class CaseEditDataService {
|
|
|
8389
8337
|
constructor() {
|
|
8390
8338
|
this.title$ = new BehaviorSubject(null);
|
|
8391
8339
|
this.formValidationErrors$ = new BehaviorSubject([]);
|
|
8392
|
-
this.linkError$ = new BehaviorSubject(null);
|
|
8393
8340
|
this.eventTriggerName$ = new BehaviorSubject(null);
|
|
8394
8341
|
this.triggerSubmitEvent$ = new BehaviorSubject(null);
|
|
8395
8342
|
this.caseTitle$ = this.title$.asObservable();
|
|
8396
8343
|
this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
|
|
8397
|
-
this.caseLinkError$ = this.linkError$.asObservable();
|
|
8398
8344
|
this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
|
|
8399
8345
|
this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
|
|
8400
8346
|
}
|
|
@@ -8404,18 +8350,12 @@ class CaseEditDataService {
|
|
|
8404
8350
|
setCaseEventTriggerName(triggerName) {
|
|
8405
8351
|
this.eventTriggerName$.next(triggerName);
|
|
8406
8352
|
}
|
|
8407
|
-
setCaseLinkError(error) {
|
|
8408
|
-
this.linkError$.next(error);
|
|
8409
|
-
}
|
|
8410
8353
|
setFormValidationErrors(validationErrors) {
|
|
8411
8354
|
this.formValidationErrors$.next(validationErrors);
|
|
8412
8355
|
}
|
|
8413
8356
|
clearFormValidationErrors() {
|
|
8414
8357
|
this.formValidationErrors$.next([]);
|
|
8415
8358
|
}
|
|
8416
|
-
clearCaseLinkError() {
|
|
8417
|
-
this.linkError$.next(null);
|
|
8418
|
-
}
|
|
8419
8359
|
addFormValidationError(validationError) {
|
|
8420
8360
|
this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
|
|
8421
8361
|
}
|
|
@@ -8853,27 +8793,18 @@ class CaseEditPageComponent {
|
|
|
8853
8793
|
this.caseEditDataService.addFormValidationError({ id, message: `${label} exceeds the maximum length` });
|
|
8854
8794
|
fieldElement.markAsDirty();
|
|
8855
8795
|
}
|
|
8856
|
-
else if (this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
|
|
8857
|
-
this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
|
|
8858
|
-
}
|
|
8859
8796
|
else if (fieldElement.invalid) {
|
|
8860
8797
|
if (casefield.isComplex()) {
|
|
8861
8798
|
this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id);
|
|
8862
8799
|
}
|
|
8863
8800
|
else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
}
|
|
8868
|
-
else {
|
|
8869
|
-
const fieldArray = fieldElement;
|
|
8870
|
-
if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
|
|
8871
|
-
id = `${fieldArray['component']['collItems'][0].prefix}`;
|
|
8872
|
-
}
|
|
8873
|
-
fieldArray.controls.forEach((c) => {
|
|
8874
|
-
this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
|
|
8875
|
-
});
|
|
8801
|
+
const fieldArray = fieldElement;
|
|
8802
|
+
if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
|
|
8803
|
+
id = `${fieldArray['component']['collItems'][0].prefix}`;
|
|
8876
8804
|
}
|
|
8805
|
+
fieldArray.controls.forEach((c) => {
|
|
8806
|
+
this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id);
|
|
8807
|
+
});
|
|
8877
8808
|
}
|
|
8878
8809
|
else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
|
|
8879
8810
|
// Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
|
|
@@ -9121,7 +9052,6 @@ class CaseEditPageComponent {
|
|
|
9121
9052
|
}
|
|
9122
9053
|
syncCaseEditDataService() {
|
|
9123
9054
|
this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
|
|
9124
|
-
this.caseEditDataService.setCaseLinkError(this.caseLinkError);
|
|
9125
9055
|
this.caseEditDataService.setCaseTitle(this.getCaseTitle());
|
|
9126
9056
|
this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
9127
9057
|
next: (validationErrors) => this.validationErrors = validationErrors
|
|
@@ -9569,10 +9499,6 @@ class ReadFieldsFilterPipe {
|
|
|
9569
9499
|
&& ReadFieldsFilterPipe.NESTED_TYPES[field.field_type.type](field, value);
|
|
9570
9500
|
}
|
|
9571
9501
|
static keepField(field, value, ignoreLabels = false) {
|
|
9572
|
-
// We should always render the caselinks tables from and to regardless whether it has valid value or not
|
|
9573
|
-
if (field.id === 'caseLinks') {
|
|
9574
|
-
return true;
|
|
9575
|
-
}
|
|
9576
9502
|
// We shouldn't ditch labels.
|
|
9577
9503
|
if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
|
|
9578
9504
|
return true;
|
|
@@ -9837,154 +9763,6 @@ FieldsFilterPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFieldsFilter", type: Fie
|
|
|
9837
9763
|
}]
|
|
9838
9764
|
}], null, null); })();
|
|
9839
9765
|
|
|
9840
|
-
class LinkedCasesService {
|
|
9841
|
-
constructor(jurisdictionService, searchService) {
|
|
9842
|
-
this.jurisdictionService = jurisdictionService;
|
|
9843
|
-
this.searchService = searchService;
|
|
9844
|
-
this.caseFieldValue = [];
|
|
9845
|
-
this.isLinkedCasesEventTrigger = false;
|
|
9846
|
-
this.linkCaseReasons = [];
|
|
9847
|
-
this.linkedCases = [];
|
|
9848
|
-
this.initialCaseLinks = [];
|
|
9849
|
-
this.editMode = false;
|
|
9850
|
-
this.jurisdictionsResponse = [];
|
|
9851
|
-
this.serverError = null;
|
|
9852
|
-
this.serverLinkedApiError = null;
|
|
9853
|
-
this.isServerReasonCodeError = false;
|
|
9854
|
-
this.caseJurisdictionID = null;
|
|
9855
|
-
this.groupLinkedCasesByCaseType = (arrObj, key) => {
|
|
9856
|
-
return arrObj.reduce((rv, x) => {
|
|
9857
|
-
(rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
|
|
9858
|
-
return rv;
|
|
9859
|
-
}, {});
|
|
9860
|
-
};
|
|
9861
|
-
this.jurisdictionService.getJurisdictions().subscribe((jurisdictions) => {
|
|
9862
|
-
this.jurisdictionsResponse = jurisdictions;
|
|
9863
|
-
}, (error) => {
|
|
9864
|
-
this.serverJurisdictionError = true;
|
|
9865
|
-
});
|
|
9866
|
-
}
|
|
9867
|
-
constructElasticSearchQuery(caseIds, size) {
|
|
9868
|
-
return {
|
|
9869
|
-
query: {
|
|
9870
|
-
terms: {
|
|
9871
|
-
reference: caseIds,
|
|
9872
|
-
},
|
|
9873
|
-
},
|
|
9874
|
-
size,
|
|
9875
|
-
};
|
|
9876
|
-
}
|
|
9877
|
-
mapResponse(esSearchCasesResponse) {
|
|
9878
|
-
const caseInfo = this.caseFieldValue.find(item => item.value && item.value.CaseReference === esSearchCasesResponse.case_id);
|
|
9879
|
-
return caseInfo && {
|
|
9880
|
-
caseReference: esSearchCasesResponse.case_id,
|
|
9881
|
-
caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
|
|
9882
|
-
caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
|
|
9883
|
-
service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
|
|
9884
|
-
state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
|
|
9885
|
-
reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
|
|
9886
|
-
caseInfo.value.ReasonForLink.map(reason => reason.value && reason.value.Reason),
|
|
9887
|
-
};
|
|
9888
|
-
}
|
|
9889
|
-
searchCasesByCaseIds(searchCasesResponse) {
|
|
9890
|
-
return forkJoin(searchCasesResponse);
|
|
9891
|
-
}
|
|
9892
|
-
getAllLinkedCaseInformation() {
|
|
9893
|
-
const searchCasesResponse = [];
|
|
9894
|
-
const linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
|
|
9895
|
-
Object.keys(linkedCaseIds).forEach(key => {
|
|
9896
|
-
const esQuery = this.constructElasticSearchQuery(linkedCaseIds[key], 100);
|
|
9897
|
-
const query = this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
|
|
9898
|
-
searchCasesResponse.push(query);
|
|
9899
|
-
});
|
|
9900
|
-
if (searchCasesResponse.length) {
|
|
9901
|
-
this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
|
|
9902
|
-
const casesResponse = [];
|
|
9903
|
-
searchCases.forEach(response => {
|
|
9904
|
-
response.results.forEach((result) => {
|
|
9905
|
-
casesResponse.push(this.mapResponse(result));
|
|
9906
|
-
});
|
|
9907
|
-
});
|
|
9908
|
-
const caseLinks = casesResponse.map(item => {
|
|
9909
|
-
return {
|
|
9910
|
-
caseReference: item.caseReference,
|
|
9911
|
-
caseName: item.caseName,
|
|
9912
|
-
caseService: item.service,
|
|
9913
|
-
caseType: item.caseType,
|
|
9914
|
-
unlink: false,
|
|
9915
|
-
reasons: item.reasons && item.reasons.map(reason => {
|
|
9916
|
-
return {
|
|
9917
|
-
reasonCode: reason
|
|
9918
|
-
};
|
|
9919
|
-
}),
|
|
9920
|
-
};
|
|
9921
|
-
});
|
|
9922
|
-
this.linkedCases = caseLinks;
|
|
9923
|
-
this.serverLinkedApiError = null;
|
|
9924
|
-
}, err => {
|
|
9925
|
-
this.serverLinkedApiError = {
|
|
9926
|
-
id: 'backendError', message: 'Some case information is not available at the moment'
|
|
9927
|
-
};
|
|
9928
|
-
});
|
|
9929
|
-
}
|
|
9930
|
-
}
|
|
9931
|
-
mapLookupIDToValueFromJurisdictions(fieldName, fieldValue) {
|
|
9932
|
-
const selectedJurisdiction = this.jurisdictionsResponse &&
|
|
9933
|
-
this.jurisdictionsResponse.find(item => item.id === this.caseDetails.case_type.jurisdiction.id);
|
|
9934
|
-
const selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(item => item.id === this.caseDetails.case_type.id);
|
|
9935
|
-
const state = selectedCaseType && selectedCaseType.states.find(item => item.id === fieldValue);
|
|
9936
|
-
switch (fieldName) {
|
|
9937
|
-
case 'JURISDICTION':
|
|
9938
|
-
return selectedJurisdiction && selectedJurisdiction.description;
|
|
9939
|
-
case 'CASE_TYPE':
|
|
9940
|
-
return selectedCaseType && selectedCaseType.name;
|
|
9941
|
-
case 'CASE_TYPE_DESCRIPTION':
|
|
9942
|
-
return selectedCaseType && selectedCaseType.description;
|
|
9943
|
-
case 'STATE':
|
|
9944
|
-
return state && state.name || fieldValue;
|
|
9945
|
-
case 'STATE_DESCRIPTION':
|
|
9946
|
-
return state && state.description || fieldValue;
|
|
9947
|
-
default:
|
|
9948
|
-
break;
|
|
9949
|
-
}
|
|
9950
|
-
}
|
|
9951
|
-
getCaseName(searchCasesResponse) {
|
|
9952
|
-
let caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
|
|
9953
|
-
const tabs = searchCasesResponse.tabs.filter(tab => {
|
|
9954
|
-
const caseNameHmctsInternalField = tab.fields.find(field => field.id === 'caseNameHmctsInternal');
|
|
9955
|
-
if (caseNameHmctsInternalField) {
|
|
9956
|
-
caseName = caseNameHmctsInternalField.value;
|
|
9957
|
-
}
|
|
9958
|
-
});
|
|
9959
|
-
return caseName;
|
|
9960
|
-
}
|
|
9961
|
-
}
|
|
9962
|
-
LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
|
|
9963
|
-
LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0.ɵɵinject(JurisdictionService), i0.ɵɵinject(SearchService)); };
|
|
9964
|
-
LinkedCasesService.ɵprov = i0.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
|
|
9965
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesService, [{
|
|
9966
|
-
type: Injectable
|
|
9967
|
-
}], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null); })();
|
|
9968
|
-
|
|
9969
|
-
class LinkCasesReasonValuePipe {
|
|
9970
|
-
constructor(linkedCasesService) {
|
|
9971
|
-
this.linkedCasesService = linkedCasesService;
|
|
9972
|
-
}
|
|
9973
|
-
transform(reasonCode) {
|
|
9974
|
-
const reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
|
|
9975
|
-
this.linkedCasesService.linkCaseReasons.find(reason => reason.key === reasonCode);
|
|
9976
|
-
return reasonCodeMapping && reasonCodeMapping.value_en;
|
|
9977
|
-
}
|
|
9978
|
-
}
|
|
9979
|
-
LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
9980
|
-
LinkCasesReasonValuePipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
|
|
9981
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
|
|
9982
|
-
type: Pipe,
|
|
9983
|
-
args: [{
|
|
9984
|
-
name: 'ccdLinkCasesReasonValue'
|
|
9985
|
-
}]
|
|
9986
|
-
}], function () { return [{ type: LinkedCasesService }]; }, null); })();
|
|
9987
|
-
|
|
9988
9766
|
var SortOrder;
|
|
9989
9767
|
(function (SortOrder) {
|
|
9990
9768
|
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
@@ -10020,8 +9798,7 @@ const pipeDeclarations = [
|
|
|
10020
9798
|
CcdCYAPageLabelFilterPipe,
|
|
10021
9799
|
ReadFieldsFilterPipe,
|
|
10022
9800
|
CcdTabFieldsPipe,
|
|
10023
|
-
CcdPageFieldsPipe
|
|
10024
|
-
LinkCasesReasonValuePipe
|
|
9801
|
+
CcdPageFieldsPipe
|
|
10025
9802
|
];
|
|
10026
9803
|
class PipesModule {
|
|
10027
9804
|
}
|
|
@@ -10037,16 +9814,14 @@ PipesModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
|
|
|
10037
9814
|
CcdCYAPageLabelFilterPipe,
|
|
10038
9815
|
ReadFieldsFilterPipe,
|
|
10039
9816
|
CcdTabFieldsPipe,
|
|
10040
|
-
CcdPageFieldsPipe,
|
|
10041
|
-
LinkCasesReasonValuePipe], imports: [CommonModule], exports: [CaseReferencePipe,
|
|
9817
|
+
CcdPageFieldsPipe], imports: [CommonModule], exports: [CaseReferencePipe,
|
|
10042
9818
|
SortSearchResultPipe,
|
|
10043
9819
|
CcdCaseTitlePipe,
|
|
10044
9820
|
CcdCollectionTableCaseFieldsFilterPipe,
|
|
10045
9821
|
CcdCYAPageLabelFilterPipe,
|
|
10046
9822
|
ReadFieldsFilterPipe,
|
|
10047
9823
|
CcdTabFieldsPipe,
|
|
10048
|
-
CcdPageFieldsPipe
|
|
10049
|
-
LinkCasesReasonValuePipe] }); })();
|
|
9824
|
+
CcdPageFieldsPipe] }); })();
|
|
10050
9825
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PipesModule, [{
|
|
10051
9826
|
type: NgModule,
|
|
10052
9827
|
args: [{
|
|
@@ -10268,7 +10043,7 @@ class AddressOption {
|
|
|
10268
10043
|
}
|
|
10269
10044
|
}
|
|
10270
10045
|
|
|
10271
|
-
const _c0$
|
|
10046
|
+
const _c0$P = ["writeComplexFieldComponent"];
|
|
10272
10047
|
function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
10273
10048
|
i0.ɵɵelementStart(0, "span", 14);
|
|
10274
10049
|
i0.ɵɵtext(1, "Enter the Postcode");
|
|
@@ -10461,7 +10236,7 @@ class WriteAddressFieldComponent extends AbstractFieldWriteComponent {
|
|
|
10461
10236
|
}
|
|
10462
10237
|
WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(IsCompoundPipe)); };
|
|
10463
10238
|
WriteAddressFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
10464
|
-
i0.ɵɵviewQuery(_c0$
|
|
10239
|
+
i0.ɵɵviewQuery(_c0$P, 1);
|
|
10465
10240
|
i0.ɵɵviewQuery(FocusElementDirective, 1);
|
|
10466
10241
|
} if (rf & 2) {
|
|
10467
10242
|
let _t;
|
|
@@ -10547,7 +10322,7 @@ function CaseFileViewFieldComponent_div_1_ng_container_8_Template(rf, ctx) { if
|
|
|
10547
10322
|
} if (rf & 2) {
|
|
10548
10323
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
10549
10324
|
i0.ɵɵadvance(1);
|
|
10550
|
-
i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true);
|
|
10325
|
+
i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
|
|
10551
10326
|
} }
|
|
10552
10327
|
function CaseFileViewFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
10553
10328
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -10563,7 +10338,7 @@ function CaseFileViewFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
10563
10338
|
i0.ɵɵelementEnd();
|
|
10564
10339
|
i0.ɵɵelement(6, "div", 9);
|
|
10565
10340
|
i0.ɵɵelementStart(7, "div", 10);
|
|
10566
|
-
i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2,
|
|
10341
|
+
i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
|
|
10567
10342
|
i0.ɵɵelementEnd();
|
|
10568
10343
|
i0.ɵɵelementEnd();
|
|
10569
10344
|
i0.ɵɵelementEnd();
|
|
@@ -10639,7 +10414,7 @@ class CaseFileViewFieldComponent {
|
|
|
10639
10414
|
}
|
|
10640
10415
|
CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
|
|
10641
10416
|
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(LoadingService)); };
|
|
10642
|
-
CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10417
|
+
CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10643
10418
|
i0.ɵɵtemplate(0, CaseFileViewFieldComponent_div_0_Template, 5, 0, "div", 0);
|
|
10644
10419
|
i0.ɵɵtemplate(1, CaseFileViewFieldComponent_div_1_Template, 9, 3, "div", 1);
|
|
10645
10420
|
} if (rf & 2) {
|
|
@@ -10673,7 +10448,7 @@ function CaseFileViewFieldReadComponent_div_1_ng_container_8_Template(rf, ctx) {
|
|
|
10673
10448
|
} if (rf & 2) {
|
|
10674
10449
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
10675
10450
|
i0.ɵɵadvance(1);
|
|
10676
|
-
i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true);
|
|
10451
|
+
i0.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
|
|
10677
10452
|
} }
|
|
10678
10453
|
function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
10679
10454
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -10689,7 +10464,7 @@ function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
10689
10464
|
i0.ɵɵelementEnd();
|
|
10690
10465
|
i0.ɵɵelement(6, "div", 9);
|
|
10691
10466
|
i0.ɵɵelementStart(7, "div", 10);
|
|
10692
|
-
i0.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2,
|
|
10467
|
+
i0.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
|
|
10693
10468
|
i0.ɵɵelementEnd();
|
|
10694
10469
|
i0.ɵɵelementEnd();
|
|
10695
10470
|
i0.ɵɵelementEnd();
|
|
@@ -10707,7 +10482,7 @@ class CaseFileViewFieldReadComponent extends CaseFileViewFieldComponent {
|
|
|
10707
10482
|
}
|
|
10708
10483
|
}
|
|
10709
10484
|
CaseFileViewFieldReadComponent.ɵfac = function CaseFileViewFieldReadComponent_Factory(t) { return ɵCaseFileViewFieldReadComponent_BaseFactory(t || CaseFileViewFieldReadComponent); };
|
|
10710
|
-
CaseFileViewFieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10485
|
+
CaseFileViewFieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10711
10486
|
i0.ɵɵtemplate(0, CaseFileViewFieldReadComponent_div_0_Template, 5, 0, "div", 0);
|
|
10712
10487
|
i0.ɵɵtemplate(1, CaseFileViewFieldReadComponent_div_1_Template, 9, 3, "div", 1);
|
|
10713
10488
|
} if (rf & 2) {
|
|
@@ -11035,7 +10810,7 @@ function WriteCaseFlagFieldComponent_div_1_ng_container_7_Template(rf, ctx) { if
|
|
|
11035
10810
|
i0.ɵɵadvance(1);
|
|
11036
10811
|
i0.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
|
|
11037
10812
|
} }
|
|
11038
|
-
const _c0$
|
|
10813
|
+
const _c0$O = function (a0) { return { "form-group-error": a0 }; };
|
|
11039
10814
|
function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
11040
10815
|
i0.ɵɵelementStart(0, "div", 8);
|
|
11041
10816
|
i0.ɵɵelementStart(1, "div", 9);
|
|
@@ -11054,7 +10829,7 @@ function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
11054
10829
|
i0.ɵɵadvance(1);
|
|
11055
10830
|
i0.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
|
|
11056
10831
|
i0.ɵɵadvance(1);
|
|
11057
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
10832
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$O, ctx_r1.errorMessages.length > 0));
|
|
11058
10833
|
i0.ɵɵadvance(1);
|
|
11059
10834
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
|
|
11060
10835
|
i0.ɵɵadvance(1);
|
|
@@ -11418,8 +11193,8 @@ WriteCaseFlagFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseFlag
|
|
|
11418
11193
|
}], function () { return [{ type: i1$1.ActivatedRoute }, { type: CaseEditDataService }]; }, null); })();
|
|
11419
11194
|
|
|
11420
11195
|
function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
11421
|
-
i0.ɵɵelementStart(0, "a",
|
|
11422
|
-
i0.ɵɵelementStart(1, "span",
|
|
11196
|
+
i0.ɵɵelementStart(0, "a", 1);
|
|
11197
|
+
i0.ɵɵelementStart(1, "span", 2);
|
|
11423
11198
|
i0.ɵɵtext(2);
|
|
11424
11199
|
i0.ɵɵpipe(3, "ccdCaseReference");
|
|
11425
11200
|
i0.ɵɵelementEnd();
|
|
@@ -11430,112 +11205,71 @@ function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
11430
11205
|
i0.ɵɵadvance(2);
|
|
11431
11206
|
i0.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
|
|
11432
11207
|
} }
|
|
11433
|
-
function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
11434
|
-
i0.ɵɵelementContainerStart(0);
|
|
11435
|
-
i0.ɵɵelement(1, "ccd-read-linked-cases", 4);
|
|
11436
|
-
i0.ɵɵelementContainerEnd();
|
|
11437
|
-
} if (rf & 2) {
|
|
11438
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
11439
|
-
i0.ɵɵadvance(1);
|
|
11440
|
-
i0.ɵɵproperty("caseField", ctx_r1.caseField);
|
|
11441
|
-
} }
|
|
11442
11208
|
class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
|
|
11443
|
-
constructor() {
|
|
11444
|
-
super(...arguments);
|
|
11445
|
-
this.paletteContext = PaletteContext;
|
|
11446
|
-
}
|
|
11447
11209
|
hasReference() {
|
|
11448
11210
|
return this.caseField.value && this.caseField.value.CaseReference;
|
|
11449
11211
|
}
|
|
11450
|
-
hasCaseLinkCollection() {
|
|
11451
|
-
return (this.caseField.field_type &&
|
|
11452
|
-
this.caseField.field_type.type === 'Collection' &&
|
|
11453
|
-
this.caseField.field_type.collection_field_type.id === 'CaseLink');
|
|
11454
|
-
}
|
|
11455
11212
|
}
|
|
11456
11213
|
ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
|
|
11457
|
-
ReadCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
11214
|
+
ReadCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["target", "_blank", 3, "href", 4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11458
11215
|
i0.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
|
|
11459
|
-
i0.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
|
|
11460
11216
|
} if (rf & 2) {
|
|
11461
11217
|
i0.ɵɵproperty("ngIf", ctx.hasReference());
|
|
11462
|
-
|
|
11463
|
-
i0.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
|
|
11464
|
-
} }, encapsulation: 2 });
|
|
11218
|
+
} }, directives: [i1.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
|
|
11465
11219
|
const ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
|
|
11466
11220
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
|
|
11467
11221
|
type: Component,
|
|
11468
11222
|
args: [{
|
|
11469
11223
|
selector: 'ccd-read-case-link-field',
|
|
11470
|
-
templateUrl: 'read-case-link-field.html'
|
|
11224
|
+
templateUrl: 'read-case-link-field.html'
|
|
11471
11225
|
}]
|
|
11472
11226
|
}], null, null); })();
|
|
11473
11227
|
|
|
11474
|
-
const _c0$
|
|
11475
|
-
function
|
|
11228
|
+
const _c0$N = ["writeComplexFieldComponent"];
|
|
11229
|
+
function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
11476
11230
|
i0.ɵɵelementStart(0, "span", 6);
|
|
11477
11231
|
i0.ɵɵtext(1);
|
|
11478
11232
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
11479
11233
|
i0.ɵɵelementEnd();
|
|
11480
11234
|
} if (rf & 2) {
|
|
11481
|
-
const
|
|
11235
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
11482
11236
|
i0.ɵɵadvance(1);
|
|
11483
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1,
|
|
11237
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
11484
11238
|
} }
|
|
11485
|
-
function
|
|
11239
|
+
function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
11486
11240
|
i0.ɵɵelementStart(0, "span", 7);
|
|
11487
11241
|
i0.ɵɵtext(1);
|
|
11488
11242
|
i0.ɵɵelementEnd();
|
|
11489
11243
|
} if (rf & 2) {
|
|
11490
|
-
const
|
|
11491
|
-
i0.ɵɵadvance(1);
|
|
11492
|
-
i0.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
|
|
11493
|
-
} }
|
|
11494
|
-
function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
11495
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
11496
|
-
i0.ɵɵelementStart(1, "label", 2);
|
|
11497
|
-
i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
|
|
11498
|
-
i0.ɵɵelementEnd();
|
|
11499
|
-
i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
|
|
11500
|
-
i0.ɵɵelement(4, "input", 5);
|
|
11501
|
-
i0.ɵɵelementEnd();
|
|
11502
|
-
} if (rf & 2) {
|
|
11503
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
11504
|
-
i0.ɵɵadvance(1);
|
|
11505
|
-
i0.ɵɵproperty("for", ctx_r0.id());
|
|
11506
|
-
i0.ɵɵadvance(1);
|
|
11507
|
-
i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
|
|
11508
|
-
i0.ɵɵadvance(1);
|
|
11509
|
-
i0.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
|
|
11244
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
11510
11245
|
i0.ɵɵadvance(1);
|
|
11511
|
-
i0.ɵɵ
|
|
11246
|
+
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
11512
11247
|
} }
|
|
11513
|
-
function
|
|
11514
|
-
|
|
11515
|
-
i0.ɵɵ
|
|
11516
|
-
i0.ɵɵ
|
|
11517
|
-
i0.ɵɵlistener("onLinkedCasesSelected", function WriteCaseLinkFieldComponent_div_2_Template_ccd_write_linked_cases_onLinkedCasesSelected_1_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.submitLinkedCases(); });
|
|
11518
|
-
i0.ɵɵelementEnd();
|
|
11248
|
+
function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
11249
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
11250
|
+
i0.ɵɵtext(1);
|
|
11251
|
+
i0.ɵɵpipe(2, "ccdFirstError");
|
|
11519
11252
|
i0.ɵɵelementEnd();
|
|
11520
11253
|
} if (rf & 2) {
|
|
11521
|
-
const
|
|
11254
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
11522
11255
|
i0.ɵɵadvance(1);
|
|
11523
|
-
i0.ɵɵ
|
|
11256
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
|
|
11524
11257
|
} }
|
|
11258
|
+
const _c1$k = function (a0) { return { "form-group-error": a0 }; };
|
|
11525
11259
|
class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
11526
|
-
constructor(linkedCasesService) {
|
|
11527
|
-
super();
|
|
11528
|
-
this.linkedCasesService = linkedCasesService;
|
|
11529
|
-
this.caseFields = [];
|
|
11530
|
-
}
|
|
11531
11260
|
ngOnInit() {
|
|
11532
|
-
|
|
11533
|
-
this.formArray['caseField'] = this.caseField;
|
|
11534
|
-
if (!this.hasCaseLinkCollection()) {
|
|
11261
|
+
if (this.caseField.value) {
|
|
11535
11262
|
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
11536
11263
|
CaseReference: new FormControl(this.caseField.value.CaseReference, Validators.required),
|
|
11537
11264
|
}), true);
|
|
11538
11265
|
}
|
|
11266
|
+
else {
|
|
11267
|
+
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
11268
|
+
CaseReference: new FormControl(null, Validators.required),
|
|
11269
|
+
}), true);
|
|
11270
|
+
}
|
|
11271
|
+
this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
|
|
11272
|
+
this.caseReferenceControl.setValidators(this.caseReferenceValidator());
|
|
11539
11273
|
// Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
|
|
11540
11274
|
// field uses the Complex type, it is meant to be treated as one field
|
|
11541
11275
|
if (this.caseField && this.caseField.field_type.type === 'Complex') {
|
|
@@ -11543,18 +11277,22 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11543
11277
|
caseLinkSubField.retain_hidden_value = this.caseField.retain_hidden_value;
|
|
11544
11278
|
}
|
|
11545
11279
|
}
|
|
11546
|
-
this.containsCaseLinkCollection = this.hasCaseLinkCollection();
|
|
11547
11280
|
}
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11281
|
+
caseReferenceValidator() {
|
|
11282
|
+
return (control) => {
|
|
11283
|
+
if (control.value) {
|
|
11284
|
+
if (this.validCaseReference(control.value)) {
|
|
11285
|
+
return null;
|
|
11286
|
+
}
|
|
11287
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
11288
|
+
}
|
|
11289
|
+
else {
|
|
11290
|
+
if (control.touched) {
|
|
11291
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
11292
|
+
}
|
|
11293
|
+
}
|
|
11294
|
+
return null;
|
|
11295
|
+
};
|
|
11558
11296
|
}
|
|
11559
11297
|
validCaseReference(valueString) {
|
|
11560
11298
|
if (!valueString) {
|
|
@@ -11562,45 +11300,48 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11562
11300
|
}
|
|
11563
11301
|
return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
|
|
11564
11302
|
}
|
|
11565
|
-
hasCaseLinkCollection() {
|
|
11566
|
-
return (this.caseField.field_type &&
|
|
11567
|
-
this.caseField.field_type.type === 'Collection' &&
|
|
11568
|
-
this.caseField.field_type.collection_field_type.id === 'CaseLink');
|
|
11569
|
-
}
|
|
11570
11303
|
}
|
|
11571
|
-
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return
|
|
11304
|
+
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
|
|
11572
11305
|
WriteCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
11573
|
-
i0.ɵɵviewQuery(_c0$
|
|
11306
|
+
i0.ɵɵviewQuery(_c0$N, 1);
|
|
11574
11307
|
} if (rf & 2) {
|
|
11575
11308
|
let _t;
|
|
11576
11309
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
11577
|
-
} },
|
|
11578
|
-
i0.ɵɵ
|
|
11579
|
-
i0.ɵɵ
|
|
11580
|
-
i0.ɵɵtemplate(2,
|
|
11581
|
-
i0.ɵɵ
|
|
11310
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 9, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11311
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
11312
|
+
i0.ɵɵelementStart(1, "label", 1);
|
|
11313
|
+
i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
11314
|
+
i0.ɵɵelementEnd();
|
|
11315
|
+
i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
11316
|
+
i0.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
11317
|
+
i0.ɵɵelement(5, "input", 5);
|
|
11318
|
+
i0.ɵɵelementEnd();
|
|
11582
11319
|
} if (rf & 2) {
|
|
11320
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
11321
|
+
i0.ɵɵadvance(1);
|
|
11322
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
11583
11323
|
i0.ɵɵadvance(1);
|
|
11584
|
-
i0.ɵɵproperty("ngIf",
|
|
11324
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
11585
11325
|
i0.ɵɵadvance(1);
|
|
11586
|
-
i0.ɵɵproperty("ngIf", ctx.
|
|
11587
|
-
|
|
11326
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
11327
|
+
i0.ɵɵadvance(1);
|
|
11328
|
+
i0.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
|
|
11329
|
+
i0.ɵɵadvance(1);
|
|
11330
|
+
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
|
|
11331
|
+
} }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
11332
|
+
const ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
|
|
11588
11333
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
|
|
11589
11334
|
type: Component,
|
|
11590
11335
|
args: [{
|
|
11591
11336
|
selector: 'ccd-write-case-link-field',
|
|
11592
11337
|
templateUrl: 'write-case-link-field.html'
|
|
11593
11338
|
}]
|
|
11594
|
-
}],
|
|
11595
|
-
type: Input
|
|
11596
|
-
}], formGroup: [{
|
|
11597
|
-
type: Input
|
|
11598
|
-
}], writeComplexFieldComponent: [{
|
|
11339
|
+
}], null, { writeComplexFieldComponent: [{
|
|
11599
11340
|
type: ViewChild,
|
|
11600
|
-
args: ['writeComplexFieldComponent'
|
|
11341
|
+
args: ['writeComplexFieldComponent']
|
|
11601
11342
|
}] }); })();
|
|
11602
11343
|
|
|
11603
|
-
const _c0$
|
|
11344
|
+
const _c0$M = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
|
|
11604
11345
|
function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf & 1) {
|
|
11605
11346
|
i0.ɵɵelementStart(0, "tbody");
|
|
11606
11347
|
i0.ɵɵelementStart(1, "tr");
|
|
@@ -11613,9 +11354,9 @@ function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf
|
|
|
11613
11354
|
} if (rf & 2) {
|
|
11614
11355
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
11615
11356
|
i0.ɵɵadvance(4);
|
|
11616
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$
|
|
11357
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$M, 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);
|
|
11617
11358
|
} }
|
|
11618
|
-
const _c1$
|
|
11359
|
+
const _c1$j = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
11619
11360
|
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
11620
11361
|
i0.ɵɵelementStart(0, "tr");
|
|
11621
11362
|
i0.ɵɵelementStart(1, "td");
|
|
@@ -11627,7 +11368,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
|
|
|
11627
11368
|
const i_r5 = ctx.index;
|
|
11628
11369
|
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
11629
11370
|
i0.ɵɵadvance(2);
|
|
11630
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$
|
|
11371
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$j, 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));
|
|
11631
11372
|
} }
|
|
11632
11373
|
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
|
|
11633
11374
|
i0.ɵɵelementStart(0, "tbody");
|
|
@@ -11741,7 +11482,7 @@ RemoveDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RemoveDialogCompone
|
|
|
11741
11482
|
}]
|
|
11742
11483
|
}], function () { return [{ type: i1$3.MatDialogRef }]; }, null); })();
|
|
11743
11484
|
|
|
11744
|
-
const _c0$
|
|
11485
|
+
const _c0$L = ["collectionItem"];
|
|
11745
11486
|
function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
11746
11487
|
i0.ɵɵelementStart(0, "span", 9);
|
|
11747
11488
|
i0.ɵɵtext(1);
|
|
@@ -12115,7 +11856,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12115
11856
|
}
|
|
12116
11857
|
WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(i2$1.ScrollToService), i0.ɵɵdirectiveInject(ProfileNotifier)); };
|
|
12117
11858
|
WriteCollectionFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
12118
|
-
i0.ɵɵviewQuery(_c0$
|
|
11859
|
+
i0.ɵɵviewQuery(_c0$L, 1);
|
|
12119
11860
|
} if (rf & 2) {
|
|
12120
11861
|
let _t;
|
|
12121
11862
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
|
|
@@ -12435,7 +12176,7 @@ FileUploadStateService.ɵprov = i0.ɵɵdefineInjectable({ token: FileUploadState
|
|
|
12435
12176
|
type: Injectable
|
|
12436
12177
|
}], null, null); })();
|
|
12437
12178
|
|
|
12438
|
-
const _c0$
|
|
12179
|
+
const _c0$K = ["fileInput"];
|
|
12439
12180
|
function WriteDocumentFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
12440
12181
|
i0.ɵɵelementStart(0, "span", 12);
|
|
12441
12182
|
i0.ɵɵtext(1);
|
|
@@ -12460,7 +12201,7 @@ function WriteDocumentFieldComponent_ccd_read_document_field_9_Template(rf, ctx)
|
|
|
12460
12201
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
12461
12202
|
i0.ɵɵproperty("caseField", ctx_r2.caseField);
|
|
12462
12203
|
} }
|
|
12463
|
-
const _c1$
|
|
12204
|
+
const _c1$i = function (a0) { return { "form-group-error bottom-30": a0 }; };
|
|
12464
12205
|
class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
12465
12206
|
constructor(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
|
|
12466
12207
|
super();
|
|
@@ -12713,7 +12454,7 @@ WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facili
|
|
|
12713
12454
|
WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|
|
12714
12455
|
WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(FileUploadStateService)); };
|
|
12715
12456
|
WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
12716
|
-
i0.ɵɵviewQuery(_c0$
|
|
12457
|
+
i0.ɵɵviewQuery(_c0$K, 1);
|
|
12717
12458
|
} if (rf & 2) {
|
|
12718
12459
|
let _t;
|
|
12719
12460
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileInput = _t.first);
|
|
@@ -12749,7 +12490,7 @@ WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocument
|
|
|
12749
12490
|
i0.ɵɵelementEnd();
|
|
12750
12491
|
i0.ɵɵelementEnd();
|
|
12751
12492
|
} if (rf & 2) {
|
|
12752
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c1$
|
|
12493
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c1$i, !ctx.valid));
|
|
12753
12494
|
i0.ɵɵadvance(1);
|
|
12754
12495
|
i0.ɵɵproperty("for", ctx.id());
|
|
12755
12496
|
i0.ɵɵadvance(1);
|
|
@@ -12875,7 +12616,7 @@ function WriteDynamicListFieldComponent_option_9_Template(rf, ctx) { if (rf & 1)
|
|
|
12875
12616
|
i0.ɵɵadvance(1);
|
|
12876
12617
|
i0.ɵɵtextInterpolate(type_r5.label);
|
|
12877
12618
|
} }
|
|
12878
|
-
const _c0$
|
|
12619
|
+
const _c0$J = function (a0) { return { "form-group-error": a0 }; };
|
|
12879
12620
|
class WriteDynamicListFieldComponent extends AbstractFieldWriteComponent {
|
|
12880
12621
|
ngOnInit() {
|
|
12881
12622
|
/**
|
|
@@ -12917,7 +12658,7 @@ WriteDynamicListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDynam
|
|
|
12917
12658
|
i0.ɵɵelementEnd();
|
|
12918
12659
|
i0.ɵɵelementEnd();
|
|
12919
12660
|
} if (rf & 2) {
|
|
12920
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$
|
|
12661
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c0$J, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
|
|
12921
12662
|
i0.ɵɵadvance(1);
|
|
12922
12663
|
i0.ɵɵproperty("for", ctx.id());
|
|
12923
12664
|
i0.ɵɵadvance(1);
|
|
@@ -13038,7 +12779,7 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
|
|
|
13038
12779
|
i0.ɵɵadvance(1);
|
|
13039
12780
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
|
|
13040
12781
|
} }
|
|
13041
|
-
const _c0$
|
|
12782
|
+
const _c0$I = function (a0) { return { selected: a0 }; };
|
|
13042
12783
|
function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
13043
12784
|
i0.ɵɵelementStart(0, "div", 10);
|
|
13044
12785
|
i0.ɵɵelement(1, "input", 11);
|
|
@@ -13049,7 +12790,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
|
|
|
13049
12790
|
} if (rf & 2) {
|
|
13050
12791
|
const radioButton_r5 = ctx.$implicit;
|
|
13051
12792
|
const ctx_r4 = i0.ɵɵnextContext();
|
|
13052
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$
|
|
12793
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$I, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
|
|
13053
12794
|
i0.ɵɵadvance(1);
|
|
13054
12795
|
i0.ɵɵpropertyInterpolate("name", ctx_r4.id());
|
|
13055
12796
|
i0.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
|
|
@@ -13058,7 +12799,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
|
|
|
13058
12799
|
i0.ɵɵadvance(1);
|
|
13059
12800
|
i0.ɵɵtextInterpolate(radioButton_r5.label);
|
|
13060
12801
|
} }
|
|
13061
|
-
const _c1$
|
|
12802
|
+
const _c1$h = function (a0) { return { "form-group-error": a0 }; };
|
|
13062
12803
|
class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
13063
12804
|
ngOnInit() {
|
|
13064
12805
|
/**
|
|
@@ -13099,7 +12840,7 @@ WriteDynamicRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Write
|
|
|
13099
12840
|
i0.ɵɵelementEnd();
|
|
13100
12841
|
i0.ɵɵelementEnd();
|
|
13101
12842
|
} if (rf & 2) {
|
|
13102
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$
|
|
12843
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$h, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
13103
12844
|
i0.ɵɵadvance(3);
|
|
13104
12845
|
i0.ɵɵproperty("for", ctx.id());
|
|
13105
12846
|
i0.ɵɵadvance(1);
|
|
@@ -13183,8 +12924,8 @@ function WriteEmailFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
13183
12924
|
i0.ɵɵadvance(1);
|
|
13184
12925
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
|
|
13185
12926
|
} }
|
|
13186
|
-
const _c0$
|
|
13187
|
-
const _c1$
|
|
12927
|
+
const _c0$H = function (a0) { return { "form-group-error": a0 }; };
|
|
12928
|
+
const _c1$g = function (a0) { return { "govuk-input--error": a0 }; };
|
|
13188
12929
|
class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
|
|
13189
12930
|
ngOnInit() {
|
|
13190
12931
|
this.emailControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -13201,7 +12942,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
|
|
|
13201
12942
|
i0.ɵɵelement(5, "input", 5);
|
|
13202
12943
|
i0.ɵɵelementEnd();
|
|
13203
12944
|
} if (rf & 2) {
|
|
13204
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
12945
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$H, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
|
|
13205
12946
|
i0.ɵɵadvance(1);
|
|
13206
12947
|
i0.ɵɵproperty("for", ctx.id());
|
|
13207
12948
|
i0.ɵɵadvance(1);
|
|
@@ -13211,7 +12952,7 @@ WriteEmailFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteEmailFieldC
|
|
|
13211
12952
|
i0.ɵɵadvance(1);
|
|
13212
12953
|
i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
|
|
13213
12954
|
i0.ɵɵadvance(1);
|
|
13214
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
12955
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$g, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
|
|
13215
12956
|
} }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
13216
12957
|
const ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
|
|
13217
12958
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
|
|
@@ -13303,7 +13044,7 @@ function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
13303
13044
|
i0.ɵɵadvance(1);
|
|
13304
13045
|
i0.ɵɵtextInterpolate(type_r4.label);
|
|
13305
13046
|
} }
|
|
13306
|
-
const _c0$
|
|
13047
|
+
const _c0$G = function (a0) { return { "form-group-error": a0 }; };
|
|
13307
13048
|
class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
|
|
13308
13049
|
get listItems() {
|
|
13309
13050
|
if (this.caseField) {
|
|
@@ -13341,7 +13082,7 @@ WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedLi
|
|
|
13341
13082
|
i0.ɵɵelementEnd();
|
|
13342
13083
|
i0.ɵɵelementEnd();
|
|
13343
13084
|
} if (rf & 2) {
|
|
13344
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$
|
|
13085
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$G, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
|
|
13345
13086
|
i0.ɵɵadvance(1);
|
|
13346
13087
|
i0.ɵɵproperty("for", ctx.id());
|
|
13347
13088
|
i0.ɵɵadvance(1);
|
|
@@ -13432,7 +13173,7 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
|
|
|
13432
13173
|
i0.ɵɵadvance(1);
|
|
13433
13174
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
13434
13175
|
} }
|
|
13435
|
-
const _c0$
|
|
13176
|
+
const _c0$F = function (a0) { return { selected: a0 }; };
|
|
13436
13177
|
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
13437
13178
|
i0.ɵɵelementStart(0, "div", 9);
|
|
13438
13179
|
i0.ɵɵelement(1, "input", 10);
|
|
@@ -13443,7 +13184,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
|
|
|
13443
13184
|
} if (rf & 2) {
|
|
13444
13185
|
const radioButton_r4 = ctx.$implicit;
|
|
13445
13186
|
const ctx_r3 = i0.ɵɵnextContext();
|
|
13446
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$
|
|
13187
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$F, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
13447
13188
|
i0.ɵɵadvance(1);
|
|
13448
13189
|
i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
13449
13190
|
i0.ɵɵadvance(1);
|
|
@@ -13451,7 +13192,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
|
|
|
13451
13192
|
i0.ɵɵadvance(1);
|
|
13452
13193
|
i0.ɵɵtextInterpolate(radioButton_r4.label);
|
|
13453
13194
|
} }
|
|
13454
|
-
const _c1$
|
|
13195
|
+
const _c1$f = function (a0) { return { "form-group-error": a0 }; };
|
|
13455
13196
|
class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
13456
13197
|
ngOnInit() {
|
|
13457
13198
|
const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
|
|
@@ -13475,7 +13216,7 @@ WriteFixedRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFi
|
|
|
13475
13216
|
i0.ɵɵelementEnd();
|
|
13476
13217
|
i0.ɵɵelementEnd();
|
|
13477
13218
|
} if (rf & 2) {
|
|
13478
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
13219
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$f, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
13479
13220
|
i0.ɵɵadvance(3);
|
|
13480
13221
|
i0.ɵɵproperty("for", ctx.id());
|
|
13481
13222
|
i0.ɵɵadvance(1);
|
|
@@ -13574,7 +13315,7 @@ function WriteJudicialUserFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
|
|
|
13574
13315
|
i0.ɵɵadvance(1);
|
|
13575
13316
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
|
|
13576
13317
|
} }
|
|
13577
|
-
const _c0$
|
|
13318
|
+
const _c0$E = function (a0) { return { "hide-autocomplete": a0 }; };
|
|
13578
13319
|
function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf & 1) {
|
|
13579
13320
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
13580
13321
|
i0.ɵɵelementStart(0, "mat-option", 11);
|
|
@@ -13584,7 +13325,7 @@ function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) { if (rf
|
|
|
13584
13325
|
} if (rf & 2) {
|
|
13585
13326
|
const judicialUser_r5 = ctx.$implicit;
|
|
13586
13327
|
const ctx_r3 = i0.ɵɵnextContext();
|
|
13587
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$
|
|
13328
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$E, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
|
|
13588
13329
|
i0.ɵɵadvance(1);
|
|
13589
13330
|
i0.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
|
|
13590
13331
|
} }
|
|
@@ -13892,7 +13633,7 @@ function WriteMoneyGbpFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
13892
13633
|
i0.ɵɵadvance(1);
|
|
13893
13634
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
|
|
13894
13635
|
} }
|
|
13895
|
-
const _c0$
|
|
13636
|
+
const _c0$D = function (a0) { return { "form-group-error": a0 }; };
|
|
13896
13637
|
class WriteMoneyGbpFieldComponent extends AbstractFieldWriteComponent {
|
|
13897
13638
|
ngOnInit() {
|
|
13898
13639
|
this.moneyGbpControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -13915,7 +13656,7 @@ WriteMoneyGbpFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteMoneyGbp
|
|
|
13915
13656
|
i0.ɵɵelementEnd();
|
|
13916
13657
|
i0.ɵɵelementEnd();
|
|
13917
13658
|
} if (rf & 2) {
|
|
13918
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$
|
|
13659
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$D, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
|
|
13919
13660
|
i0.ɵɵadvance(1);
|
|
13920
13661
|
i0.ɵɵproperty("for", ctx.id());
|
|
13921
13662
|
i0.ɵɵadvance(1);
|
|
@@ -14032,7 +13773,7 @@ function WriteMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) { i
|
|
|
14032
13773
|
i0.ɵɵadvance(1);
|
|
14033
13774
|
i0.ɵɵtextInterpolate(checkbox_r4.label);
|
|
14034
13775
|
} }
|
|
14035
|
-
const _c0$
|
|
13776
|
+
const _c0$C = function (a0) { return { "error": a0 }; };
|
|
14036
13777
|
class WriteMultiSelectListFieldComponent extends AbstractFieldWriteComponent {
|
|
14037
13778
|
ngOnInit() {
|
|
14038
13779
|
this.checkboxes = new FormArray([]);
|
|
@@ -14087,7 +13828,7 @@ WriteMultiSelectListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteM
|
|
|
14087
13828
|
i0.ɵɵelementEnd();
|
|
14088
13829
|
i0.ɵɵelementEnd();
|
|
14089
13830
|
} if (rf & 2) {
|
|
14090
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$
|
|
13831
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$C, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
|
|
14091
13832
|
i0.ɵɵadvance(3);
|
|
14092
13833
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
14093
13834
|
i0.ɵɵadvance(1);
|
|
@@ -14156,8 +13897,8 @@ function WriteNumberFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
14156
13897
|
i0.ɵɵadvance(1);
|
|
14157
13898
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
|
|
14158
13899
|
} }
|
|
14159
|
-
const _c0$
|
|
14160
|
-
const _c1$
|
|
13900
|
+
const _c0$B = function (a0) { return { "form-group-error": a0 }; };
|
|
13901
|
+
const _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
14161
13902
|
class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
|
|
14162
13903
|
ngOnInit() {
|
|
14163
13904
|
this.numberControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -14174,7 +13915,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
|
|
|
14174
13915
|
i0.ɵɵelement(5, "input", 5);
|
|
14175
13916
|
i0.ɵɵelementEnd();
|
|
14176
13917
|
} if (rf & 2) {
|
|
14177
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
13918
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$B, !ctx.numberControl.valid && ctx.numberControl.dirty));
|
|
14178
13919
|
i0.ɵɵadvance(1);
|
|
14179
13920
|
i0.ɵɵproperty("for", ctx.id());
|
|
14180
13921
|
i0.ɵɵadvance(1);
|
|
@@ -14184,7 +13925,7 @@ WriteNumberFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteNumberFiel
|
|
|
14184
13925
|
i0.ɵɵadvance(1);
|
|
14185
13926
|
i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
|
|
14186
13927
|
i0.ɵɵadvance(1);
|
|
14187
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
13928
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
|
|
14188
13929
|
} }, directives: [i1.NgClass, i1.NgIf, i2.NumberValueAccessor, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
14189
13930
|
const ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
|
|
14190
13931
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
|
|
@@ -14424,7 +14165,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_div_4_Template(rf, ct
|
|
|
14424
14165
|
i0.ɵɵelementEnd();
|
|
14425
14166
|
i0.ɵɵelementEnd();
|
|
14426
14167
|
} }
|
|
14427
|
-
const _c0$
|
|
14168
|
+
const _c0$A = function (a0) { return { "scroll-container ": a0 }; };
|
|
14428
14169
|
function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { if (rf & 1) {
|
|
14429
14170
|
i0.ɵɵelementStart(0, "div", 26);
|
|
14430
14171
|
i0.ɵɵpipe(1, "async");
|
|
@@ -14438,7 +14179,7 @@ function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) { i
|
|
|
14438
14179
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
14439
14180
|
let tmp_0_0 = null;
|
|
14440
14181
|
let tmp_2_0 = null;
|
|
14441
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$
|
|
14182
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$A, ((tmp_0_0 = i0.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
|
|
14442
14183
|
i0.ɵɵadvance(2);
|
|
14443
14184
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
|
|
14444
14185
|
i0.ɵɵadvance(2);
|
|
@@ -14837,8 +14578,8 @@ function WritePhoneUKFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
14837
14578
|
i0.ɵɵadvance(1);
|
|
14838
14579
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label));
|
|
14839
14580
|
} }
|
|
14840
|
-
const _c0$
|
|
14841
|
-
const _c1$
|
|
14581
|
+
const _c0$z = function (a0) { return { "form-group-error": a0 }; };
|
|
14582
|
+
const _c1$d = function (a0) { return { "govuk-input--error": a0 }; };
|
|
14842
14583
|
class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
|
|
14843
14584
|
ngOnInit() {
|
|
14844
14585
|
this.phoneUkControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -14855,7 +14596,7 @@ WritePhoneUKFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WritePhoneUKFi
|
|
|
14855
14596
|
i0.ɵɵelement(5, "input", 5);
|
|
14856
14597
|
i0.ɵɵelementEnd();
|
|
14857
14598
|
} if (rf & 2) {
|
|
14858
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
14599
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$z, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
|
|
14859
14600
|
i0.ɵɵadvance(1);
|
|
14860
14601
|
i0.ɵɵproperty("for", ctx.id());
|
|
14861
14602
|
i0.ɵɵadvance(1);
|
|
@@ -14865,7 +14606,7 @@ WritePhoneUKFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WritePhoneUKFi
|
|
|
14865
14606
|
i0.ɵɵadvance(1);
|
|
14866
14607
|
i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
|
|
14867
14608
|
i0.ɵɵadvance(1);
|
|
14868
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
14609
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$d, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
|
|
14869
14610
|
} }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
14870
14611
|
const ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
|
|
14871
14612
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
|
|
@@ -14925,8 +14666,8 @@ function WriteTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
14925
14666
|
i0.ɵɵadvance(1);
|
|
14926
14667
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label));
|
|
14927
14668
|
} }
|
|
14928
|
-
const _c0$
|
|
14929
|
-
const _c1$
|
|
14669
|
+
const _c0$y = function (a0) { return { "form-group-error": a0 }; };
|
|
14670
|
+
const _c1$c = function (a0) { return { "govuk-textarea--error": a0 }; };
|
|
14930
14671
|
class WriteTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
14931
14672
|
constructor(browserService) {
|
|
14932
14673
|
super();
|
|
@@ -14956,7 +14697,7 @@ WriteTextAreaFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextArea
|
|
|
14956
14697
|
i0.ɵɵelementEnd();
|
|
14957
14698
|
i0.ɵɵelementEnd();
|
|
14958
14699
|
} if (rf & 2) {
|
|
14959
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
14700
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$y, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
|
|
14960
14701
|
i0.ɵɵadvance(1);
|
|
14961
14702
|
i0.ɵɵproperty("for", ctx.id());
|
|
14962
14703
|
i0.ɵɵadvance(1);
|
|
@@ -14966,7 +14707,7 @@ WriteTextAreaFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextArea
|
|
|
14966
14707
|
i0.ɵɵadvance(1);
|
|
14967
14708
|
i0.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
|
|
14968
14709
|
i0.ɵɵadvance(1);
|
|
14969
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
14710
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$c, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
|
|
14970
14711
|
} }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
14971
14712
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextAreaFieldComponent, [{
|
|
14972
14713
|
type: Component,
|
|
@@ -15026,8 +14767,8 @@ function WriteTextFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
15026
14767
|
i0.ɵɵadvance(1);
|
|
15027
14768
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label));
|
|
15028
14769
|
} }
|
|
15029
|
-
const _c0$
|
|
15030
|
-
const _c1$
|
|
14770
|
+
const _c0$x = function (a0) { return { "form-group-error": a0 }; };
|
|
14771
|
+
const _c1$b = function (a0) { return { "govuk-input--error": a0 }; };
|
|
15031
14772
|
class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
15032
14773
|
ngOnInit() {
|
|
15033
14774
|
this.textControl = this.registerControl(new FormControl(this.caseField.value));
|
|
@@ -15049,7 +14790,7 @@ WriteTextFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextFieldCom
|
|
|
15049
14790
|
i0.ɵɵelementEnd();
|
|
15050
14791
|
i0.ɵɵelementEnd();
|
|
15051
14792
|
} if (rf & 2) {
|
|
15052
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
14793
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$x, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
|
|
15053
14794
|
i0.ɵɵadvance(1);
|
|
15054
14795
|
i0.ɵɵproperty("for", ctx.id());
|
|
15055
14796
|
i0.ɵɵadvance(1);
|
|
@@ -15059,7 +14800,7 @@ WriteTextFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteTextFieldCom
|
|
|
15059
14800
|
i0.ɵɵadvance(1);
|
|
15060
14801
|
i0.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
15061
14802
|
i0.ɵɵadvance(1);
|
|
15062
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
14803
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$b, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
15063
14804
|
} }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
15064
14805
|
const ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteTextFieldComponent);
|
|
15065
14806
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteTextFieldComponent, [{
|
|
@@ -15215,7 +14956,7 @@ function WriteYesNoFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
15215
14956
|
i0.ɵɵadvance(1);
|
|
15216
14957
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label));
|
|
15217
14958
|
} }
|
|
15218
|
-
const _c0$
|
|
14959
|
+
const _c0$w = function (a0) { return { selected: a0 }; };
|
|
15219
14960
|
function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
15220
14961
|
i0.ɵɵelementStart(0, "div", 10);
|
|
15221
14962
|
i0.ɵɵelement(1, "input", 11);
|
|
@@ -15226,7 +14967,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
15226
14967
|
} if (rf & 2) {
|
|
15227
14968
|
const value_r4 = ctx.$implicit;
|
|
15228
14969
|
const ctx_r3 = i0.ɵɵnextContext();
|
|
15229
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$
|
|
14970
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$w, ctx_r3.yesNoControl.value === value_r4));
|
|
15230
14971
|
i0.ɵɵadvance(1);
|
|
15231
14972
|
i0.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
|
|
15232
14973
|
i0.ɵɵattribute("name", ctx_r3.id());
|
|
@@ -15235,7 +14976,7 @@ function WriteYesNoFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
15235
14976
|
i0.ɵɵadvance(1);
|
|
15236
14977
|
i0.ɵɵtextInterpolate(value_r4);
|
|
15237
14978
|
} }
|
|
15238
|
-
const _c1$
|
|
14979
|
+
const _c1$a = function (a0) { return { "form-group-error": a0 }; };
|
|
15239
14980
|
class WriteYesNoFieldComponent extends AbstractFieldWriteComponent {
|
|
15240
14981
|
constructor(yesNoService) {
|
|
15241
14982
|
super();
|
|
@@ -15261,7 +15002,7 @@ WriteYesNoFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteYesNoFieldC
|
|
|
15261
15002
|
i0.ɵɵelementEnd();
|
|
15262
15003
|
i0.ɵɵelementEnd();
|
|
15263
15004
|
} if (rf & 2) {
|
|
15264
|
-
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
15005
|
+
i0.ɵɵproperty("id", ctx.id())("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
|
|
15265
15006
|
i0.ɵɵadvance(3);
|
|
15266
15007
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
15267
15008
|
i0.ɵɵadvance(1);
|
|
@@ -15322,25 +15063,17 @@ class PaletteService {
|
|
|
15322
15063
|
return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
|
|
15323
15064
|
case 'OrderSummary':
|
|
15324
15065
|
return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
|
|
15066
|
+
case 'CaseLink':
|
|
15067
|
+
return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
|
|
15325
15068
|
case 'Organisation':
|
|
15326
15069
|
return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
|
|
15327
15070
|
case 'JudicialUser':
|
|
15328
15071
|
return write ? WriteJudicialUserFieldComponent : ReadJudicialUserFieldComponent;
|
|
15329
|
-
case 'CaseLink':
|
|
15330
|
-
return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
|
|
15331
15072
|
default:
|
|
15332
15073
|
return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
|
|
15333
15074
|
}
|
|
15334
15075
|
case 'Collection':
|
|
15335
|
-
|
|
15336
|
-
case 'CaseLink':
|
|
15337
|
-
if (caseField.id === 'caseLinks') {
|
|
15338
|
-
return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
|
|
15339
|
-
}
|
|
15340
|
-
return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
|
|
15341
|
-
default:
|
|
15342
|
-
return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
|
|
15343
|
-
}
|
|
15076
|
+
return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
|
|
15344
15077
|
case 'MultiSelectList':
|
|
15345
15078
|
return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
|
|
15346
15079
|
case 'Document':
|
|
@@ -15377,7 +15110,7 @@ PaletteService.ɵprov = i0.ɵɵdefineInjectable({ token: PaletteService, factory
|
|
|
15377
15110
|
type: Injectable
|
|
15378
15111
|
}], null, null); })();
|
|
15379
15112
|
|
|
15380
|
-
const _c0$
|
|
15113
|
+
const _c0$v = ["fieldContainer"];
|
|
15381
15114
|
const FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
|
|
15382
15115
|
class FieldReadComponent extends AbstractFieldReadComponent {
|
|
15383
15116
|
constructor(resolver, paletteService) {
|
|
@@ -15421,7 +15154,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
|
|
|
15421
15154
|
}
|
|
15422
15155
|
FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(PaletteService)); };
|
|
15423
15156
|
FieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) { if (rf & 1) {
|
|
15424
|
-
i0.ɵɵviewQuery(_c0$
|
|
15157
|
+
i0.ɵɵviewQuery(_c0$v, 1, ViewContainerRef);
|
|
15425
15158
|
} if (rf & 2) {
|
|
15426
15159
|
let _t;
|
|
15427
15160
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fieldContainer = _t.first);
|
|
@@ -15455,7 +15188,7 @@ FieldReadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadComponent, se
|
|
|
15455
15188
|
args: ['fieldContainer', { static: false, read: ViewContainerRef }]
|
|
15456
15189
|
}] }); })();
|
|
15457
15190
|
|
|
15458
|
-
const _c0$
|
|
15191
|
+
const _c0$u = ["fieldContainer"];
|
|
15459
15192
|
const FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
|
|
15460
15193
|
class FieldWriteComponent extends AbstractFieldWriteComponent {
|
|
15461
15194
|
constructor(resolver, paletteService) {
|
|
@@ -15499,7 +15232,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
|
|
|
15499
15232
|
}
|
|
15500
15233
|
FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(PaletteService)); };
|
|
15501
15234
|
FieldWriteComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) { if (rf & 1) {
|
|
15502
|
-
i0.ɵɵviewQuery(_c0$
|
|
15235
|
+
i0.ɵɵviewQuery(_c0$u, 3, ViewContainerRef);
|
|
15503
15236
|
} if (rf & 2) {
|
|
15504
15237
|
let _t;
|
|
15505
15238
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fieldContainer = _t.first);
|
|
@@ -15548,7 +15281,7 @@ function FieldReadLabelComponent_dl_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
15548
15281
|
function FieldReadLabelComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
15549
15282
|
i0.ɵɵprojection(0);
|
|
15550
15283
|
} }
|
|
15551
|
-
const _c0$
|
|
15284
|
+
const _c0$t = ["*"];
|
|
15552
15285
|
class FieldReadLabelComponent extends AbstractFieldReadComponent {
|
|
15553
15286
|
constructor() {
|
|
15554
15287
|
super(...arguments);
|
|
@@ -15583,7 +15316,7 @@ class FieldReadLabelComponent extends AbstractFieldReadComponent {
|
|
|
15583
15316
|
}
|
|
15584
15317
|
}
|
|
15585
15318
|
FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
|
|
15586
|
-
FieldReadLabelComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$
|
|
15319
|
+
FieldReadLabelComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$t, decls: 4, vars: 5, consts: [[3, "hidden"], ["class", "case-field", 4, "ngIf", "ngIfElse"], ["caseFieldValue", ""], [1, "case-field"], [1, "case-field__label"], [1, "case-field__value"], [4, "ngTemplateOutlet"]], template: function FieldReadLabelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15587
15320
|
i0.ɵɵprojectionDef();
|
|
15588
15321
|
i0.ɵɵelementStart(0, "div", 0);
|
|
15589
15322
|
i0.ɵɵtemplate(1, FieldReadLabelComponent_dl_1_Template, 5, 2, "dl", 1);
|
|
@@ -15612,25 +15345,25 @@ const ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedF
|
|
|
15612
15345
|
type: Input
|
|
15613
15346
|
}] }); })();
|
|
15614
15347
|
|
|
15615
|
-
function
|
|
15348
|
+
function CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
15616
15349
|
i0.ɵɵelementContainer(0);
|
|
15617
15350
|
} }
|
|
15618
|
-
const _c0$
|
|
15619
|
-
function
|
|
15351
|
+
const _c0$s = function (a0) { return { cat: a0, level: 1 }; };
|
|
15352
|
+
function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
|
|
15620
15353
|
i0.ɵɵelementContainerStart(0);
|
|
15621
|
-
i0.ɵɵtemplate(1,
|
|
15354
|
+
i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_container_6_ng_container_1_Template, 1, 0, "ng-container", 8);
|
|
15622
15355
|
i0.ɵɵelementContainerEnd();
|
|
15623
15356
|
} if (rf & 2) {
|
|
15624
15357
|
const cat_r3 = ctx.$implicit;
|
|
15625
15358
|
i0.ɵɵnextContext();
|
|
15626
15359
|
const _r1 = i0.ɵɵreference(13);
|
|
15627
15360
|
i0.ɵɵadvance(1);
|
|
15628
|
-
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$
|
|
15361
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$s, cat_r3));
|
|
15629
15362
|
} }
|
|
15630
15363
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
15631
15364
|
i0.ɵɵelementContainer(0);
|
|
15632
15365
|
} }
|
|
15633
|
-
const _c1$
|
|
15366
|
+
const _c1$9 = function (a0, a1) { return { cat: a0, level: a1 }; };
|
|
15634
15367
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
15635
15368
|
i0.ɵɵelementContainerStart(0);
|
|
15636
15369
|
i0.ɵɵtemplate(1, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template, 1, 0, "ng-container", 8);
|
|
@@ -15641,7 +15374,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Templ
|
|
|
15641
15374
|
i0.ɵɵnextContext();
|
|
15642
15375
|
const _r1 = i0.ɵɵreference(13);
|
|
15643
15376
|
i0.ɵɵadvance(1);
|
|
15644
|
-
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$
|
|
15377
|
+
i0.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$9, subcat_r8, level_r6 + 1));
|
|
15645
15378
|
} }
|
|
15646
15379
|
function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
|
|
15647
15380
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
@@ -15653,7 +15386,7 @@ function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
|
|
|
15653
15386
|
i0.ɵɵelement(3, "img", 12);
|
|
15654
15387
|
i0.ɵɵtext(4);
|
|
15655
15388
|
i0.ɵɵelementEnd();
|
|
15656
|
-
i0.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template, 2, 5, "ng-container",
|
|
15389
|
+
i0.ɵɵtemplate(5, CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template, 2, 5, "ng-container", 3);
|
|
15657
15390
|
i0.ɵɵelementEnd();
|
|
15658
15391
|
} if (rf & 2) {
|
|
15659
15392
|
const cat_r5 = ctx.cat;
|
|
@@ -15724,42 +15457,43 @@ class CaseFileViewFolderSelectorComponent {
|
|
|
15724
15457
|
}
|
|
15725
15458
|
}
|
|
15726
15459
|
CaseFileViewFolderSelectorComponent.ɵfac = function CaseFileViewFolderSelectorComponent_Factory(t) { return new (t || CaseFileViewFolderSelectorComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
|
|
15727
|
-
CaseFileViewFolderSelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], decls: 14, vars: 2, consts: [[1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "cancel", 3, "click"], [
|
|
15728
|
-
i0.ɵɵelementStart(0, "
|
|
15729
|
-
i0.ɵɵ
|
|
15460
|
+
CaseFileViewFolderSelectorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], decls: 14, vars: 2, consts: [[1, "close", 3, "click"], [1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], [1, "cancel", 3, "click"], ["folder", ""], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "name", "id", "click"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15461
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
15462
|
+
i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_div_click_0_listener() { return ctx.cancel(); });
|
|
15730
15463
|
i0.ɵɵelementEnd();
|
|
15731
|
-
i0.ɵɵelementStart(
|
|
15732
|
-
i0.ɵɵtext(
|
|
15464
|
+
i0.ɵɵelementStart(1, "h2", 1);
|
|
15465
|
+
i0.ɵɵtext(2, "Move File");
|
|
15733
15466
|
i0.ɵɵelementEnd();
|
|
15734
|
-
i0.ɵɵelementStart(
|
|
15735
|
-
i0.ɵɵ
|
|
15467
|
+
i0.ɵɵelementStart(3, "p");
|
|
15468
|
+
i0.ɵɵtext(4);
|
|
15736
15469
|
i0.ɵɵelementEnd();
|
|
15737
|
-
i0.ɵɵelementStart(
|
|
15738
|
-
i0.ɵɵ
|
|
15739
|
-
i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_7_listener() { return ctx.save(); });
|
|
15740
|
-
i0.ɵɵtext(8, "Save");
|
|
15470
|
+
i0.ɵɵelementStart(5, "div", 2);
|
|
15471
|
+
i0.ɵɵtemplate(6, CaseFileViewFolderSelectorComponent_ng_container_6_Template, 2, 4, "ng-container", 3);
|
|
15741
15472
|
i0.ɵɵelementEnd();
|
|
15742
|
-
i0.ɵɵelementStart(
|
|
15743
|
-
i0.ɵɵ
|
|
15744
|
-
i0.ɵɵ
|
|
15473
|
+
i0.ɵɵelementStart(7, "div", 4);
|
|
15474
|
+
i0.ɵɵelementStart(8, "button", 5);
|
|
15475
|
+
i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_8_listener() { return ctx.save(); });
|
|
15476
|
+
i0.ɵɵtext(9, "Save");
|
|
15745
15477
|
i0.ɵɵelementEnd();
|
|
15478
|
+
i0.ɵɵelementStart(10, "a", 6);
|
|
15479
|
+
i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_a_click_10_listener() { return ctx.cancel(); });
|
|
15480
|
+
i0.ɵɵtext(11, "Cancel");
|
|
15746
15481
|
i0.ɵɵelementEnd();
|
|
15747
|
-
i0.ɵɵelementStart(11, "div", 6);
|
|
15748
|
-
i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_div_click_11_listener() { return ctx.cancel(); });
|
|
15749
15482
|
i0.ɵɵelementEnd();
|
|
15750
15483
|
i0.ɵɵtemplate(12, CaseFileViewFolderSelectorComponent_ng_template_12_Template, 6, 5, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
|
|
15751
15484
|
} if (rf & 2) {
|
|
15752
|
-
i0.ɵɵadvance(
|
|
15485
|
+
i0.ɵɵadvance(4);
|
|
15753
15486
|
i0.ɵɵtextInterpolate1("Where do you want to move \"", ctx.data.document.document_filename, "\" file?");
|
|
15754
15487
|
i0.ɵɵadvance(2);
|
|
15755
15488
|
i0.ɵɵproperty("ngForOf", ctx.currentCategories);
|
|
15756
|
-
} }, directives: [i1.NgForOf, i1.NgTemplateOutlet], styles: ["
|
|
15489
|
+
} }, directives: [i1.NgForOf, i1.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
|
|
15757
15490
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
15758
15491
|
type: Component,
|
|
15759
15492
|
args: [{
|
|
15760
15493
|
selector: 'xui-case-file-view-folder-selector',
|
|
15761
15494
|
templateUrl: './case-file-view-folder-selector.component.html',
|
|
15762
|
-
styleUrls: ['./case-file-view-folder-selector.component.scss']
|
|
15495
|
+
styleUrls: ['./case-file-view-folder-selector.component.scss'],
|
|
15496
|
+
encapsulation: ViewEncapsulation.None
|
|
15763
15497
|
}]
|
|
15764
15498
|
}], function () { return [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
15765
15499
|
type: Inject,
|
|
@@ -15815,8 +15549,8 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
|
|
|
15815
15549
|
i0.ɵɵadvance(1);
|
|
15816
15550
|
i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
|
|
15817
15551
|
} }
|
|
15818
|
-
const _c0$
|
|
15819
|
-
const _c1$
|
|
15552
|
+
const _c0$r = [[["", "trigger", ""]]];
|
|
15553
|
+
const _c1$8 = ["[trigger]"];
|
|
15820
15554
|
class CaseFileViewOverlayMenuComponent {
|
|
15821
15555
|
constructor() {
|
|
15822
15556
|
this.title = '';
|
|
@@ -15830,8 +15564,8 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
15830
15564
|
}
|
|
15831
15565
|
}
|
|
15832
15566
|
CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
|
|
15833
|
-
CaseFileViewOverlayMenuComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$
|
|
15834
|
-
i0.ɵɵprojectionDef(_c0$
|
|
15567
|
+
CaseFileViewOverlayMenuComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$8, 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) {
|
|
15568
|
+
i0.ɵɵprojectionDef(_c0$r);
|
|
15835
15569
|
i0.ɵɵelementStart(0, "div");
|
|
15836
15570
|
i0.ɵɵelementStart(1, "button", 0, 1);
|
|
15837
15571
|
i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
|
|
@@ -16240,7 +15974,7 @@ class CaseFileViewFolderComponent {
|
|
|
16240
15974
|
return Object.assign(documentTreeNode, node);
|
|
16241
15975
|
}
|
|
16242
15976
|
let filteredData = this.documentTreeData;
|
|
16243
|
-
if (searchTerm && searchTerm.length >= CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS && this.documentFilterFormGroup.controls[CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME].value.length >
|
|
15977
|
+
if (searchTerm && searchTerm.length >= CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS && this.documentFilterFormGroup.controls[CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME].value.length > 0) {
|
|
16244
15978
|
filteredData = this.documentTreeData.map(copy).filter(function filterTreeData(node) {
|
|
16245
15979
|
if (node.name && node.name.toLowerCase().includes(searchTerm) && node.type === DocumentTreeNodeType.DOCUMENT) {
|
|
16246
15980
|
return true;
|
|
@@ -16320,7 +16054,6 @@ class CaseFileViewFolderComponent {
|
|
|
16320
16054
|
}
|
|
16321
16055
|
openMoveDialog(node) {
|
|
16322
16056
|
const dialogRef = this.dialog.open(CaseFileViewFolderSelectorComponent, {
|
|
16323
|
-
width: '570px',
|
|
16324
16057
|
data: { categories: this.categories, document: node }
|
|
16325
16058
|
});
|
|
16326
16059
|
dialogRef.afterClosed().subscribe(newCatId => {
|
|
@@ -16345,7 +16078,7 @@ class CaseFileViewFolderComponent {
|
|
|
16345
16078
|
}
|
|
16346
16079
|
CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
|
|
16347
16080
|
CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
|
|
16348
|
-
CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS =
|
|
16081
|
+
CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 1;
|
|
16349
16082
|
CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$3.MatDialog)); };
|
|
16350
16083
|
CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments", allowMoving: "allowMoving" }, outputs: { clickedDocument: "clickedDocument", moveDocument: "moveDocument" }, decls: 9, vars: 3, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", 1, "form-control", "document-search"], [1, "document-folders-header"], [1, "document-folders-header__title"], [3, "sortAscending", "sortDescending"], ["class", "document-tree-container", 4, "ngIf"], [1, "document-tree-container"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-container__node document-tree-container__node--document", 4, "cdkTreeNodeDef"], ["class", "document-tree-container__node document-tree-container__folder", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-container__node", "document-tree-container__node--document"], [1, "node", 3, "click"], ["disabled", "", 1, "node__icon"], ["src", "/assets/img/case-file-view/case-file-view-document.svg", "alt", "Document icon", 1, "node__iconImg"], [1, "node__name", "node-name-document"], [1, "node__document-options"], [3, "allowMoving", "changeFolderAction", "openInANewTabAction", "downloadAction", "printAction"], [1, "document-tree-container__node", "document-tree-container__folder"], ["cdkTreeNodeToggle", "", 1, "node"], [1, "node__icon"], ["alt", "Folder icon", 1, "node__iconImg", 3, "src"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
16351
16084
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -16579,8 +16312,8 @@ function SelectFlagTypeComponent_div_9_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
16579
16312
|
i0.ɵɵadvance(3);
|
|
16580
16313
|
i0.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
|
|
16581
16314
|
} }
|
|
16582
|
-
const _c0$
|
|
16583
|
-
const _c1$
|
|
16315
|
+
const _c0$q = function (a0) { return { "form-group-error": a0 }; };
|
|
16316
|
+
const _c1$7 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
16584
16317
|
function SelectFlagTypeComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
16585
16318
|
i0.ɵɵelementStart(0, "div", 15);
|
|
16586
16319
|
i0.ɵɵelementStart(1, "div", 1);
|
|
@@ -16594,11 +16327,11 @@ function SelectFlagTypeComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
16594
16327
|
} if (rf & 2) {
|
|
16595
16328
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
16596
16329
|
i0.ɵɵadvance(1);
|
|
16597
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$
|
|
16330
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$q, ctx_r2.flagTypeErrorMessage.length > 0));
|
|
16598
16331
|
i0.ɵɵadvance(3);
|
|
16599
16332
|
i0.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
|
|
16600
16333
|
i0.ɵɵadvance(1);
|
|
16601
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
16334
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$7, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
|
|
16602
16335
|
} }
|
|
16603
16336
|
function SelectFlagTypeComponent_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
16604
16337
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
@@ -16745,7 +16478,7 @@ SelectFlagTypeComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SelectFlagTypeCom
|
|
|
16745
16478
|
} if (rf & 2) {
|
|
16746
16479
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
16747
16480
|
i0.ɵɵadvance(1);
|
|
16748
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$
|
|
16481
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$q, ctx.flagTypeNotSelectedErrorMessage.length > 0));
|
|
16749
16482
|
i0.ɵɵadvance(4);
|
|
16750
16483
|
i0.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
|
|
16751
16484
|
i0.ɵɵadvance(1);
|
|
@@ -16837,7 +16570,7 @@ function SearchLanguageInterpreterComponent_div_21_div_5_Template(rf, ctx) { if
|
|
|
16837
16570
|
i0.ɵɵadvance(3);
|
|
16838
16571
|
i0.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
|
|
16839
16572
|
} }
|
|
16840
|
-
const _c0$
|
|
16573
|
+
const _c0$p = function (a0) { return { "form-group-error": a0 }; };
|
|
16841
16574
|
function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) { if (rf & 1) {
|
|
16842
16575
|
i0.ɵɵelementStart(0, "div", 25);
|
|
16843
16576
|
i0.ɵɵelementStart(1, "div", 1);
|
|
@@ -16852,7 +16585,7 @@ function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) { if (rf &
|
|
|
16852
16585
|
} if (rf & 2) {
|
|
16853
16586
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
16854
16587
|
i0.ɵɵadvance(1);
|
|
16855
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$
|
|
16588
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$p, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
|
|
16856
16589
|
i0.ɵɵadvance(2);
|
|
16857
16590
|
i0.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
|
|
16858
16591
|
i0.ɵɵadvance(1);
|
|
@@ -17018,7 +16751,7 @@ SearchLanguageInterpreterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Search
|
|
|
17018
16751
|
const _r2 = i0.ɵɵreference(12);
|
|
17019
16752
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
17020
16753
|
i0.ɵɵadvance(1);
|
|
17021
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$
|
|
16754
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0$p, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
|
|
17022
16755
|
i0.ɵɵadvance(2);
|
|
17023
16756
|
i0.ɵɵproperty("for", ctx.languageSearchTermControlName);
|
|
17024
16757
|
i0.ɵɵadvance(1);
|
|
@@ -17132,7 +16865,7 @@ function SelectFlagLocationComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
17132
16865
|
i0.ɵɵelementEnd();
|
|
17133
16866
|
i0.ɵɵelementEnd();
|
|
17134
16867
|
} }
|
|
17135
|
-
const _c0$
|
|
16868
|
+
const _c0$o = function (a0) { return { "form-group-error": a0 }; };
|
|
17136
16869
|
class SelectFlagLocationComponent {
|
|
17137
16870
|
constructor() {
|
|
17138
16871
|
this.caseFlagStateEmitter = new EventEmitter();
|
|
@@ -17217,7 +16950,7 @@ SelectFlagLocationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SelectFlagLoc
|
|
|
17217
16950
|
} if (rf & 2) {
|
|
17218
16951
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
17219
16952
|
i0.ɵɵadvance(1);
|
|
17220
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$
|
|
16953
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
|
|
17221
16954
|
i0.ɵɵadvance(4);
|
|
17222
16955
|
i0.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
|
|
17223
16956
|
i0.ɵɵadvance(1);
|
|
@@ -17270,7 +17003,7 @@ function AddCommentsComponent_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
17270
17003
|
i0.ɵɵadvance(3);
|
|
17271
17004
|
i0.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
|
|
17272
17005
|
} }
|
|
17273
|
-
const _c0$
|
|
17006
|
+
const _c0$n = function (a0) { return { "form-group-error": a0 }; };
|
|
17274
17007
|
class AddCommentsComponent {
|
|
17275
17008
|
constructor() {
|
|
17276
17009
|
this.optional = false;
|
|
@@ -17348,7 +17081,7 @@ AddCommentsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddCommentsComponent
|
|
|
17348
17081
|
} if (rf & 2) {
|
|
17349
17082
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
17350
17083
|
i0.ɵɵadvance(2);
|
|
17351
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c0$
|
|
17084
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c0$n, ctx.errorMessages.length > 0));
|
|
17352
17085
|
i0.ɵɵadvance(2);
|
|
17353
17086
|
i0.ɵɵproperty("for", ctx.flagCommentsControlName);
|
|
17354
17087
|
i0.ɵɵadvance(1);
|
|
@@ -17417,7 +17150,7 @@ function ManageCaseFlagsComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
17417
17150
|
i0.ɵɵelementEnd();
|
|
17418
17151
|
i0.ɵɵelementEnd();
|
|
17419
17152
|
} }
|
|
17420
|
-
const _c0$
|
|
17153
|
+
const _c0$m = function (a0) { return { "form-group-error": a0 }; };
|
|
17421
17154
|
class ManageCaseFlagsComponent {
|
|
17422
17155
|
constructor() {
|
|
17423
17156
|
this.caseFlagStateEmitter = new EventEmitter();
|
|
@@ -17576,7 +17309,7 @@ ManageCaseFlagsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ManageCaseFlagsC
|
|
|
17576
17309
|
} if (rf & 2) {
|
|
17577
17310
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
17578
17311
|
i0.ɵɵadvance(1);
|
|
17579
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$
|
|
17312
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$m, ctx.errorMessages.length > 0));
|
|
17580
17313
|
i0.ɵɵadvance(4);
|
|
17581
17314
|
i0.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
|
|
17582
17315
|
i0.ɵɵadvance(1);
|
|
@@ -17635,8 +17368,8 @@ function UpdateFlagComponent_button_22_Template(rf, ctx) { if (rf & 1) {
|
|
|
17635
17368
|
i0.ɵɵtext(1, " Make inactive ");
|
|
17636
17369
|
i0.ɵɵelementEnd();
|
|
17637
17370
|
} }
|
|
17638
|
-
const _c0$
|
|
17639
|
-
const _c1$
|
|
17371
|
+
const _c0$l = function (a0) { return { "form-group-error": a0 }; };
|
|
17372
|
+
const _c1$6 = function (a0) { return { "govuk-tag--grey": a0 }; };
|
|
17640
17373
|
class UpdateFlagComponent {
|
|
17641
17374
|
constructor() {
|
|
17642
17375
|
this.caseFlagStateEmitter = new EventEmitter();
|
|
@@ -17754,7 +17487,7 @@ UpdateFlagComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UpdateFlagComponent,
|
|
|
17754
17487
|
} if (rf & 2) {
|
|
17755
17488
|
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
17756
17489
|
i0.ɵɵadvance(2);
|
|
17757
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$
|
|
17490
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c0$l, ctx.errorMessages.length > 0));
|
|
17758
17491
|
i0.ɵɵadvance(2);
|
|
17759
17492
|
i0.ɵɵproperty("for", ctx.updateFlagControlName);
|
|
17760
17493
|
i0.ɵɵadvance(1);
|
|
@@ -17770,7 +17503,7 @@ UpdateFlagComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UpdateFlagComponent,
|
|
|
17770
17503
|
i0.ɵɵadvance(3);
|
|
17771
17504
|
i0.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
|
|
17772
17505
|
i0.ɵɵadvance(6);
|
|
17773
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c1$
|
|
17506
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c1$6, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
|
|
17774
17507
|
i0.ɵɵadvance(1);
|
|
17775
17508
|
i0.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
|
|
17776
17509
|
i0.ɵɵadvance(2);
|
|
@@ -17883,2050 +17616,6 @@ CaseFlagSummaryListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFlagSumm
|
|
|
17883
17616
|
type: Input
|
|
17884
17617
|
}] }); })();
|
|
17885
17618
|
|
|
17886
|
-
var LinkedCasesPages;
|
|
17887
|
-
(function (LinkedCasesPages) {
|
|
17888
|
-
LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
|
|
17889
|
-
LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
|
|
17890
|
-
LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
|
|
17891
|
-
LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
|
|
17892
|
-
LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
|
|
17893
|
-
})(LinkedCasesPages || (LinkedCasesPages = {}));
|
|
17894
|
-
var LinkedCasesErrorMessages;
|
|
17895
|
-
(function (LinkedCasesErrorMessages) {
|
|
17896
|
-
LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
|
|
17897
|
-
LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
|
|
17898
|
-
LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
|
|
17899
|
-
LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
|
|
17900
|
-
LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
|
|
17901
|
-
LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
|
|
17902
|
-
LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
|
|
17903
|
-
LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
|
|
17904
|
-
LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
|
|
17905
|
-
LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
|
|
17906
|
-
LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
|
|
17907
|
-
LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
|
|
17908
|
-
})(LinkedCasesErrorMessages || (LinkedCasesErrorMessages = {}));
|
|
17909
|
-
var LinkedCasesEventTriggers;
|
|
17910
|
-
(function (LinkedCasesEventTriggers) {
|
|
17911
|
-
LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
|
|
17912
|
-
LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
|
|
17913
|
-
})(LinkedCasesEventTriggers || (LinkedCasesEventTriggers = {}));
|
|
17914
|
-
var Patterns;
|
|
17915
|
-
(function (Patterns) {
|
|
17916
|
-
Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
|
|
17917
|
-
})(Patterns || (Patterns = {}));
|
|
17918
|
-
|
|
17919
|
-
function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) { if (rf & 1) {
|
|
17920
|
-
i0.ɵɵelementStart(0, "p", 5);
|
|
17921
|
-
i0.ɵɵelementStart(1, "span", 6);
|
|
17922
|
-
i0.ɵɵtext(2, "Error:");
|
|
17923
|
-
i0.ɵɵelementEnd();
|
|
17924
|
-
i0.ɵɵtext(3);
|
|
17925
|
-
i0.ɵɵelementEnd();
|
|
17926
|
-
} if (rf & 2) {
|
|
17927
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
17928
|
-
i0.ɵɵadvance(3);
|
|
17929
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
|
|
17930
|
-
} }
|
|
17931
|
-
function BeforeYouStartComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
17932
|
-
const _r4 = i0.ɵɵgetCurrentView();
|
|
17933
|
-
i0.ɵɵelementStart(0, "div");
|
|
17934
|
-
i0.ɵɵelementStart(1, "h1", 1);
|
|
17935
|
-
i0.ɵɵtext(2, "There is a problem");
|
|
17936
|
-
i0.ɵɵelementEnd();
|
|
17937
|
-
i0.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
|
|
17938
|
-
i0.ɵɵelementStart(4, "p", 3);
|
|
17939
|
-
i0.ɵɵelementStart(5, "a", 4);
|
|
17940
|
-
i0.ɵɵlistener("click", function BeforeYouStartComponent_div_1_Template_a_click_5_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.onBack(); });
|
|
17941
|
-
i0.ɵɵtext(6, "Go back to the Linked cases tab");
|
|
17942
|
-
i0.ɵɵelementEnd();
|
|
17943
|
-
i0.ɵɵelementEnd();
|
|
17944
|
-
i0.ɵɵelementEnd();
|
|
17945
|
-
} if (rf & 2) {
|
|
17946
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
17947
|
-
i0.ɵɵadvance(3);
|
|
17948
|
-
i0.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
|
|
17949
|
-
} }
|
|
17950
|
-
function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
17951
|
-
i0.ɵɵelementStart(0, "div", 11);
|
|
17952
|
-
i0.ɵɵelementStart(1, "p", 3);
|
|
17953
|
-
i0.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
|
|
17954
|
-
i0.ɵɵelementEnd();
|
|
17955
|
-
i0.ɵɵelementStart(3, "p", 3);
|
|
17956
|
-
i0.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
|
|
17957
|
-
i0.ɵɵelementEnd();
|
|
17958
|
-
i0.ɵɵelementEnd();
|
|
17959
|
-
} }
|
|
17960
|
-
function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
17961
|
-
i0.ɵɵelementStart(0, "div", 12);
|
|
17962
|
-
i0.ɵɵelementStart(1, "p", 3);
|
|
17963
|
-
i0.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
|
|
17964
|
-
i0.ɵɵelementEnd();
|
|
17965
|
-
i0.ɵɵelementEnd();
|
|
17966
|
-
} }
|
|
17967
|
-
function BeforeYouStartComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
17968
|
-
const _r8 = i0.ɵɵgetCurrentView();
|
|
17969
|
-
i0.ɵɵelementStart(0, "div");
|
|
17970
|
-
i0.ɵɵelementStart(1, "h1", 1);
|
|
17971
|
-
i0.ɵɵtext(2, "Before you start");
|
|
17972
|
-
i0.ɵɵelementEnd();
|
|
17973
|
-
i0.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
|
|
17974
|
-
i0.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
|
|
17975
|
-
i0.ɵɵelementStart(5, "div", 9);
|
|
17976
|
-
i0.ɵɵelementStart(6, "button", 10);
|
|
17977
|
-
i0.ɵɵlistener("click", function BeforeYouStartComponent_div_2_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onNext(); });
|
|
17978
|
-
i0.ɵɵtext(7, "Next");
|
|
17979
|
-
i0.ɵɵelementEnd();
|
|
17980
|
-
i0.ɵɵelementEnd();
|
|
17981
|
-
i0.ɵɵelementEnd();
|
|
17982
|
-
} if (rf & 2) {
|
|
17983
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
17984
|
-
i0.ɵɵadvance(3);
|
|
17985
|
-
i0.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
|
|
17986
|
-
i0.ɵɵadvance(1);
|
|
17987
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
|
|
17988
|
-
} }
|
|
17989
|
-
class BeforeYouStartComponent {
|
|
17990
|
-
constructor(router, linkedCasesService) {
|
|
17991
|
-
this.router = router;
|
|
17992
|
-
this.linkedCasesService = linkedCasesService;
|
|
17993
|
-
this.linkedCasesStateEmitter = new EventEmitter();
|
|
17994
|
-
this.isLinkCasesJourney = false;
|
|
17995
|
-
this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
|
|
17996
|
-
// re-initiate the state based on the casefield value
|
|
17997
|
-
const linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(item => item).map(item => item.id);
|
|
17998
|
-
this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(item => linkedCaseRefereneIds.indexOf(item.caseReference) !== -1);
|
|
17999
|
-
this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
|
|
18000
|
-
}
|
|
18001
|
-
onNext() {
|
|
18002
|
-
this.linkedCasesStateEmitter.emit({
|
|
18003
|
-
currentLinkedCasesPage: LinkedCasesPages.BEFORE_YOU_START,
|
|
18004
|
-
errorMessages: this.errorMessages,
|
|
18005
|
-
navigateToNextPage: true
|
|
18006
|
-
});
|
|
18007
|
-
}
|
|
18008
|
-
onBack() {
|
|
18009
|
-
this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
|
|
18010
|
-
window.location.hash = 'Linked cases';
|
|
18011
|
-
});
|
|
18012
|
-
}
|
|
18013
|
-
}
|
|
18014
|
-
BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
18015
|
-
BeforeYouStartComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BeforeYouStartComponent, selectors: [["ccd-linked-cases-before-you-start"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 3, vars: 2, consts: [[4, "ngIf"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "link-cases-journey", 4, "ngIf"], ["id", "manage-link-cases-journey", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], ["id", "link-cases-journey"], ["id", "manage-link-cases-journey"]], template: function BeforeYouStartComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18016
|
-
i0.ɵɵelementStart(0, "div");
|
|
18017
|
-
i0.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
|
|
18018
|
-
i0.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
|
|
18019
|
-
i0.ɵɵelementEnd();
|
|
18020
|
-
} if (rf & 2) {
|
|
18021
|
-
i0.ɵɵadvance(1);
|
|
18022
|
-
i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
|
|
18023
|
-
i0.ɵɵadvance(1);
|
|
18024
|
-
i0.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
|
|
18025
|
-
} }, directives: [i1.NgIf], encapsulation: 2 });
|
|
18026
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BeforeYouStartComponent, [{
|
|
18027
|
-
type: Component,
|
|
18028
|
-
args: [{
|
|
18029
|
-
selector: 'ccd-linked-cases-before-you-start',
|
|
18030
|
-
templateUrl: './before-you-start.component.html'
|
|
18031
|
-
}]
|
|
18032
|
-
}], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
18033
|
-
type: Output
|
|
18034
|
-
}] }); })();
|
|
18035
|
-
|
|
18036
|
-
function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) { if (rf & 1) {
|
|
18037
|
-
const _r8 = i0.ɵɵgetCurrentView();
|
|
18038
|
-
i0.ɵɵelementStart(0, "tr", 7);
|
|
18039
|
-
i0.ɵɵelementStart(1, "td", 14);
|
|
18040
|
-
i0.ɵɵtext(2);
|
|
18041
|
-
i0.ɵɵelement(3, "br");
|
|
18042
|
-
i0.ɵɵtext(4);
|
|
18043
|
-
i0.ɵɵpipe(5, "ccdCaseReference");
|
|
18044
|
-
i0.ɵɵelementEnd();
|
|
18045
|
-
i0.ɵɵelementStart(6, "td", 14);
|
|
18046
|
-
i0.ɵɵelementStart(7, "a", 15);
|
|
18047
|
-
i0.ɵɵlistener("click", function CheckYourAnswersComponent_table_4_tr_9_Template_a_click_7_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(2); return ctx_r7.onChange(); });
|
|
18048
|
-
i0.ɵɵtext(8, "Change");
|
|
18049
|
-
i0.ɵɵelementEnd();
|
|
18050
|
-
i0.ɵɵelementEnd();
|
|
18051
|
-
i0.ɵɵelementEnd();
|
|
18052
|
-
} if (rf & 2) {
|
|
18053
|
-
const case_r6 = ctx.$implicit;
|
|
18054
|
-
i0.ɵɵadvance(2);
|
|
18055
|
-
i0.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
|
|
18056
|
-
i0.ɵɵadvance(2);
|
|
18057
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
|
|
18058
|
-
} }
|
|
18059
|
-
function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) { if (rf & 1) {
|
|
18060
|
-
i0.ɵɵelementStart(0, "tr", 7);
|
|
18061
|
-
i0.ɵɵelementStart(1, "td", 16);
|
|
18062
|
-
i0.ɵɵtext(2, " None ");
|
|
18063
|
-
i0.ɵɵelementEnd();
|
|
18064
|
-
i0.ɵɵelementEnd();
|
|
18065
|
-
} }
|
|
18066
|
-
function CheckYourAnswersComponent_table_4_Template(rf, ctx) { if (rf & 1) {
|
|
18067
|
-
i0.ɵɵelementStart(0, "table", 13);
|
|
18068
|
-
i0.ɵɵelementStart(1, "caption", 5);
|
|
18069
|
-
i0.ɵɵtext(2, "Cases to unlink");
|
|
18070
|
-
i0.ɵɵelementEnd();
|
|
18071
|
-
i0.ɵɵelementStart(3, "thead", 6);
|
|
18072
|
-
i0.ɵɵelementStart(4, "tr", 7);
|
|
18073
|
-
i0.ɵɵelementStart(5, "th", 8);
|
|
18074
|
-
i0.ɵɵtext(6, "Case name and number");
|
|
18075
|
-
i0.ɵɵelementEnd();
|
|
18076
|
-
i0.ɵɵelement(7, "th", 8);
|
|
18077
|
-
i0.ɵɵelementEnd();
|
|
18078
|
-
i0.ɵɵelementEnd();
|
|
18079
|
-
i0.ɵɵelementStart(8, "tbody", 10);
|
|
18080
|
-
i0.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
|
|
18081
|
-
i0.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
|
|
18082
|
-
i0.ɵɵelementEnd();
|
|
18083
|
-
i0.ɵɵelementEnd();
|
|
18084
|
-
} if (rf & 2) {
|
|
18085
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
18086
|
-
i0.ɵɵadvance(9);
|
|
18087
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
|
|
18088
|
-
i0.ɵɵadvance(1);
|
|
18089
|
-
i0.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
|
|
18090
|
-
} }
|
|
18091
|
-
function CheckYourAnswersComponent_th_15_Template(rf, ctx) { if (rf & 1) {
|
|
18092
|
-
i0.ɵɵelement(0, "th", 8);
|
|
18093
|
-
} }
|
|
18094
|
-
function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) { if (rf & 1) {
|
|
18095
|
-
i0.ɵɵelement(0, "br");
|
|
18096
|
-
} }
|
|
18097
|
-
function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) { if (rf & 1) {
|
|
18098
|
-
i0.ɵɵelementStart(0, "span");
|
|
18099
|
-
i0.ɵɵtext(1);
|
|
18100
|
-
i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
18101
|
-
i0.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
|
|
18102
|
-
i0.ɵɵelementEnd();
|
|
18103
|
-
} if (rf & 2) {
|
|
18104
|
-
const reason_r12 = ctx.$implicit;
|
|
18105
|
-
const isLast_r13 = ctx.last;
|
|
18106
|
-
i0.ɵɵadvance(1);
|
|
18107
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
|
|
18108
|
-
i0.ɵɵadvance(2);
|
|
18109
|
-
i0.ɵɵproperty("ngIf", !isLast_r13);
|
|
18110
|
-
} }
|
|
18111
|
-
function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) { if (rf & 1) {
|
|
18112
|
-
const _r16 = i0.ɵɵgetCurrentView();
|
|
18113
|
-
i0.ɵɵelementStart(0, "td", 14);
|
|
18114
|
-
i0.ɵɵelementStart(1, "a", 15);
|
|
18115
|
-
i0.ɵɵlistener("click", function CheckYourAnswersComponent_tr_17_td_10_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(2); return ctx_r15.onChange(); });
|
|
18116
|
-
i0.ɵɵtext(2, "Change");
|
|
18117
|
-
i0.ɵɵelementEnd();
|
|
18118
|
-
i0.ɵɵelementEnd();
|
|
18119
|
-
} }
|
|
18120
|
-
function CheckYourAnswersComponent_tr_17_Template(rf, ctx) { if (rf & 1) {
|
|
18121
|
-
i0.ɵɵelementStart(0, "tr", 7);
|
|
18122
|
-
i0.ɵɵelementStart(1, "td", 14);
|
|
18123
|
-
i0.ɵɵelementStart(2, "span");
|
|
18124
|
-
i0.ɵɵtext(3);
|
|
18125
|
-
i0.ɵɵelement(4, "br");
|
|
18126
|
-
i0.ɵɵtext(5);
|
|
18127
|
-
i0.ɵɵpipe(6, "ccdCaseReference");
|
|
18128
|
-
i0.ɵɵelementEnd();
|
|
18129
|
-
i0.ɵɵelementEnd();
|
|
18130
|
-
i0.ɵɵelementStart(7, "td", 14);
|
|
18131
|
-
i0.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
|
|
18132
|
-
i0.ɵɵelementEnd();
|
|
18133
|
-
i0.ɵɵelement(9, "td", 14);
|
|
18134
|
-
i0.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
|
|
18135
|
-
i0.ɵɵelementEnd();
|
|
18136
|
-
} if (rf & 2) {
|
|
18137
|
-
const case_r9 = ctx.$implicit;
|
|
18138
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
18139
|
-
i0.ɵɵadvance(3);
|
|
18140
|
-
i0.ɵɵtextInterpolate1("", case_r9.caseName, " ");
|
|
18141
|
-
i0.ɵɵadvance(2);
|
|
18142
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
|
|
18143
|
-
i0.ɵɵadvance(3);
|
|
18144
|
-
i0.ɵɵproperty("ngForOf", case_r9.reasons);
|
|
18145
|
-
i0.ɵɵadvance(2);
|
|
18146
|
-
i0.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
|
|
18147
|
-
} }
|
|
18148
|
-
function CheckYourAnswersComponent_tr_18_Template(rf, ctx) { if (rf & 1) {
|
|
18149
|
-
i0.ɵɵelementStart(0, "tr", 7);
|
|
18150
|
-
i0.ɵɵelementStart(1, "td", 20);
|
|
18151
|
-
i0.ɵɵtext(2, " None ");
|
|
18152
|
-
i0.ɵɵelementEnd();
|
|
18153
|
-
i0.ɵɵelementEnd();
|
|
18154
|
-
} }
|
|
18155
|
-
class CheckYourAnswersComponent {
|
|
18156
|
-
constructor(linkedCasesService) {
|
|
18157
|
-
this.linkedCasesService = linkedCasesService;
|
|
18158
|
-
this.linkedCasesStateEmitter = new EventEmitter();
|
|
18159
|
-
}
|
|
18160
|
-
ngOnInit() {
|
|
18161
|
-
this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
|
|
18162
|
-
this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
|
|
18163
|
-
this.linkedCases = this.linkedCasesService.linkedCases.filter(linkedCase => !linkedCase.unlink);
|
|
18164
|
-
this.casesToUnlink = this.linkedCasesService.linkedCases.filter(linkedCase => linkedCase.unlink && linkedCase.unlink === true);
|
|
18165
|
-
}
|
|
18166
|
-
onChange() {
|
|
18167
|
-
this.linkedCasesService.editMode = true;
|
|
18168
|
-
this.linkedCasesStateEmitter.emit({
|
|
18169
|
-
currentLinkedCasesPage: LinkedCasesPages.CHECK_YOUR_ANSWERS,
|
|
18170
|
-
navigateToPreviousPage: true,
|
|
18171
|
-
navigateToNextPage: true
|
|
18172
|
-
});
|
|
18173
|
-
}
|
|
18174
|
-
}
|
|
18175
|
-
CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
18176
|
-
CheckYourAnswersComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CheckYourAnswersComponent, selectors: [["ccd-linked-cases-check-your-answers"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 19, vars: 5, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["id", "cases-to-unlink-table", "class", "govuk-table", 4, "ngIf"], ["id", "linked-cases-table", 1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header"], ["scope", "col", "class", "govuk-table__header", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], ["id", "cases-to-unlink-table", 1, "govuk-table"], [1, "govuk-table__cell"], ["href", "javascript:void(0)", 1, "govuk-link", "govuk-link--no-visited-state", "float-right", 3, "click"], ["colspan", "2", 1, "govuk-table__cell"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__cell", 4, "ngIf"], [4, "ngIf"], ["colspan", "4", 1, "govuk-table__cell"]], template: function CheckYourAnswersComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18177
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
18178
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
18179
|
-
i0.ɵɵelementStart(2, "h1", 2);
|
|
18180
|
-
i0.ɵɵtext(3, "Check your answers");
|
|
18181
|
-
i0.ɵɵelementEnd();
|
|
18182
|
-
i0.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
|
|
18183
|
-
i0.ɵɵelementStart(5, "table", 4);
|
|
18184
|
-
i0.ɵɵelementStart(6, "caption", 5);
|
|
18185
|
-
i0.ɵɵtext(7);
|
|
18186
|
-
i0.ɵɵelementEnd();
|
|
18187
|
-
i0.ɵɵelementStart(8, "thead", 6);
|
|
18188
|
-
i0.ɵɵelementStart(9, "tr", 7);
|
|
18189
|
-
i0.ɵɵelementStart(10, "th", 8);
|
|
18190
|
-
i0.ɵɵtext(11, "Case name and number");
|
|
18191
|
-
i0.ɵɵelementEnd();
|
|
18192
|
-
i0.ɵɵelementStart(12, "th", 8);
|
|
18193
|
-
i0.ɵɵtext(13, "Reasons for case link");
|
|
18194
|
-
i0.ɵɵelementEnd();
|
|
18195
|
-
i0.ɵɵelement(14, "th", 8);
|
|
18196
|
-
i0.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
|
|
18197
|
-
i0.ɵɵelementEnd();
|
|
18198
|
-
i0.ɵɵelementEnd();
|
|
18199
|
-
i0.ɵɵelementStart(16, "tbody", 10);
|
|
18200
|
-
i0.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
|
|
18201
|
-
i0.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
|
|
18202
|
-
i0.ɵɵelementEnd();
|
|
18203
|
-
i0.ɵɵelementEnd();
|
|
18204
|
-
i0.ɵɵelementEnd();
|
|
18205
|
-
i0.ɵɵelementEnd();
|
|
18206
|
-
} if (rf & 2) {
|
|
18207
|
-
i0.ɵɵadvance(4);
|
|
18208
|
-
i0.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
|
|
18209
|
-
i0.ɵɵadvance(3);
|
|
18210
|
-
i0.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
|
|
18211
|
-
i0.ɵɵadvance(8);
|
|
18212
|
-
i0.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
|
|
18213
|
-
i0.ɵɵadvance(2);
|
|
18214
|
-
i0.ɵɵproperty("ngForOf", ctx.linkedCases);
|
|
18215
|
-
i0.ɵɵadvance(1);
|
|
18216
|
-
i0.ɵɵproperty("ngIf", !ctx.linkedCases.length);
|
|
18217
|
-
} }, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
|
|
18218
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckYourAnswersComponent, [{
|
|
18219
|
-
type: Component,
|
|
18220
|
-
args: [{
|
|
18221
|
-
selector: 'ccd-linked-cases-check-your-answers',
|
|
18222
|
-
templateUrl: './check-your-answers.component.html',
|
|
18223
|
-
styleUrls: ['./check-your-answers.component.scss']
|
|
18224
|
-
}]
|
|
18225
|
-
}], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
18226
|
-
type: Output
|
|
18227
|
-
}] }); })();
|
|
18228
|
-
|
|
18229
|
-
class ValidatorsUtils {
|
|
18230
|
-
numberLengthValidator(inputLength) {
|
|
18231
|
-
return (control) => {
|
|
18232
|
-
return control.value.length !== inputLength ? { isValid: false } : null;
|
|
18233
|
-
};
|
|
18234
|
-
}
|
|
18235
|
-
formArraySelectedValidator() {
|
|
18236
|
-
return (control) => {
|
|
18237
|
-
return control.value.every((option) => !option.selected) ? { isValid: false } : null;
|
|
18238
|
-
};
|
|
18239
|
-
}
|
|
18240
|
-
regexPattern(regexPattern) {
|
|
18241
|
-
return (control) => {
|
|
18242
|
-
const regex = new RegExp(regexPattern);
|
|
18243
|
-
return regex.test(control.value) ? null : { isValid: false };
|
|
18244
|
-
};
|
|
18245
|
-
}
|
|
18246
|
-
}
|
|
18247
|
-
ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
|
|
18248
|
-
ValidatorsUtils.ɵprov = i0.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
|
|
18249
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidatorsUtils, [{
|
|
18250
|
-
type: Injectable,
|
|
18251
|
-
args: [{ providedIn: 'root' }]
|
|
18252
|
-
}], null, null); })();
|
|
18253
|
-
|
|
18254
|
-
function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
18255
|
-
i0.ɵɵelementStart(0, "span", 28);
|
|
18256
|
-
i0.ɵɵelementStart(1, "span", 29);
|
|
18257
|
-
i0.ɵɵtext(2, "Error:");
|
|
18258
|
-
i0.ɵɵelementEnd();
|
|
18259
|
-
i0.ɵɵtext(3);
|
|
18260
|
-
i0.ɵɵelementEnd();
|
|
18261
|
-
} if (rf & 2) {
|
|
18262
|
-
const ctx_r4 = i0.ɵɵnextContext(2);
|
|
18263
|
-
i0.ɵɵadvance(3);
|
|
18264
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
|
|
18265
|
-
} }
|
|
18266
|
-
function LinkCasesComponent_div_8_span_10_Template(rf, ctx) { if (rf & 1) {
|
|
18267
|
-
i0.ɵɵelementStart(0, "span", 28);
|
|
18268
|
-
i0.ɵɵelementStart(1, "span", 29);
|
|
18269
|
-
i0.ɵɵtext(2, "Error:");
|
|
18270
|
-
i0.ɵɵelementEnd();
|
|
18271
|
-
i0.ɵɵtext(3);
|
|
18272
|
-
i0.ɵɵelementEnd();
|
|
18273
|
-
} if (rf & 2) {
|
|
18274
|
-
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
18275
|
-
i0.ɵɵadvance(3);
|
|
18276
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
|
|
18277
|
-
} }
|
|
18278
|
-
function LinkCasesComponent_div_8_div_12_Template(rf, ctx) { if (rf & 1) {
|
|
18279
|
-
i0.ɵɵelementStart(0, "div", 30);
|
|
18280
|
-
i0.ɵɵelement(1, "input", 31);
|
|
18281
|
-
i0.ɵɵelementStart(2, "label", 32);
|
|
18282
|
-
i0.ɵɵtext(3);
|
|
18283
|
-
i0.ɵɵelementEnd();
|
|
18284
|
-
i0.ɵɵelementEnd();
|
|
18285
|
-
} if (rf & 2) {
|
|
18286
|
-
const reason_r8 = ctx.$implicit;
|
|
18287
|
-
const pos_r9 = ctx.index;
|
|
18288
|
-
i0.ɵɵproperty("formGroupName", pos_r9);
|
|
18289
|
-
i0.ɵɵadvance(1);
|
|
18290
|
-
i0.ɵɵpropertyInterpolate("id", reason_r8.key);
|
|
18291
|
-
i0.ɵɵproperty("value", reason_r8.value_en);
|
|
18292
|
-
i0.ɵɵadvance(1);
|
|
18293
|
-
i0.ɵɵpropertyInterpolate("for", reason_r8.key);
|
|
18294
|
-
i0.ɵɵadvance(1);
|
|
18295
|
-
i0.ɵɵtextInterpolate(reason_r8.value_en);
|
|
18296
|
-
} }
|
|
18297
|
-
function LinkCasesComponent_div_8_span_15_Template(rf, ctx) { if (rf & 1) {
|
|
18298
|
-
i0.ɵɵelementStart(0, "span", 28);
|
|
18299
|
-
i0.ɵɵelementStart(1, "span", 29);
|
|
18300
|
-
i0.ɵɵtext(2, "Error:");
|
|
18301
|
-
i0.ɵɵelementEnd();
|
|
18302
|
-
i0.ɵɵtext(3);
|
|
18303
|
-
i0.ɵɵelementEnd();
|
|
18304
|
-
} if (rf & 2) {
|
|
18305
|
-
const ctx_r7 = i0.ɵɵnextContext(2);
|
|
18306
|
-
i0.ɵɵadvance(3);
|
|
18307
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
|
|
18308
|
-
} }
|
|
18309
|
-
const _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
18310
|
-
function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
18311
|
-
const _r11 = i0.ɵɵgetCurrentView();
|
|
18312
|
-
i0.ɵɵelementStart(0, "div", 21);
|
|
18313
|
-
i0.ɵɵelementStart(1, "h3", 22);
|
|
18314
|
-
i0.ɵɵtext(2, "Enter case reference");
|
|
18315
|
-
i0.ɵɵelementEnd();
|
|
18316
|
-
i0.ɵɵelementStart(3, "div", 5);
|
|
18317
|
-
i0.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
|
|
18318
|
-
i0.ɵɵelement(5, "input", 23);
|
|
18319
|
-
i0.ɵɵelementEnd();
|
|
18320
|
-
i0.ɵɵelementStart(6, "h3", 22);
|
|
18321
|
-
i0.ɵɵtext(7, "Why should these cases be linked?");
|
|
18322
|
-
i0.ɵɵelementEnd();
|
|
18323
|
-
i0.ɵɵelementStart(8, "div", 24);
|
|
18324
|
-
i0.ɵɵtext(9, " Select all that apply. ");
|
|
18325
|
-
i0.ɵɵelementEnd();
|
|
18326
|
-
i0.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
|
|
18327
|
-
i0.ɵɵelementStart(11, "div", 25);
|
|
18328
|
-
i0.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
|
|
18329
|
-
i0.ɵɵelementEnd();
|
|
18330
|
-
i0.ɵɵelement(13, "br");
|
|
18331
|
-
i0.ɵɵelement(14, "br");
|
|
18332
|
-
i0.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
|
|
18333
|
-
i0.ɵɵelementStart(16, "button", 27);
|
|
18334
|
-
i0.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.submitCaseInfo(); });
|
|
18335
|
-
i0.ɵɵtext(17, "Propose case link");
|
|
18336
|
-
i0.ɵɵelementEnd();
|
|
18337
|
-
i0.ɵɵelementEnd();
|
|
18338
|
-
} if (rf & 2) {
|
|
18339
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
18340
|
-
i0.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
|
|
18341
|
-
i0.ɵɵadvance(3);
|
|
18342
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
|
|
18343
|
-
i0.ɵɵadvance(1);
|
|
18344
|
-
i0.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
|
|
18345
|
-
i0.ɵɵadvance(6);
|
|
18346
|
-
i0.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
|
|
18347
|
-
i0.ɵɵadvance(1);
|
|
18348
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
|
|
18349
|
-
i0.ɵɵadvance(1);
|
|
18350
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
|
|
18351
|
-
i0.ɵɵadvance(3);
|
|
18352
|
-
i0.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
|
|
18353
|
-
} }
|
|
18354
|
-
function LinkCasesComponent_span_13_Template(rf, ctx) { if (rf & 1) {
|
|
18355
|
-
i0.ɵɵelementStart(0, "span", 28);
|
|
18356
|
-
i0.ɵɵelementStart(1, "span", 29);
|
|
18357
|
-
i0.ɵɵtext(2, "Error:");
|
|
18358
|
-
i0.ɵɵelementEnd();
|
|
18359
|
-
i0.ɵɵtext(3);
|
|
18360
|
-
i0.ɵɵelementEnd();
|
|
18361
|
-
} if (rf & 2) {
|
|
18362
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
18363
|
-
i0.ɵɵadvance(3);
|
|
18364
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
|
|
18365
|
-
} }
|
|
18366
|
-
function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
|
|
18367
|
-
i0.ɵɵelementStart(0, "span");
|
|
18368
|
-
i0.ɵɵtext(1);
|
|
18369
|
-
i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
18370
|
-
i0.ɵɵelement(3, "br");
|
|
18371
|
-
i0.ɵɵelementEnd();
|
|
18372
|
-
} if (rf & 2) {
|
|
18373
|
-
const reason_r15 = ctx.$implicit;
|
|
18374
|
-
i0.ɵɵadvance(1);
|
|
18375
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
|
|
18376
|
-
} }
|
|
18377
|
-
const _c1$6 = function (a0) { return { "table-group-error": a0 }; };
|
|
18378
|
-
function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
18379
|
-
const _r17 = i0.ɵɵgetCurrentView();
|
|
18380
|
-
i0.ɵɵelementStart(0, "tr", 10);
|
|
18381
|
-
i0.ɵɵelementStart(1, "td", 33);
|
|
18382
|
-
i0.ɵɵelement(2, "div", 34);
|
|
18383
|
-
i0.ɵɵelementStart(3, "span");
|
|
18384
|
-
i0.ɵɵtext(4);
|
|
18385
|
-
i0.ɵɵelement(5, "br");
|
|
18386
|
-
i0.ɵɵtext(6);
|
|
18387
|
-
i0.ɵɵpipe(7, "ccdCaseReference");
|
|
18388
|
-
i0.ɵɵelementEnd();
|
|
18389
|
-
i0.ɵɵelementEnd();
|
|
18390
|
-
i0.ɵɵelementStart(8, "td", 35);
|
|
18391
|
-
i0.ɵɵtext(9);
|
|
18392
|
-
i0.ɵɵelementEnd();
|
|
18393
|
-
i0.ɵɵelementStart(10, "td", 33);
|
|
18394
|
-
i0.ɵɵtext(11);
|
|
18395
|
-
i0.ɵɵelementEnd();
|
|
18396
|
-
i0.ɵɵelementStart(12, "td", 35);
|
|
18397
|
-
i0.ɵɵtext(13);
|
|
18398
|
-
i0.ɵɵelementEnd();
|
|
18399
|
-
i0.ɵɵelementStart(14, "td", 33);
|
|
18400
|
-
i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
|
|
18401
|
-
i0.ɵɵelementEnd();
|
|
18402
|
-
i0.ɵɵelementStart(16, "td", 33);
|
|
18403
|
-
i0.ɵɵelementStart(17, "a", 37);
|
|
18404
|
-
i0.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { i0.ɵɵrestoreView(_r17); const pos_r13 = ctx.index; const case_r12 = ctx.$implicit; const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onSelectedLinkedCaseRemove(pos_r13, case_r12.caseReference); });
|
|
18405
|
-
i0.ɵɵtext(18, "Remove");
|
|
18406
|
-
i0.ɵɵelementEnd();
|
|
18407
|
-
i0.ɵɵelementEnd();
|
|
18408
|
-
i0.ɵɵelementEnd();
|
|
18409
|
-
} if (rf & 2) {
|
|
18410
|
-
const case_r12 = ctx.$implicit;
|
|
18411
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
18412
|
-
i0.ɵɵadvance(2);
|
|
18413
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
|
|
18414
|
-
i0.ɵɵadvance(2);
|
|
18415
|
-
i0.ɵɵtextInterpolate1("", case_r12.caseName, " ");
|
|
18416
|
-
i0.ɵɵadvance(2);
|
|
18417
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
|
|
18418
|
-
i0.ɵɵadvance(2);
|
|
18419
|
-
i0.ɵɵproperty("title", case_r12.caseTypeDescription);
|
|
18420
|
-
i0.ɵɵadvance(1);
|
|
18421
|
-
i0.ɵɵtextInterpolate(case_r12.caseType);
|
|
18422
|
-
i0.ɵɵadvance(2);
|
|
18423
|
-
i0.ɵɵtextInterpolate(case_r12.caseService);
|
|
18424
|
-
i0.ɵɵadvance(1);
|
|
18425
|
-
i0.ɵɵproperty("title", case_r12.caseStateDescription);
|
|
18426
|
-
i0.ɵɵadvance(1);
|
|
18427
|
-
i0.ɵɵtextInterpolate(case_r12.caseState);
|
|
18428
|
-
i0.ɵɵadvance(2);
|
|
18429
|
-
i0.ɵɵproperty("ngForOf", case_r12.reasons);
|
|
18430
|
-
i0.ɵɵadvance(2);
|
|
18431
|
-
i0.ɵɵattribute("id", case_r12.caseReference);
|
|
18432
|
-
} }
|
|
18433
|
-
function LinkCasesComponent_tr_32_Template(rf, ctx) { if (rf & 1) {
|
|
18434
|
-
i0.ɵɵelementStart(0, "tr", 10);
|
|
18435
|
-
i0.ɵɵelementStart(1, "td", 38);
|
|
18436
|
-
i0.ɵɵtext(2, " None ");
|
|
18437
|
-
i0.ɵɵelementEnd();
|
|
18438
|
-
i0.ɵɵelementEnd();
|
|
18439
|
-
} }
|
|
18440
|
-
class LinkCasesComponent {
|
|
18441
|
-
constructor(casesService, fb, validatorsUtils, linkedCasesService) {
|
|
18442
|
-
this.casesService = casesService;
|
|
18443
|
-
this.fb = fb;
|
|
18444
|
-
this.validatorsUtils = validatorsUtils;
|
|
18445
|
-
this.linkedCasesService = linkedCasesService;
|
|
18446
|
-
this.linkedCasesStateEmitter = new EventEmitter();
|
|
18447
|
-
this.errorMessages = [];
|
|
18448
|
-
this.selectedCases = [];
|
|
18449
|
-
this.linkCaseReasons = [];
|
|
18450
|
-
this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
|
|
18451
|
-
}
|
|
18452
|
-
ngOnInit() {
|
|
18453
|
-
this.caseId = this.linkedCasesService.caseId;
|
|
18454
|
-
this.caseName = this.linkedCasesService.caseName;
|
|
18455
|
-
this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
|
|
18456
|
-
this.initForm();
|
|
18457
|
-
if (this.linkedCasesService.editMode) {
|
|
18458
|
-
// this may have includes the currently added one but yet to be submitted.
|
|
18459
|
-
this.selectedCases = this.linkedCasesService.linkedCases;
|
|
18460
|
-
}
|
|
18461
|
-
else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
|
|
18462
|
-
this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
|
|
18463
|
-
}
|
|
18464
|
-
}
|
|
18465
|
-
initForm() {
|
|
18466
|
-
this.linkCaseForm = this.fb.group({
|
|
18467
|
-
caseNumber: ['', [Validators.minLength(16), this.validatorsUtils.regexPattern(Patterns.CASE_REF)]],
|
|
18468
|
-
reasonType: this.getReasonTypeFormArray,
|
|
18469
|
-
});
|
|
18470
|
-
}
|
|
18471
|
-
get getReasonTypeFormArray() {
|
|
18472
|
-
return this.fb.array(this.linkCaseReasons.map((val) => this.fb.group({
|
|
18473
|
-
key: [val.key],
|
|
18474
|
-
value_en: [val.value_en],
|
|
18475
|
-
value_cy: [val.value_cy],
|
|
18476
|
-
hint_text_en: [val.hint_text_en],
|
|
18477
|
-
hint_text_cy: [val.hint_text_cy],
|
|
18478
|
-
lov_order: [val.lov_order],
|
|
18479
|
-
parent_key: [val.parent_key],
|
|
18480
|
-
selected: [!!val.selected],
|
|
18481
|
-
})), this.validatorsUtils.formArraySelectedValidator());
|
|
18482
|
-
}
|
|
18483
|
-
submitCaseInfo() {
|
|
18484
|
-
this.errorMessages = [];
|
|
18485
|
-
this.caseReasonError = null;
|
|
18486
|
-
this.caseNumberError = null;
|
|
18487
|
-
this.caseSelectionError = null;
|
|
18488
|
-
this.noSelectedCaseError = null;
|
|
18489
|
-
if (this.linkCaseForm.valid &&
|
|
18490
|
-
!this.isCaseSelected(this.selectedCases) &&
|
|
18491
|
-
!this.isCaseSelected(this.linkedCasesService.linkedCases) &&
|
|
18492
|
-
!this.isCaseSelectedSameAsCurrentCase()) {
|
|
18493
|
-
this.getCaseInfo();
|
|
18494
|
-
}
|
|
18495
|
-
else {
|
|
18496
|
-
this.showErrorInfo();
|
|
18497
|
-
}
|
|
18498
|
-
}
|
|
18499
|
-
isCaseSelected(linkedCases) {
|
|
18500
|
-
if (linkedCases.length === 0) {
|
|
18501
|
-
return false;
|
|
18502
|
-
}
|
|
18503
|
-
const caseNumber = this.linkCaseForm.value.caseNumber;
|
|
18504
|
-
return !!linkedCases.find((caseLink) => caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''));
|
|
18505
|
-
}
|
|
18506
|
-
isCaseSelectedSameAsCurrentCase() {
|
|
18507
|
-
return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
|
|
18508
|
-
}
|
|
18509
|
-
showErrorInfo() {
|
|
18510
|
-
if (this.linkCaseForm.controls.caseNumber.invalid) {
|
|
18511
|
-
this.caseNumberError = LinkedCasesErrorMessages.CaseNumberError;
|
|
18512
|
-
this.errorMessages.push({
|
|
18513
|
-
title: 'dummy-case-number',
|
|
18514
|
-
description: LinkedCasesErrorMessages.CaseNumberError,
|
|
18515
|
-
fieldId: 'caseNumber',
|
|
18516
|
-
});
|
|
18517
|
-
}
|
|
18518
|
-
if (this.linkCaseForm.controls.reasonType.invalid) {
|
|
18519
|
-
this.caseReasonError = LinkedCasesErrorMessages.ReasonSelectionError;
|
|
18520
|
-
this.errorMessages.push({
|
|
18521
|
-
title: 'dummy-case-reason',
|
|
18522
|
-
description: LinkedCasesErrorMessages.ReasonSelectionError,
|
|
18523
|
-
fieldId: 'caseReason',
|
|
18524
|
-
});
|
|
18525
|
-
}
|
|
18526
|
-
if (this.isCaseSelected(this.selectedCases)) {
|
|
18527
|
-
this.caseSelectionError = LinkedCasesErrorMessages.CaseProposedError;
|
|
18528
|
-
this.errorMessages.push({
|
|
18529
|
-
title: 'dummy-case-number',
|
|
18530
|
-
description: LinkedCasesErrorMessages.CaseProposedError,
|
|
18531
|
-
fieldId: 'caseNumber',
|
|
18532
|
-
});
|
|
18533
|
-
}
|
|
18534
|
-
if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
|
|
18535
|
-
this.caseSelectionError = LinkedCasesErrorMessages.CasesLinkedError;
|
|
18536
|
-
this.errorMessages.push({
|
|
18537
|
-
title: 'dummy-case-number',
|
|
18538
|
-
description: LinkedCasesErrorMessages.CasesLinkedError,
|
|
18539
|
-
fieldId: 'caseNumber',
|
|
18540
|
-
});
|
|
18541
|
-
}
|
|
18542
|
-
if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
|
|
18543
|
-
this.errorMessages.push({
|
|
18544
|
-
title: 'dummy-case-number',
|
|
18545
|
-
description: LinkedCasesErrorMessages.ProposedCaseWithIn,
|
|
18546
|
-
fieldId: 'caseNumber',
|
|
18547
|
-
});
|
|
18548
|
-
}
|
|
18549
|
-
window.scrollTo(0, 0);
|
|
18550
|
-
this.emitLinkedCasesState(false);
|
|
18551
|
-
}
|
|
18552
|
-
getCaseInfo() {
|
|
18553
|
-
const caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
|
|
18554
|
-
this.casesService
|
|
18555
|
-
.getCaseViewV2(caseNumberData)
|
|
18556
|
-
.subscribe((caseView) => {
|
|
18557
|
-
this.linkedCasesService.caseDetails = caseView;
|
|
18558
|
-
const caseLink = {
|
|
18559
|
-
caseReference: caseView.case_id,
|
|
18560
|
-
reasons: this.getSelectedCaseReasons(),
|
|
18561
|
-
createdDateTime: moment(new Date()).format(this.ISO_FORMAT),
|
|
18562
|
-
caseType: caseView.case_type.name || '',
|
|
18563
|
-
caseTypeDescription: caseView.case_type.description || '',
|
|
18564
|
-
caseState: caseView.state.name || '',
|
|
18565
|
-
caseStateDescription: caseView.state.description || '',
|
|
18566
|
-
caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
|
|
18567
|
-
caseName: this.linkedCasesService.getCaseName(caseView),
|
|
18568
|
-
};
|
|
18569
|
-
const ccdApiCaseLinkData = {
|
|
18570
|
-
CaseReference: caseView.case_id,
|
|
18571
|
-
CaseType: caseView.case_type.id,
|
|
18572
|
-
CreatedDateTime: moment(new Date()).format(this.ISO_FORMAT),
|
|
18573
|
-
ReasonForLink: this.getSelectedCCDTypeCaseReason()
|
|
18574
|
-
};
|
|
18575
|
-
if (!this.linkedCasesService.caseFieldValue) {
|
|
18576
|
-
this.linkedCasesService.caseFieldValue = [];
|
|
18577
|
-
}
|
|
18578
|
-
this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
|
|
18579
|
-
this.selectedCases.push(caseLink);
|
|
18580
|
-
this.initForm();
|
|
18581
|
-
this.emitLinkedCasesState(false);
|
|
18582
|
-
}, (error) => {
|
|
18583
|
-
this.caseNumberError = LinkedCasesErrorMessages.CaseCheckAgainError;
|
|
18584
|
-
this.errorMessages.push({
|
|
18585
|
-
title: 'dummy-case-number',
|
|
18586
|
-
description: LinkedCasesErrorMessages.CaseCheckAgainError,
|
|
18587
|
-
fieldId: 'caseNumber',
|
|
18588
|
-
});
|
|
18589
|
-
this.emitLinkedCasesState(false);
|
|
18590
|
-
window.scrollTo(0, 0);
|
|
18591
|
-
return throwError(error);
|
|
18592
|
-
});
|
|
18593
|
-
}
|
|
18594
|
-
// Return linked cases state and error messages to the parent
|
|
18595
|
-
emitLinkedCasesState(isNavigateToNextPage) {
|
|
18596
|
-
this.linkedCasesStateEmitter.emit({
|
|
18597
|
-
currentLinkedCasesPage: LinkedCasesPages.LINK_CASE,
|
|
18598
|
-
errorMessages: this.errorMessages,
|
|
18599
|
-
navigateToNextPage: isNavigateToNextPage,
|
|
18600
|
-
});
|
|
18601
|
-
}
|
|
18602
|
-
getSelectedCaseReasons() {
|
|
18603
|
-
const selectedReasons = [];
|
|
18604
|
-
this.linkCaseForm.controls.reasonType.value.forEach((selectedReason) => {
|
|
18605
|
-
if (selectedReason.selected) {
|
|
18606
|
-
selectedReasons.push({
|
|
18607
|
-
reasonCode: selectedReason.key
|
|
18608
|
-
});
|
|
18609
|
-
}
|
|
18610
|
-
});
|
|
18611
|
-
return selectedReasons;
|
|
18612
|
-
}
|
|
18613
|
-
getSelectedCCDTypeCaseReason() {
|
|
18614
|
-
const selectedReasons = [];
|
|
18615
|
-
this.linkCaseForm.controls.reasonType.value.forEach((selectedReason) => {
|
|
18616
|
-
if (selectedReason.selected) {
|
|
18617
|
-
selectedReasons.push({
|
|
18618
|
-
value: {
|
|
18619
|
-
Reason: selectedReason.key,
|
|
18620
|
-
}
|
|
18621
|
-
});
|
|
18622
|
-
}
|
|
18623
|
-
});
|
|
18624
|
-
return selectedReasons;
|
|
18625
|
-
}
|
|
18626
|
-
onSelectedLinkedCaseRemove(pos, selectedCaseReference) {
|
|
18627
|
-
const caseFieldValue = this.linkedCasesService.caseFieldValue || [];
|
|
18628
|
-
const updatedItems = caseFieldValue.filter(item => item.value && item.value.CaseReference !== selectedCaseReference);
|
|
18629
|
-
if (updatedItems) {
|
|
18630
|
-
this.linkedCasesService.caseFieldValue = updatedItems;
|
|
18631
|
-
}
|
|
18632
|
-
this.selectedCases.splice(pos, 1);
|
|
18633
|
-
}
|
|
18634
|
-
onNext() {
|
|
18635
|
-
this.errorMessages = [];
|
|
18636
|
-
this.caseReasonError = null;
|
|
18637
|
-
this.caseNumberError = null;
|
|
18638
|
-
this.caseSelectionError = null;
|
|
18639
|
-
this.noSelectedCaseError = null;
|
|
18640
|
-
let navigateToNextPage = true;
|
|
18641
|
-
if (this.selectedCases.length) {
|
|
18642
|
-
this.linkedCasesService.linkedCases = this.selectedCases;
|
|
18643
|
-
}
|
|
18644
|
-
else {
|
|
18645
|
-
this.noSelectedCaseError = LinkedCasesErrorMessages.CaseSelectionError;
|
|
18646
|
-
this.errorMessages.push({
|
|
18647
|
-
title: 'dummy-case-selection',
|
|
18648
|
-
description: LinkedCasesErrorMessages.CaseSelectionError,
|
|
18649
|
-
fieldId: 'caseReason',
|
|
18650
|
-
});
|
|
18651
|
-
navigateToNextPage = false;
|
|
18652
|
-
}
|
|
18653
|
-
this.emitLinkedCasesState(navigateToNextPage);
|
|
18654
|
-
}
|
|
18655
|
-
}
|
|
18656
|
-
LinkCasesComponent.ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(ValidatorsUtils), i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
18657
|
-
LinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, decls: 36, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "300", 1, "govuk-table__header"], ["scope", "col", "width", "150", 1, "govuk-table__header"], ["scope", "col", "width", "200", 1, "govuk-table__header"], ["scope", "col", "width", "400", 1, "govuk-table__header"], ["scope", "col", "width", "50", 1, "govuk-table__header"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-heading-s"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes", 3, "ngClass"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18658
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
18659
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
18660
|
-
i0.ɵɵelementStart(2, "div");
|
|
18661
|
-
i0.ɵɵelementStart(3, "span", 2);
|
|
18662
|
-
i0.ɵɵtext(4);
|
|
18663
|
-
i0.ɵɵpipe(5, "ccdCaseReference");
|
|
18664
|
-
i0.ɵɵelementEnd();
|
|
18665
|
-
i0.ɵɵelementStart(6, "h1", 3);
|
|
18666
|
-
i0.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
|
|
18667
|
-
i0.ɵɵelementEnd();
|
|
18668
|
-
i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
|
|
18669
|
-
i0.ɵɵelement(9, "hr");
|
|
18670
|
-
i0.ɵɵelement(10, "br");
|
|
18671
|
-
i0.ɵɵelement(11, "br");
|
|
18672
|
-
i0.ɵɵelementStart(12, "div", 5);
|
|
18673
|
-
i0.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
|
|
18674
|
-
i0.ɵɵelementStart(14, "table", 7);
|
|
18675
|
-
i0.ɵɵelementStart(15, "caption", 8);
|
|
18676
|
-
i0.ɵɵtext(16, "Proposed case links ");
|
|
18677
|
-
i0.ɵɵelementEnd();
|
|
18678
|
-
i0.ɵɵelementStart(17, "thead", 9);
|
|
18679
|
-
i0.ɵɵelementStart(18, "tr", 10);
|
|
18680
|
-
i0.ɵɵelementStart(19, "th", 11);
|
|
18681
|
-
i0.ɵɵtext(20, "Case name and number");
|
|
18682
|
-
i0.ɵɵelementEnd();
|
|
18683
|
-
i0.ɵɵelementStart(21, "th", 12);
|
|
18684
|
-
i0.ɵɵtext(22, "Case type ");
|
|
18685
|
-
i0.ɵɵelementEnd();
|
|
18686
|
-
i0.ɵɵelementStart(23, "th", 13);
|
|
18687
|
-
i0.ɵɵtext(24, "Service");
|
|
18688
|
-
i0.ɵɵelementEnd();
|
|
18689
|
-
i0.ɵɵelementStart(25, "th", 13);
|
|
18690
|
-
i0.ɵɵtext(26, "State");
|
|
18691
|
-
i0.ɵɵelementEnd();
|
|
18692
|
-
i0.ɵɵelementStart(27, "th", 14);
|
|
18693
|
-
i0.ɵɵtext(28, "Reasons for case link");
|
|
18694
|
-
i0.ɵɵelementEnd();
|
|
18695
|
-
i0.ɵɵelement(29, "th", 15);
|
|
18696
|
-
i0.ɵɵelementEnd();
|
|
18697
|
-
i0.ɵɵelementEnd();
|
|
18698
|
-
i0.ɵɵelementStart(30, "tbody", 16);
|
|
18699
|
-
i0.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
|
|
18700
|
-
i0.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
|
|
18701
|
-
i0.ɵɵelementEnd();
|
|
18702
|
-
i0.ɵɵelementEnd();
|
|
18703
|
-
i0.ɵɵelementEnd();
|
|
18704
|
-
i0.ɵɵelementStart(33, "div", 19);
|
|
18705
|
-
i0.ɵɵelementStart(34, "button", 20);
|
|
18706
|
-
i0.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
|
|
18707
|
-
i0.ɵɵtext(35, "Next");
|
|
18708
|
-
i0.ɵɵelementEnd();
|
|
18709
|
-
i0.ɵɵelementEnd();
|
|
18710
|
-
i0.ɵɵelementEnd();
|
|
18711
|
-
i0.ɵɵelementEnd();
|
|
18712
|
-
i0.ɵɵelementEnd();
|
|
18713
|
-
} if (rf & 2) {
|
|
18714
|
-
i0.ɵɵadvance(4);
|
|
18715
|
-
i0.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0.ɵɵpipeBind1(5, 7, ctx.caseId), "");
|
|
18716
|
-
i0.ɵɵadvance(4);
|
|
18717
|
-
i0.ɵɵproperty("ngIf", ctx.linkCaseForm);
|
|
18718
|
-
i0.ɵɵadvance(4);
|
|
18719
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
|
|
18720
|
-
i0.ɵɵadvance(1);
|
|
18721
|
-
i0.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
|
|
18722
|
-
i0.ɵɵadvance(18);
|
|
18723
|
-
i0.ɵɵproperty("ngForOf", ctx.selectedCases);
|
|
18724
|
-
i0.ɵɵadvance(1);
|
|
18725
|
-
i0.ɵɵproperty("ngIf", !ctx.selectedCases.length);
|
|
18726
|
-
} }, styles: [".no-visited-state[_ngcontent-%COMP%]{color:#1d70b8;cursor:pointer}.no-visited-state[_ngcontent-%COMP%]:hover{color:#003078}.govuk-checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes[_ngcontent-%COMP%] .govuk-checkboxes__item[_ngcontent-%COMP%]{display:flex} .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row[_ngcontent-%COMP%]{position:relative}.govuk-table__row[_ngcontent-%COMP%] .table-group-error[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 20px);margin-left:-15px}"] });
|
|
18727
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesComponent, [{
|
|
18728
|
-
type: Component,
|
|
18729
|
-
args: [{
|
|
18730
|
-
selector: 'ccd-link-cases',
|
|
18731
|
-
styleUrls: ['./link-cases.component.scss'],
|
|
18732
|
-
templateUrl: './link-cases.component.html',
|
|
18733
|
-
}]
|
|
18734
|
-
}], function () { return [{ type: CasesService }, { type: i2.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
18735
|
-
type: Output
|
|
18736
|
-
}] }); })();
|
|
18737
|
-
|
|
18738
|
-
function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
18739
|
-
const _r3 = i0.ɵɵgetCurrentView();
|
|
18740
|
-
i0.ɵɵelementStart(0, "a", 2);
|
|
18741
|
-
i0.ɵɵlistener("click", function LinkedCasesFromTableComponent_a_0_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.onClick(); });
|
|
18742
|
-
i0.ɵɵtext(1);
|
|
18743
|
-
i0.ɵɵelementEnd();
|
|
18744
|
-
} if (rf & 2) {
|
|
18745
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
18746
|
-
i0.ɵɵadvance(1);
|
|
18747
|
-
i0.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
|
|
18748
|
-
} }
|
|
18749
|
-
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
18750
|
-
i0.ɵɵelementStart(0, "span");
|
|
18751
|
-
i0.ɵɵtext(1);
|
|
18752
|
-
i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
18753
|
-
i0.ɵɵelement(3, "br");
|
|
18754
|
-
i0.ɵɵelementEnd();
|
|
18755
|
-
} if (rf & 2) {
|
|
18756
|
-
const reason_r11 = ctx.$implicit;
|
|
18757
|
-
i0.ɵɵadvance(1);
|
|
18758
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
|
|
18759
|
-
} }
|
|
18760
|
-
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) { if (rf & 1) {
|
|
18761
|
-
i0.ɵɵelementStart(0, "td", 14);
|
|
18762
|
-
i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
|
|
18763
|
-
i0.ɵɵelementEnd();
|
|
18764
|
-
} if (rf & 2) {
|
|
18765
|
-
const details_r9 = ctx.$implicit;
|
|
18766
|
-
i0.ɵɵadvance(1);
|
|
18767
|
-
i0.ɵɵproperty("ngForOf", details_r9.reasons);
|
|
18768
|
-
} }
|
|
18769
|
-
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
18770
|
-
i0.ɵɵelementStart(0, "tr", 5);
|
|
18771
|
-
i0.ɵɵelementStart(1, "td", 11);
|
|
18772
|
-
i0.ɵɵelementStart(2, "p", 12);
|
|
18773
|
-
i0.ɵɵelementStart(3, "a", 13);
|
|
18774
|
-
i0.ɵɵelementStart(4, "span");
|
|
18775
|
-
i0.ɵɵtext(5);
|
|
18776
|
-
i0.ɵɵelement(6, "br");
|
|
18777
|
-
i0.ɵɵtext(7);
|
|
18778
|
-
i0.ɵɵpipe(8, "ccdCaseReference");
|
|
18779
|
-
i0.ɵɵelementEnd();
|
|
18780
|
-
i0.ɵɵelementEnd();
|
|
18781
|
-
i0.ɵɵelementEnd();
|
|
18782
|
-
i0.ɵɵelementEnd();
|
|
18783
|
-
i0.ɵɵelementStart(9, "td", 14);
|
|
18784
|
-
i0.ɵɵelementStart(10, "span", 15);
|
|
18785
|
-
i0.ɵɵtext(11);
|
|
18786
|
-
i0.ɵɵelementEnd();
|
|
18787
|
-
i0.ɵɵelementEnd();
|
|
18788
|
-
i0.ɵɵelementStart(12, "td", 14);
|
|
18789
|
-
i0.ɵɵelementStart(13, "span");
|
|
18790
|
-
i0.ɵɵtext(14);
|
|
18791
|
-
i0.ɵɵelementEnd();
|
|
18792
|
-
i0.ɵɵelementEnd();
|
|
18793
|
-
i0.ɵɵelementStart(15, "td", 14);
|
|
18794
|
-
i0.ɵɵelementStart(16, "span", 15);
|
|
18795
|
-
i0.ɵɵtext(17);
|
|
18796
|
-
i0.ɵɵelementEnd();
|
|
18797
|
-
i0.ɵɵelementEnd();
|
|
18798
|
-
i0.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
|
|
18799
|
-
i0.ɵɵelementEnd();
|
|
18800
|
-
} if (rf & 2) {
|
|
18801
|
-
const case_r7 = ctx.$implicit;
|
|
18802
|
-
i0.ɵɵadvance(3);
|
|
18803
|
-
i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0.ɵɵsanitizeUrl);
|
|
18804
|
-
i0.ɵɵadvance(2);
|
|
18805
|
-
i0.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
|
|
18806
|
-
i0.ɵɵadvance(2);
|
|
18807
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
|
|
18808
|
-
i0.ɵɵadvance(3);
|
|
18809
|
-
i0.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
|
|
18810
|
-
i0.ɵɵadvance(1);
|
|
18811
|
-
i0.ɵɵtextInterpolate(case_r7.ccdCaseType);
|
|
18812
|
-
i0.ɵɵadvance(3);
|
|
18813
|
-
i0.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
|
|
18814
|
-
i0.ɵɵadvance(2);
|
|
18815
|
-
i0.ɵɵproperty("title", case_r7.stateDescription);
|
|
18816
|
-
i0.ɵɵadvance(1);
|
|
18817
|
-
i0.ɵɵtextInterpolate(case_r7.state);
|
|
18818
|
-
i0.ɵɵadvance(1);
|
|
18819
|
-
i0.ɵɵproperty("ngForOf", case_r7.linkDetails);
|
|
18820
|
-
} }
|
|
18821
|
-
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) { if (rf & 1) {
|
|
18822
|
-
i0.ɵɵelementStart(0, "tr", 5);
|
|
18823
|
-
i0.ɵɵelementStart(1, "td", 18);
|
|
18824
|
-
i0.ɵɵtext(2, " None ");
|
|
18825
|
-
i0.ɵɵelementEnd();
|
|
18826
|
-
i0.ɵɵelementEnd();
|
|
18827
|
-
} }
|
|
18828
|
-
function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) { if (rf & 1) {
|
|
18829
|
-
i0.ɵɵelementStart(0, "tbody", 8);
|
|
18830
|
-
i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
|
|
18831
|
-
i0.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
|
|
18832
|
-
i0.ɵɵelementEnd();
|
|
18833
|
-
} if (rf & 2) {
|
|
18834
|
-
const ctx_r4 = i0.ɵɵnextContext(2);
|
|
18835
|
-
i0.ɵɵadvance(1);
|
|
18836
|
-
i0.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
|
|
18837
|
-
i0.ɵɵadvance(1);
|
|
18838
|
-
i0.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
|
|
18839
|
-
} }
|
|
18840
|
-
function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) { if (rf & 1) {
|
|
18841
|
-
i0.ɵɵelementStart(0, "table", 3);
|
|
18842
|
-
i0.ɵɵelementStart(1, "thead", 4);
|
|
18843
|
-
i0.ɵɵelementStart(2, "tr", 5);
|
|
18844
|
-
i0.ɵɵelementStart(3, "th", 6);
|
|
18845
|
-
i0.ɵɵtext(4, "Case name and number");
|
|
18846
|
-
i0.ɵɵelementEnd();
|
|
18847
|
-
i0.ɵɵelementStart(5, "th", 6);
|
|
18848
|
-
i0.ɵɵtext(6, "Case type ");
|
|
18849
|
-
i0.ɵɵelementEnd();
|
|
18850
|
-
i0.ɵɵelementStart(7, "th", 6);
|
|
18851
|
-
i0.ɵɵtext(8, "Service");
|
|
18852
|
-
i0.ɵɵelementEnd();
|
|
18853
|
-
i0.ɵɵelementStart(9, "th", 6);
|
|
18854
|
-
i0.ɵɵtext(10, "State");
|
|
18855
|
-
i0.ɵɵelementEnd();
|
|
18856
|
-
i0.ɵɵelementStart(11, "th", 6);
|
|
18857
|
-
i0.ɵɵtext(12, "Reasons for case link");
|
|
18858
|
-
i0.ɵɵelementEnd();
|
|
18859
|
-
i0.ɵɵelementEnd();
|
|
18860
|
-
i0.ɵɵelementEnd();
|
|
18861
|
-
i0.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
|
|
18862
|
-
i0.ɵɵelementEnd();
|
|
18863
|
-
} if (rf & 2) {
|
|
18864
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
18865
|
-
i0.ɵɵadvance(13);
|
|
18866
|
-
i0.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
|
|
18867
|
-
} }
|
|
18868
|
-
var PageType;
|
|
18869
|
-
(function (PageType) {
|
|
18870
|
-
PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
|
|
18871
|
-
PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
|
|
18872
|
-
})(PageType || (PageType = {}));
|
|
18873
|
-
class LinkedCasesFromTableComponent {
|
|
18874
|
-
constructor(route, casesService, linkedCasesService) {
|
|
18875
|
-
this.route = route;
|
|
18876
|
-
this.casesService = casesService;
|
|
18877
|
-
this.linkedCasesService = linkedCasesService;
|
|
18878
|
-
this.notifyAPIFailure = new EventEmitter(false);
|
|
18879
|
-
this.pageType = PageType;
|
|
18880
|
-
this.getLinkedCasesResponse = [];
|
|
18881
|
-
this.showHideLinkText = 'Show';
|
|
18882
|
-
this.noLinkedCases = true;
|
|
18883
|
-
this.isServerError = false;
|
|
18884
|
-
}
|
|
18885
|
-
ngAfterViewInit() {
|
|
18886
|
-
const labelField = document.getElementsByClassName('case-viewer-label');
|
|
18887
|
-
if (labelField && labelField.length) {
|
|
18888
|
-
labelField[0].replaceWith('');
|
|
18889
|
-
}
|
|
18890
|
-
}
|
|
18891
|
-
ngOnInit() {
|
|
18892
|
-
this.fetchPageData();
|
|
18893
|
-
if (this.route.snapshot.data.case) {
|
|
18894
|
-
this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
|
|
18895
|
-
}
|
|
18896
|
-
}
|
|
18897
|
-
fetchPageData() {
|
|
18898
|
-
this.caseId = this.route.snapshot.data.case.case_id;
|
|
18899
|
-
this.getLinkedCases().subscribe(response => {
|
|
18900
|
-
this.isServerError = false;
|
|
18901
|
-
this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(item => {
|
|
18902
|
-
const mappedCasetype = this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
|
|
18903
|
-
const mappedCasetypeDescription = this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
|
|
18904
|
-
const mappedCaseState = this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
|
|
18905
|
-
const mappedCaseStateDescription = this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
|
|
18906
|
-
const mappedCaseService = this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
|
|
18907
|
-
return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
|
|
18908
|
-
});
|
|
18909
|
-
this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
|
|
18910
|
-
}, err => {
|
|
18911
|
-
this.isServerError = true;
|
|
18912
|
-
this.notifyAPIFailure.emit(true);
|
|
18913
|
-
});
|
|
18914
|
-
}
|
|
18915
|
-
getLinkedCases() {
|
|
18916
|
-
return this.casesService.getLinkedCases(this.caseId);
|
|
18917
|
-
}
|
|
18918
|
-
mapLookupIDToValueFromJurisdictions(fieldName, fieldValue) {
|
|
18919
|
-
return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
|
|
18920
|
-
}
|
|
18921
|
-
onClick() {
|
|
18922
|
-
this.showHideLinkText = this.showHideLinkText === 'Show'
|
|
18923
|
-
? 'Hide'
|
|
18924
|
-
: 'Show';
|
|
18925
|
-
}
|
|
18926
|
-
}
|
|
18927
|
-
LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
|
|
18928
|
-
LinkedCasesFromTableComponent.ɵfac = function LinkedCasesFromTableComponent_Factory(t) { return new (t || LinkedCasesFromTableComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
18929
|
-
LinkedCasesFromTableComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 2, vars: 2, consts: [["id", "show-hide-link", "class", "govuk-link", "href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "table to display cases linked from", 4, "ngIf"], ["id", "show-hide-link", "href", "javascript:void(0)", 1, "govuk-link", 3, "click"], ["aria-describedby", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18930
|
-
i0.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
|
|
18931
|
-
i0.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
|
|
18932
|
-
} if (rf & 2) {
|
|
18933
|
-
i0.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
|
|
18934
|
-
i0.ɵɵadvance(1);
|
|
18935
|
-
i0.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
|
|
18936
|
-
} }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
|
|
18937
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
|
|
18938
|
-
type: Component,
|
|
18939
|
-
args: [{
|
|
18940
|
-
selector: 'ccd-linked-cases-from-table',
|
|
18941
|
-
templateUrl: './linked-cases-from-table.component.html',
|
|
18942
|
-
styleUrls: ['./linked-cases-from-table.component.scss']
|
|
18943
|
-
}]
|
|
18944
|
-
}], function () { return [{ type: i1$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
|
|
18945
|
-
type: Input
|
|
18946
|
-
}], notifyAPIFailure: [{
|
|
18947
|
-
type: Output
|
|
18948
|
-
}] }); })();
|
|
18949
|
-
|
|
18950
|
-
function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) { if (rf & 1) {
|
|
18951
|
-
i0.ɵɵelementStart(0, "a", 16);
|
|
18952
|
-
i0.ɵɵtext(1);
|
|
18953
|
-
i0.ɵɵelementEnd();
|
|
18954
|
-
} if (rf & 2) {
|
|
18955
|
-
const case_r3 = i0.ɵɵnextContext(3).$implicit;
|
|
18956
|
-
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
18957
|
-
i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0.ɵɵsanitizeUrl);
|
|
18958
|
-
i0.ɵɵadvance(1);
|
|
18959
|
-
i0.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
|
|
18960
|
-
} }
|
|
18961
|
-
function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) { if (rf & 1) {
|
|
18962
|
-
i0.ɵɵelement(0, "br");
|
|
18963
|
-
} }
|
|
18964
|
-
function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
18965
|
-
i0.ɵɵelementStart(0, "span");
|
|
18966
|
-
i0.ɵɵtext(1);
|
|
18967
|
-
i0.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
18968
|
-
i0.ɵɵelementStart(3, "span");
|
|
18969
|
-
i0.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
|
|
18970
|
-
i0.ɵɵelementEnd();
|
|
18971
|
-
i0.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
|
|
18972
|
-
i0.ɵɵelementEnd();
|
|
18973
|
-
} if (rf & 2) {
|
|
18974
|
-
const reason_r6 = ctx.$implicit;
|
|
18975
|
-
const isLast_r8 = ctx.last;
|
|
18976
|
-
const ctx_r5 = i0.ɵɵnextContext(4);
|
|
18977
|
-
i0.ɵɵadvance(1);
|
|
18978
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 3, reason_r6), "");
|
|
18979
|
-
i0.ɵɵadvance(3);
|
|
18980
|
-
i0.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
|
|
18981
|
-
i0.ɵɵadvance(1);
|
|
18982
|
-
i0.ɵɵproperty("ngIf", !isLast_r8);
|
|
18983
|
-
} }
|
|
18984
|
-
function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) { if (rf & 1) {
|
|
18985
|
-
i0.ɵɵelementStart(0, "td");
|
|
18986
|
-
i0.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
|
|
18987
|
-
i0.ɵɵelementEnd();
|
|
18988
|
-
} if (rf & 2) {
|
|
18989
|
-
const case_r3 = i0.ɵɵnextContext().$implicit;
|
|
18990
|
-
i0.ɵɵadvance(1);
|
|
18991
|
-
i0.ɵɵproperty("ngForOf", case_r3.reasons);
|
|
18992
|
-
} }
|
|
18993
|
-
function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) { if (rf & 1) {
|
|
18994
|
-
i0.ɵɵelementStart(0, "tr", 4);
|
|
18995
|
-
i0.ɵɵelementStart(1, "td");
|
|
18996
|
-
i0.ɵɵelementStart(2, "p", 9);
|
|
18997
|
-
i0.ɵɵelementStart(3, "a", 10);
|
|
18998
|
-
i0.ɵɵelementStart(4, "span", 11);
|
|
18999
|
-
i0.ɵɵtext(5);
|
|
19000
|
-
i0.ɵɵelement(6, "br");
|
|
19001
|
-
i0.ɵɵtext(7);
|
|
19002
|
-
i0.ɵɵpipe(8, "ccdCaseReference");
|
|
19003
|
-
i0.ɵɵelementEnd();
|
|
19004
|
-
i0.ɵɵelementEnd();
|
|
19005
|
-
i0.ɵɵelementEnd();
|
|
19006
|
-
i0.ɵɵelementEnd();
|
|
19007
|
-
i0.ɵɵelementStart(9, "td");
|
|
19008
|
-
i0.ɵɵelementStart(10, "span", 12);
|
|
19009
|
-
i0.ɵɵtext(11);
|
|
19010
|
-
i0.ɵɵelementEnd();
|
|
19011
|
-
i0.ɵɵelementEnd();
|
|
19012
|
-
i0.ɵɵelementStart(12, "td");
|
|
19013
|
-
i0.ɵɵelementStart(13, "span");
|
|
19014
|
-
i0.ɵɵtext(14);
|
|
19015
|
-
i0.ɵɵelementEnd();
|
|
19016
|
-
i0.ɵɵelementEnd();
|
|
19017
|
-
i0.ɵɵelementStart(15, "td");
|
|
19018
|
-
i0.ɵɵelementStart(16, "span", 12);
|
|
19019
|
-
i0.ɵɵtext(17);
|
|
19020
|
-
i0.ɵɵelementEnd();
|
|
19021
|
-
i0.ɵɵelementEnd();
|
|
19022
|
-
i0.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
|
|
19023
|
-
i0.ɵɵelementEnd();
|
|
19024
|
-
} if (rf & 2) {
|
|
19025
|
-
const case_r3 = ctx.$implicit;
|
|
19026
|
-
i0.ɵɵadvance(3);
|
|
19027
|
-
i0.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0.ɵɵsanitizeUrl);
|
|
19028
|
-
i0.ɵɵadvance(2);
|
|
19029
|
-
i0.ɵɵtextInterpolate1("", case_r3.caseName, " ");
|
|
19030
|
-
i0.ɵɵadvance(2);
|
|
19031
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
|
|
19032
|
-
i0.ɵɵadvance(3);
|
|
19033
|
-
i0.ɵɵproperty("title", case_r3.caseTypeDescription);
|
|
19034
|
-
i0.ɵɵadvance(1);
|
|
19035
|
-
i0.ɵɵtextInterpolate(case_r3.caseType);
|
|
19036
|
-
i0.ɵɵadvance(3);
|
|
19037
|
-
i0.ɵɵtextInterpolate(case_r3.service);
|
|
19038
|
-
i0.ɵɵadvance(2);
|
|
19039
|
-
i0.ɵɵproperty("title", case_r3.stateDescription);
|
|
19040
|
-
i0.ɵɵadvance(1);
|
|
19041
|
-
i0.ɵɵtextInterpolate(case_r3.state);
|
|
19042
|
-
i0.ɵɵadvance(1);
|
|
19043
|
-
i0.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
|
|
19044
|
-
} }
|
|
19045
|
-
function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) { if (rf & 1) {
|
|
19046
|
-
i0.ɵɵelementStart(0, "tr", 4);
|
|
19047
|
-
i0.ɵɵelementStart(1, "td", 17);
|
|
19048
|
-
i0.ɵɵtext(2, " None ");
|
|
19049
|
-
i0.ɵɵelementEnd();
|
|
19050
|
-
i0.ɵɵelementEnd();
|
|
19051
|
-
} }
|
|
19052
|
-
function LinkedCasesToTableComponent_table_2_Template(rf, ctx) { if (rf & 1) {
|
|
19053
|
-
i0.ɵɵelementStart(0, "table", 3);
|
|
19054
|
-
i0.ɵɵelementStart(1, "thead");
|
|
19055
|
-
i0.ɵɵelementStart(2, "tr", 4);
|
|
19056
|
-
i0.ɵɵelementStart(3, "th", 5);
|
|
19057
|
-
i0.ɵɵtext(4, "Case name and number");
|
|
19058
|
-
i0.ɵɵelementEnd();
|
|
19059
|
-
i0.ɵɵelementStart(5, "th", 5);
|
|
19060
|
-
i0.ɵɵtext(6, "Case type ");
|
|
19061
|
-
i0.ɵɵelementEnd();
|
|
19062
|
-
i0.ɵɵelementStart(7, "th", 5);
|
|
19063
|
-
i0.ɵɵtext(8, "Service");
|
|
19064
|
-
i0.ɵɵelementEnd();
|
|
19065
|
-
i0.ɵɵelementStart(9, "th", 5);
|
|
19066
|
-
i0.ɵɵtext(10, "State");
|
|
19067
|
-
i0.ɵɵelementEnd();
|
|
19068
|
-
i0.ɵɵelementStart(11, "th", 5);
|
|
19069
|
-
i0.ɵɵtext(12, "Reasons for case link");
|
|
19070
|
-
i0.ɵɵelementEnd();
|
|
19071
|
-
i0.ɵɵelementEnd();
|
|
19072
|
-
i0.ɵɵelementEnd();
|
|
19073
|
-
i0.ɵɵelementStart(13, "tbody", 6);
|
|
19074
|
-
i0.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
|
|
19075
|
-
i0.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
|
|
19076
|
-
i0.ɵɵelementEnd();
|
|
19077
|
-
i0.ɵɵelementEnd();
|
|
19078
|
-
} if (rf & 2) {
|
|
19079
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
19080
|
-
i0.ɵɵadvance(14);
|
|
19081
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
|
|
19082
|
-
i0.ɵɵadvance(1);
|
|
19083
|
-
i0.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
|
|
19084
|
-
} }
|
|
19085
|
-
class LinkedCasesToTableComponent {
|
|
19086
|
-
constructor(route, linkedCasesService, casesService) {
|
|
19087
|
-
this.route = route;
|
|
19088
|
-
this.linkedCasesService = linkedCasesService;
|
|
19089
|
-
this.casesService = casesService;
|
|
19090
|
-
this.notifyAPIFailure = new EventEmitter(false);
|
|
19091
|
-
this.linkedCasesFromResponse = [];
|
|
19092
|
-
this.isServerError = false;
|
|
19093
|
-
this.jurisdictionsResponse = [];
|
|
19094
|
-
}
|
|
19095
|
-
ngAfterViewInit() {
|
|
19096
|
-
let labelField = document.getElementsByClassName('govuk-heading-l');
|
|
19097
|
-
if (labelField && labelField.length) {
|
|
19098
|
-
labelField[0].replaceWith('');
|
|
19099
|
-
}
|
|
19100
|
-
labelField = document.getElementsByClassName('heading-h2');
|
|
19101
|
-
if (labelField && labelField.length) {
|
|
19102
|
-
labelField[0].replaceWith('');
|
|
19103
|
-
}
|
|
19104
|
-
}
|
|
19105
|
-
ngOnInit() {
|
|
19106
|
-
this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
|
|
19107
|
-
this.getAllLinkedCaseInformation();
|
|
19108
|
-
if (this.route.snapshot.data.case) {
|
|
19109
|
-
this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
|
|
19110
|
-
}
|
|
19111
|
-
}
|
|
19112
|
-
getCaseRefereneLink(caseRef) {
|
|
19113
|
-
return caseRef.slice(this.caseId.length - 4);
|
|
19114
|
-
}
|
|
19115
|
-
sortLinkedCasesByReasonCode(searchCasesResponse) {
|
|
19116
|
-
const topLevelresultArray = [];
|
|
19117
|
-
let secondLevelresultArray = [];
|
|
19118
|
-
searchCasesResponse.forEach((item) => {
|
|
19119
|
-
const reasons = item && item.reasons || [];
|
|
19120
|
-
const consolidatedStateReason = reasons.map(x => x).find(reason => reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE);
|
|
19121
|
-
const progressedStateReason = reasons.map(x => x).find(reason => reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE);
|
|
19122
|
-
let arrayItem;
|
|
19123
|
-
if (progressedStateReason) {
|
|
19124
|
-
arrayItem = Object.assign({}, item);
|
|
19125
|
-
topLevelresultArray.push(arrayItem);
|
|
19126
|
-
}
|
|
19127
|
-
else if (consolidatedStateReason) {
|
|
19128
|
-
arrayItem = Object.assign({}, item);
|
|
19129
|
-
secondLevelresultArray = [Object.assign({}, item), ...secondLevelresultArray];
|
|
19130
|
-
}
|
|
19131
|
-
else {
|
|
19132
|
-
arrayItem = Object.assign({}, item);
|
|
19133
|
-
secondLevelresultArray.push(Object.assign({}, item));
|
|
19134
|
-
}
|
|
19135
|
-
});
|
|
19136
|
-
return topLevelresultArray.concat(secondLevelresultArray);
|
|
19137
|
-
}
|
|
19138
|
-
getAllLinkedCaseInformation() {
|
|
19139
|
-
const searchCasesResponse = [];
|
|
19140
|
-
const caseFieldValue = this.caseField ? this.caseField.value : [];
|
|
19141
|
-
// Generate the list of observables
|
|
19142
|
-
caseFieldValue.forEach(fieldValue => {
|
|
19143
|
-
if (fieldValue && fieldValue.id) {
|
|
19144
|
-
searchCasesResponse.push(this.casesService.getCaseViewV2(fieldValue.id));
|
|
19145
|
-
}
|
|
19146
|
-
});
|
|
19147
|
-
if (searchCasesResponse.length) {
|
|
19148
|
-
this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
|
|
19149
|
-
const casesResponse = [];
|
|
19150
|
-
searchCases.forEach(response => {
|
|
19151
|
-
casesResponse.push(this.mapResponse(response));
|
|
19152
|
-
});
|
|
19153
|
-
this.linkedCasesFromResponse = this.sortLinkedCasesByReasonCode(casesResponse);
|
|
19154
|
-
this.isLoaded = true;
|
|
19155
|
-
const caseLinks = this.linkedCasesFromResponse.map(item => {
|
|
19156
|
-
return {
|
|
19157
|
-
caseReference: item.caseReference,
|
|
19158
|
-
caseName: item.caseName,
|
|
19159
|
-
caseService: item.service,
|
|
19160
|
-
caseType: item.caseType,
|
|
19161
|
-
unlink: false,
|
|
19162
|
-
reasons: item.reasons && item.reasons.map(reason => {
|
|
19163
|
-
return {
|
|
19164
|
-
reasonCode: reason
|
|
19165
|
-
};
|
|
19166
|
-
}),
|
|
19167
|
-
};
|
|
19168
|
-
});
|
|
19169
|
-
this.linkedCasesService.initialCaseLinks = caseLinks;
|
|
19170
|
-
this.linkedCasesService.linkedCases = caseLinks;
|
|
19171
|
-
this.isServerError = false;
|
|
19172
|
-
}, err => {
|
|
19173
|
-
this.isServerError = true;
|
|
19174
|
-
this.notifyAPIFailure.emit(true);
|
|
19175
|
-
});
|
|
19176
|
-
}
|
|
19177
|
-
}
|
|
19178
|
-
searchCasesByCaseIds(searchCasesResponse) {
|
|
19179
|
-
return forkJoin(searchCasesResponse);
|
|
19180
|
-
}
|
|
19181
|
-
hasLeadCaseOrConsolidated(reasonCode) {
|
|
19182
|
-
return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
|
|
19183
|
-
reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
|
|
19184
|
-
}
|
|
19185
|
-
mapResponse(esSearchCasesResponse) {
|
|
19186
|
-
const caseInfo = this.caseField.value.find(item => item.value && item.value.CaseReference === esSearchCasesResponse.case_id);
|
|
19187
|
-
return caseInfo && {
|
|
19188
|
-
caseReference: esSearchCasesResponse.case_id,
|
|
19189
|
-
caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
|
|
19190
|
-
caseType: esSearchCasesResponse.case_type.name || '',
|
|
19191
|
-
caseTypeDescription: esSearchCasesResponse.case_type.description || '',
|
|
19192
|
-
service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
|
|
19193
|
-
state: esSearchCasesResponse.state.name || '',
|
|
19194
|
-
stateDescription: esSearchCasesResponse.state.description || '',
|
|
19195
|
-
reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
|
|
19196
|
-
caseInfo.value.ReasonForLink.map(reason => reason.value && reason.value.Reason),
|
|
19197
|
-
};
|
|
19198
|
-
}
|
|
19199
|
-
}
|
|
19200
|
-
LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
|
|
19201
|
-
LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
|
|
19202
|
-
LinkedCasesToTableComponent.ɵfac = function LinkedCasesToTableComponent_Factory(t) { return new (t || LinkedCasesToTableComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CasesService)); };
|
|
19203
|
-
LinkedCasesToTableComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkedCasesToTableComponent, selectors: [["ccd-linked-cases-to-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, decls: 3, vars: 1, consts: [[1, "govuk-grid-row", "govuk-!-margin-bottom-2"], [1, "govuk-grid-column-full"], ["aria-describedby", "table to display cases linked TO", 4, "ngIf"], ["aria-describedby", "table to display cases linked TO"], [1, "govuk-table__row"], ["scope", "col", "width", "20%", 1, "govuk-table__header", "case-table-column"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 3, "href"], [1, "govuk-link"], [3, "title"], [4, "ngIf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesToTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19204
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
19205
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
19206
|
-
i0.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
|
|
19207
|
-
i0.ɵɵelementEnd();
|
|
19208
|
-
i0.ɵɵelementEnd();
|
|
19209
|
-
} if (rf & 2) {
|
|
19210
|
-
i0.ɵɵadvance(2);
|
|
19211
|
-
i0.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
|
|
19212
|
-
} }, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
|
|
19213
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
|
|
19214
|
-
type: Component,
|
|
19215
|
-
args: [{
|
|
19216
|
-
selector: 'ccd-linked-cases-to-table',
|
|
19217
|
-
templateUrl: './linked-cases-to-table.component.html',
|
|
19218
|
-
styleUrls: ['./linked-cases-to-table.component.scss']
|
|
19219
|
-
}]
|
|
19220
|
-
}], function () { return [{ type: i1$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
|
|
19221
|
-
type: Input
|
|
19222
|
-
}], notifyAPIFailure: [{
|
|
19223
|
-
type: Output
|
|
19224
|
-
}] }); })();
|
|
19225
|
-
|
|
19226
|
-
function NoLinkedCasesComponent_h1_2_Template(rf, ctx) { if (rf & 1) {
|
|
19227
|
-
i0.ɵɵelementStart(0, "h1", 9);
|
|
19228
|
-
i0.ɵɵtext(1, "There is a problem");
|
|
19229
|
-
i0.ɵɵelementEnd();
|
|
19230
|
-
} }
|
|
19231
|
-
function NoLinkedCasesComponent_p_3_Template(rf, ctx) { if (rf & 1) {
|
|
19232
|
-
i0.ɵɵelementStart(0, "p", 10);
|
|
19233
|
-
i0.ɵɵelementStart(1, "span", 11);
|
|
19234
|
-
i0.ɵɵtext(2, "Error:");
|
|
19235
|
-
i0.ɵɵelementEnd();
|
|
19236
|
-
i0.ɵɵtext(3);
|
|
19237
|
-
i0.ɵɵelementEnd();
|
|
19238
|
-
} if (rf & 2) {
|
|
19239
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
19240
|
-
i0.ɵɵadvance(3);
|
|
19241
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
|
|
19242
|
-
} }
|
|
19243
|
-
function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
|
|
19244
|
-
i0.ɵɵelementStart(0, "p", 5);
|
|
19245
|
-
i0.ɵɵtext(1, "There are no cases linked to this one.");
|
|
19246
|
-
i0.ɵɵelementEnd();
|
|
19247
|
-
} }
|
|
19248
|
-
class NoLinkedCasesComponent {
|
|
19249
|
-
constructor(router, linkedCasesService) {
|
|
19250
|
-
this.router = router;
|
|
19251
|
-
this.linkedCasesService = linkedCasesService;
|
|
19252
|
-
}
|
|
19253
|
-
onBack() {
|
|
19254
|
-
this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(() => {
|
|
19255
|
-
window.location.hash = 'Linked cases';
|
|
19256
|
-
});
|
|
19257
|
-
}
|
|
19258
|
-
}
|
|
19259
|
-
NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
19260
|
-
NoLinkedCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NoLinkedCasesComponent, selectors: [["ccd-no-linked-cases"]], decls: 12, vars: 3, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], ["class", "govuk-heading-xl", 4, "ngIf"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf", "ngIfElse"], ["noLinkedCases", ""], [1, "govuk-body"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-button-group"], ["type", "button", "id", "back-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-heading-xl"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function NoLinkedCasesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19261
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
19262
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
19263
|
-
i0.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
|
|
19264
|
-
i0.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
|
|
19265
|
-
i0.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
|
|
19266
|
-
i0.ɵɵelementStart(6, "p", 5);
|
|
19267
|
-
i0.ɵɵelementStart(7, "a", 6);
|
|
19268
|
-
i0.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
|
|
19269
|
-
i0.ɵɵtext(8, "Go back to the Linked cases tab");
|
|
19270
|
-
i0.ɵɵelementEnd();
|
|
19271
|
-
i0.ɵɵelementEnd();
|
|
19272
|
-
i0.ɵɵelementStart(9, "div", 7);
|
|
19273
|
-
i0.ɵɵelementStart(10, "button", 8);
|
|
19274
|
-
i0.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
|
|
19275
|
-
i0.ɵɵtext(11, "Back");
|
|
19276
|
-
i0.ɵɵelementEnd();
|
|
19277
|
-
i0.ɵɵelementEnd();
|
|
19278
|
-
i0.ɵɵelementEnd();
|
|
19279
|
-
i0.ɵɵelementEnd();
|
|
19280
|
-
} if (rf & 2) {
|
|
19281
|
-
const _r2 = i0.ɵɵreference(5);
|
|
19282
|
-
i0.ɵɵadvance(2);
|
|
19283
|
-
i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
|
|
19284
|
-
i0.ɵɵadvance(1);
|
|
19285
|
-
i0.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
|
|
19286
|
-
} }, directives: [i1.NgIf], encapsulation: 2 });
|
|
19287
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoLinkedCasesComponent, [{
|
|
19288
|
-
type: Component,
|
|
19289
|
-
args: [{
|
|
19290
|
-
selector: 'ccd-no-linked-cases',
|
|
19291
|
-
templateUrl: './no-linked-cases.component.html'
|
|
19292
|
-
}]
|
|
19293
|
-
}], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }]; }, null); })();
|
|
19294
|
-
|
|
19295
|
-
function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) { if (rf & 1) {
|
|
19296
|
-
i0.ɵɵelementStart(0, "p", 11);
|
|
19297
|
-
i0.ɵɵelementStart(1, "span", 12);
|
|
19298
|
-
i0.ɵɵtext(2, "Error:");
|
|
19299
|
-
i0.ɵɵelementEnd();
|
|
19300
|
-
i0.ɵɵtext(3);
|
|
19301
|
-
i0.ɵɵelementEnd();
|
|
19302
|
-
} if (rf & 2) {
|
|
19303
|
-
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
19304
|
-
i0.ɵɵadvance(3);
|
|
19305
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
|
|
19306
|
-
} }
|
|
19307
|
-
function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
19308
|
-
const _r6 = i0.ɵɵgetCurrentView();
|
|
19309
|
-
i0.ɵɵelementStart(0, "div", 13);
|
|
19310
|
-
i0.ɵɵelementStart(1, "input", 14);
|
|
19311
|
-
i0.ɵɵlistener("change", function UnLinkCasesComponent_div_0_div_4_div_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(3); return ctx_r5.onChange($event.target); });
|
|
19312
|
-
i0.ɵɵelementEnd();
|
|
19313
|
-
i0.ɵɵelementStart(2, "label", 15);
|
|
19314
|
-
i0.ɵɵtext(3);
|
|
19315
|
-
i0.ɵɵpipe(4, "ccdCaseReference");
|
|
19316
|
-
i0.ɵɵelementEnd();
|
|
19317
|
-
i0.ɵɵelementEnd();
|
|
19318
|
-
} if (rf & 2) {
|
|
19319
|
-
const case_r4 = ctx.$implicit;
|
|
19320
|
-
i0.ɵɵadvance(1);
|
|
19321
|
-
i0.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
|
|
19322
|
-
i0.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
|
|
19323
|
-
i0.ɵɵadvance(1);
|
|
19324
|
-
i0.ɵɵpropertyInterpolate("for", case_r4.caseReference);
|
|
19325
|
-
i0.ɵɵadvance(1);
|
|
19326
|
-
i0.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
|
|
19327
|
-
} }
|
|
19328
|
-
const _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
19329
|
-
function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
19330
|
-
i0.ɵɵelementStart(0, "div", 7);
|
|
19331
|
-
i0.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
|
|
19332
|
-
i0.ɵɵelementStart(2, "div", 9);
|
|
19333
|
-
i0.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
|
|
19334
|
-
i0.ɵɵelementEnd();
|
|
19335
|
-
i0.ɵɵelementEnd();
|
|
19336
|
-
} if (rf & 2) {
|
|
19337
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
19338
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
|
|
19339
|
-
i0.ɵɵadvance(1);
|
|
19340
|
-
i0.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
|
|
19341
|
-
i0.ɵɵadvance(2);
|
|
19342
|
-
i0.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
|
|
19343
|
-
} }
|
|
19344
|
-
function UnLinkCasesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
19345
|
-
const _r8 = i0.ɵɵgetCurrentView();
|
|
19346
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
19347
|
-
i0.ɵɵelementStart(1, "div", 2);
|
|
19348
|
-
i0.ɵɵelementStart(2, "h1", 3);
|
|
19349
|
-
i0.ɵɵtext(3, "Select the cases you want to unlink from this case");
|
|
19350
|
-
i0.ɵɵelementEnd();
|
|
19351
|
-
i0.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
|
|
19352
|
-
i0.ɵɵelementStart(5, "div", 5);
|
|
19353
|
-
i0.ɵɵelementStart(6, "button", 6);
|
|
19354
|
-
i0.ɵɵlistener("click", function UnLinkCasesComponent_div_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onNext(); });
|
|
19355
|
-
i0.ɵɵtext(7, "Next");
|
|
19356
|
-
i0.ɵɵelementEnd();
|
|
19357
|
-
i0.ɵɵelementEnd();
|
|
19358
|
-
i0.ɵɵelementEnd();
|
|
19359
|
-
i0.ɵɵelementEnd();
|
|
19360
|
-
} if (rf & 2) {
|
|
19361
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
19362
|
-
i0.ɵɵadvance(4);
|
|
19363
|
-
i0.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
|
|
19364
|
-
} }
|
|
19365
|
-
class UnLinkCasesComponent {
|
|
19366
|
-
constructor(caseEdit, fb, casesService, linkedCasesService) {
|
|
19367
|
-
this.caseEdit = caseEdit;
|
|
19368
|
-
this.fb = fb;
|
|
19369
|
-
this.casesService = casesService;
|
|
19370
|
-
this.linkedCasesService = linkedCasesService;
|
|
19371
|
-
this.linkedCasesStateEmitter = new EventEmitter();
|
|
19372
|
-
this.notifyAPIFailure = new EventEmitter(false);
|
|
19373
|
-
this.linkedCases = [];
|
|
19374
|
-
this.errorMessages = [];
|
|
19375
|
-
this.isServerError = false;
|
|
19376
|
-
}
|
|
19377
|
-
ngOnInit() {
|
|
19378
|
-
this.getLinkedCases();
|
|
19379
|
-
}
|
|
19380
|
-
getLinkedCases() {
|
|
19381
|
-
this.caseId = this.linkedCasesService.caseId;
|
|
19382
|
-
if (this.linkedCasesService.linkedCases.length > 0) {
|
|
19383
|
-
this.linkedCases = this.linkedCasesService.linkedCases;
|
|
19384
|
-
this.getAllLinkedCaseInformation();
|
|
19385
|
-
}
|
|
19386
|
-
else {
|
|
19387
|
-
this.casesService.getCaseViewV2(this.caseId).subscribe((caseView) => {
|
|
19388
|
-
const linkedCasesTab = caseView.tabs.find(tab => tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID);
|
|
19389
|
-
if (linkedCasesTab) {
|
|
19390
|
-
const linkedCases = linkedCasesTab.fields[0].value;
|
|
19391
|
-
this.linkedCases = linkedCases;
|
|
19392
|
-
this.linkedCasesService.linkedCases = linkedCases;
|
|
19393
|
-
this.getAllLinkedCaseInformation();
|
|
19394
|
-
}
|
|
19395
|
-
});
|
|
19396
|
-
}
|
|
19397
|
-
}
|
|
19398
|
-
getAllLinkedCaseInformation() {
|
|
19399
|
-
const searchCasesResponse = [];
|
|
19400
|
-
this.linkedCases.forEach(linkedCase => {
|
|
19401
|
-
searchCasesResponse.push(this.casesService.getCaseViewV2(linkedCase.caseReference));
|
|
19402
|
-
});
|
|
19403
|
-
if (searchCasesResponse.length) {
|
|
19404
|
-
this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
|
|
19405
|
-
searchCases.forEach((response) => {
|
|
19406
|
-
const linkedCaseFromList = this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id);
|
|
19407
|
-
if (linkedCaseFromList) {
|
|
19408
|
-
const caseName = this.linkedCasesService.getCaseName(response);
|
|
19409
|
-
this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id).caseName = caseName;
|
|
19410
|
-
}
|
|
19411
|
-
});
|
|
19412
|
-
this.initForm();
|
|
19413
|
-
this.linkedCasesService.linkedCases = this.linkedCases;
|
|
19414
|
-
this.isServerError = false;
|
|
19415
|
-
}, err => {
|
|
19416
|
-
this.isServerError = true;
|
|
19417
|
-
this.notifyAPIFailure.emit(true);
|
|
19418
|
-
});
|
|
19419
|
-
}
|
|
19420
|
-
}
|
|
19421
|
-
searchCasesByCaseIds(searchCasesResponse) {
|
|
19422
|
-
return forkJoin(searchCasesResponse);
|
|
19423
|
-
}
|
|
19424
|
-
initForm() {
|
|
19425
|
-
this.unlinkCaseForm = this.fb.group({
|
|
19426
|
-
linkedCases: this.getLinkedCasesFormArray
|
|
19427
|
-
});
|
|
19428
|
-
}
|
|
19429
|
-
get getLinkedCasesFormArray() {
|
|
19430
|
-
const formFieldArray = this.linkedCases.map(val => this.fb.group({
|
|
19431
|
-
caseReference: val.caseReference,
|
|
19432
|
-
reasons: val.reasons,
|
|
19433
|
-
createdDateTime: val.createdDateTime,
|
|
19434
|
-
caseType: val.caseType,
|
|
19435
|
-
caseState: val.caseState,
|
|
19436
|
-
caseService: val.caseService,
|
|
19437
|
-
caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
|
|
19438
|
-
unlink: val.unlink
|
|
19439
|
-
}));
|
|
19440
|
-
return this.fb.array(formFieldArray);
|
|
19441
|
-
}
|
|
19442
|
-
onChange(caseSelected) {
|
|
19443
|
-
this.resetErrorMessages();
|
|
19444
|
-
const selectedCase = this.linkedCases.find(linkedCase => linkedCase.caseReference === caseSelected.value);
|
|
19445
|
-
if (selectedCase) {
|
|
19446
|
-
selectedCase.unlink = caseSelected.checked ? true : false;
|
|
19447
|
-
}
|
|
19448
|
-
}
|
|
19449
|
-
onNext() {
|
|
19450
|
-
this.resetErrorMessages();
|
|
19451
|
-
let navigateToNextPage = true;
|
|
19452
|
-
const casesMarkedToUnlink = this.linkedCases.find(linkedCase => linkedCase.unlink && linkedCase.unlink === true);
|
|
19453
|
-
if (!casesMarkedToUnlink) {
|
|
19454
|
-
this.errorMessages.push({
|
|
19455
|
-
title: 'case-selection',
|
|
19456
|
-
description: LinkedCasesErrorMessages.UnlinkCaseSelectionError,
|
|
19457
|
-
fieldId: `case-reference-${this.linkedCases[0].caseReference}`
|
|
19458
|
-
});
|
|
19459
|
-
this.unlinkErrorMessage = LinkedCasesErrorMessages.UnlinkCaseSelectionError;
|
|
19460
|
-
navigateToNextPage = false;
|
|
19461
|
-
}
|
|
19462
|
-
const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
|
|
19463
|
-
const updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(item => unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1);
|
|
19464
|
-
this.caseEdit.form.controls['data'] = new FormGroup({ caseLinks: new FormControl(updatedLinkedCases || []) });
|
|
19465
|
-
// Return linked cases state and error messages to the parent
|
|
19466
|
-
this.linkedCasesStateEmitter.emit({
|
|
19467
|
-
currentLinkedCasesPage: LinkedCasesPages.UNLINK_CASE,
|
|
19468
|
-
errorMessages: this.errorMessages,
|
|
19469
|
-
navigateToNextPage
|
|
19470
|
-
});
|
|
19471
|
-
}
|
|
19472
|
-
resetErrorMessages() {
|
|
19473
|
-
this.errorMessages = [];
|
|
19474
|
-
this.unlinkErrorMessage = null;
|
|
19475
|
-
}
|
|
19476
|
-
}
|
|
19477
|
-
UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
|
|
19478
|
-
UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
|
|
19479
|
-
UnLinkCasesComponent.ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
19480
|
-
UnLinkCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: UnLinkCasesComponent, selectors: [["ccd-unlink-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter", notifyAPIFailure: "notifyAPIFailure" }, decls: 1, vars: 1, consts: [["class", "govuk-grid-row", 4, "ngIf"], [1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-heading-xl"], ["class", "govuk-form-group form-group", 3, "ngClass", "formGroup", 4, "ngIf"], [1, "govuk-button-group"], ["type", "button", "id", "next-button", 1, "button", "button-primary", 3, "click"], [1, "govuk-form-group", "form-group", 3, "ngClass", "formGroup"], ["id", "unlink-cases-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 4, "ngFor", "ngForOf"], ["id", "unlink-cases-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item"], ["formArrayName", "linkedCases", "name", "linkedCases", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "value", "checked", "change"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"]], template: function UnLinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19481
|
-
i0.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
|
|
19482
|
-
} if (rf & 2) {
|
|
19483
|
-
i0.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
|
|
19484
|
-
} }, directives: [i1.NgIf, i1.NgClass, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgForOf, i2.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
|
|
19485
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UnLinkCasesComponent, [{
|
|
19486
|
-
type: Component,
|
|
19487
|
-
args: [{
|
|
19488
|
-
selector: 'ccd-unlink-cases',
|
|
19489
|
-
templateUrl: './unlink-cases.component.html'
|
|
19490
|
-
}]
|
|
19491
|
-
}], function () { return [{ type: CaseEditComponent }, { type: i2.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
19492
|
-
type: Output
|
|
19493
|
-
}], notifyAPIFailure: [{
|
|
19494
|
-
type: Output
|
|
19495
|
-
}] }); })();
|
|
19496
|
-
|
|
19497
|
-
function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
19498
|
-
const _r9 = i0.ɵɵgetCurrentView();
|
|
19499
|
-
i0.ɵɵelementStart(0, "div", 7);
|
|
19500
|
-
i0.ɵɵelementStart(1, "ul", 8);
|
|
19501
|
-
i0.ɵɵelementStart(2, "li");
|
|
19502
|
-
i0.ɵɵelementStart(3, "a", 9);
|
|
19503
|
-
i0.ɵɵlistener("click", function WriteLinkedCasesComponent_div_0_div_3_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r9); const errorMessage_r7 = ctx.$implicit; const ctx_r8 = i0.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
|
|
19504
|
-
i0.ɵɵtext(4);
|
|
19505
|
-
i0.ɵɵelementEnd();
|
|
19506
|
-
i0.ɵɵelementEnd();
|
|
19507
|
-
i0.ɵɵelementEnd();
|
|
19508
|
-
i0.ɵɵelementEnd();
|
|
19509
|
-
} if (rf & 2) {
|
|
19510
|
-
const errorMessage_r7 = ctx.$implicit;
|
|
19511
|
-
i0.ɵɵadvance(4);
|
|
19512
|
-
i0.ɵɵtextInterpolate(errorMessage_r7.description);
|
|
19513
|
-
} }
|
|
19514
|
-
function WriteLinkedCasesComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
19515
|
-
i0.ɵɵelementStart(0, "div", 4);
|
|
19516
|
-
i0.ɵɵelementStart(1, "h2", 5);
|
|
19517
|
-
i0.ɵɵtext(2, " There is a problem ");
|
|
19518
|
-
i0.ɵɵelementEnd();
|
|
19519
|
-
i0.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
|
|
19520
|
-
i0.ɵɵelementEnd();
|
|
19521
|
-
} if (rf & 2) {
|
|
19522
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
19523
|
-
i0.ɵɵadvance(3);
|
|
19524
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
|
|
19525
|
-
} }
|
|
19526
|
-
function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
19527
|
-
const _r11 = i0.ɵɵgetCurrentView();
|
|
19528
|
-
i0.ɵɵelementContainerStart(0);
|
|
19529
|
-
i0.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
|
|
19530
|
-
i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_3_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.onLinkedCasesStateEmitted($event); });
|
|
19531
|
-
i0.ɵɵelementEnd();
|
|
19532
|
-
i0.ɵɵelementContainerEnd();
|
|
19533
|
-
} }
|
|
19534
|
-
function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
|
|
19535
|
-
const _r13 = i0.ɵɵgetCurrentView();
|
|
19536
|
-
i0.ɵɵelementContainerStart(0);
|
|
19537
|
-
i0.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
|
|
19538
|
-
i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_4_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.onLinkedCasesStateEmitted($event); });
|
|
19539
|
-
i0.ɵɵelementEnd();
|
|
19540
|
-
i0.ɵɵelementContainerEnd();
|
|
19541
|
-
} }
|
|
19542
|
-
function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
19543
|
-
const _r15 = i0.ɵɵgetCurrentView();
|
|
19544
|
-
i0.ɵɵelementContainerStart(0);
|
|
19545
|
-
i0.ɵɵelementStart(1, "ccd-link-cases", 10);
|
|
19546
|
-
i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_5_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.onLinkedCasesStateEmitted($event); });
|
|
19547
|
-
i0.ɵɵelementEnd();
|
|
19548
|
-
i0.ɵɵelementContainerEnd();
|
|
19549
|
-
} }
|
|
19550
|
-
function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
|
|
19551
|
-
const _r17 = i0.ɵɵgetCurrentView();
|
|
19552
|
-
i0.ɵɵelementContainerStart(0);
|
|
19553
|
-
i0.ɵɵelementStart(1, "ccd-unlink-cases", 10);
|
|
19554
|
-
i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
|
|
19555
|
-
i0.ɵɵelementEnd();
|
|
19556
|
-
i0.ɵɵelementContainerEnd();
|
|
19557
|
-
} }
|
|
19558
|
-
function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
|
|
19559
|
-
const _r19 = i0.ɵɵgetCurrentView();
|
|
19560
|
-
i0.ɵɵelementContainerStart(0);
|
|
19561
|
-
i0.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
|
|
19562
|
-
i0.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_7_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.onLinkedCasesStateEmitted($event); });
|
|
19563
|
-
i0.ɵɵelementEnd();
|
|
19564
|
-
i0.ɵɵelementContainerEnd();
|
|
19565
|
-
} }
|
|
19566
|
-
class WriteLinkedCasesComponent extends AbstractFieldWriteComponent {
|
|
19567
|
-
constructor(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
|
|
19568
|
-
super();
|
|
19569
|
-
this.caseEdit = caseEdit;
|
|
19570
|
-
this.appConfig = appConfig;
|
|
19571
|
-
this.commonDataService = commonDataService;
|
|
19572
|
-
this.casesService = casesService;
|
|
19573
|
-
this.linkedCasesService = linkedCasesService;
|
|
19574
|
-
this.caseEditDataService = caseEditDataService;
|
|
19575
|
-
this.onLinkedCasesSelected = new EventEmitter();
|
|
19576
|
-
this.isLinkedCasesJourney = false;
|
|
19577
|
-
this.linkedCasesPages = LinkedCasesPages;
|
|
19578
|
-
this.linkedCasesEventTriggers = LinkedCasesEventTriggers;
|
|
19579
|
-
this.linkedCases = [];
|
|
19580
|
-
this.errorMessages = [];
|
|
19581
|
-
}
|
|
19582
|
-
ngOnInit() {
|
|
19583
|
-
this.caseEditDataService.clearFormValidationErrors();
|
|
19584
|
-
this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
|
|
19585
|
-
this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
|
|
19586
|
-
this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
|
|
19587
|
-
this.linkedCasesService.editMode = false;
|
|
19588
|
-
const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
|
|
19589
|
-
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
19590
|
-
next: reasons => {
|
|
19591
|
-
this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
|
|
19592
|
-
}
|
|
19593
|
-
});
|
|
19594
|
-
this.getLinkedCases();
|
|
19595
|
-
this.caseEditDataService.caseEventTriggerName$.subscribe({
|
|
19596
|
-
next: name => {
|
|
19597
|
-
this.linkedCasesService.isLinkedCasesEventTrigger
|
|
19598
|
-
= (name === LinkedCasesEventTriggers.LINK_CASES);
|
|
19599
|
-
}
|
|
19600
|
-
});
|
|
19601
|
-
}
|
|
19602
|
-
ngAfterViewInit() {
|
|
19603
|
-
let labelField = document.getElementsByClassName('govuk-heading-l');
|
|
19604
|
-
if (labelField && labelField.length) {
|
|
19605
|
-
labelField[0].replaceWith('');
|
|
19606
|
-
}
|
|
19607
|
-
labelField = document.getElementsByClassName('heading-h2');
|
|
19608
|
-
if (labelField && labelField.length) {
|
|
19609
|
-
labelField[0].replaceWith('');
|
|
19610
|
-
}
|
|
19611
|
-
}
|
|
19612
|
-
onLinkedCasesStateEmitted(linkedCasesState) {
|
|
19613
|
-
this.errorMessages = [];
|
|
19614
|
-
this.caseEditDataService.clearFormValidationErrors();
|
|
19615
|
-
if (linkedCasesState.navigateToNextPage) {
|
|
19616
|
-
this.linkedCasesPage = this.getNextPage(linkedCasesState);
|
|
19617
|
-
this.setContinueButtonValidationErrorMessage();
|
|
19618
|
-
this.proceedToNextPage();
|
|
19619
|
-
}
|
|
19620
|
-
else {
|
|
19621
|
-
if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
|
|
19622
|
-
linkedCasesState.errorMessages.forEach((errorMessage, index) => {
|
|
19623
|
-
this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
|
|
19624
|
-
});
|
|
19625
|
-
}
|
|
19626
|
-
}
|
|
19627
|
-
}
|
|
19628
|
-
isAtFinalState() {
|
|
19629
|
-
return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
|
|
19630
|
-
}
|
|
19631
|
-
setContinueButtonValidationErrorMessage() {
|
|
19632
|
-
const errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
|
|
19633
|
-
? LinkedCasesErrorMessages.LinkCasesNavigationError
|
|
19634
|
-
: LinkedCasesErrorMessages.UnlinkCasesNavigationError;
|
|
19635
|
-
const buttonId = this.linkedCasesService.linkedCases.length === 0
|
|
19636
|
-
? 'back-button'
|
|
19637
|
-
: 'next-button';
|
|
19638
|
-
this.caseEditDataService.setCaseLinkError({
|
|
19639
|
-
componentId: buttonId,
|
|
19640
|
-
errorMessage
|
|
19641
|
-
});
|
|
19642
|
-
}
|
|
19643
|
-
proceedToNextPage() {
|
|
19644
|
-
if (this.isAtFinalPage()) {
|
|
19645
|
-
// Continue button event must be allowed in final page
|
|
19646
|
-
this.caseEditDataService.clearCaseLinkError();
|
|
19647
|
-
// Trigger validation to clear the "notAtFinalPage" error if now at the final state
|
|
19648
|
-
this.formGroup.updateValueAndValidity();
|
|
19649
|
-
// update form value
|
|
19650
|
-
this.onLinkedCasesSelected.emit();
|
|
19651
|
-
this.caseEdit.form.controls['data'] = new FormGroup({ caseLinks: new FormControl(this.linkedCasesService.caseFieldValue) });
|
|
19652
|
-
}
|
|
19653
|
-
}
|
|
19654
|
-
isAtFinalPage() {
|
|
19655
|
-
return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
|
|
19656
|
-
}
|
|
19657
|
-
getNextPage(linkedCasesState) {
|
|
19658
|
-
if ((this.linkedCasesPage === LinkedCasesPages.BEFORE_YOU_START) ||
|
|
19659
|
-
(linkedCasesState.currentLinkedCasesPage === LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
|
|
19660
|
-
return this.isLinkedCasesJourney
|
|
19661
|
-
? LinkedCasesPages.LINK_CASE
|
|
19662
|
-
: LinkedCasesPages.UNLINK_CASE;
|
|
19663
|
-
}
|
|
19664
|
-
return LinkedCasesPages.CHECK_YOUR_ANSWERS;
|
|
19665
|
-
}
|
|
19666
|
-
getLinkedCases() {
|
|
19667
|
-
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
|
|
19668
|
-
const caseViewFiltered = caseView.tabs.filter(tab => {
|
|
19669
|
-
const linkField = tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
|
|
19670
|
-
return linkField;
|
|
19671
|
-
});
|
|
19672
|
-
if (caseViewFiltered) {
|
|
19673
|
-
const caseLinkFieldValue = caseViewFiltered.map(filtered => filtered.fields.length && filtered.fields[0].value);
|
|
19674
|
-
this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
|
|
19675
|
-
this.linkedCasesService.getAllLinkedCaseInformation();
|
|
19676
|
-
}
|
|
19677
|
-
// Initialise the first page to display
|
|
19678
|
-
this.linkedCasesPage = this.linkedCasesService.isLinkedCasesEventTrigger ||
|
|
19679
|
-
(this.linkedCasesService.caseFieldValue && this.linkedCasesService.caseFieldValue.length > 0
|
|
19680
|
-
&& !this.linkedCasesService.serverLinkedApiError)
|
|
19681
|
-
? LinkedCasesPages.BEFORE_YOU_START
|
|
19682
|
-
: LinkedCasesPages.NO_LINKED_CASES;
|
|
19683
|
-
// Initialise the error to be displayed when clicked on Continue button
|
|
19684
|
-
this.setContinueButtonValidationErrorMessage();
|
|
19685
|
-
});
|
|
19686
|
-
}
|
|
19687
|
-
navigateToErrorElement(elementId) {
|
|
19688
|
-
if (elementId) {
|
|
19689
|
-
const htmlElement = document.getElementById(elementId);
|
|
19690
|
-
if (htmlElement) {
|
|
19691
|
-
htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
19692
|
-
htmlElement.focus();
|
|
19693
|
-
}
|
|
19694
|
-
}
|
|
19695
|
-
}
|
|
19696
|
-
}
|
|
19697
|
-
WriteLinkedCasesComponent.ɵfac = function WriteLinkedCasesComponent_Factory(t) { return new (t || WriteLinkedCasesComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
19698
|
-
WriteLinkedCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteLinkedCasesComponent, selectors: [["ccd-write-linked-cases"]], inputs: { caseFields: "caseFields", caseField: "caseField", isLinkedCasesJourney: "isLinkedCasesJourney", formGroup: "formGroup" }, outputs: { onLinkedCasesSelected: "onLinkedCasesSelected" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19699
|
-
i0.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
|
|
19700
|
-
i0.ɵɵelementStart(1, "div", 1);
|
|
19701
|
-
i0.ɵɵelementStart(2, "div", 2);
|
|
19702
|
-
i0.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
|
|
19703
|
-
i0.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
|
|
19704
|
-
i0.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
|
|
19705
|
-
i0.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
|
|
19706
|
-
i0.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
|
|
19707
|
-
i0.ɵɵelementEnd();
|
|
19708
|
-
i0.ɵɵelementEnd();
|
|
19709
|
-
} if (rf & 2) {
|
|
19710
|
-
i0.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
|
|
19711
|
-
i0.ɵɵadvance(1);
|
|
19712
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
19713
|
-
i0.ɵɵadvance(1);
|
|
19714
|
-
i0.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
|
|
19715
|
-
i0.ɵɵadvance(1);
|
|
19716
|
-
i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
|
|
19717
|
-
i0.ɵɵadvance(1);
|
|
19718
|
-
i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
|
|
19719
|
-
i0.ɵɵadvance(1);
|
|
19720
|
-
i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
|
|
19721
|
-
i0.ɵɵadvance(1);
|
|
19722
|
-
i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
|
|
19723
|
-
i0.ɵɵadvance(1);
|
|
19724
|
-
i0.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
|
|
19725
|
-
} }, encapsulation: 2 });
|
|
19726
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
|
|
19727
|
-
type: Component,
|
|
19728
|
-
args: [{
|
|
19729
|
-
selector: 'ccd-write-linked-cases',
|
|
19730
|
-
templateUrl: './write-linked-cases.component.html'
|
|
19731
|
-
}]
|
|
19732
|
-
}], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
|
|
19733
|
-
type: Input
|
|
19734
|
-
}], caseField: [{
|
|
19735
|
-
type: Input
|
|
19736
|
-
}], onLinkedCasesSelected: [{
|
|
19737
|
-
type: Output
|
|
19738
|
-
}], isLinkedCasesJourney: [{
|
|
19739
|
-
type: Input
|
|
19740
|
-
}], formGroup: [{
|
|
19741
|
-
type: Input
|
|
19742
|
-
}] }); })();
|
|
19743
|
-
|
|
19744
|
-
function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
|
|
19745
|
-
i0.ɵɵelementContainer(0);
|
|
19746
|
-
} }
|
|
19747
|
-
function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) { if (rf & 1) {
|
|
19748
|
-
i0.ɵɵelementContainer(0);
|
|
19749
|
-
} }
|
|
19750
|
-
function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) { if (rf & 1) {
|
|
19751
|
-
i0.ɵɵelementContainer(0);
|
|
19752
|
-
} }
|
|
19753
|
-
function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) { if (rf & 1) {
|
|
19754
|
-
i0.ɵɵelementContainer(0);
|
|
19755
|
-
} }
|
|
19756
|
-
function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
|
|
19757
|
-
const _r9 = i0.ɵɵgetCurrentView();
|
|
19758
|
-
i0.ɵɵelementStart(0, "div", 8);
|
|
19759
|
-
i0.ɵɵelementStart(1, "p", 9);
|
|
19760
|
-
i0.ɵɵtext(2);
|
|
19761
|
-
i0.ɵɵelementEnd();
|
|
19762
|
-
i0.ɵɵelementStart(3, "span", 10);
|
|
19763
|
-
i0.ɵɵelementStart(4, "a", 11);
|
|
19764
|
-
i0.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_16_Template_a_click_4_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.reloadCurrentRoute(); });
|
|
19765
|
-
i0.ɵɵtext(5, "Reload the Linked cases tab");
|
|
19766
|
-
i0.ɵɵelementEnd();
|
|
19767
|
-
i0.ɵɵelementEnd();
|
|
19768
|
-
i0.ɵɵelementEnd();
|
|
19769
|
-
} if (rf & 2) {
|
|
19770
|
-
const ctx_r5 = i0.ɵɵnextContext();
|
|
19771
|
-
i0.ɵɵadvance(2);
|
|
19772
|
-
i0.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
|
|
19773
|
-
} }
|
|
19774
|
-
function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) { if (rf & 1) {
|
|
19775
|
-
const _r11 = i0.ɵɵgetCurrentView();
|
|
19776
|
-
i0.ɵɵelementStart(0, "div", 8);
|
|
19777
|
-
i0.ɵɵelementStart(1, "p", 9);
|
|
19778
|
-
i0.ɵɵtext(2);
|
|
19779
|
-
i0.ɵɵelementEnd();
|
|
19780
|
-
i0.ɵɵelementStart(3, "span", 10);
|
|
19781
|
-
i0.ɵɵelementStart(4, "a", 11);
|
|
19782
|
-
i0.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_18_Template_a_click_4_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.reloadCurrentRoute(); });
|
|
19783
|
-
i0.ɵɵtext(5, "Reload the Linked cases tab");
|
|
19784
|
-
i0.ɵɵelementEnd();
|
|
19785
|
-
i0.ɵɵelementEnd();
|
|
19786
|
-
i0.ɵɵelementEnd();
|
|
19787
|
-
} if (rf & 2) {
|
|
19788
|
-
const ctx_r7 = i0.ɵɵnextContext();
|
|
19789
|
-
i0.ɵɵadvance(2);
|
|
19790
|
-
i0.ɵɵtextInterpolate(ctx_r7.serverError.message);
|
|
19791
|
-
} }
|
|
19792
|
-
class ReadLinkedCasesComponent {
|
|
19793
|
-
constructor(router, linkedCasesService, appConfig, commonDataService) {
|
|
19794
|
-
this.router = router;
|
|
19795
|
-
this.linkedCasesService = linkedCasesService;
|
|
19796
|
-
this.appConfig = appConfig;
|
|
19797
|
-
this.commonDataService = commonDataService;
|
|
19798
|
-
this.reasonListLoaded = false;
|
|
19799
|
-
this.reload = false;
|
|
19800
|
-
this.serverError = null;
|
|
19801
|
-
this.serverLinkedApiError = null;
|
|
19802
|
-
this.isServerReasonCodeError = false;
|
|
19803
|
-
this.isServerJurisdictionError = false;
|
|
19804
|
-
this.isServerLinkedFromError = false;
|
|
19805
|
-
this.isServerLinkedToError = false;
|
|
19806
|
-
}
|
|
19807
|
-
ngOnInit() {
|
|
19808
|
-
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
19809
|
-
const reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
|
|
19810
|
-
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
19811
|
-
next: reasons => {
|
|
19812
|
-
this.reasonListLoaded = true;
|
|
19813
|
-
this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
|
|
19814
|
-
},
|
|
19815
|
-
error: error => {
|
|
19816
|
-
this.isServerReasonCodeError = true;
|
|
19817
|
-
this.linkedCasesService.isServerReasonCodeError = true;
|
|
19818
|
-
}
|
|
19819
|
-
});
|
|
19820
|
-
this.serverLinkedApiError = {
|
|
19821
|
-
id: 'backendError', message: 'Some case information is not available at the moment'
|
|
19822
|
-
};
|
|
19823
|
-
this.serverError = {
|
|
19824
|
-
id: 'backendError', message: 'There has been a system error and your request could not be processed.'
|
|
19825
|
-
};
|
|
19826
|
-
}
|
|
19827
|
-
ngAfterViewInit() {
|
|
19828
|
-
this.linkedCasesService.caseFieldValue = this.caseField.value || [];
|
|
19829
|
-
let labelField = document.getElementsByClassName('govuk-heading-l');
|
|
19830
|
-
if (labelField && labelField.length) {
|
|
19831
|
-
labelField[0].replaceWith('');
|
|
19832
|
-
}
|
|
19833
|
-
labelField = document.getElementsByClassName('heading-h2');
|
|
19834
|
-
if (labelField && labelField.length) {
|
|
19835
|
-
labelField[0].replaceWith('');
|
|
19836
|
-
}
|
|
19837
|
-
labelField = document.getElementsByClassName('case-viewer-label');
|
|
19838
|
-
if (labelField && labelField.length) {
|
|
19839
|
-
labelField[0].replaceWith('');
|
|
19840
|
-
}
|
|
19841
|
-
}
|
|
19842
|
-
reloadCurrentRoute() {
|
|
19843
|
-
this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(() => {
|
|
19844
|
-
window.location.hash = 'Linked cases';
|
|
19845
|
-
});
|
|
19846
|
-
}
|
|
19847
|
-
getFailureLinkedToNotification(evt) {
|
|
19848
|
-
this.isServerLinkedToError = true;
|
|
19849
|
-
}
|
|
19850
|
-
getFailureLinkedFromNotification(evt) {
|
|
19851
|
-
this.isServerLinkedFromError = true;
|
|
19852
|
-
}
|
|
19853
|
-
}
|
|
19854
|
-
ReadLinkedCasesComponent.ɵfac = function ReadLinkedCasesComponent_Factory(t) { return new (t || ReadLinkedCasesComponent)(i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService)); };
|
|
19855
|
-
ReadLinkedCasesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadLinkedCasesComponent, selectors: [["ccd-read-linked-cases"]], inputs: { caseField: "caseField" }, decls: 20, vars: 10, consts: [[1, "govuk-!-margin-bottom-2"], [1, "heading-h1"], [1, "table-sub-heading"], ["reloadPage", "reload", 3, "caseField", "notifyAPIFailure"], [4, "ngIf", "ngIfThen"], [1, "govuk-!-margin-top-8"], ["singleApiError", ""], ["multiApisError", ""], [1, "govuk-main-wrapper"], [1, "govuk-body"], [1, "govuk-body", "align-left"], ["href", "javascript:void(0)", "id", "reload-linked-cases-tab", 1, "govuk-link", 3, "click"]], template: function ReadLinkedCasesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19856
|
-
i0.ɵɵelementStart(0, "div");
|
|
19857
|
-
i0.ɵɵelementStart(1, "div", 0);
|
|
19858
|
-
i0.ɵɵelementStart(2, "h1", 1);
|
|
19859
|
-
i0.ɵɵtext(3, "Linked cases");
|
|
19860
|
-
i0.ɵɵelementEnd();
|
|
19861
|
-
i0.ɵɵelementStart(4, "label", 2);
|
|
19862
|
-
i0.ɵɵtext(5, "This case is linked to");
|
|
19863
|
-
i0.ɵɵelementEnd();
|
|
19864
|
-
i0.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
|
|
19865
|
-
i0.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
|
|
19866
|
-
i0.ɵɵelementEnd();
|
|
19867
|
-
i0.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
|
|
19868
|
-
i0.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
|
|
19869
|
-
i0.ɵɵelementEnd();
|
|
19870
|
-
i0.ɵɵelementStart(9, "div", 5);
|
|
19871
|
-
i0.ɵɵelementStart(10, "label", 2);
|
|
19872
|
-
i0.ɵɵtext(11, "This case is linked from");
|
|
19873
|
-
i0.ɵɵelementEnd();
|
|
19874
|
-
i0.ɵɵelement(12, "br");
|
|
19875
|
-
i0.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
|
|
19876
|
-
i0.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
|
|
19877
|
-
i0.ɵɵelementEnd();
|
|
19878
|
-
i0.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
|
|
19879
|
-
i0.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
|
|
19880
|
-
i0.ɵɵelementEnd();
|
|
19881
|
-
i0.ɵɵelementEnd();
|
|
19882
|
-
i0.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
|
|
19883
|
-
i0.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
|
|
19884
|
-
} if (rf & 2) {
|
|
19885
|
-
const _r4 = i0.ɵɵreference(17);
|
|
19886
|
-
const _r6 = i0.ɵɵreference(19);
|
|
19887
|
-
i0.ɵɵadvance(6);
|
|
19888
|
-
i0.ɵɵproperty("caseField", ctx.caseField);
|
|
19889
|
-
i0.ɵɵadvance(1);
|
|
19890
|
-
i0.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
|
|
19891
|
-
i0.ɵɵadvance(1);
|
|
19892
|
-
i0.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
|
|
19893
|
-
i0.ɵɵadvance(5);
|
|
19894
|
-
i0.ɵɵproperty("caseField", ctx.caseField);
|
|
19895
|
-
i0.ɵɵadvance(1);
|
|
19896
|
-
i0.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
|
|
19897
|
-
i0.ɵɵadvance(1);
|
|
19898
|
-
i0.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
|
|
19899
|
-
} }, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
|
|
19900
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
|
|
19901
|
-
type: Component,
|
|
19902
|
-
args: [{
|
|
19903
|
-
selector: 'ccd-read-linked-cases',
|
|
19904
|
-
templateUrl: './read-linked-cases.component.html',
|
|
19905
|
-
styleUrls: ['./read-linked-cases.component.scss']
|
|
19906
|
-
}]
|
|
19907
|
-
}], function () { return [{ type: i1$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
|
|
19908
|
-
type: Input
|
|
19909
|
-
}] }); })();
|
|
19910
|
-
|
|
19911
|
-
class LinkCaseReason {
|
|
19912
|
-
}
|
|
19913
|
-
class CCDCaseLinkType {
|
|
19914
|
-
}
|
|
19915
|
-
class CaseLink {
|
|
19916
|
-
}
|
|
19917
|
-
class LinkReason {
|
|
19918
|
-
}
|
|
19919
|
-
class LinkedCasesResponse {
|
|
19920
|
-
}
|
|
19921
|
-
class CaseLinkResponse {
|
|
19922
|
-
}
|
|
19923
|
-
class LinkDetails {
|
|
19924
|
-
}
|
|
19925
|
-
class Terms {
|
|
19926
|
-
}
|
|
19927
|
-
class ESQueryType {
|
|
19928
|
-
}
|
|
19929
|
-
|
|
19930
17619
|
class CollectionCreateCheckerService {
|
|
19931
17620
|
setDisplayContextForChildren(caseField, profile) {
|
|
19932
17621
|
const children = this.getCaseFieldChildren(caseField);
|
|
@@ -21695,7 +19384,6 @@ const PALETTE_COMPONENTS = [
|
|
|
21695
19384
|
ReadComplexFieldTableComponent,
|
|
21696
19385
|
ReadComplexFieldCollectionTableComponent,
|
|
21697
19386
|
ReadCaseFlagFieldComponent,
|
|
21698
|
-
ReadLinkedCasesComponent,
|
|
21699
19387
|
// Write
|
|
21700
19388
|
WriteJudicialUserFieldComponent,
|
|
21701
19389
|
WriteAddressFieldComponent,
|
|
@@ -21731,15 +19419,7 @@ const PALETTE_COMPONENTS = [
|
|
|
21731
19419
|
CaseFileViewFolderSortComponent,
|
|
21732
19420
|
CaseFileViewOverlayMenuComponent,
|
|
21733
19421
|
CaseFileViewFolderDocumentActionsComponent,
|
|
21734
|
-
CaseFileViewFolderSelectorComponent
|
|
21735
|
-
LinkedCasesToTableComponent,
|
|
21736
|
-
LinkedCasesFromTableComponent,
|
|
21737
|
-
BeforeYouStartComponent,
|
|
21738
|
-
LinkCasesComponent,
|
|
21739
|
-
CheckYourAnswersComponent,
|
|
21740
|
-
WriteLinkedCasesComponent,
|
|
21741
|
-
UnLinkCasesComponent,
|
|
21742
|
-
NoLinkedCasesComponent
|
|
19422
|
+
CaseFileViewFolderSelectorComponent
|
|
21743
19423
|
];
|
|
21744
19424
|
class PaletteModule {
|
|
21745
19425
|
}
|
|
@@ -21755,7 +19435,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
21755
19435
|
FileUploadStateService,
|
|
21756
19436
|
FileUploadProgressGuard,
|
|
21757
19437
|
WindowService,
|
|
21758
|
-
LinkedCasesService,
|
|
21759
19438
|
CommonDataService,
|
|
21760
19439
|
JurisdictionService,
|
|
21761
19440
|
{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -21850,7 +19529,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
21850
19529
|
ReadComplexFieldTableComponent,
|
|
21851
19530
|
ReadComplexFieldCollectionTableComponent,
|
|
21852
19531
|
ReadCaseFlagFieldComponent,
|
|
21853
|
-
ReadLinkedCasesComponent,
|
|
21854
19532
|
// Write
|
|
21855
19533
|
WriteJudicialUserFieldComponent,
|
|
21856
19534
|
WriteAddressFieldComponent,
|
|
@@ -21886,15 +19564,7 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
21886
19564
|
CaseFileViewFolderSortComponent,
|
|
21887
19565
|
CaseFileViewOverlayMenuComponent,
|
|
21888
19566
|
CaseFileViewFolderDocumentActionsComponent,
|
|
21889
|
-
CaseFileViewFolderSelectorComponent,
|
|
21890
|
-
LinkedCasesToTableComponent,
|
|
21891
|
-
LinkedCasesFromTableComponent,
|
|
21892
|
-
BeforeYouStartComponent,
|
|
21893
|
-
LinkCasesComponent,
|
|
21894
|
-
CheckYourAnswersComponent,
|
|
21895
|
-
WriteLinkedCasesComponent,
|
|
21896
|
-
UnLinkCasesComponent,
|
|
21897
|
-
NoLinkedCasesComponent], imports: [CommonModule,
|
|
19567
|
+
CaseFileViewFolderSelectorComponent], imports: [CommonModule,
|
|
21898
19568
|
RouterModule,
|
|
21899
19569
|
FormsModule,
|
|
21900
19570
|
ReactiveFormsModule,
|
|
@@ -21968,7 +19638,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
21968
19638
|
ReadComplexFieldTableComponent,
|
|
21969
19639
|
ReadComplexFieldCollectionTableComponent,
|
|
21970
19640
|
ReadCaseFlagFieldComponent,
|
|
21971
|
-
ReadLinkedCasesComponent,
|
|
21972
19641
|
// Write
|
|
21973
19642
|
WriteJudicialUserFieldComponent,
|
|
21974
19643
|
WriteAddressFieldComponent,
|
|
@@ -22004,15 +19673,7 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
22004
19673
|
CaseFileViewFolderSortComponent,
|
|
22005
19674
|
CaseFileViewOverlayMenuComponent,
|
|
22006
19675
|
CaseFileViewFolderDocumentActionsComponent,
|
|
22007
|
-
CaseFileViewFolderSelectorComponent
|
|
22008
|
-
LinkedCasesToTableComponent,
|
|
22009
|
-
LinkedCasesFromTableComponent,
|
|
22010
|
-
BeforeYouStartComponent,
|
|
22011
|
-
LinkCasesComponent,
|
|
22012
|
-
CheckYourAnswersComponent,
|
|
22013
|
-
WriteLinkedCasesComponent,
|
|
22014
|
-
UnLinkCasesComponent,
|
|
22015
|
-
NoLinkedCasesComponent] }); })();
|
|
19676
|
+
CaseFileViewFolderSelectorComponent] }); })();
|
|
22016
19677
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteModule, [{
|
|
22017
19678
|
type: NgModule,
|
|
22018
19679
|
args: [{
|
|
@@ -22082,7 +19743,6 @@ PaletteModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
|
22082
19743
|
FileUploadStateService,
|
|
22083
19744
|
FileUploadProgressGuard,
|
|
22084
19745
|
WindowService,
|
|
22085
|
-
LinkedCasesService,
|
|
22086
19746
|
CommonDataService,
|
|
22087
19747
|
JurisdictionService,
|
|
22088
19748
|
{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -22100,7 +19760,6 @@ i0.ɵɵsetComponentScope(ReadOrganisationFieldComponent, [i1.NgSwitch, i1.NgSwit
|
|
|
22100
19760
|
i0.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i1.NgForOf, ReadOrderSummaryRowComponent,
|
|
22101
19761
|
ReadMoneyGbpFieldComponent], []);
|
|
22102
19762
|
i0.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], []);
|
|
22103
|
-
i0.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i1.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
|
|
22104
19763
|
i0.ɵɵsetComponentScope(ReadComplexFieldComponent, [i1.NgSwitch, i1.NgSwitchCase, ReadComplexFieldRawComponent,
|
|
22105
19764
|
ReadComplexFieldCollectionTableComponent, i1.NgSwitchDefault, ReadComplexFieldTableComponent], []);
|
|
22106
19765
|
i0.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i1.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe]);
|
|
@@ -22108,7 +19767,6 @@ i0.ɵɵsetComponentScope(ReadComplexFieldTableComponent, [i1.NgForOf, i1.NgIf, F
|
|
|
22108
19767
|
i0.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i1.NgForOf, i1.NgIf, FieldReadComponent,
|
|
22109
19768
|
ReadCaseLinkFieldComponent], [ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i1.KeyValuePipe, IsCompoundPipe]);
|
|
22110
19769
|
i0.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i1.NgSwitch, i1.NgSwitchCase, CaseFlagSummaryListComponent, i1.NgSwitchDefault, i1.NgForOf, i1.NgIf, CaseFlagTableComponent], []);
|
|
22111
|
-
i0.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i1.NgIf, LinkedCasesFromTableComponent], []);
|
|
22112
19770
|
i0.ɵɵsetComponentScope(WriteAddressFieldComponent, [i1.NgIf, i1.NgClass, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i2.SelectControlValueAccessor, i1.NgForOf, i2.NgSelectOption, i2.ɵangular_packages_forms_forms_z, WriteComplexFieldComponent, i2.NgControlStatusGroup, i2.FormGroupDirective], [FieldLabelPipe]);
|
|
22113
19771
|
i0.ɵɵsetComponentScope(WriteComplexFieldComponent, [i1.NgIf, i1.NgForOf, i1.NgSwitch, i1.NgSwitchCase, FieldReadComponent, LabelSubstitutorDirective, i2.NgControlStatusGroup, i2.FormGroupDirective, FieldWriteComponent], [FieldLabelPipe, IsReadOnlyPipe]);
|
|
22114
19772
|
i0.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i1.NgClass, i1.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe]);
|
|
@@ -22123,21 +19781,11 @@ i0.ɵɵsetComponentScope(WriteOrganisationFieldComponent, [i2.NgControlStatusGro
|
|
|
22123
19781
|
WriteOrganisationComplexFieldComponent], [i1.AsyncPipe]);
|
|
22124
19782
|
i0.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
|
|
22125
19783
|
i0.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i1.NgIf, DatetimePickerComponent, i2.NgControlStatusGroup, i2.FormGroupDirective, WriteDateFieldComponent], []);
|
|
22126
|
-
i0.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective, WriteLinkedCasesComponent, i2.NgControlStatusGroup, i2.FormGroupDirective], [FieldLabelPipe]);
|
|
22127
19784
|
i0.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1.NgIf, i1.NgForOf, FieldWriteComponent, i2.NgControlStatusGroup, i2.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
|
|
22128
19785
|
i0.ɵɵsetComponentScope(
|
|
22129
19786
|
// ComponentLauncher web components
|
|
22130
|
-
CaseFileViewFieldComponent, [i1.NgIf, CaseFileViewFolderComponent,
|
|
22131
|
-
i0.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1.NgIf, CaseFileViewFolderComponent,
|
|
22132
|
-
i0.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1.NgIf, i1.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
22133
|
-
i0.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1.NgIf, i1.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
22134
|
-
i0.ɵɵsetComponentScope(LinkCasesComponent, [i1.NgIf, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgClass, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlName, i2.FormArrayName, i1.NgForOf, i2.FormGroupName, i2.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
22135
|
-
i0.ɵɵsetComponentScope(CheckYourAnswersComponent, [i1.NgIf, i1.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
22136
|
-
i0.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i1.NgIf, i1.NgForOf, i2.NgControlStatusGroup, i2.FormGroupDirective, i1.NgSwitch, i1.NgSwitchCase, BeforeYouStartComponent,
|
|
22137
|
-
NoLinkedCasesComponent,
|
|
22138
|
-
LinkCasesComponent,
|
|
22139
|
-
UnLinkCasesComponent,
|
|
22140
|
-
CheckYourAnswersComponent], []);
|
|
19787
|
+
CaseFileViewFieldComponent, [i1.NgIf, CaseFileViewFolderComponent, i11.ɵcs], []);
|
|
19788
|
+
i0.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1.NgIf, CaseFileViewFolderComponent, i11.ɵcs], []);
|
|
22141
19789
|
|
|
22142
19790
|
class Confirmation {
|
|
22143
19791
|
constructor(caseId, status, header, body) {
|
|
@@ -30808,5 +28456,5 @@ class TestRouteSnapshotBuilder {
|
|
|
30808
28456
|
* Generated bundle index. Do not edit.
|
|
30809
28457
|
*/
|
|
30810
28458
|
|
|
30811
|
-
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService,
|
|
28459
|
+
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BodyComponent, BrowserService, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFieldReadComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagFieldState, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagText, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, Embedded, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HasLoadingState, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, MarkdownComponent, MoneyGbpInputComponent, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RouterHelperService, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, TestRouteSnapshotBuilder, UnsupportedFieldComponent, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, textFieldType, viewerRouting };
|
|
30812
28460
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.js.map
|