@hmcts/ccd-case-ui-toolkit 5.0.52-rollback-case-link → 5.0.53-prevent-clear-page-from-cya
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 +2875 -211
- 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 +9 -1
- package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +39 -9
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +28 -1
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +10 -2
- package/esm2015/lib/shared/components/palette/base-field/abstract-form-field.component.js +4 -2
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +125 -0
- package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +198 -0
- package/esm2015/lib/shared/components/palette/case-link/components/index.js +10 -0
- package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +497 -0
- package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +221 -0
- package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +286 -0
- package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +76 -0
- package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +178 -0
- package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +216 -0
- package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +265 -0
- package/esm2015/lib/shared/components/palette/case-link/domain/index.js +3 -0
- package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +2 -0
- package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +19 -0
- package/esm2015/lib/shared/components/palette/case-link/enums/index.js +2 -0
- package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +33 -0
- package/esm2015/lib/shared/components/palette/case-link/index.js +4 -1
- package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +28 -8
- package/esm2015/lib/shared/components/palette/case-link/services/index.js +2 -0
- package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +134 -0
- package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +27 -0
- package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +77 -66
- package/esm2015/lib/shared/components/palette/dynamic-list/write-dynamic-list-field.component.js +1 -1
- package/esm2015/lib/shared/components/palette/palette.module.js +68 -22
- package/esm2015/lib/shared/components/palette/palette.service.js +12 -4
- package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +10 -1
- 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 +5 -1
- package/esm2015/lib/shared/pipes/index.js +2 -1
- package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +23 -0
- package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +2 -0
- package/esm2015/lib/shared/pipes/pipes.module.js +8 -4
- package/esm2015/lib/shared/services/fields/fields.utils.js +7 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +2576 -204
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +5 -0
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +4 -4
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +4 -0
- 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 +7 -0
- 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 +1 -0
- 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-link/components/before-you-start/before-you-start.component.d.ts +19 -0
- package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +18 -0
- package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/index.d.ts +10 -0
- package/lib/shared/components/palette/case-link/components/index.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +45 -0
- package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +42 -0
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +45 -0
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +12 -0
- package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +37 -0
- package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +38 -0
- package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +45 -0
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/domain/index.d.ts +3 -0
- package/lib/shared/components/palette/case-link/domain/index.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +12 -0
- package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +65 -0
- package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/enums/index.d.ts +2 -0
- package/lib/shared/components/palette/case-link/enums/index.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +29 -0
- package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/index.d.ts +3 -0
- 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 +3 -0
- package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/services/index.d.ts +2 -0
- package/lib/shared/components/palette/case-link/services/index.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +50 -0
- package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +10 -0
- package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +1 -0
- package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +12 -3
- 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 +67 -58
- 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 +1 -0
- 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 +1 -0
- package/lib/shared/pipes/index.d.ts.map +1 -1
- package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +11 -0
- package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +1 -0
- package/lib/shared/pipes/link-cases-reason-code/index.d.ts +2 -0
- package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +1 -0
- package/lib/shared/pipes/pipes.module.d.ts +3 -2
- package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +1 -0
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rx-polling'), require('rxjs'), require('@angular/common/http'), require('rxjs/operators'), require('class-transformer'), require('underscore'), require('moment'), require('util'), require('@edium/fsm'), require('@angular/material/dialog'), require('@angular-material-components/datetime-picker'), require('@angular/cdk/overlay'), require('@angular/cdk/tree'), require('@angular/material/autocomplete'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@hmcts/ccpay-web-component'), require('@hmcts/media-viewer'), require('@nicky-lenaers/ngx-scroll-to'), require('ngx-md'), require('@angular-material-components/moment-adapter'), require('@angular/cdk/portal'), require('ngx-pagination'), require('@angular/material/tabs')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@hmcts/ccd-case-ui-toolkit', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rx-polling', 'rxjs', '@angular/common/http', 'rxjs/operators', 'class-transformer', 'underscore', 'moment', 'util', '@edium/fsm', '@angular/material/dialog', '@angular-material-components/datetime-picker', '@angular/cdk/overlay', '@angular/cdk/tree', '@angular/material/autocomplete', '@angular/material/core', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@hmcts/ccpay-web-component', '@hmcts/media-viewer', '@nicky-lenaers/ngx-scroll-to', 'ngx-md', '@angular-material-components/moment-adapter', '@angular/cdk/portal', 'ngx-pagination', '@angular/material/tabs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.
|
|
5
|
-
})(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hmcts = global.hmcts || {}, global.hmcts["ccd-case-ui-toolkit"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global["rx-polling"], global.rxjs, global.ng.common.http, global.rxjs.operators, global["class-transformer"], global.underscore, global.moment, global.util, global["@edium/fsm"], global.ng.material.dialog, global["@angular-material-components/datetime-picker"], global.ng.cdk.overlay, global.ng.cdk.tree, global.ng.material.autocomplete, global.ng.material.core, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global["@hmcts/ccpay-web-component"], global.i12, global["@nicky-lenaers/ngx-scroll-to"], global["ngx-md"], global["@angular-material-components/moment-adapter"], global.ng.cdk.portal, global["ngx-pagination"], global.ng.material.tabs));
|
|
5
|
+
})(this, (function (exports, i0, i1, i1$1, i2, polling, rxjs, i1$2, operators, classTransformer, _, moment, util, fsm, i1$3, i4, i1$4, i7, i5, i6, i5$1, i6$1, i3$1, i3, i12, i2$1, i1$5, momentAdapter, i6$2, i1$6, i9) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
43
43
|
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
44
44
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
45
|
-
var
|
|
45
|
+
var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
|
|
46
46
|
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
47
47
|
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
48
48
|
var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
i0__namespace.ɵɵtextInterpolate(ctx_r1.workhours);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
var _c0$
|
|
121
|
+
var _c0$_ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
122
122
|
var _c1$r = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
123
123
|
var FooterComponent = /** @class */ (function () {
|
|
124
124
|
function FooterComponent() {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
129
129
|
FooterComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
130
130
|
if (rf & 1) {
|
|
131
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
131
|
+
i0__namespace.ɵɵprojectionDef(_c0$_);
|
|
132
132
|
i0__namespace.ɵɵelementStart(0, "footer", 0);
|
|
133
133
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
134
134
|
i0__namespace.ɵɵtemplate(2, FooterComponent_div_2_Template, 15, 0, "div", 2);
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
i0__namespace.ɵɵtextInterpolate(ctx_r2.title);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
var _c0$
|
|
210
|
+
var _c0$Z = [[["", "headerNavigation", ""]]];
|
|
211
211
|
var _c1$q = ["[headerNavigation]"];
|
|
212
212
|
var HeaderBarComponent = /** @class */ (function () {
|
|
213
213
|
function HeaderBarComponent() {
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
222
222
|
HeaderBarComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
223
223
|
if (rf & 1) {
|
|
224
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
224
|
+
i0__namespace.ɵɵprojectionDef(_c0$Z);
|
|
225
225
|
i0__namespace.ɵɵelementStart(0, "header", 0);
|
|
226
226
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
227
227
|
i0__namespace.ɵɵelementStart(2, "div", 2);
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
}] });
|
|
283
283
|
})();
|
|
284
284
|
|
|
285
|
-
var _c0$
|
|
285
|
+
var _c0$Y = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
286
286
|
var _c1$p = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
287
287
|
var NavigationComponent = /** @class */ (function () {
|
|
288
288
|
function NavigationComponent() {
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
293
293
|
NavigationComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
294
294
|
if (rf & 1) {
|
|
295
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
295
|
+
i0__namespace.ɵɵprojectionDef(_c0$Y);
|
|
296
296
|
i0__namespace.ɵɵelementStart(0, "div");
|
|
297
297
|
i0__namespace.ɵɵelementStart(1, "nav", 0);
|
|
298
298
|
i0__namespace.ɵɵprojection(2);
|
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
}], null, null);
|
|
438
438
|
})();
|
|
439
439
|
|
|
440
|
-
var _c0$
|
|
440
|
+
var _c0$X = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
441
441
|
var _c1$o = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
442
442
|
var BodyComponent = /** @class */ (function () {
|
|
443
443
|
function BodyComponent() {
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
448
448
|
BodyComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$o, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
|
|
449
449
|
if (rf & 1) {
|
|
450
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
450
|
+
i0__namespace.ɵɵprojectionDef(_c0$X);
|
|
451
451
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
452
452
|
i0__namespace.ɵɵprojection(1);
|
|
453
453
|
i0__namespace.ɵɵprojection(2, 1);
|
|
@@ -794,7 +794,7 @@
|
|
|
794
794
|
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
-
var _c0$
|
|
797
|
+
var _c0$W = function (a0) { return { "govuk-input--error": a0 }; };
|
|
798
798
|
function DateInputComponent_div_16_Template(rf, ctx) {
|
|
799
799
|
if (rf & 1) {
|
|
800
800
|
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -812,7 +812,7 @@
|
|
|
812
812
|
i0__namespace.ɵɵadvance(1);
|
|
813
813
|
i0__namespace.ɵɵproperty("for", ctx_r3.hourId());
|
|
814
814
|
i0__namespace.ɵɵadvance(2);
|
|
815
|
-
i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$
|
|
815
|
+
i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r3.isInvalid));
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
818
|
function DateInputComponent_div_17_Template(rf, ctx) {
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
i0__namespace.ɵɵadvance(1);
|
|
833
833
|
i0__namespace.ɵɵproperty("for", ctx_r4.minuteId());
|
|
834
834
|
i0__namespace.ɵɵadvance(2);
|
|
835
|
-
i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$
|
|
835
|
+
i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r4.isInvalid));
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
function DateInputComponent_div_18_Template(rf, ctx) {
|
|
@@ -852,7 +852,7 @@
|
|
|
852
852
|
i0__namespace.ɵɵadvance(1);
|
|
853
853
|
i0__namespace.ɵɵproperty("for", ctx_r5.secondId());
|
|
854
854
|
i0__namespace.ɵɵadvance(2);
|
|
855
|
-
i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$
|
|
855
|
+
i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$W, ctx_r5.isInvalid));
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
var DateInputComponent = /** @class */ (function () {
|
|
@@ -1086,15 +1086,15 @@
|
|
|
1086
1086
|
i0__namespace.ɵɵadvance(2);
|
|
1087
1087
|
i0__namespace.ɵɵproperty("for", ctx.dayId());
|
|
1088
1088
|
i0__namespace.ɵɵadvance(2);
|
|
1089
|
-
i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$
|
|
1089
|
+
i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$W, ctx.isInvalid));
|
|
1090
1090
|
i0__namespace.ɵɵadvance(3);
|
|
1091
1091
|
i0__namespace.ɵɵproperty("for", ctx.monthId());
|
|
1092
1092
|
i0__namespace.ɵɵadvance(2);
|
|
1093
|
-
i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$
|
|
1093
|
+
i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$W, ctx.isInvalid));
|
|
1094
1094
|
i0__namespace.ɵɵadvance(3);
|
|
1095
1095
|
i0__namespace.ɵɵproperty("for", ctx.yearId());
|
|
1096
1096
|
i0__namespace.ɵɵadvance(2);
|
|
1097
|
-
i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$
|
|
1097
|
+
i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$W, ctx.isInvalid));
|
|
1098
1098
|
i0__namespace.ɵɵadvance(2);
|
|
1099
1099
|
i0__namespace.ɵɵproperty("ngIf", ctx.isDateTime);
|
|
1100
1100
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -1175,7 +1175,7 @@
|
|
|
1175
1175
|
i0__namespace.ɵɵelementContainerEnd();
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
var _c0$
|
|
1178
|
+
var _c0$V = ["*"];
|
|
1179
1179
|
exports.AlertMessageType = void 0;
|
|
1180
1180
|
(function (AlertMessageType) {
|
|
1181
1181
|
AlertMessageType["WARNING"] = "warning";
|
|
@@ -1196,7 +1196,7 @@
|
|
|
1196
1196
|
AlertComponent.TYPE_ERROR = 'error';
|
|
1197
1197
|
AlertComponent.TYPE_INFORMATION = 'information';
|
|
1198
1198
|
AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
|
|
1199
|
-
AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$
|
|
1199
|
+
AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$V, 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) {
|
|
1200
1200
|
if (rf & 1) {
|
|
1201
1201
|
i0__namespace.ɵɵprojectionDef();
|
|
1202
1202
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
@@ -1471,7 +1471,7 @@
|
|
|
1471
1471
|
}] });
|
|
1472
1472
|
})();
|
|
1473
1473
|
|
|
1474
|
-
var _c0$
|
|
1474
|
+
var _c0$U = function (a0) { return { "js-hidden": a0 }; };
|
|
1475
1475
|
var _c1$n = ["*"];
|
|
1476
1476
|
var TabComponent = /** @class */ (function () {
|
|
1477
1477
|
function TabComponent() {
|
|
@@ -1487,7 +1487,7 @@
|
|
|
1487
1487
|
i0__namespace.ɵɵelementEnd();
|
|
1488
1488
|
}
|
|
1489
1489
|
if (rf & 2) {
|
|
1490
|
-
i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$
|
|
1490
|
+
i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$U, !ctx.selected));
|
|
1491
1491
|
i0__namespace.ɵɵattribute("aria-hidden", !ctx.selected);
|
|
1492
1492
|
}
|
|
1493
1493
|
}, directives: [i1__namespace.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}}"] });
|
|
@@ -1510,7 +1510,7 @@
|
|
|
1510
1510
|
}] });
|
|
1511
1511
|
})();
|
|
1512
1512
|
|
|
1513
|
-
var _c0$
|
|
1513
|
+
var _c0$T = ["tab"];
|
|
1514
1514
|
var _c1$m = function () { return ["."]; };
|
|
1515
1515
|
var _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
|
|
1516
1516
|
function TabsComponent_li_2_Template(rf, ctx) {
|
|
@@ -1564,7 +1564,7 @@
|
|
|
1564
1564
|
}
|
|
1565
1565
|
}, viewQuery: function TabsComponent_Query(rf, ctx) {
|
|
1566
1566
|
if (rf & 1) {
|
|
1567
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
1567
|
+
i0__namespace.ɵɵviewQuery(_c0$T, 1);
|
|
1568
1568
|
}
|
|
1569
1569
|
if (rf & 2) {
|
|
1570
1570
|
var _t = void 0;
|
|
@@ -1643,7 +1643,7 @@
|
|
|
1643
1643
|
}], null, null);
|
|
1644
1644
|
})();
|
|
1645
1645
|
|
|
1646
|
-
var _c0$
|
|
1646
|
+
var _c0$S = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
|
|
1647
1647
|
var ActivityBannerComponent = /** @class */ (function () {
|
|
1648
1648
|
function ActivityBannerComponent() {
|
|
1649
1649
|
}
|
|
@@ -1664,7 +1664,7 @@
|
|
|
1664
1664
|
i0__namespace.ɵɵelementEnd();
|
|
1665
1665
|
}
|
|
1666
1666
|
if (rf & 2) {
|
|
1667
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$
|
|
1667
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$S, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
|
|
1668
1668
|
i0__namespace.ɵɵadvance(2);
|
|
1669
1669
|
i0__namespace.ɵɵpropertyInterpolate("alt", ctx.description);
|
|
1670
1670
|
i0__namespace.ɵɵpropertyInterpolate("src", ctx.imageLink, i0__namespace.ɵɵsanitizeUrl);
|
|
@@ -3036,6 +3036,14 @@
|
|
|
3036
3036
|
if (!field || !field.field_type || !field.field_type.type) {
|
|
3037
3037
|
return false;
|
|
3038
3038
|
}
|
|
3039
|
+
// Case link tab spacing alignment fix
|
|
3040
|
+
// This Pipe needs to be re-visited
|
|
3041
|
+
// to make it more generic to support and fix alignments issues for multiple tabs
|
|
3042
|
+
if (field.field_type.collection_field_type &&
|
|
3043
|
+
field.field_type.collection_field_type.id &&
|
|
3044
|
+
field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
|
|
3045
|
+
return true;
|
|
3046
|
+
}
|
|
3039
3047
|
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
3040
3048
|
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
3041
3049
|
return false;
|
|
@@ -3046,6 +3054,7 @@
|
|
|
3046
3054
|
};
|
|
3047
3055
|
return IsCompoundPipe;
|
|
3048
3056
|
}());
|
|
3057
|
+
IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
|
|
3049
3058
|
IsCompoundPipe.COMPOUND_TYPES = [
|
|
3050
3059
|
'Complex',
|
|
3051
3060
|
'Label',
|
|
@@ -3910,6 +3919,12 @@
|
|
|
3910
3919
|
FieldsUtils.isCollectionWithValue = function (pageFormFields) {
|
|
3911
3920
|
return pageFormFields[0]['value'] !== undefined;
|
|
3912
3921
|
};
|
|
3922
|
+
FieldsUtils.isLinkedCasesCaseField = function (caseField) {
|
|
3923
|
+
if (!caseField) {
|
|
3924
|
+
return false;
|
|
3925
|
+
}
|
|
3926
|
+
return caseField.field_type.collection_field_type.id === 'CaseLink';
|
|
3927
|
+
};
|
|
3913
3928
|
FieldsUtils.cloneObject = function (obj) {
|
|
3914
3929
|
return Object.assign({}, obj);
|
|
3915
3930
|
};
|
|
@@ -4849,7 +4864,9 @@
|
|
|
4849
4864
|
};
|
|
4850
4865
|
AbstractFormFieldComponent.prototype.addControlToFormGroup = function (control, parent, replace) {
|
|
4851
4866
|
if (replace) {
|
|
4852
|
-
if (this.caseField.field_type && this.caseField.field_type.
|
|
4867
|
+
if (this.caseField.field_type && this.caseField.field_type.collection_field_type
|
|
4868
|
+
&& this.caseField.field_type.collection_field_type.id === 'CaseLink'
|
|
4869
|
+
&& this.caseField.field_type.type === 'Complex' && /^-?\d+$/.test(this.caseField.id)) {
|
|
4853
4870
|
parent.setControl('CaseReference', control['controls']['CaseReference']);
|
|
4854
4871
|
}
|
|
4855
4872
|
else {
|
|
@@ -8432,6 +8449,34 @@
|
|
|
8432
8449
|
return rxjs.throwError(error);
|
|
8433
8450
|
}), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
8434
8451
|
};
|
|
8452
|
+
/**
|
|
8453
|
+
* TODO: Gets case link responses
|
|
8454
|
+
* @returns case link responses
|
|
8455
|
+
*/
|
|
8456
|
+
CasesService.prototype.getCaseLinkResponses = function () {
|
|
8457
|
+
var _this = this;
|
|
8458
|
+
var headers = new i1$2.HttpHeaders()
|
|
8459
|
+
.set('experimental', 'true')
|
|
8460
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
|
|
8461
|
+
.set('Content-Type', 'application/json');
|
|
8462
|
+
var loadingToken = this.loadingService.register();
|
|
8463
|
+
return this.http
|
|
8464
|
+
.get('assets/getCaseReasons.json', { headers: headers, observe: 'body' })
|
|
8465
|
+
.pipe(operators.map(function (reasons) {
|
|
8466
|
+
return reasons.sort(function (reasonA, reasonB) { return reasonA.value_en > reasonB.value_en ? 1 : -1; });
|
|
8467
|
+
}), operators.catchError(function (error) {
|
|
8468
|
+
_this.errorService.setError(error);
|
|
8469
|
+
return rxjs.throwError(error);
|
|
8470
|
+
}), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
8471
|
+
};
|
|
8472
|
+
CasesService.prototype.getLinkedCases = function (caseId) {
|
|
8473
|
+
var url = this.appConfig.getCaseDataStoreApiUrl() + "/" + caseId;
|
|
8474
|
+
return this.http
|
|
8475
|
+
.get(url)
|
|
8476
|
+
.pipe(operators.catchError(function (error) {
|
|
8477
|
+
return rxjs.throwError(error);
|
|
8478
|
+
}));
|
|
8479
|
+
};
|
|
8435
8480
|
CasesService.prototype.getEventTrigger = function (caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
8436
8481
|
var _this = this;
|
|
8437
8482
|
ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
|
|
@@ -9255,7 +9300,8 @@
|
|
|
9255
9300
|
.filter(function (caseField) { return !_this.isHidden(caseField, editForm); })
|
|
9256
9301
|
.every(function (caseField) {
|
|
9257
9302
|
var theControl = editForm.controls['data'].get(caseField.id);
|
|
9258
|
-
return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl)
|
|
9303
|
+
return _this.checkDocumentField(caseField, theControl) && _this.checkOptionalField(caseField, theControl) &&
|
|
9304
|
+
_this.checkCaseLinksCollectionField(caseField, theControl);
|
|
9259
9305
|
});
|
|
9260
9306
|
};
|
|
9261
9307
|
PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
|
|
@@ -9283,6 +9329,13 @@
|
|
|
9283
9329
|
PageValidationService.prototype.checkMandatoryField = function (caseField, theControl) {
|
|
9284
9330
|
return this.caseFieldService.isMandatory(caseField) && theControl === null;
|
|
9285
9331
|
};
|
|
9332
|
+
PageValidationService.prototype.checkCaseLinksCollectionField = function (caseField, theControl) {
|
|
9333
|
+
if (caseField && caseField.id === 'caseLinks') {
|
|
9334
|
+
return theControl && theControl.value && Array.isArray(theControl.value) &&
|
|
9335
|
+
theControl.value.length ? true : false;
|
|
9336
|
+
}
|
|
9337
|
+
return true;
|
|
9338
|
+
};
|
|
9286
9339
|
return PageValidationService;
|
|
9287
9340
|
}());
|
|
9288
9341
|
PageValidationService.ɵfac = function PageValidationService_Factory(t) { return new (t || PageValidationService)(i0__namespace.ɵɵinject(CaseFieldService)); };
|
|
@@ -9793,10 +9846,12 @@
|
|
|
9793
9846
|
function CaseEditDataService() {
|
|
9794
9847
|
this.title$ = new rxjs.BehaviorSubject(null);
|
|
9795
9848
|
this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
|
|
9849
|
+
this.linkError$ = new rxjs.BehaviorSubject(null);
|
|
9796
9850
|
this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
|
|
9797
9851
|
this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
|
|
9798
9852
|
this.caseTitle$ = this.title$.asObservable();
|
|
9799
9853
|
this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
|
|
9854
|
+
this.caseLinkError$ = this.linkError$.asObservable();
|
|
9800
9855
|
this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
|
|
9801
9856
|
this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
|
|
9802
9857
|
}
|
|
@@ -9806,12 +9861,18 @@
|
|
|
9806
9861
|
CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
|
|
9807
9862
|
this.eventTriggerName$.next(triggerName);
|
|
9808
9863
|
};
|
|
9864
|
+
CaseEditDataService.prototype.setCaseLinkError = function (error) {
|
|
9865
|
+
this.linkError$.next(error);
|
|
9866
|
+
};
|
|
9809
9867
|
CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
|
|
9810
9868
|
this.formValidationErrors$.next(validationErrors);
|
|
9811
9869
|
};
|
|
9812
9870
|
CaseEditDataService.prototype.clearFormValidationErrors = function () {
|
|
9813
9871
|
this.formValidationErrors$.next([]);
|
|
9814
9872
|
};
|
|
9873
|
+
CaseEditDataService.prototype.clearCaseLinkError = function () {
|
|
9874
|
+
this.linkError$.next(null);
|
|
9875
|
+
};
|
|
9815
9876
|
CaseEditDataService.prototype.addFormValidationError = function (validationError) {
|
|
9816
9877
|
this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
|
|
9817
9878
|
};
|
|
@@ -10233,18 +10294,27 @@
|
|
|
10233
10294
|
_this.caseEditDataService.addFormValidationError({ id: id_1, message: label + " exceeds the maximum length" });
|
|
10234
10295
|
fieldElement.markAsDirty();
|
|
10235
10296
|
}
|
|
10297
|
+
else if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
|
|
10298
|
+
_this.validationErrors.push({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
|
|
10299
|
+
}
|
|
10236
10300
|
else if (fieldElement.invalid) {
|
|
10237
10301
|
if (casefield.isComplex()) {
|
|
10238
10302
|
_this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement, id_1);
|
|
10239
10303
|
}
|
|
10240
10304
|
else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10305
|
+
if (_this.caseLinkError && FieldsUtils.isLinkedCasesCaseField(casefield)) {
|
|
10306
|
+
_this.caseEditDataService.addFormValidationError({ id: _this.caseLinkError.componentId, message: _this.caseLinkError.errorMessage });
|
|
10307
|
+
// this.validationErrors.push({ id: this.caseLinkError.componentId, message: this.caseLinkError.errorMessage });
|
|
10308
|
+
}
|
|
10309
|
+
else {
|
|
10310
|
+
var fieldArray = fieldElement;
|
|
10311
|
+
if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
|
|
10312
|
+
id_1 = "" + fieldArray['component']['collItems'][0].prefix;
|
|
10313
|
+
}
|
|
10314
|
+
fieldArray.controls.forEach(function (c) {
|
|
10315
|
+
_this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
|
|
10316
|
+
});
|
|
10244
10317
|
}
|
|
10245
|
-
fieldArray.controls.forEach(function (c) {
|
|
10246
|
-
_this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'), id_1);
|
|
10247
|
-
});
|
|
10248
10318
|
}
|
|
10249
10319
|
else if (FieldsUtils.isFlagLauncherCaseField(casefield)) {
|
|
10250
10320
|
// Check whether the case field DisplayContextParameter is signalling "create" mode or "update" mode
|
|
@@ -10330,12 +10400,35 @@
|
|
|
10330
10400
|
return this.wizard.findWizardPage(caseFieldId);
|
|
10331
10401
|
};
|
|
10332
10402
|
CaseEditPageComponent.prototype.updateEventTriggerCaseFields = function (caseFieldId, jsonData, eventTrigger) {
|
|
10333
|
-
|
|
10403
|
+
var _this = this;
|
|
10404
|
+
if (eventTrigger === null || eventTrigger === void 0 ? void 0 : eventTrigger.case_fields) {
|
|
10334
10405
|
eventTrigger.case_fields
|
|
10335
10406
|
.filter(function (element) { return element.id === caseFieldId; })
|
|
10336
|
-
.forEach(function (element) {
|
|
10407
|
+
.forEach(function (element) {
|
|
10408
|
+
if (_this.isAnObject(element.value)) {
|
|
10409
|
+
var updatedJsonDataObject = _this.updateJsonDataObject(caseFieldId, jsonData, element);
|
|
10410
|
+
element.value = Object.assign(Object.assign({}, element.value), updatedJsonDataObject);
|
|
10411
|
+
}
|
|
10412
|
+
else {
|
|
10413
|
+
element.value = jsonData.data[caseFieldId];
|
|
10414
|
+
}
|
|
10415
|
+
});
|
|
10337
10416
|
}
|
|
10338
10417
|
};
|
|
10418
|
+
CaseEditPageComponent.prototype.updateJsonDataObject = function (caseFieldId, jsonData, element) {
|
|
10419
|
+
var _this = this;
|
|
10420
|
+
return Object.keys(jsonData.data[caseFieldId]).reduce(function (acc, key) {
|
|
10421
|
+
var _a;
|
|
10422
|
+
var elementValue = element.value[key];
|
|
10423
|
+
var jsonDataValue = jsonData.data[caseFieldId][key];
|
|
10424
|
+
var hasElementGotValueProperty = _this.isAnObject(elementValue) && elementValue.value !== undefined;
|
|
10425
|
+
var jsonDataOrElementValue = (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== null && (jsonDataValue === null || jsonDataValue === void 0 ? void 0 : jsonDataValue.value) !== undefined ? jsonDataValue : elementValue;
|
|
10426
|
+
return Object.assign(Object.assign({}, acc), (_a = {}, _a["" + key] = hasElementGotValueProperty ? jsonDataOrElementValue : jsonDataValue, _a));
|
|
10427
|
+
}, {});
|
|
10428
|
+
};
|
|
10429
|
+
CaseEditPageComponent.prototype.isAnObject = function (property) {
|
|
10430
|
+
return typeof property === 'object' && !Array.isArray(property) && property !== null;
|
|
10431
|
+
};
|
|
10339
10432
|
CaseEditPageComponent.prototype.updateFormControlsValue = function (formGroup, caseFieldId, value) {
|
|
10340
10433
|
var theControl = formGroup.controls['data'].get(caseFieldId);
|
|
10341
10434
|
if (theControl && theControl['status'] !== 'DISABLED') {
|
|
@@ -10511,6 +10604,7 @@
|
|
|
10511
10604
|
CaseEditPageComponent.prototype.syncCaseEditDataService = function () {
|
|
10512
10605
|
var _this = this;
|
|
10513
10606
|
this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
|
|
10607
|
+
this.caseEditDataService.setCaseLinkError(this.caseLinkError);
|
|
10514
10608
|
this.caseEditDataService.setCaseTitle(this.getCaseTitle());
|
|
10515
10609
|
this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
10516
10610
|
next: function (validationErrors) { return _this.validationErrors = validationErrors; }
|
|
@@ -11038,6 +11132,10 @@
|
|
|
11038
11132
|
};
|
|
11039
11133
|
ReadFieldsFilterPipe.keepField = function (field, value, ignoreLabels) {
|
|
11040
11134
|
if (ignoreLabels === void 0) { ignoreLabels = false; }
|
|
11135
|
+
// We should always render the caselinks tables from and to regardless whether it has valid value or not
|
|
11136
|
+
if (field.id === 'caseLinks') {
|
|
11137
|
+
return true;
|
|
11138
|
+
}
|
|
11041
11139
|
// We shouldn't ditch labels.
|
|
11042
11140
|
if (!ignoreLabels && field.field_type.type === 'Label' && (field.label || '').length > 0) {
|
|
11043
11141
|
return true;
|
|
@@ -11325,6 +11423,163 @@
|
|
|
11325
11423
|
}], null, null);
|
|
11326
11424
|
})();
|
|
11327
11425
|
|
|
11426
|
+
var LinkedCasesService = /** @class */ (function () {
|
|
11427
|
+
function LinkedCasesService(jurisdictionService, searchService) {
|
|
11428
|
+
var _this = this;
|
|
11429
|
+
this.jurisdictionService = jurisdictionService;
|
|
11430
|
+
this.searchService = searchService;
|
|
11431
|
+
this.caseFieldValue = [];
|
|
11432
|
+
this.isLinkedCasesEventTrigger = false;
|
|
11433
|
+
this.linkCaseReasons = [];
|
|
11434
|
+
this.linkedCases = [];
|
|
11435
|
+
this.initialCaseLinks = [];
|
|
11436
|
+
this.editMode = false;
|
|
11437
|
+
this.jurisdictionsResponse = [];
|
|
11438
|
+
this.serverError = null;
|
|
11439
|
+
this.serverLinkedApiError = null;
|
|
11440
|
+
this.isServerReasonCodeError = false;
|
|
11441
|
+
this.caseJurisdictionID = null;
|
|
11442
|
+
this.groupLinkedCasesByCaseType = function (arrObj, key) {
|
|
11443
|
+
return arrObj.reduce(function (rv, x) {
|
|
11444
|
+
(rv[x.value[key]] = rv[x.value[key]] || []).push(x.value['CaseReference']);
|
|
11445
|
+
return rv;
|
|
11446
|
+
}, {});
|
|
11447
|
+
};
|
|
11448
|
+
this.jurisdictionService.getJurisdictions().subscribe(function (jurisdictions) {
|
|
11449
|
+
_this.jurisdictionsResponse = jurisdictions;
|
|
11450
|
+
}, function (error) {
|
|
11451
|
+
_this.serverJurisdictionError = true;
|
|
11452
|
+
});
|
|
11453
|
+
}
|
|
11454
|
+
LinkedCasesService.prototype.constructElasticSearchQuery = function (caseIds, size) {
|
|
11455
|
+
return {
|
|
11456
|
+
query: {
|
|
11457
|
+
terms: {
|
|
11458
|
+
reference: caseIds,
|
|
11459
|
+
},
|
|
11460
|
+
},
|
|
11461
|
+
size: size,
|
|
11462
|
+
};
|
|
11463
|
+
};
|
|
11464
|
+
LinkedCasesService.prototype.mapResponse = function (esSearchCasesResponse) {
|
|
11465
|
+
var caseInfo = this.caseFieldValue.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
|
|
11466
|
+
return caseInfo && {
|
|
11467
|
+
caseReference: esSearchCasesResponse.case_id,
|
|
11468
|
+
caseName: esSearchCasesResponse.case_fields.caseNameHmctsInternal || LinkedCasesService.CASE_NAME_MISSING_TEXT,
|
|
11469
|
+
caseType: this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', esSearchCasesResponse.case_fields['[CASE_TYPE]']),
|
|
11470
|
+
service: this.mapLookupIDToValueFromJurisdictions('JURISDICTION', esSearchCasesResponse.case_fields['[JURISDICTION]']),
|
|
11471
|
+
state: this.mapLookupIDToValueFromJurisdictions('STATE', esSearchCasesResponse.case_fields['[STATE]']),
|
|
11472
|
+
reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
|
|
11473
|
+
caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
|
|
11474
|
+
};
|
|
11475
|
+
};
|
|
11476
|
+
LinkedCasesService.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
|
|
11477
|
+
return rxjs.forkJoin(searchCasesResponse);
|
|
11478
|
+
};
|
|
11479
|
+
LinkedCasesService.prototype.getAllLinkedCaseInformation = function () {
|
|
11480
|
+
var _this = this;
|
|
11481
|
+
var searchCasesResponse = [];
|
|
11482
|
+
var linkedCaseIds = this.groupLinkedCasesByCaseType(this.caseFieldValue, 'CaseType');
|
|
11483
|
+
Object.keys(linkedCaseIds).forEach(function (key) {
|
|
11484
|
+
var esQuery = _this.constructElasticSearchQuery(linkedCaseIds[key], 100);
|
|
11485
|
+
var query = _this.searchService.searchCasesByIds(key, esQuery, SearchService.VIEW_WORKBASKET);
|
|
11486
|
+
searchCasesResponse.push(query);
|
|
11487
|
+
});
|
|
11488
|
+
if (searchCasesResponse.length) {
|
|
11489
|
+
this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
|
|
11490
|
+
var casesResponse = [];
|
|
11491
|
+
searchCases.forEach(function (response) {
|
|
11492
|
+
response.results.forEach(function (result) {
|
|
11493
|
+
casesResponse.push(_this.mapResponse(result));
|
|
11494
|
+
});
|
|
11495
|
+
});
|
|
11496
|
+
var caseLinks = casesResponse.map(function (item) {
|
|
11497
|
+
return {
|
|
11498
|
+
caseReference: item.caseReference,
|
|
11499
|
+
caseName: item.caseName,
|
|
11500
|
+
caseService: item.service,
|
|
11501
|
+
caseType: item.caseType,
|
|
11502
|
+
unlink: false,
|
|
11503
|
+
reasons: item.reasons && item.reasons.map(function (reason) {
|
|
11504
|
+
return {
|
|
11505
|
+
reasonCode: reason
|
|
11506
|
+
};
|
|
11507
|
+
}),
|
|
11508
|
+
};
|
|
11509
|
+
});
|
|
11510
|
+
_this.linkedCases = caseLinks;
|
|
11511
|
+
_this.serverLinkedApiError = null;
|
|
11512
|
+
}, function (err) {
|
|
11513
|
+
_this.serverLinkedApiError = {
|
|
11514
|
+
id: 'backendError', message: 'Some case information is not available at the moment'
|
|
11515
|
+
};
|
|
11516
|
+
});
|
|
11517
|
+
}
|
|
11518
|
+
};
|
|
11519
|
+
LinkedCasesService.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
|
|
11520
|
+
var _this = this;
|
|
11521
|
+
var selectedJurisdiction = this.jurisdictionsResponse &&
|
|
11522
|
+
this.jurisdictionsResponse.find(function (item) { return item.id === _this.caseDetails.case_type.jurisdiction.id; });
|
|
11523
|
+
var selectedCaseType = selectedJurisdiction && selectedJurisdiction.caseTypes.find(function (item) { return item.id === _this.caseDetails.case_type.id; });
|
|
11524
|
+
var state = selectedCaseType && selectedCaseType.states.find(function (item) { return item.id === fieldValue; });
|
|
11525
|
+
switch (fieldName) {
|
|
11526
|
+
case 'JURISDICTION':
|
|
11527
|
+
return selectedJurisdiction && selectedJurisdiction.description;
|
|
11528
|
+
case 'CASE_TYPE':
|
|
11529
|
+
return selectedCaseType && selectedCaseType.name;
|
|
11530
|
+
case 'CASE_TYPE_DESCRIPTION':
|
|
11531
|
+
return selectedCaseType && selectedCaseType.description;
|
|
11532
|
+
case 'STATE':
|
|
11533
|
+
return state && state.name || fieldValue;
|
|
11534
|
+
case 'STATE_DESCRIPTION':
|
|
11535
|
+
return state && state.description || fieldValue;
|
|
11536
|
+
default:
|
|
11537
|
+
break;
|
|
11538
|
+
}
|
|
11539
|
+
};
|
|
11540
|
+
LinkedCasesService.prototype.getCaseName = function (searchCasesResponse) {
|
|
11541
|
+
var caseName = LinkedCasesService.CASE_NAME_MISSING_TEXT;
|
|
11542
|
+
var tabs = searchCasesResponse.tabs.filter(function (tab) {
|
|
11543
|
+
var caseNameHmctsInternalField = tab.fields.find(function (field) { return field.id === 'caseNameHmctsInternal'; });
|
|
11544
|
+
if (caseNameHmctsInternalField) {
|
|
11545
|
+
caseName = caseNameHmctsInternalField.value;
|
|
11546
|
+
}
|
|
11547
|
+
});
|
|
11548
|
+
return caseName;
|
|
11549
|
+
};
|
|
11550
|
+
return LinkedCasesService;
|
|
11551
|
+
}());
|
|
11552
|
+
LinkedCasesService.CASE_NAME_MISSING_TEXT = 'Case name missing';
|
|
11553
|
+
LinkedCasesService.ɵfac = function LinkedCasesService_Factory(t) { return new (t || LinkedCasesService)(i0__namespace.ɵɵinject(JurisdictionService), i0__namespace.ɵɵinject(SearchService)); };
|
|
11554
|
+
LinkedCasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: LinkedCasesService, factory: LinkedCasesService.ɵfac });
|
|
11555
|
+
(function () {
|
|
11556
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesService, [{
|
|
11557
|
+
type: i0.Injectable
|
|
11558
|
+
}], function () { return [{ type: JurisdictionService }, { type: SearchService }]; }, null);
|
|
11559
|
+
})();
|
|
11560
|
+
|
|
11561
|
+
var LinkCasesReasonValuePipe = /** @class */ (function () {
|
|
11562
|
+
function LinkCasesReasonValuePipe(linkedCasesService) {
|
|
11563
|
+
this.linkedCasesService = linkedCasesService;
|
|
11564
|
+
}
|
|
11565
|
+
LinkCasesReasonValuePipe.prototype.transform = function (reasonCode) {
|
|
11566
|
+
var reasonCodeMapping = this.linkedCasesService.linkCaseReasons &&
|
|
11567
|
+
this.linkedCasesService.linkCaseReasons.find(function (reason) { return reason.key === reasonCode; });
|
|
11568
|
+
return reasonCodeMapping && reasonCodeMapping.value_en;
|
|
11569
|
+
};
|
|
11570
|
+
return LinkCasesReasonValuePipe;
|
|
11571
|
+
}());
|
|
11572
|
+
LinkCasesReasonValuePipe.ɵfac = function LinkCasesReasonValuePipe_Factory(t) { return new (t || LinkCasesReasonValuePipe)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
11573
|
+
LinkCasesReasonValuePipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdLinkCasesReasonValue", type: LinkCasesReasonValuePipe, pure: true });
|
|
11574
|
+
(function () {
|
|
11575
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesReasonValuePipe, [{
|
|
11576
|
+
type: i0.Pipe,
|
|
11577
|
+
args: [{
|
|
11578
|
+
name: 'ccdLinkCasesReasonValue'
|
|
11579
|
+
}]
|
|
11580
|
+
}], function () { return [{ type: LinkedCasesService }]; }, null);
|
|
11581
|
+
})();
|
|
11582
|
+
|
|
11328
11583
|
var SortOrder;
|
|
11329
11584
|
(function (SortOrder) {
|
|
11330
11585
|
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
@@ -11365,7 +11620,8 @@
|
|
|
11365
11620
|
CcdCYAPageLabelFilterPipe,
|
|
11366
11621
|
ReadFieldsFilterPipe,
|
|
11367
11622
|
CcdTabFieldsPipe,
|
|
11368
|
-
CcdPageFieldsPipe
|
|
11623
|
+
CcdPageFieldsPipe,
|
|
11624
|
+
LinkCasesReasonValuePipe
|
|
11369
11625
|
];
|
|
11370
11626
|
var PipesModule = /** @class */ (function () {
|
|
11371
11627
|
function PipesModule() {
|
|
@@ -11385,14 +11641,16 @@
|
|
|
11385
11641
|
CcdCYAPageLabelFilterPipe,
|
|
11386
11642
|
ReadFieldsFilterPipe,
|
|
11387
11643
|
CcdTabFieldsPipe,
|
|
11388
|
-
CcdPageFieldsPipe
|
|
11644
|
+
CcdPageFieldsPipe,
|
|
11645
|
+
LinkCasesReasonValuePipe], imports: [i1.CommonModule], exports: [CaseReferencePipe,
|
|
11389
11646
|
SortSearchResultPipe,
|
|
11390
11647
|
CcdCaseTitlePipe,
|
|
11391
11648
|
CcdCollectionTableCaseFieldsFilterPipe,
|
|
11392
11649
|
CcdCYAPageLabelFilterPipe,
|
|
11393
11650
|
ReadFieldsFilterPipe,
|
|
11394
11651
|
CcdTabFieldsPipe,
|
|
11395
|
-
CcdPageFieldsPipe
|
|
11652
|
+
CcdPageFieldsPipe,
|
|
11653
|
+
LinkCasesReasonValuePipe] });
|
|
11396
11654
|
})();
|
|
11397
11655
|
(function () {
|
|
11398
11656
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PipesModule, [{
|
|
@@ -11452,7 +11710,7 @@
|
|
|
11452
11710
|
return AddressOption;
|
|
11453
11711
|
}());
|
|
11454
11712
|
|
|
11455
|
-
var _c0$
|
|
11713
|
+
var _c0$R = ["writeComplexFieldComponent"];
|
|
11456
11714
|
function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) {
|
|
11457
11715
|
if (rf & 1) {
|
|
11458
11716
|
i0__namespace.ɵɵelementStart(0, "span", 14);
|
|
@@ -11666,7 +11924,7 @@
|
|
|
11666
11924
|
WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0__namespace.ɵɵdirectiveInject(AddressesService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe)); };
|
|
11667
11925
|
WriteAddressFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
|
|
11668
11926
|
if (rf & 1) {
|
|
11669
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
11927
|
+
i0__namespace.ɵɵviewQuery(_c0$R, 1);
|
|
11670
11928
|
i0__namespace.ɵɵviewQuery(FocusElementDirective, 1);
|
|
11671
11929
|
}
|
|
11672
11930
|
if (rf & 2) {
|
|
@@ -12326,7 +12584,7 @@
|
|
|
12326
12584
|
i0__namespace.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
|
|
12327
12585
|
}
|
|
12328
12586
|
}
|
|
12329
|
-
var _c0$
|
|
12587
|
+
var _c0$Q = function (a0) { return { "form-group-error": a0 }; };
|
|
12330
12588
|
function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) {
|
|
12331
12589
|
if (rf & 1) {
|
|
12332
12590
|
i0__namespace.ɵɵelementStart(0, "div", 8);
|
|
@@ -12347,7 +12605,7 @@
|
|
|
12347
12605
|
i0__namespace.ɵɵadvance(1);
|
|
12348
12606
|
i0__namespace.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
|
|
12349
12607
|
i0__namespace.ɵɵadvance(1);
|
|
12350
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
12608
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$Q, ctx_r1.errorMessages.length > 0));
|
|
12351
12609
|
i0__namespace.ɵɵadvance(1);
|
|
12352
12610
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
|
|
12353
12611
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -12733,8 +12991,8 @@
|
|
|
12733
12991
|
|
|
12734
12992
|
function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) {
|
|
12735
12993
|
if (rf & 1) {
|
|
12736
|
-
i0__namespace.ɵɵelementStart(0, "a",
|
|
12737
|
-
i0__namespace.ɵɵelementStart(1, "span",
|
|
12994
|
+
i0__namespace.ɵɵelementStart(0, "a", 2);
|
|
12995
|
+
i0__namespace.ɵɵelementStart(1, "span", 3);
|
|
12738
12996
|
i0__namespace.ɵɵtext(2);
|
|
12739
12997
|
i0__namespace.ɵɵpipe(3, "ccdCaseReference");
|
|
12740
12998
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -12747,38 +13005,60 @@
|
|
|
12747
13005
|
i0__namespace.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0__namespace.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
|
|
12748
13006
|
}
|
|
12749
13007
|
}
|
|
13008
|
+
function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) {
|
|
13009
|
+
if (rf & 1) {
|
|
13010
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
13011
|
+
i0__namespace.ɵɵelement(1, "ccd-read-linked-cases", 4);
|
|
13012
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
13013
|
+
}
|
|
13014
|
+
if (rf & 2) {
|
|
13015
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
13016
|
+
i0__namespace.ɵɵadvance(1);
|
|
13017
|
+
i0__namespace.ɵɵproperty("caseField", ctx_r1.caseField);
|
|
13018
|
+
}
|
|
13019
|
+
}
|
|
12750
13020
|
var ReadCaseLinkFieldComponent = /** @class */ (function (_super) {
|
|
12751
13021
|
__extends(ReadCaseLinkFieldComponent, _super);
|
|
12752
13022
|
function ReadCaseLinkFieldComponent() {
|
|
12753
|
-
|
|
13023
|
+
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
13024
|
+
_this.paletteContext = exports.PaletteContext;
|
|
13025
|
+
return _this;
|
|
12754
13026
|
}
|
|
12755
13027
|
ReadCaseLinkFieldComponent.prototype.hasReference = function () {
|
|
12756
13028
|
return this.caseField.value && this.caseField.value.CaseReference;
|
|
12757
13029
|
};
|
|
13030
|
+
ReadCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
|
|
13031
|
+
return (this.caseField.field_type &&
|
|
13032
|
+
this.caseField.field_type.type === 'Collection' &&
|
|
13033
|
+
this.caseField.field_type.collection_field_type.id === 'CaseLink');
|
|
13034
|
+
};
|
|
12758
13035
|
return ReadCaseLinkFieldComponent;
|
|
12759
13036
|
}(AbstractFieldReadComponent));
|
|
12760
13037
|
ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
|
|
12761
|
-
ReadCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls:
|
|
13038
|
+
ReadCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["target", "_blank", 3, "href", 4, "ngIf"], [4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"], [3, "caseField"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) {
|
|
12762
13039
|
if (rf & 1) {
|
|
12763
13040
|
i0__namespace.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
|
|
13041
|
+
i0__namespace.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
|
|
12764
13042
|
}
|
|
12765
13043
|
if (rf & 2) {
|
|
12766
13044
|
i0__namespace.ɵɵproperty("ngIf", ctx.hasReference());
|
|
13045
|
+
i0__namespace.ɵɵadvance(1);
|
|
13046
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
|
|
12767
13047
|
}
|
|
12768
|
-
},
|
|
13048
|
+
}, encapsulation: 2 });
|
|
12769
13049
|
var ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
|
|
12770
13050
|
(function () {
|
|
12771
13051
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
|
|
12772
13052
|
type: i0.Component,
|
|
12773
13053
|
args: [{
|
|
12774
13054
|
selector: 'ccd-read-case-link-field',
|
|
12775
|
-
templateUrl: 'read-case-link-field.html'
|
|
13055
|
+
templateUrl: 'read-case-link-field.html',
|
|
12776
13056
|
}]
|
|
12777
13057
|
}], null, null);
|
|
12778
13058
|
})();
|
|
12779
13059
|
|
|
12780
|
-
var _c0$
|
|
12781
|
-
function
|
|
13060
|
+
var _c0$P = ["writeComplexFieldComponent"];
|
|
13061
|
+
function WriteCaseLinkFieldComponent_div_1_span_2_Template(rf, ctx) {
|
|
12782
13062
|
if (rf & 1) {
|
|
12783
13063
|
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
12784
13064
|
i0__namespace.ɵɵtext(1);
|
|
@@ -12786,56 +13066,77 @@
|
|
|
12786
13066
|
i0__namespace.ɵɵelementEnd();
|
|
12787
13067
|
}
|
|
12788
13068
|
if (rf & 2) {
|
|
12789
|
-
var
|
|
13069
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
12790
13070
|
i0__namespace.ɵɵadvance(1);
|
|
12791
|
-
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1,
|
|
13071
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.caseField));
|
|
12792
13072
|
}
|
|
12793
13073
|
}
|
|
12794
|
-
function
|
|
13074
|
+
function WriteCaseLinkFieldComponent_div_1_span_3_Template(rf, ctx) {
|
|
12795
13075
|
if (rf & 1) {
|
|
12796
13076
|
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
12797
13077
|
i0__namespace.ɵɵtext(1);
|
|
12798
13078
|
i0__namespace.ɵɵelementEnd();
|
|
12799
13079
|
}
|
|
12800
13080
|
if (rf & 2) {
|
|
12801
|
-
var
|
|
13081
|
+
var ctx_r3 = i0__namespace.ɵɵnextContext(2);
|
|
12802
13082
|
i0__namespace.ɵɵadvance(1);
|
|
12803
|
-
i0__namespace.ɵɵtextInterpolate(
|
|
13083
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
|
|
12804
13084
|
}
|
|
12805
13085
|
}
|
|
12806
|
-
function
|
|
13086
|
+
function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) {
|
|
12807
13087
|
if (rf & 1) {
|
|
12808
|
-
i0__namespace.ɵɵelementStart(0, "
|
|
12809
|
-
i0__namespace.ɵɵ
|
|
12810
|
-
i0__namespace.ɵɵ
|
|
13088
|
+
i0__namespace.ɵɵelementStart(0, "div", 1);
|
|
13089
|
+
i0__namespace.ɵɵelementStart(1, "label", 2);
|
|
13090
|
+
i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
|
|
13091
|
+
i0__namespace.ɵɵelementEnd();
|
|
13092
|
+
i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
|
|
13093
|
+
i0__namespace.ɵɵelement(4, "input", 5);
|
|
12811
13094
|
i0__namespace.ɵɵelementEnd();
|
|
12812
13095
|
}
|
|
12813
13096
|
if (rf & 2) {
|
|
12814
|
-
var
|
|
13097
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
13098
|
+
i0__namespace.ɵɵadvance(1);
|
|
13099
|
+
i0__namespace.ɵɵproperty("for", ctx_r0.id());
|
|
13100
|
+
i0__namespace.ɵɵadvance(1);
|
|
13101
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.label);
|
|
13102
|
+
i0__namespace.ɵɵadvance(1);
|
|
13103
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
|
|
12815
13104
|
i0__namespace.ɵɵadvance(1);
|
|
12816
|
-
i0__namespace.ɵɵ
|
|
13105
|
+
i0__namespace.ɵɵproperty("id", ctx_r0.id())("formControl", ctx_r0.caseReferenceControl);
|
|
13106
|
+
}
|
|
13107
|
+
}
|
|
13108
|
+
function WriteCaseLinkFieldComponent_div_2_Template(rf, ctx) {
|
|
13109
|
+
if (rf & 1) {
|
|
13110
|
+
var _r5_1 = i0__namespace.ɵɵgetCurrentView();
|
|
13111
|
+
i0__namespace.ɵɵelementStart(0, "div", 1);
|
|
13112
|
+
i0__namespace.ɵɵelementStart(1, "ccd-write-linked-cases", 8);
|
|
13113
|
+
i0__namespace.ɵɵlistener("onLinkedCasesSelected", function WriteCaseLinkFieldComponent_div_2_Template_ccd_write_linked_cases_onLinkedCasesSelected_1_listener() { i0__namespace.ɵɵrestoreView(_r5_1); var ctx_r4 = i0__namespace.ɵɵnextContext(); return ctx_r4.submitLinkedCases(); });
|
|
13114
|
+
i0__namespace.ɵɵelementEnd();
|
|
13115
|
+
i0__namespace.ɵɵelementEnd();
|
|
13116
|
+
}
|
|
13117
|
+
if (rf & 2) {
|
|
13118
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
13119
|
+
i0__namespace.ɵɵadvance(1);
|
|
13120
|
+
i0__namespace.ɵɵproperty("caseFields", ctx_r1.caseFields)("caseField", ctx_r1.caseField)("formGroup", ctx_r1.formGroup)("isLinkedCasesJourney", ctx_r1.linkedCasesService.isLinkedCasesEventTrigger);
|
|
12817
13121
|
}
|
|
12818
13122
|
}
|
|
12819
|
-
var _c1$k = function (a0) { return { "form-group-error": a0 }; };
|
|
12820
13123
|
var WriteCaseLinkFieldComponent = /** @class */ (function (_super) {
|
|
12821
13124
|
__extends(WriteCaseLinkFieldComponent, _super);
|
|
12822
|
-
function WriteCaseLinkFieldComponent() {
|
|
12823
|
-
|
|
13125
|
+
function WriteCaseLinkFieldComponent(linkedCasesService) {
|
|
13126
|
+
var _this = _super.call(this) || this;
|
|
13127
|
+
_this.linkedCasesService = linkedCasesService;
|
|
13128
|
+
_this.caseFields = [];
|
|
13129
|
+
return _this;
|
|
12824
13130
|
}
|
|
12825
13131
|
WriteCaseLinkFieldComponent.prototype.ngOnInit = function () {
|
|
12826
13132
|
var e_1, _a;
|
|
12827
|
-
|
|
13133
|
+
this.formArray = this.registerControl(new i2.FormArray([]), true);
|
|
13134
|
+
this.formArray['caseField'] = this.caseField;
|
|
13135
|
+
if (!this.hasCaseLinkCollection()) {
|
|
12828
13136
|
this.caseLinkGroup = this.registerControl(new i2.FormGroup({
|
|
12829
13137
|
CaseReference: new i2.FormControl(this.caseField.value.CaseReference, i2.Validators.required),
|
|
12830
13138
|
}), true);
|
|
12831
13139
|
}
|
|
12832
|
-
else {
|
|
12833
|
-
this.caseLinkGroup = this.registerControl(new i2.FormGroup({
|
|
12834
|
-
CaseReference: new i2.FormControl(null, i2.Validators.required),
|
|
12835
|
-
}), true);
|
|
12836
|
-
}
|
|
12837
|
-
this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
|
|
12838
|
-
this.caseReferenceControl.setValidators(this.caseReferenceValidator());
|
|
12839
13140
|
// Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
|
|
12840
13141
|
// field uses the Complex type, it is meant to be treated as one field
|
|
12841
13142
|
if (this.caseField && this.caseField.field_type.type === 'Complex') {
|
|
@@ -12853,23 +13154,18 @@
|
|
|
12853
13154
|
finally { if (e_1) throw e_1.error; }
|
|
12854
13155
|
}
|
|
12855
13156
|
}
|
|
13157
|
+
this.containsCaseLinkCollection = this.hasCaseLinkCollection();
|
|
12856
13158
|
};
|
|
12857
|
-
WriteCaseLinkFieldComponent.prototype.
|
|
12858
|
-
var
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
if (control.touched) {
|
|
12868
|
-
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
12869
|
-
}
|
|
12870
|
-
}
|
|
12871
|
-
return null;
|
|
12872
|
-
};
|
|
13159
|
+
WriteCaseLinkFieldComponent.prototype.submitLinkedCases = function () {
|
|
13160
|
+
var formGroup = this.formGroup;
|
|
13161
|
+
if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
|
|
13162
|
+
var unlinkedCaseRefereneIds_1 = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
|
|
13163
|
+
this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue
|
|
13164
|
+
.filter(function (item) { return unlinkedCaseRefereneIds_1.indexOf(item.id) === -1; });
|
|
13165
|
+
}
|
|
13166
|
+
else if (formGroup.value && formGroup.value.caseLinks && this.linkedCasesService.linkedCases) {
|
|
13167
|
+
this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
|
|
13168
|
+
}
|
|
12873
13169
|
};
|
|
12874
13170
|
WriteCaseLinkFieldComponent.prototype.validCaseReference = function (valueString) {
|
|
12875
13171
|
if (!valueString) {
|
|
@@ -12877,43 +13173,36 @@
|
|
|
12877
13173
|
}
|
|
12878
13174
|
return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
|
|
12879
13175
|
};
|
|
13176
|
+
WriteCaseLinkFieldComponent.prototype.hasCaseLinkCollection = function () {
|
|
13177
|
+
return (this.caseField.field_type &&
|
|
13178
|
+
this.caseField.field_type.type === 'Collection' &&
|
|
13179
|
+
this.caseField.field_type.collection_field_type.id === 'CaseLink');
|
|
13180
|
+
};
|
|
12880
13181
|
return WriteCaseLinkFieldComponent;
|
|
12881
13182
|
}(AbstractFieldWriteComponent));
|
|
12882
|
-
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return
|
|
13183
|
+
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return new (t || WriteCaseLinkFieldComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
12883
13184
|
WriteCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) {
|
|
12884
13185
|
if (rf & 1) {
|
|
12885
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
13186
|
+
i0__namespace.ɵɵviewQuery(_c0$P, 1);
|
|
12886
13187
|
}
|
|
12887
13188
|
if (rf & 2) {
|
|
12888
13189
|
var _t = void 0;
|
|
12889
13190
|
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
12890
13191
|
}
|
|
12891
|
-
}, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls:
|
|
13192
|
+
}, inputs: { caseFields: "caseFields", formGroup: "formGroup" }, features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["class", "form-group", 4, "ngIf"], [1, "form-group"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [3, "caseFields", "caseField", "formGroup", "isLinkedCasesJourney", "onLinkedCasesSelected"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) {
|
|
12892
13193
|
if (rf & 1) {
|
|
12893
|
-
i0__namespace.ɵɵ
|
|
12894
|
-
i0__namespace.ɵɵ
|
|
12895
|
-
i0__namespace.ɵɵtemplate(2,
|
|
12896
|
-
i0__namespace.ɵɵ
|
|
12897
|
-
i0__namespace.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
12898
|
-
i0__namespace.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
12899
|
-
i0__namespace.ɵɵelement(5, "input", 5);
|
|
12900
|
-
i0__namespace.ɵɵelementEnd();
|
|
13194
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
13195
|
+
i0__namespace.ɵɵtemplate(1, WriteCaseLinkFieldComponent_div_1_Template, 5, 5, "div", 0);
|
|
13196
|
+
i0__namespace.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_2_Template, 2, 4, "div", 0);
|
|
13197
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
12901
13198
|
}
|
|
12902
13199
|
if (rf & 2) {
|
|
12903
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$k, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
12904
|
-
i0__namespace.ɵɵadvance(1);
|
|
12905
|
-
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
12906
|
-
i0__namespace.ɵɵadvance(1);
|
|
12907
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
12908
|
-
i0__namespace.ɵɵadvance(1);
|
|
12909
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
12910
13200
|
i0__namespace.ɵɵadvance(1);
|
|
12911
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.
|
|
13201
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx.containsCaseLinkCollection);
|
|
12912
13202
|
i0__namespace.ɵɵadvance(1);
|
|
12913
|
-
i0__namespace.ɵɵproperty("
|
|
13203
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.containsCaseLinkCollection);
|
|
12914
13204
|
}
|
|
12915
|
-
},
|
|
12916
|
-
var ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
|
|
13205
|
+
}, encapsulation: 2 });
|
|
12917
13206
|
(function () {
|
|
12918
13207
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
|
|
12919
13208
|
type: i0.Component,
|
|
@@ -12921,13 +13210,17 @@
|
|
|
12921
13210
|
selector: 'ccd-write-case-link-field',
|
|
12922
13211
|
templateUrl: 'write-case-link-field.html'
|
|
12923
13212
|
}]
|
|
12924
|
-
}],
|
|
13213
|
+
}], function () { return [{ type: LinkedCasesService }]; }, { caseFields: [{
|
|
13214
|
+
type: i0.Input
|
|
13215
|
+
}], formGroup: [{
|
|
13216
|
+
type: i0.Input
|
|
13217
|
+
}], writeComplexFieldComponent: [{
|
|
12925
13218
|
type: i0.ViewChild,
|
|
12926
|
-
args: ['writeComplexFieldComponent']
|
|
13219
|
+
args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
|
|
12927
13220
|
}] });
|
|
12928
13221
|
})();
|
|
12929
13222
|
|
|
12930
|
-
var _c0$
|
|
13223
|
+
var _c0$O = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
|
|
12931
13224
|
function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
|
|
12932
13225
|
if (rf & 1) {
|
|
12933
13226
|
i0__namespace.ɵɵelementStart(0, "tbody");
|
|
@@ -12942,10 +13235,10 @@
|
|
|
12942
13235
|
if (rf & 2) {
|
|
12943
13236
|
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
12944
13237
|
i0__namespace.ɵɵadvance(4);
|
|
12945
|
-
i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$
|
|
13238
|
+
i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$O, 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);
|
|
12946
13239
|
}
|
|
12947
13240
|
}
|
|
12948
|
-
var _c1$
|
|
13241
|
+
var _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
12949
13242
|
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) {
|
|
12950
13243
|
if (rf & 1) {
|
|
12951
13244
|
i0__namespace.ɵɵelementStart(0, "tr");
|
|
@@ -12959,7 +13252,7 @@
|
|
|
12959
13252
|
var i_r5 = ctx.index;
|
|
12960
13253
|
var ctx_r3 = i0__namespace.ɵɵnextContext(3);
|
|
12961
13254
|
i0__namespace.ɵɵadvance(2);
|
|
12962
|
-
i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction5(4, _c1$
|
|
13255
|
+
i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction5(4, _c1$k, 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));
|
|
12963
13256
|
}
|
|
12964
13257
|
}
|
|
12965
13258
|
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) {
|
|
@@ -13093,7 +13386,7 @@
|
|
|
13093
13386
|
}], function () { return [{ type: i1__namespace$3.MatDialogRef }]; }, null);
|
|
13094
13387
|
})();
|
|
13095
13388
|
|
|
13096
|
-
var _c0$
|
|
13389
|
+
var _c0$N = ["collectionItem"];
|
|
13097
13390
|
function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) {
|
|
13098
13391
|
if (rf & 1) {
|
|
13099
13392
|
i0__namespace.ɵɵelementStart(0, "span", 9);
|
|
@@ -13506,7 +13799,7 @@
|
|
|
13506
13799
|
WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(i2__namespace$1.ScrollToService), i0__namespace.ɵɵdirectiveInject(ProfileNotifier)); };
|
|
13507
13800
|
WriteCollectionFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) {
|
|
13508
13801
|
if (rf & 1) {
|
|
13509
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
13802
|
+
i0__namespace.ɵɵviewQuery(_c0$N, 1);
|
|
13510
13803
|
}
|
|
13511
13804
|
if (rf & 2) {
|
|
13512
13805
|
var _t = void 0;
|
|
@@ -14094,7 +14387,7 @@
|
|
|
14094
14387
|
}], null, null);
|
|
14095
14388
|
})();
|
|
14096
14389
|
|
|
14097
|
-
var _c0$
|
|
14390
|
+
var _c0$M = ["fileInput"];
|
|
14098
14391
|
function WriteDocumentFieldComponent_span_6_Template(rf, ctx) {
|
|
14099
14392
|
if (rf & 1) {
|
|
14100
14393
|
i0__namespace.ɵɵelementStart(0, "span", 12);
|
|
@@ -14128,7 +14421,7 @@
|
|
|
14128
14421
|
i0__namespace.ɵɵproperty("caseField", ctx_r2.caseField);
|
|
14129
14422
|
}
|
|
14130
14423
|
}
|
|
14131
|
-
var _c1$
|
|
14424
|
+
var _c1$j = function (a0) { return { "form-group-error bottom-30": a0 }; };
|
|
14132
14425
|
var WriteDocumentFieldComponent = /** @class */ (function (_super) {
|
|
14133
14426
|
__extends(WriteDocumentFieldComponent, _super);
|
|
14134
14427
|
function WriteDocumentFieldComponent(appConfig, caseNotifier, documentManagement, dialog, fileUploadStateService) {
|
|
@@ -14388,7 +14681,7 @@
|
|
|
14388
14681
|
WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(FileUploadStateService)); };
|
|
14389
14682
|
WriteDocumentFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
|
|
14390
14683
|
if (rf & 1) {
|
|
14391
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
14684
|
+
i0__namespace.ɵɵviewQuery(_c0$M, 1);
|
|
14392
14685
|
}
|
|
14393
14686
|
if (rf & 2) {
|
|
14394
14687
|
var _t = void 0;
|
|
@@ -14430,7 +14723,7 @@
|
|
|
14430
14723
|
i0__namespace.ɵɵelementEnd();
|
|
14431
14724
|
}
|
|
14432
14725
|
if (rf & 2) {
|
|
14433
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$
|
|
14726
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(15, _c1$j, !ctx.valid));
|
|
14434
14727
|
i0__namespace.ɵɵadvance(1);
|
|
14435
14728
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14436
14729
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14588,7 +14881,7 @@
|
|
|
14588
14881
|
i0__namespace.ɵɵtextInterpolate(type_r5.label);
|
|
14589
14882
|
}
|
|
14590
14883
|
}
|
|
14591
|
-
var _c0$
|
|
14884
|
+
var _c0$L = function (a0) { return { "form-group-error": a0 }; };
|
|
14592
14885
|
var WriteDynamicListFieldComponent = /** @class */ (function (_super) {
|
|
14593
14886
|
__extends(WriteDynamicListFieldComponent, _super);
|
|
14594
14887
|
function WriteDynamicListFieldComponent() {
|
|
@@ -14637,7 +14930,7 @@
|
|
|
14637
14930
|
i0__namespace.ɵɵelementEnd();
|
|
14638
14931
|
}
|
|
14639
14932
|
if (rf & 2) {
|
|
14640
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$
|
|
14933
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$L, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
|
|
14641
14934
|
i0__namespace.ɵɵadvance(1);
|
|
14642
14935
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14643
14936
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14787,7 +15080,7 @@
|
|
|
14787
15080
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r3.dynamicRadioListControl.errors));
|
|
14788
15081
|
}
|
|
14789
15082
|
}
|
|
14790
|
-
var _c0$
|
|
15083
|
+
var _c0$K = function (a0) { return { selected: a0 }; };
|
|
14791
15084
|
function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) {
|
|
14792
15085
|
if (rf & 1) {
|
|
14793
15086
|
i0__namespace.ɵɵelementStart(0, "div", 10);
|
|
@@ -14800,7 +15093,7 @@
|
|
|
14800
15093
|
if (rf & 2) {
|
|
14801
15094
|
var radioButton_r5 = ctx.$implicit;
|
|
14802
15095
|
var ctx_r4 = i0__namespace.ɵɵnextContext();
|
|
14803
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$
|
|
15096
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
|
|
14804
15097
|
i0__namespace.ɵɵadvance(1);
|
|
14805
15098
|
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r4.id());
|
|
14806
15099
|
i0__namespace.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
|
|
@@ -14810,7 +15103,7 @@
|
|
|
14810
15103
|
i0__namespace.ɵɵtextInterpolate(radioButton_r5.label);
|
|
14811
15104
|
}
|
|
14812
15105
|
}
|
|
14813
|
-
var _c1$
|
|
15106
|
+
var _c1$i = function (a0) { return { "form-group-error": a0 }; };
|
|
14814
15107
|
var WriteDynamicRadioListFieldComponent = /** @class */ (function (_super) {
|
|
14815
15108
|
__extends(WriteDynamicRadioListFieldComponent, _super);
|
|
14816
15109
|
function WriteDynamicRadioListFieldComponent() {
|
|
@@ -14858,7 +15151,7 @@
|
|
|
14858
15151
|
i0__namespace.ɵɵelementEnd();
|
|
14859
15152
|
}
|
|
14860
15153
|
if (rf & 2) {
|
|
14861
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$
|
|
15154
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c1$i, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
14862
15155
|
i0__namespace.ɵɵadvance(3);
|
|
14863
15156
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14864
15157
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14965,8 +15258,8 @@
|
|
|
14965
15258
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.emailControl.errors, ctx_r2.caseField.label));
|
|
14966
15259
|
}
|
|
14967
15260
|
}
|
|
14968
|
-
var _c0$
|
|
14969
|
-
var _c1$
|
|
15261
|
+
var _c0$J = function (a0) { return { "form-group-error": a0 }; };
|
|
15262
|
+
var _c1$h = function (a0) { return { "govuk-input--error": a0 }; };
|
|
14970
15263
|
var WriteEmailFieldComponent = /** @class */ (function (_super) {
|
|
14971
15264
|
__extends(WriteEmailFieldComponent, _super);
|
|
14972
15265
|
function WriteEmailFieldComponent() {
|
|
@@ -14990,7 +15283,7 @@
|
|
|
14990
15283
|
i0__namespace.ɵɵelementEnd();
|
|
14991
15284
|
}
|
|
14992
15285
|
if (rf & 2) {
|
|
14993
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
15286
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$J, !ctx.emailControl.valid && (ctx.emailControl.dirty || ctx.emailControl.touched)));
|
|
14994
15287
|
i0__namespace.ɵɵadvance(1);
|
|
14995
15288
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14996
15289
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15000,7 +15293,7 @@
|
|
|
15000
15293
|
i0__namespace.ɵɵadvance(1);
|
|
15001
15294
|
i0__namespace.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
|
|
15002
15295
|
i0__namespace.ɵɵadvance(1);
|
|
15003
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$
|
|
15296
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$h, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
|
|
15004
15297
|
}
|
|
15005
15298
|
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
15006
15299
|
var ɵWriteEmailFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteEmailFieldComponent);
|
|
@@ -15122,7 +15415,7 @@
|
|
|
15122
15415
|
i0__namespace.ɵɵtextInterpolate(type_r4.label);
|
|
15123
15416
|
}
|
|
15124
15417
|
}
|
|
15125
|
-
var _c0$
|
|
15418
|
+
var _c0$I = function (a0) { return { "form-group-error": a0 }; };
|
|
15126
15419
|
var WriteFixedListFieldComponent = /** @class */ (function (_super) {
|
|
15127
15420
|
__extends(WriteFixedListFieldComponent, _super);
|
|
15128
15421
|
function WriteFixedListFieldComponent() {
|
|
@@ -15171,7 +15464,7 @@
|
|
|
15171
15464
|
i0__namespace.ɵɵelementEnd();
|
|
15172
15465
|
}
|
|
15173
15466
|
if (rf & 2) {
|
|
15174
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$
|
|
15467
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$I, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
|
|
15175
15468
|
i0__namespace.ɵɵadvance(1);
|
|
15176
15469
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
15177
15470
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15289,7 +15582,7 @@
|
|
|
15289
15582
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
15290
15583
|
}
|
|
15291
15584
|
}
|
|
15292
|
-
var _c0$
|
|
15585
|
+
var _c0$H = function (a0) { return { selected: a0 }; };
|
|
15293
15586
|
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) {
|
|
15294
15587
|
if (rf & 1) {
|
|
15295
15588
|
i0__namespace.ɵɵelementStart(0, "div", 9);
|
|
@@ -15302,7 +15595,7 @@
|
|
|
15302
15595
|
if (rf & 2) {
|
|
15303
15596
|
var radioButton_r4 = ctx.$implicit;
|
|
15304
15597
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
15305
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$
|
|
15598
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$H, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
15306
15599
|
i0__namespace.ɵɵadvance(1);
|
|
15307
15600
|
i0__namespace.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
15308
15601
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15311,7 +15604,7 @@
|
|
|
15311
15604
|
i0__namespace.ɵɵtextInterpolate(radioButton_r4.label);
|
|
15312
15605
|
}
|
|
15313
15606
|
}
|
|
15314
|
-
var _c1$
|
|
15607
|
+
var _c1$g = function (a0) { return { "form-group-error": a0 }; };
|
|
15315
15608
|
var WriteFixedRadioListFieldComponent = /** @class */ (function (_super) {
|
|
15316
15609
|
__extends(WriteFixedRadioListFieldComponent, _super);
|
|
15317
15610
|
function WriteFixedRadioListFieldComponent() {
|
|
@@ -15342,7 +15635,7 @@
|
|
|
15342
15635
|
i0__namespace.ɵɵelementEnd();
|
|
15343
15636
|
}
|
|
15344
15637
|
if (rf & 2) {
|
|
15345
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$
|
|
15638
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$g, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
15346
15639
|
i0__namespace.ɵɵadvance(3);
|
|
15347
15640
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
15348
15641
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15472,7 +15765,7 @@
|
|
|
15472
15765
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.caseField.hint_text, " ");
|
|
15473
15766
|
}
|
|
15474
15767
|
}
|
|
15475
|
-
var _c0$
|
|
15768
|
+
var _c0$G = function (a0) { return { "hide-autocomplete": a0 }; };
|
|
15476
15769
|
function WriteJudicialUserFieldComponent_mat_option_7_Template(rf, ctx) {
|
|
15477
15770
|
if (rf & 1) {
|
|
15478
15771
|
var _r7_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -15484,7 +15777,7 @@
|
|
|
15484
15777
|
if (rf & 2) {
|
|
15485
15778
|
var judicialUser_r5 = ctx.$implicit;
|
|
15486
15779
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
15487
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$
|
|
15780
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$G, !ctx_r3.showAutocomplete))("value", judicialUser_r5.idamId);
|
|
15488
15781
|
i0__namespace.ɵɵadvance(1);
|
|
15489
15782
|
i0__namespace.ɵɵtextInterpolate2(" ", judicialUser_r5.fullName, " (", judicialUser_r5.emailId, ") ");
|
|
15490
15783
|
}
|
|
@@ -15831,7 +16124,7 @@
|
|
|
15831
16124
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.moneyGbpControl.errors, ctx_r2.caseField.label));
|
|
15832
16125
|
}
|
|
15833
16126
|
}
|
|
15834
|
-
var _c0$
|
|
16127
|
+
var _c0$F = function (a0) { return { "form-group-error": a0 }; };
|
|
15835
16128
|
var WriteMoneyGbpFieldComponent = /** @class */ (function (_super) {
|
|
15836
16129
|
__extends(WriteMoneyGbpFieldComponent, _super);
|
|
15837
16130
|
function WriteMoneyGbpFieldComponent() {
|
|
@@ -15861,7 +16154,7 @@
|
|
|
15861
16154
|
i0__namespace.ɵɵelementEnd();
|
|
15862
16155
|
}
|
|
15863
16156
|
if (rf & 2) {
|
|
15864
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
16157
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$F, !ctx.moneyGbpControl.valid && (ctx.moneyGbpControl.dirty || ctx.moneyGbpControl.touched)));
|
|
15865
16158
|
i0__namespace.ɵɵadvance(1);
|
|
15866
16159
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
15867
16160
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -16009,7 +16302,7 @@
|
|
|
16009
16302
|
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
16010
16303
|
}
|
|
16011
16304
|
}
|
|
16012
|
-
var _c0$
|
|
16305
|
+
var _c0$E = function (a0) { return { "error": a0 }; };
|
|
16013
16306
|
var WriteMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
16014
16307
|
__extends(WriteMultiSelectListFieldComponent, _super);
|
|
16015
16308
|
function WriteMultiSelectListFieldComponent() {
|
|
@@ -16073,7 +16366,7 @@
|
|
|
16073
16366
|
i0__namespace.ɵɵelementEnd();
|
|
16074
16367
|
}
|
|
16075
16368
|
if (rf & 2) {
|
|
16076
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$
|
|
16369
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$E, !ctx.checkboxes.valid && (ctx.checkboxes.dirty || ctx.checkboxes.touched)))("id", ctx.id());
|
|
16077
16370
|
i0__namespace.ɵɵadvance(3);
|
|
16078
16371
|
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
16079
16372
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -16164,8 +16457,8 @@
|
|
|
16164
16457
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.numberControl.errors, ctx_r2.caseField.label));
|
|
16165
16458
|
}
|
|
16166
16459
|
}
|
|
16167
|
-
var _c0$
|
|
16168
|
-
var _c1$
|
|
16460
|
+
var _c0$D = function (a0) { return { "form-group-error": a0 }; };
|
|
16461
|
+
var _c1$f = function (a0) { return { "govuk-input--error": a0 }; };
|
|
16169
16462
|
var WriteNumberFieldComponent = /** @class */ (function (_super) {
|
|
16170
16463
|
__extends(WriteNumberFieldComponent, _super);
|
|
16171
16464
|
function WriteNumberFieldComponent() {
|
|
@@ -16189,7 +16482,7 @@
|
|
|
16189
16482
|
i0__namespace.ɵɵelementEnd();
|
|
16190
16483
|
}
|
|
16191
16484
|
if (rf & 2) {
|
|
16192
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
16485
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$D, !ctx.numberControl.valid && ctx.numberControl.dirty));
|
|
16193
16486
|
i0__namespace.ɵɵadvance(1);
|
|
16194
16487
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
16195
16488
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -16199,7 +16492,7 @@
|
|
|
16199
16492
|
i0__namespace.ɵɵadvance(1);
|
|
16200
16493
|
i0__namespace.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
|
|
16201
16494
|
i0__namespace.ɵɵadvance(1);
|
|
16202
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$
|
|
16495
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
|
|
16203
16496
|
}
|
|
16204
16497
|
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.NumberValueAccessor, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
16205
16498
|
var ɵWriteNumberFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteNumberFieldComponent);
|
|
@@ -16490,7 +16783,7 @@
|
|
|
16490
16783
|
i0__namespace.ɵɵelementEnd();
|
|
16491
16784
|
}
|
|
16492
16785
|
}
|
|
16493
|
-
var _c0$
|
|
16786
|
+
var _c0$C = function (a0) { return { "scroll-container ": a0 }; };
|
|
16494
16787
|
function WriteOrganisationFieldComponent_fieldset_3_div_14_Template(rf, ctx) {
|
|
16495
16788
|
if (rf & 1) {
|
|
16496
16789
|
i0__namespace.ɵɵelementStart(0, "div", 26);
|
|
@@ -16506,7 +16799,7 @@
|
|
|
16506
16799
|
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
16507
16800
|
var tmp_0_0 = null;
|
|
16508
16801
|
var tmp_2_0 = null;
|
|
16509
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$
|
|
16802
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c0$C, ((tmp_0_0 = i0__namespace.ɵɵpipeBind1(1, 3, ctx_r2.simpleOrganisations$)) == null ? null : tmp_0_0.length) > 10));
|
|
16510
16803
|
i0__namespace.ɵɵadvance(2);
|
|
16511
16804
|
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind1(3, 5, ctx_r2.simpleOrganisations$));
|
|
16512
16805
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -16978,8 +17271,8 @@
|
|
|
16978
17271
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.phoneUkControl.errors, ctx_r2.caseField.label));
|
|
16979
17272
|
}
|
|
16980
17273
|
}
|
|
16981
|
-
var _c0$
|
|
16982
|
-
var _c1$
|
|
17274
|
+
var _c0$B = function (a0) { return { "form-group-error": a0 }; };
|
|
17275
|
+
var _c1$e = function (a0) { return { "govuk-input--error": a0 }; };
|
|
16983
17276
|
var WritePhoneUKFieldComponent = /** @class */ (function (_super) {
|
|
16984
17277
|
__extends(WritePhoneUKFieldComponent, _super);
|
|
16985
17278
|
function WritePhoneUKFieldComponent() {
|
|
@@ -17003,7 +17296,7 @@
|
|
|
17003
17296
|
i0__namespace.ɵɵelementEnd();
|
|
17004
17297
|
}
|
|
17005
17298
|
if (rf & 2) {
|
|
17006
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
17299
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$B, !ctx.phoneUkControl.valid && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched)));
|
|
17007
17300
|
i0__namespace.ɵɵadvance(1);
|
|
17008
17301
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
17009
17302
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -17013,7 +17306,7 @@
|
|
|
17013
17306
|
i0__namespace.ɵɵadvance(1);
|
|
17014
17307
|
i0__namespace.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
|
|
17015
17308
|
i0__namespace.ɵɵadvance(1);
|
|
17016
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$
|
|
17309
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
|
|
17017
17310
|
}
|
|
17018
17311
|
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
17019
17312
|
var ɵWritePhoneUKFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WritePhoneUKFieldComponent);
|
|
@@ -17095,8 +17388,8 @@
|
|
|
17095
17388
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textareaControl.errors, ctx_r2.caseField.label));
|
|
17096
17389
|
}
|
|
17097
17390
|
}
|
|
17098
|
-
var _c0$
|
|
17099
|
-
var _c1$
|
|
17391
|
+
var _c0$A = function (a0) { return { "form-group-error": a0 }; };
|
|
17392
|
+
var _c1$d = function (a0) { return { "govuk-textarea--error": a0 }; };
|
|
17100
17393
|
var WriteTextAreaFieldComponent = /** @class */ (function (_super) {
|
|
17101
17394
|
__extends(WriteTextAreaFieldComponent, _super);
|
|
17102
17395
|
function WriteTextAreaFieldComponent(browserService) {
|
|
@@ -17131,7 +17424,7 @@
|
|
|
17131
17424
|
i0__namespace.ɵɵelementEnd();
|
|
17132
17425
|
}
|
|
17133
17426
|
if (rf & 2) {
|
|
17134
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
17427
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$A, !ctx.textareaControl.valid && ctx.textareaControl.dirty));
|
|
17135
17428
|
i0__namespace.ɵɵadvance(1);
|
|
17136
17429
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
17137
17430
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -17141,7 +17434,7 @@
|
|
|
17141
17434
|
i0__namespace.ɵɵadvance(1);
|
|
17142
17435
|
i0__namespace.ɵɵproperty("ngIf", ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched));
|
|
17143
17436
|
i0__namespace.ɵɵadvance(1);
|
|
17144
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$
|
|
17437
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$d, ctx.textareaControl.errors && (ctx.textareaControl.dirty || ctx.textareaControl.touched)))("id", ctx.id())("formControl", ctx.textareaControl);
|
|
17145
17438
|
}
|
|
17146
17439
|
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
17147
17440
|
(function () {
|
|
@@ -17223,8 +17516,8 @@
|
|
|
17223
17516
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.textControl.errors, ctx_r2.caseField.label));
|
|
17224
17517
|
}
|
|
17225
17518
|
}
|
|
17226
|
-
var _c0$
|
|
17227
|
-
var _c1$
|
|
17519
|
+
var _c0$z = function (a0) { return { "form-group-error": a0 }; };
|
|
17520
|
+
var _c1$c = function (a0) { return { "govuk-input--error": a0 }; };
|
|
17228
17521
|
var WriteTextFieldComponent = /** @class */ (function (_super) {
|
|
17229
17522
|
__extends(WriteTextFieldComponent, _super);
|
|
17230
17523
|
function WriteTextFieldComponent() {
|
|
@@ -17253,7 +17546,7 @@
|
|
|
17253
17546
|
i0__namespace.ɵɵelementEnd();
|
|
17254
17547
|
}
|
|
17255
17548
|
if (rf & 2) {
|
|
17256
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
17549
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$z, !!ctx.textControl && !ctx.textControl.valid && (ctx.textControl.dirty || ctx.textControl.touched)));
|
|
17257
17550
|
i0__namespace.ɵɵadvance(1);
|
|
17258
17551
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
17259
17552
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -17263,7 +17556,7 @@
|
|
|
17263
17556
|
i0__namespace.ɵɵadvance(1);
|
|
17264
17557
|
i0__namespace.ɵɵproperty("ngIf", (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched));
|
|
17265
17558
|
i0__namespace.ɵɵadvance(1);
|
|
17266
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$
|
|
17559
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c1$c, (ctx.textControl == null ? null : ctx.textControl.errors) && (ctx.textControl.dirty || ctx.textControl.touched)))("id", ctx.id())("formControl", ctx.textControl);
|
|
17267
17560
|
}
|
|
17268
17561
|
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
17269
17562
|
var ɵWriteTextFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteTextFieldComponent);
|
|
@@ -17461,7 +17754,7 @@
|
|
|
17461
17754
|
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind2(2, 1, ctx_r2.yesNoControl.errors, ctx_r2.caseField.label));
|
|
17462
17755
|
}
|
|
17463
17756
|
}
|
|
17464
|
-
var _c0$
|
|
17757
|
+
var _c0$y = function (a0) { return { selected: a0 }; };
|
|
17465
17758
|
function WriteYesNoFieldComponent_div_7_Template(rf, ctx) {
|
|
17466
17759
|
if (rf & 1) {
|
|
17467
17760
|
i0__namespace.ɵɵelementStart(0, "div", 10);
|
|
@@ -17474,7 +17767,7 @@
|
|
|
17474
17767
|
if (rf & 2) {
|
|
17475
17768
|
var value_r4 = ctx.$implicit;
|
|
17476
17769
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
17477
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
17770
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$y, ctx_r3.yesNoControl.value === value_r4));
|
|
17478
17771
|
i0__namespace.ɵɵadvance(1);
|
|
17479
17772
|
i0__namespace.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
|
|
17480
17773
|
i0__namespace.ɵɵattribute("name", ctx_r3.id());
|
|
@@ -17484,7 +17777,7 @@
|
|
|
17484
17777
|
i0__namespace.ɵɵtextInterpolate(value_r4);
|
|
17485
17778
|
}
|
|
17486
17779
|
}
|
|
17487
|
-
var _c1$
|
|
17780
|
+
var _c1$b = function (a0) { return { "form-group-error": a0 }; };
|
|
17488
17781
|
var WriteYesNoFieldComponent = /** @class */ (function (_super) {
|
|
17489
17782
|
__extends(WriteYesNoFieldComponent, _super);
|
|
17490
17783
|
function WriteYesNoFieldComponent(yesNoService) {
|
|
@@ -17515,7 +17808,7 @@
|
|
|
17515
17808
|
i0__namespace.ɵɵelementEnd();
|
|
17516
17809
|
}
|
|
17517
17810
|
if (rf & 2) {
|
|
17518
|
-
i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$
|
|
17811
|
+
i0__namespace.ɵɵproperty("id", ctx.id())("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$b, !ctx.yesNoControl.valid && (ctx.yesNoControl.dirty || ctx.yesNoControl.touched)));
|
|
17519
17812
|
i0__namespace.ɵɵadvance(3);
|
|
17520
17813
|
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
17521
17814
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -17579,17 +17872,25 @@
|
|
|
17579
17872
|
return write ? WriteAddressFieldComponent : ReadComplexFieldComponent;
|
|
17580
17873
|
case 'OrderSummary':
|
|
17581
17874
|
return write ? WriteOrderSummaryFieldComponent : ReadOrderSummaryFieldComponent;
|
|
17582
|
-
case 'CaseLink':
|
|
17583
|
-
return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
|
|
17584
17875
|
case 'Organisation':
|
|
17585
17876
|
return write ? WriteOrganisationFieldComponent : ReadOrganisationFieldComponent;
|
|
17586
17877
|
case 'JudicialUser':
|
|
17587
17878
|
return write ? WriteJudicialUserFieldComponent : ReadJudicialUserFieldComponent;
|
|
17879
|
+
case 'CaseLink':
|
|
17880
|
+
return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
|
|
17588
17881
|
default:
|
|
17589
17882
|
return write ? WriteComplexFieldComponent : ReadComplexFieldComponent;
|
|
17590
17883
|
}
|
|
17591
17884
|
case 'Collection':
|
|
17592
|
-
|
|
17885
|
+
switch (caseField.field_type.collection_field_type.id) {
|
|
17886
|
+
case 'CaseLink':
|
|
17887
|
+
if (caseField.id === 'caseLinks') {
|
|
17888
|
+
return write ? WriteCaseLinkFieldComponent : ReadCaseLinkFieldComponent;
|
|
17889
|
+
}
|
|
17890
|
+
return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
|
|
17891
|
+
default:
|
|
17892
|
+
return write ? WriteCollectionFieldComponent : ReadCollectionFieldComponent;
|
|
17893
|
+
}
|
|
17593
17894
|
case 'MultiSelectList':
|
|
17594
17895
|
return write ? WriteMultiSelectListFieldComponent : ReadMultiSelectListFieldComponent;
|
|
17595
17896
|
case 'Document':
|
|
@@ -17629,7 +17930,7 @@
|
|
|
17629
17930
|
}], null, null);
|
|
17630
17931
|
})();
|
|
17631
17932
|
|
|
17632
|
-
var _c0$
|
|
17933
|
+
var _c0$x = ["fieldContainer"];
|
|
17633
17934
|
var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
|
|
17634
17935
|
var FieldReadComponent = /** @class */ (function (_super) {
|
|
17635
17936
|
__extends(FieldReadComponent, _super);
|
|
@@ -17678,7 +17979,7 @@
|
|
|
17678
17979
|
FieldReadComponent.ɵfac = function FieldReadComponent_Factory(t) { return new (t || FieldReadComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
|
|
17679
17980
|
FieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadComponent, selectors: [["ccd-field-read"]], viewQuery: function FieldReadComponent_Query(rf, ctx) {
|
|
17680
17981
|
if (rf & 1) {
|
|
17681
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
17982
|
+
i0__namespace.ɵɵviewQuery(_c0$x, 1, i0.ViewContainerRef);
|
|
17682
17983
|
}
|
|
17683
17984
|
if (rf & 2) {
|
|
17684
17985
|
var _t = void 0;
|
|
@@ -17719,7 +18020,7 @@
|
|
|
17719
18020
|
}] });
|
|
17720
18021
|
})();
|
|
17721
18022
|
|
|
17722
|
-
var _c0$
|
|
18023
|
+
var _c0$w = ["fieldContainer"];
|
|
17723
18024
|
var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
|
|
17724
18025
|
var FieldWriteComponent = /** @class */ (function (_super) {
|
|
17725
18026
|
__extends(FieldWriteComponent, _super);
|
|
@@ -17767,7 +18068,7 @@
|
|
|
17767
18068
|
FieldWriteComponent.ɵfac = function FieldWriteComponent_Factory(t) { return new (t || FieldWriteComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵdirectiveInject(PaletteService)); };
|
|
17768
18069
|
FieldWriteComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldWriteComponent, selectors: [["ccd-field-write"]], viewQuery: function FieldWriteComponent_Query(rf, ctx) {
|
|
17769
18070
|
if (rf & 1) {
|
|
17770
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
18071
|
+
i0__namespace.ɵɵviewQuery(_c0$w, 3, i0.ViewContainerRef);
|
|
17771
18072
|
}
|
|
17772
18073
|
if (rf & 2) {
|
|
17773
18074
|
var _t = void 0;
|
|
@@ -17830,7 +18131,7 @@
|
|
|
17830
18131
|
i0__namespace.ɵɵprojection(0);
|
|
17831
18132
|
}
|
|
17832
18133
|
}
|
|
17833
|
-
var _c0$
|
|
18134
|
+
var _c0$v = ["*"];
|
|
17834
18135
|
var FieldReadLabelComponent = /** @class */ (function (_super) {
|
|
17835
18136
|
__extends(FieldReadLabelComponent, _super);
|
|
17836
18137
|
function FieldReadLabelComponent() {
|
|
@@ -17868,7 +18169,7 @@
|
|
|
17868
18169
|
return FieldReadLabelComponent;
|
|
17869
18170
|
}(AbstractFieldReadComponent));
|
|
17870
18171
|
FieldReadLabelComponent.ɵfac = function FieldReadLabelComponent_Factory(t) { return ɵFieldReadLabelComponent_BaseFactory(t || FieldReadLabelComponent); };
|
|
17871
|
-
FieldReadLabelComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$
|
|
18172
|
+
FieldReadLabelComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FieldReadLabelComponent, selectors: [["ccd-field-read-label"]], inputs: { withLabel: "withLabel", markdownUseHrefAsRouterLink: "markdownUseHrefAsRouterLink" }, features: [i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵNgOnChangesFeature], ngContentSelectors: _c0$v, 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) {
|
|
17872
18173
|
if (rf & 1) {
|
|
17873
18174
|
i0__namespace.ɵɵprojectionDef();
|
|
17874
18175
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
@@ -17907,7 +18208,7 @@
|
|
|
17907
18208
|
i0__namespace.ɵɵelementContainer(0);
|
|
17908
18209
|
}
|
|
17909
18210
|
}
|
|
17910
|
-
var _c0$
|
|
18211
|
+
var _c0$u = function (a0) { return { cat: a0, level: 1 }; };
|
|
17911
18212
|
function CaseFileViewFolderSelectorComponent_ng_container_6_Template(rf, ctx) {
|
|
17912
18213
|
if (rf & 1) {
|
|
17913
18214
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
@@ -17919,7 +18220,7 @@
|
|
|
17919
18220
|
i0__namespace.ɵɵnextContext();
|
|
17920
18221
|
var _r1 = i0__namespace.ɵɵreference(13);
|
|
17921
18222
|
i0__namespace.ɵɵadvance(1);
|
|
17922
|
-
i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$
|
|
18223
|
+
i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction1(2, _c0$u, cat_r3));
|
|
17923
18224
|
}
|
|
17924
18225
|
}
|
|
17925
18226
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_ng_container_1_Template(rf, ctx) {
|
|
@@ -17927,7 +18228,7 @@
|
|
|
17927
18228
|
i0__namespace.ɵɵelementContainer(0);
|
|
17928
18229
|
}
|
|
17929
18230
|
}
|
|
17930
|
-
var _c1$
|
|
18231
|
+
var _c1$a = function (a0, a1) { return { cat: a0, level: a1 }; };
|
|
17931
18232
|
function CaseFileViewFolderSelectorComponent_ng_template_12_ng_container_5_Template(rf, ctx) {
|
|
17932
18233
|
if (rf & 1) {
|
|
17933
18234
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
@@ -17940,7 +18241,7 @@
|
|
|
17940
18241
|
i0__namespace.ɵɵnextContext();
|
|
17941
18242
|
var _r1 = i0__namespace.ɵɵreference(13);
|
|
17942
18243
|
i0__namespace.ɵɵadvance(1);
|
|
17943
|
-
i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$
|
|
18244
|
+
i0__namespace.ɵɵproperty("ngTemplateOutlet", _r1)("ngTemplateOutletContext", i0__namespace.ɵɵpureFunction2(2, _c1$a, subcat_r8, level_r6 + 1));
|
|
17944
18245
|
}
|
|
17945
18246
|
}
|
|
17946
18247
|
function CaseFileViewFolderSelectorComponent_ng_template_12_Template(rf, ctx) {
|
|
@@ -18082,7 +18383,7 @@
|
|
|
18082
18383
|
i0__namespace.ɵɵadvance(2);
|
|
18083
18384
|
i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
|
|
18084
18385
|
}
|
|
18085
|
-
}, directives: [i1__namespace.NgForOf, i1__namespace.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 });
|
|
18386
|
+
}, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder,.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 });
|
|
18086
18387
|
(function () {
|
|
18087
18388
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
18088
18389
|
type: i0.Component,
|
|
@@ -18161,8 +18462,8 @@
|
|
|
18161
18462
|
i0__namespace.ɵɵproperty("ngForOf", ctx_r1.menuItems);
|
|
18162
18463
|
}
|
|
18163
18464
|
}
|
|
18164
|
-
var _c0$
|
|
18165
|
-
var _c1$
|
|
18465
|
+
var _c0$t = [[["", "trigger", ""]]];
|
|
18466
|
+
var _c1$9 = ["[trigger]"];
|
|
18166
18467
|
var CaseFileViewOverlayMenuComponent = /** @class */ (function () {
|
|
18167
18468
|
function CaseFileViewOverlayMenuComponent() {
|
|
18168
18469
|
this.title = '';
|
|
@@ -18177,9 +18478,9 @@
|
|
|
18177
18478
|
return CaseFileViewOverlayMenuComponent;
|
|
18178
18479
|
}());
|
|
18179
18480
|
CaseFileViewOverlayMenuComponent.ɵfac = function CaseFileViewOverlayMenuComponent_Factory(t) { return new (t || CaseFileViewOverlayMenuComponent)(); };
|
|
18180
|
-
CaseFileViewOverlayMenuComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$
|
|
18481
|
+
CaseFileViewOverlayMenuComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, ngContentSelectors: _c1$9, decls: 5, vars: 4, consts: [["type", "button", "cdkOverlayOrigin", "", 1, "overlay-toggle", 3, "click"], ["trigger", "cdkOverlayOrigin"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass", "backdropClick"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], [1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], [1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) {
|
|
18181
18482
|
if (rf & 1) {
|
|
18182
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
18483
|
+
i0__namespace.ɵɵprojectionDef(_c0$t);
|
|
18183
18484
|
i0__namespace.ɵɵelementStart(0, "div");
|
|
18184
18485
|
i0__namespace.ɵɵelementStart(1, "button", 0, 1);
|
|
18185
18486
|
i0__namespace.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_Template_button_click_1_listener($event) { $event.stopPropagation(); return ctx.isOpen = !ctx.isOpen; });
|
|
@@ -19026,8 +19327,8 @@
|
|
|
19026
19327
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.flagTypeErrorMessage, " ");
|
|
19027
19328
|
}
|
|
19028
19329
|
}
|
|
19029
|
-
var _c0$
|
|
19030
|
-
var _c1$
|
|
19330
|
+
var _c0$s = function (a0) { return { "form-group-error": a0 }; };
|
|
19331
|
+
var _c1$8 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
19031
19332
|
function SelectFlagTypeComponent_div_9_Template(rf, ctx) {
|
|
19032
19333
|
if (rf & 1) {
|
|
19033
19334
|
i0__namespace.ɵɵelementStart(0, "div", 15);
|
|
@@ -19043,11 +19344,11 @@
|
|
|
19043
19344
|
if (rf & 2) {
|
|
19044
19345
|
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
19045
19346
|
i0__namespace.ɵɵadvance(1);
|
|
19046
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$
|
|
19347
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$s, ctx_r2.flagTypeErrorMessage.length > 0));
|
|
19047
19348
|
i0__namespace.ɵɵadvance(3);
|
|
19048
19349
|
i0__namespace.ɵɵproperty("ngIf", ctx_r2.flagTypeErrorMessage.length > 0);
|
|
19049
19350
|
i0__namespace.ɵɵadvance(1);
|
|
19050
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$
|
|
19351
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c1$8, ctx_r2.flagTypeErrorMessage.length > 0))("name", ctx_r2.descriptionControlName)("formControlName", ctx_r2.descriptionControlName);
|
|
19051
19352
|
}
|
|
19052
19353
|
}
|
|
19053
19354
|
function SelectFlagTypeComponent_div_10_Template(rf, ctx) {
|
|
@@ -19205,7 +19506,7 @@
|
|
|
19205
19506
|
if (rf & 2) {
|
|
19206
19507
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
19207
19508
|
i0__namespace.ɵɵadvance(1);
|
|
19208
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$
|
|
19509
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$s, ctx.flagTypeNotSelectedErrorMessage.length > 0));
|
|
19209
19510
|
i0__namespace.ɵɵadvance(4);
|
|
19210
19511
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx.caseFlagWizardStepTitle.SELECT_CASE_FLAG, " ");
|
|
19211
19512
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -19317,7 +19618,7 @@
|
|
|
19317
19618
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r8.languageCharLimitErrorMessage, " ");
|
|
19318
19619
|
}
|
|
19319
19620
|
}
|
|
19320
|
-
var _c0$
|
|
19621
|
+
var _c0$r = function (a0) { return { "form-group-error": a0 }; };
|
|
19321
19622
|
function SearchLanguageInterpreterComponent_div_21_Template(rf, ctx) {
|
|
19322
19623
|
if (rf & 1) {
|
|
19323
19624
|
i0__namespace.ɵɵelementStart(0, "div", 25);
|
|
@@ -19334,7 +19635,7 @@
|
|
|
19334
19635
|
if (rf & 2) {
|
|
19335
19636
|
var ctx_r5 = i0__namespace.ɵɵnextContext();
|
|
19336
19637
|
i0__namespace.ɵɵadvance(1);
|
|
19337
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$
|
|
19638
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$r, ctx_r5.languageNotEnteredErrorMessage || ctx_r5.languageCharLimitErrorMessage));
|
|
19338
19639
|
i0__namespace.ɵɵadvance(2);
|
|
19339
19640
|
i0__namespace.ɵɵtextInterpolate(ctx_r5.searchLanguageInterpreterStep.INPUT_LABEL);
|
|
19340
19641
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -19509,7 +19810,7 @@
|
|
|
19509
19810
|
var _r2 = i0__namespace.ɵɵreference(12);
|
|
19510
19811
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
19511
19812
|
i0__namespace.ɵɵadvance(1);
|
|
19512
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$
|
|
19813
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c0$r, ctx.languageNotSelectedErrorMessage || ctx.languageEnteredInBothFieldsErrorMessage));
|
|
19513
19814
|
i0__namespace.ɵɵadvance(2);
|
|
19514
19815
|
i0__namespace.ɵɵproperty("for", ctx.languageSearchTermControlName);
|
|
19515
19816
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -19643,7 +19944,7 @@
|
|
|
19643
19944
|
i0__namespace.ɵɵelementEnd();
|
|
19644
19945
|
}
|
|
19645
19946
|
}
|
|
19646
|
-
var _c0$
|
|
19947
|
+
var _c0$q = function (a0) { return { "form-group-error": a0 }; };
|
|
19647
19948
|
var SelectFlagLocationComponent = /** @class */ (function () {
|
|
19648
19949
|
function SelectFlagLocationComponent() {
|
|
19649
19950
|
this.caseFlagStateEmitter = new i0.EventEmitter();
|
|
@@ -19732,7 +20033,7 @@
|
|
|
19732
20033
|
if (rf & 2) {
|
|
19733
20034
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
19734
20035
|
i0__namespace.ɵɵadvance(1);
|
|
19735
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$
|
|
20036
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$q, ctx.errorMessages.length > 0));
|
|
19736
20037
|
i0__namespace.ɵɵadvance(4);
|
|
19737
20038
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx.flagLocationTitle, " ");
|
|
19738
20039
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -19796,7 +20097,7 @@
|
|
|
19796
20097
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.flagCommentsCharLimitErrorMessage, " ");
|
|
19797
20098
|
}
|
|
19798
20099
|
}
|
|
19799
|
-
var _c0$
|
|
20100
|
+
var _c0$p = function (a0) { return { "form-group-error": a0 }; };
|
|
19800
20101
|
var AddCommentsComponent = /** @class */ (function () {
|
|
19801
20102
|
function AddCommentsComponent() {
|
|
19802
20103
|
this.optional = false;
|
|
@@ -19877,7 +20178,7 @@
|
|
|
19877
20178
|
if (rf & 2) {
|
|
19878
20179
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
19879
20180
|
i0__namespace.ɵɵadvance(2);
|
|
19880
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$
|
|
20181
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$p, ctx.errorMessages.length > 0));
|
|
19881
20182
|
i0__namespace.ɵɵadvance(2);
|
|
19882
20183
|
i0__namespace.ɵɵproperty("for", ctx.flagCommentsControlName);
|
|
19883
20184
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -19957,7 +20258,7 @@
|
|
|
19957
20258
|
i0__namespace.ɵɵelementEnd();
|
|
19958
20259
|
}
|
|
19959
20260
|
}
|
|
19960
|
-
var _c0$
|
|
20261
|
+
var _c0$o = function (a0) { return { "form-group-error": a0 }; };
|
|
19961
20262
|
var ManageCaseFlagsComponent = /** @class */ (function () {
|
|
19962
20263
|
function ManageCaseFlagsComponent() {
|
|
19963
20264
|
this.caseFlagStateEmitter = new i0.EventEmitter();
|
|
@@ -20117,7 +20418,7 @@
|
|
|
20117
20418
|
if (rf & 2) {
|
|
20118
20419
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
20119
20420
|
i0__namespace.ɵɵadvance(1);
|
|
20120
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$
|
|
20421
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$o, ctx.errorMessages.length > 0));
|
|
20121
20422
|
i0__namespace.ɵɵadvance(4);
|
|
20122
20423
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx.manageCaseFlagTitle, " ");
|
|
20123
20424
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -20187,8 +20488,8 @@
|
|
|
20187
20488
|
i0__namespace.ɵɵelementEnd();
|
|
20188
20489
|
}
|
|
20189
20490
|
}
|
|
20190
|
-
var _c0$
|
|
20191
|
-
var _c1$
|
|
20491
|
+
var _c0$n = function (a0) { return { "form-group-error": a0 }; };
|
|
20492
|
+
var _c1$7 = function (a0) { return { "govuk-tag--grey": a0 }; };
|
|
20192
20493
|
var UpdateFlagComponent = /** @class */ (function () {
|
|
20193
20494
|
function UpdateFlagComponent() {
|
|
20194
20495
|
this.caseFlagStateEmitter = new i0.EventEmitter();
|
|
@@ -20309,7 +20610,7 @@
|
|
|
20309
20610
|
if (rf & 2) {
|
|
20310
20611
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
20311
20612
|
i0__namespace.ɵɵadvance(2);
|
|
20312
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$
|
|
20613
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c0$n, ctx.errorMessages.length > 0));
|
|
20313
20614
|
i0__namespace.ɵɵadvance(2);
|
|
20314
20615
|
i0__namespace.ɵɵproperty("for", ctx.updateFlagControlName);
|
|
20315
20616
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -20325,7 +20626,7 @@
|
|
|
20325
20626
|
i0__namespace.ɵɵadvance(3);
|
|
20326
20627
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx.updateFlagCharLimitInfo, " ");
|
|
20327
20628
|
i0__namespace.ɵɵadvance(6);
|
|
20328
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$
|
|
20629
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(16, _c1$7, ctx.selectedFlag.flagDetailDisplay.flagDetail.status === "Inactive"));
|
|
20329
20630
|
i0__namespace.ɵɵadvance(1);
|
|
20330
20631
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx.selectedFlag.flagDetailDisplay.flagDetail.status, " ");
|
|
20331
20632
|
i0__namespace.ɵɵadvance(2);
|
|
@@ -20453,6 +20754,2309 @@
|
|
|
20453
20754
|
}] });
|
|
20454
20755
|
})();
|
|
20455
20756
|
|
|
20757
|
+
exports.LinkedCasesPages = void 0;
|
|
20758
|
+
(function (LinkedCasesPages) {
|
|
20759
|
+
LinkedCasesPages[LinkedCasesPages["BEFORE_YOU_START"] = 0] = "BEFORE_YOU_START";
|
|
20760
|
+
LinkedCasesPages[LinkedCasesPages["NO_LINKED_CASES"] = 1] = "NO_LINKED_CASES";
|
|
20761
|
+
LinkedCasesPages[LinkedCasesPages["LINK_CASE"] = 2] = "LINK_CASE";
|
|
20762
|
+
LinkedCasesPages[LinkedCasesPages["UNLINK_CASE"] = 3] = "UNLINK_CASE";
|
|
20763
|
+
LinkedCasesPages[LinkedCasesPages["CHECK_YOUR_ANSWERS"] = 4] = "CHECK_YOUR_ANSWERS";
|
|
20764
|
+
})(exports.LinkedCasesPages || (exports.LinkedCasesPages = {}));
|
|
20765
|
+
exports.LinkedCasesErrorMessages = void 0;
|
|
20766
|
+
(function (LinkedCasesErrorMessages) {
|
|
20767
|
+
LinkedCasesErrorMessages["ProposedCaseWithIn"] = "Case can not be linked to the same case";
|
|
20768
|
+
LinkedCasesErrorMessages["CaseNumberError"] = "Case numbers must have 16 digits";
|
|
20769
|
+
LinkedCasesErrorMessages["ReasonSelectionError"] = "Select a reason why these cases should be linked";
|
|
20770
|
+
LinkedCasesErrorMessages["SomethingWrong"] = "Something went wrong, please try again later";
|
|
20771
|
+
LinkedCasesErrorMessages["CaseCheckAgainError"] = "Check the case number and try again";
|
|
20772
|
+
LinkedCasesErrorMessages["CaseSelectionError"] = "You need to propose at least one case";
|
|
20773
|
+
LinkedCasesErrorMessages["CaseProposedError"] = "This case has already been proposed";
|
|
20774
|
+
LinkedCasesErrorMessages["CasesLinkedError"] = "These cases are already linked";
|
|
20775
|
+
LinkedCasesErrorMessages["UnlinkCaseSelectionError"] = "Select a case to unlink before continue";
|
|
20776
|
+
LinkedCasesErrorMessages["LinkCasesNavigationError"] = "Please select Next to link case(s)";
|
|
20777
|
+
LinkedCasesErrorMessages["UnlinkCasesNavigationError"] = "Please select Next to unlink case(s)";
|
|
20778
|
+
LinkedCasesErrorMessages["BackNavigationError"] = "Please select Back to go to the previous page";
|
|
20779
|
+
})(exports.LinkedCasesErrorMessages || (exports.LinkedCasesErrorMessages = {}));
|
|
20780
|
+
exports.LinkedCasesEventTriggers = void 0;
|
|
20781
|
+
(function (LinkedCasesEventTriggers) {
|
|
20782
|
+
LinkedCasesEventTriggers["LINK_CASES"] = "Link cases";
|
|
20783
|
+
LinkedCasesEventTriggers["MANAGE_CASE_LINKS"] = "Manage case links";
|
|
20784
|
+
})(exports.LinkedCasesEventTriggers || (exports.LinkedCasesEventTriggers = {}));
|
|
20785
|
+
exports.Patterns = void 0;
|
|
20786
|
+
(function (Patterns) {
|
|
20787
|
+
Patterns["CASE_REF"] = "((([0-9]{4})(?: |-)?)){4}";
|
|
20788
|
+
})(exports.Patterns || (exports.Patterns = {}));
|
|
20789
|
+
|
|
20790
|
+
function BeforeYouStartComponent_div_1_p_3_Template(rf, ctx) {
|
|
20791
|
+
if (rf & 1) {
|
|
20792
|
+
i0__namespace.ɵɵelementStart(0, "p", 5);
|
|
20793
|
+
i0__namespace.ɵɵelementStart(1, "span", 6);
|
|
20794
|
+
i0__namespace.ɵɵtext(2, "Error:");
|
|
20795
|
+
i0__namespace.ɵɵelementEnd();
|
|
20796
|
+
i0__namespace.ɵɵtext(3);
|
|
20797
|
+
i0__namespace.ɵɵelementEnd();
|
|
20798
|
+
}
|
|
20799
|
+
if (rf & 2) {
|
|
20800
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
20801
|
+
i0__namespace.ɵɵadvance(3);
|
|
20802
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.linkedCasesService.serverLinkedApiError.message, " ");
|
|
20803
|
+
}
|
|
20804
|
+
}
|
|
20805
|
+
function BeforeYouStartComponent_div_1_Template(rf, ctx) {
|
|
20806
|
+
if (rf & 1) {
|
|
20807
|
+
var _r4_1 = i0__namespace.ɵɵgetCurrentView();
|
|
20808
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
20809
|
+
i0__namespace.ɵɵelementStart(1, "h1", 1);
|
|
20810
|
+
i0__namespace.ɵɵtext(2, "There is a problem");
|
|
20811
|
+
i0__namespace.ɵɵelementEnd();
|
|
20812
|
+
i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_1_p_3_Template, 4, 1, "p", 2);
|
|
20813
|
+
i0__namespace.ɵɵelementStart(4, "p", 3);
|
|
20814
|
+
i0__namespace.ɵɵelementStart(5, "a", 4);
|
|
20815
|
+
i0__namespace.ɵɵlistener("click", function BeforeYouStartComponent_div_1_Template_a_click_5_listener() { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.onBack(); });
|
|
20816
|
+
i0__namespace.ɵɵtext(6, "Go back to the Linked cases tab");
|
|
20817
|
+
i0__namespace.ɵɵelementEnd();
|
|
20818
|
+
i0__namespace.ɵɵelementEnd();
|
|
20819
|
+
i0__namespace.ɵɵelementEnd();
|
|
20820
|
+
}
|
|
20821
|
+
if (rf & 2) {
|
|
20822
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
20823
|
+
i0__namespace.ɵɵadvance(3);
|
|
20824
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesService.serverLinkedApiError);
|
|
20825
|
+
}
|
|
20826
|
+
}
|
|
20827
|
+
function BeforeYouStartComponent_div_2_div_3_Template(rf, ctx) {
|
|
20828
|
+
if (rf & 1) {
|
|
20829
|
+
i0__namespace.ɵɵelementStart(0, "div", 11);
|
|
20830
|
+
i0__namespace.ɵɵelementStart(1, "p", 3);
|
|
20831
|
+
i0__namespace.ɵɵtext(2, "If a group of linked cases has a lead case, you must start from the lead case.");
|
|
20832
|
+
i0__namespace.ɵɵelementEnd();
|
|
20833
|
+
i0__namespace.ɵɵelementStart(3, "p", 3);
|
|
20834
|
+
i0__namespace.ɵɵtext(4, "If the cases to be linked has no lead, you can start the linking journey from any of those cases.");
|
|
20835
|
+
i0__namespace.ɵɵelementEnd();
|
|
20836
|
+
i0__namespace.ɵɵelementEnd();
|
|
20837
|
+
}
|
|
20838
|
+
}
|
|
20839
|
+
function BeforeYouStartComponent_div_2_div_4_Template(rf, ctx) {
|
|
20840
|
+
if (rf & 1) {
|
|
20841
|
+
i0__namespace.ɵɵelementStart(0, "div", 12);
|
|
20842
|
+
i0__namespace.ɵɵelementStart(1, "p", 3);
|
|
20843
|
+
i0__namespace.ɵɵtext(2, "If there are linked hearings for the case you need to un-link then you must unlink the hearing first.");
|
|
20844
|
+
i0__namespace.ɵɵelementEnd();
|
|
20845
|
+
i0__namespace.ɵɵelementEnd();
|
|
20846
|
+
}
|
|
20847
|
+
}
|
|
20848
|
+
function BeforeYouStartComponent_div_2_Template(rf, ctx) {
|
|
20849
|
+
if (rf & 1) {
|
|
20850
|
+
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
20851
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
20852
|
+
i0__namespace.ɵɵelementStart(1, "h1", 1);
|
|
20853
|
+
i0__namespace.ɵɵtext(2, "Before you start");
|
|
20854
|
+
i0__namespace.ɵɵelementEnd();
|
|
20855
|
+
i0__namespace.ɵɵtemplate(3, BeforeYouStartComponent_div_2_div_3_Template, 5, 0, "div", 7);
|
|
20856
|
+
i0__namespace.ɵɵtemplate(4, BeforeYouStartComponent_div_2_div_4_Template, 3, 0, "div", 8);
|
|
20857
|
+
i0__namespace.ɵɵelementStart(5, "div", 9);
|
|
20858
|
+
i0__namespace.ɵɵelementStart(6, "button", 10);
|
|
20859
|
+
i0__namespace.ɵɵlistener("click", function BeforeYouStartComponent_div_2_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onNext(); });
|
|
20860
|
+
i0__namespace.ɵɵtext(7, "Next");
|
|
20861
|
+
i0__namespace.ɵɵelementEnd();
|
|
20862
|
+
i0__namespace.ɵɵelementEnd();
|
|
20863
|
+
i0__namespace.ɵɵelementEnd();
|
|
20864
|
+
}
|
|
20865
|
+
if (rf & 2) {
|
|
20866
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
20867
|
+
i0__namespace.ɵɵadvance(3);
|
|
20868
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r1.isLinkCasesJourney);
|
|
20869
|
+
i0__namespace.ɵɵadvance(1);
|
|
20870
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx_r1.isLinkCasesJourney);
|
|
20871
|
+
}
|
|
20872
|
+
}
|
|
20873
|
+
var BeforeYouStartComponent = /** @class */ (function () {
|
|
20874
|
+
function BeforeYouStartComponent(router, linkedCasesService) {
|
|
20875
|
+
this.router = router;
|
|
20876
|
+
this.linkedCasesService = linkedCasesService;
|
|
20877
|
+
this.linkedCasesStateEmitter = new i0.EventEmitter();
|
|
20878
|
+
this.isLinkCasesJourney = false;
|
|
20879
|
+
this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
|
|
20880
|
+
// re-initiate the state based on the casefield value
|
|
20881
|
+
var linkedCaseRefereneIds = this.linkedCasesService.caseFieldValue.filter(function (item) { return item; }).map(function (item) { return item.id; });
|
|
20882
|
+
this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter(function (item) { return linkedCaseRefereneIds.indexOf(item.caseReference) !== -1; });
|
|
20883
|
+
this.linkedCasesService.initialCaseLinks = this.linkedCasesService.linkedCases;
|
|
20884
|
+
}
|
|
20885
|
+
BeforeYouStartComponent.prototype.onNext = function () {
|
|
20886
|
+
this.linkedCasesStateEmitter.emit({
|
|
20887
|
+
currentLinkedCasesPage: exports.LinkedCasesPages.BEFORE_YOU_START,
|
|
20888
|
+
errorMessages: this.errorMessages,
|
|
20889
|
+
navigateToNextPage: true
|
|
20890
|
+
});
|
|
20891
|
+
};
|
|
20892
|
+
BeforeYouStartComponent.prototype.onBack = function () {
|
|
20893
|
+
this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
|
|
20894
|
+
window.location.hash = 'Linked cases';
|
|
20895
|
+
});
|
|
20896
|
+
};
|
|
20897
|
+
return BeforeYouStartComponent;
|
|
20898
|
+
}());
|
|
20899
|
+
BeforeYouStartComponent.ɵfac = function BeforeYouStartComponent_Factory(t) { return new (t || BeforeYouStartComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
20900
|
+
BeforeYouStartComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
20901
|
+
if (rf & 1) {
|
|
20902
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
20903
|
+
i0__namespace.ɵɵtemplate(1, BeforeYouStartComponent_div_1_Template, 7, 1, "div", 0);
|
|
20904
|
+
i0__namespace.ɵɵtemplate(2, BeforeYouStartComponent_div_2_Template, 8, 2, "div", 0);
|
|
20905
|
+
i0__namespace.ɵɵelementEnd();
|
|
20906
|
+
}
|
|
20907
|
+
if (rf & 2) {
|
|
20908
|
+
i0__namespace.ɵɵadvance(1);
|
|
20909
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
|
|
20910
|
+
i0__namespace.ɵɵadvance(1);
|
|
20911
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCasesService || !ctx.linkedCasesService.serverLinkedApiError);
|
|
20912
|
+
}
|
|
20913
|
+
}, directives: [i1__namespace.NgIf], encapsulation: 2 });
|
|
20914
|
+
(function () {
|
|
20915
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(BeforeYouStartComponent, [{
|
|
20916
|
+
type: i0.Component,
|
|
20917
|
+
args: [{
|
|
20918
|
+
selector: 'ccd-linked-cases-before-you-start',
|
|
20919
|
+
templateUrl: './before-you-start.component.html'
|
|
20920
|
+
}]
|
|
20921
|
+
}], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
20922
|
+
type: i0.Output
|
|
20923
|
+
}] });
|
|
20924
|
+
})();
|
|
20925
|
+
|
|
20926
|
+
function CheckYourAnswersComponent_table_4_tr_9_Template(rf, ctx) {
|
|
20927
|
+
if (rf & 1) {
|
|
20928
|
+
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
20929
|
+
i0__namespace.ɵɵelementStart(0, "tr", 7);
|
|
20930
|
+
i0__namespace.ɵɵelementStart(1, "td", 14);
|
|
20931
|
+
i0__namespace.ɵɵtext(2);
|
|
20932
|
+
i0__namespace.ɵɵelement(3, "br");
|
|
20933
|
+
i0__namespace.ɵɵtext(4);
|
|
20934
|
+
i0__namespace.ɵɵpipe(5, "ccdCaseReference");
|
|
20935
|
+
i0__namespace.ɵɵelementEnd();
|
|
20936
|
+
i0__namespace.ɵɵelementStart(6, "td", 14);
|
|
20937
|
+
i0__namespace.ɵɵelementStart(7, "a", 15);
|
|
20938
|
+
i0__namespace.ɵɵlistener("click", function CheckYourAnswersComponent_table_4_tr_9_Template_a_click_7_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(2); return ctx_r7.onChange(); });
|
|
20939
|
+
i0__namespace.ɵɵtext(8, "Change");
|
|
20940
|
+
i0__namespace.ɵɵelementEnd();
|
|
20941
|
+
i0__namespace.ɵɵelementEnd();
|
|
20942
|
+
i0__namespace.ɵɵelementEnd();
|
|
20943
|
+
}
|
|
20944
|
+
if (rf & 2) {
|
|
20945
|
+
var case_r6 = ctx.$implicit;
|
|
20946
|
+
i0__namespace.ɵɵadvance(2);
|
|
20947
|
+
i0__namespace.ɵɵtextInterpolate1(" ", case_r6.caseName, " ");
|
|
20948
|
+
i0__namespace.ɵɵadvance(2);
|
|
20949
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(5, 2, case_r6.caseReference), " ");
|
|
20950
|
+
}
|
|
20951
|
+
}
|
|
20952
|
+
function CheckYourAnswersComponent_table_4_tr_10_Template(rf, ctx) {
|
|
20953
|
+
if (rf & 1) {
|
|
20954
|
+
i0__namespace.ɵɵelementStart(0, "tr", 7);
|
|
20955
|
+
i0__namespace.ɵɵelementStart(1, "td", 16);
|
|
20956
|
+
i0__namespace.ɵɵtext(2, " None ");
|
|
20957
|
+
i0__namespace.ɵɵelementEnd();
|
|
20958
|
+
i0__namespace.ɵɵelementEnd();
|
|
20959
|
+
}
|
|
20960
|
+
}
|
|
20961
|
+
function CheckYourAnswersComponent_table_4_Template(rf, ctx) {
|
|
20962
|
+
if (rf & 1) {
|
|
20963
|
+
i0__namespace.ɵɵelementStart(0, "table", 13);
|
|
20964
|
+
i0__namespace.ɵɵelementStart(1, "caption", 5);
|
|
20965
|
+
i0__namespace.ɵɵtext(2, "Cases to unlink");
|
|
20966
|
+
i0__namespace.ɵɵelementEnd();
|
|
20967
|
+
i0__namespace.ɵɵelementStart(3, "thead", 6);
|
|
20968
|
+
i0__namespace.ɵɵelementStart(4, "tr", 7);
|
|
20969
|
+
i0__namespace.ɵɵelementStart(5, "th", 8);
|
|
20970
|
+
i0__namespace.ɵɵtext(6, "Case name and number");
|
|
20971
|
+
i0__namespace.ɵɵelementEnd();
|
|
20972
|
+
i0__namespace.ɵɵelement(7, "th", 8);
|
|
20973
|
+
i0__namespace.ɵɵelementEnd();
|
|
20974
|
+
i0__namespace.ɵɵelementEnd();
|
|
20975
|
+
i0__namespace.ɵɵelementStart(8, "tbody", 10);
|
|
20976
|
+
i0__namespace.ɵɵtemplate(9, CheckYourAnswersComponent_table_4_tr_9_Template, 9, 4, "tr", 11);
|
|
20977
|
+
i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_table_4_tr_10_Template, 3, 0, "tr", 12);
|
|
20978
|
+
i0__namespace.ɵɵelementEnd();
|
|
20979
|
+
i0__namespace.ɵɵelementEnd();
|
|
20980
|
+
}
|
|
20981
|
+
if (rf & 2) {
|
|
20982
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
20983
|
+
i0__namespace.ɵɵadvance(9);
|
|
20984
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.casesToUnlink);
|
|
20985
|
+
i0__namespace.ɵɵadvance(1);
|
|
20986
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx_r0.casesToUnlink.length);
|
|
20987
|
+
}
|
|
20988
|
+
}
|
|
20989
|
+
function CheckYourAnswersComponent_th_15_Template(rf, ctx) {
|
|
20990
|
+
if (rf & 1) {
|
|
20991
|
+
i0__namespace.ɵɵelement(0, "th", 8);
|
|
20992
|
+
}
|
|
20993
|
+
}
|
|
20994
|
+
function CheckYourAnswersComponent_tr_17_span_8_br_3_Template(rf, ctx) {
|
|
20995
|
+
if (rf & 1) {
|
|
20996
|
+
i0__namespace.ɵɵelement(0, "br");
|
|
20997
|
+
}
|
|
20998
|
+
}
|
|
20999
|
+
function CheckYourAnswersComponent_tr_17_span_8_Template(rf, ctx) {
|
|
21000
|
+
if (rf & 1) {
|
|
21001
|
+
i0__namespace.ɵɵelementStart(0, "span");
|
|
21002
|
+
i0__namespace.ɵɵtext(1);
|
|
21003
|
+
i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
21004
|
+
i0__namespace.ɵɵtemplate(3, CheckYourAnswersComponent_tr_17_span_8_br_3_Template, 1, 0, "br", 19);
|
|
21005
|
+
i0__namespace.ɵɵelementEnd();
|
|
21006
|
+
}
|
|
21007
|
+
if (rf & 2) {
|
|
21008
|
+
var reason_r12 = ctx.$implicit;
|
|
21009
|
+
var isLast_r13 = ctx.last;
|
|
21010
|
+
i0__namespace.ɵɵadvance(1);
|
|
21011
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 2, reason_r12.reasonCode), "");
|
|
21012
|
+
i0__namespace.ɵɵadvance(2);
|
|
21013
|
+
i0__namespace.ɵɵproperty("ngIf", !isLast_r13);
|
|
21014
|
+
}
|
|
21015
|
+
}
|
|
21016
|
+
function CheckYourAnswersComponent_tr_17_td_10_Template(rf, ctx) {
|
|
21017
|
+
if (rf & 1) {
|
|
21018
|
+
var _r16_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21019
|
+
i0__namespace.ɵɵelementStart(0, "td", 14);
|
|
21020
|
+
i0__namespace.ɵɵelementStart(1, "a", 15);
|
|
21021
|
+
i0__namespace.ɵɵlistener("click", function CheckYourAnswersComponent_tr_17_td_10_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r16_1); var ctx_r15 = i0__namespace.ɵɵnextContext(2); return ctx_r15.onChange(); });
|
|
21022
|
+
i0__namespace.ɵɵtext(2, "Change");
|
|
21023
|
+
i0__namespace.ɵɵelementEnd();
|
|
21024
|
+
i0__namespace.ɵɵelementEnd();
|
|
21025
|
+
}
|
|
21026
|
+
}
|
|
21027
|
+
function CheckYourAnswersComponent_tr_17_Template(rf, ctx) {
|
|
21028
|
+
if (rf & 1) {
|
|
21029
|
+
i0__namespace.ɵɵelementStart(0, "tr", 7);
|
|
21030
|
+
i0__namespace.ɵɵelementStart(1, "td", 14);
|
|
21031
|
+
i0__namespace.ɵɵelementStart(2, "span");
|
|
21032
|
+
i0__namespace.ɵɵtext(3);
|
|
21033
|
+
i0__namespace.ɵɵelement(4, "br");
|
|
21034
|
+
i0__namespace.ɵɵtext(5);
|
|
21035
|
+
i0__namespace.ɵɵpipe(6, "ccdCaseReference");
|
|
21036
|
+
i0__namespace.ɵɵelementEnd();
|
|
21037
|
+
i0__namespace.ɵɵelementEnd();
|
|
21038
|
+
i0__namespace.ɵɵelementStart(7, "td", 14);
|
|
21039
|
+
i0__namespace.ɵɵtemplate(8, CheckYourAnswersComponent_tr_17_span_8_Template, 4, 4, "span", 17);
|
|
21040
|
+
i0__namespace.ɵɵelementEnd();
|
|
21041
|
+
i0__namespace.ɵɵelement(9, "td", 14);
|
|
21042
|
+
i0__namespace.ɵɵtemplate(10, CheckYourAnswersComponent_tr_17_td_10_Template, 3, 0, "td", 18);
|
|
21043
|
+
i0__namespace.ɵɵelementEnd();
|
|
21044
|
+
}
|
|
21045
|
+
if (rf & 2) {
|
|
21046
|
+
var case_r9 = ctx.$implicit;
|
|
21047
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
21048
|
+
i0__namespace.ɵɵadvance(3);
|
|
21049
|
+
i0__namespace.ɵɵtextInterpolate1("", case_r9.caseName, " ");
|
|
21050
|
+
i0__namespace.ɵɵadvance(2);
|
|
21051
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(6, 4, case_r9.caseReference), " ");
|
|
21052
|
+
i0__namespace.ɵɵadvance(3);
|
|
21053
|
+
i0__namespace.ɵɵproperty("ngForOf", case_r9.reasons);
|
|
21054
|
+
i0__namespace.ɵɵadvance(2);
|
|
21055
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r2.isLinkCasesJourney);
|
|
21056
|
+
}
|
|
21057
|
+
}
|
|
21058
|
+
function CheckYourAnswersComponent_tr_18_Template(rf, ctx) {
|
|
21059
|
+
if (rf & 1) {
|
|
21060
|
+
i0__namespace.ɵɵelementStart(0, "tr", 7);
|
|
21061
|
+
i0__namespace.ɵɵelementStart(1, "td", 20);
|
|
21062
|
+
i0__namespace.ɵɵtext(2, " None ");
|
|
21063
|
+
i0__namespace.ɵɵelementEnd();
|
|
21064
|
+
i0__namespace.ɵɵelementEnd();
|
|
21065
|
+
}
|
|
21066
|
+
}
|
|
21067
|
+
var CheckYourAnswersComponent = /** @class */ (function () {
|
|
21068
|
+
function CheckYourAnswersComponent(linkedCasesService) {
|
|
21069
|
+
this.linkedCasesService = linkedCasesService;
|
|
21070
|
+
this.linkedCasesStateEmitter = new i0.EventEmitter();
|
|
21071
|
+
}
|
|
21072
|
+
CheckYourAnswersComponent.prototype.ngOnInit = function () {
|
|
21073
|
+
this.isLinkCasesJourney = this.linkedCasesService.isLinkedCasesEventTrigger;
|
|
21074
|
+
this.linkedCasesTableCaption = this.linkedCasesService.isLinkedCasesEventTrigger ? 'Proposed case links' : 'Linked cases';
|
|
21075
|
+
this.linkedCases = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return !linkedCase.unlink; });
|
|
21076
|
+
this.casesToUnlink = this.linkedCasesService.linkedCases.filter(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
|
|
21077
|
+
};
|
|
21078
|
+
CheckYourAnswersComponent.prototype.onChange = function () {
|
|
21079
|
+
this.linkedCasesService.editMode = true;
|
|
21080
|
+
this.linkedCasesStateEmitter.emit({
|
|
21081
|
+
currentLinkedCasesPage: exports.LinkedCasesPages.CHECK_YOUR_ANSWERS,
|
|
21082
|
+
navigateToPreviousPage: true,
|
|
21083
|
+
navigateToNextPage: true
|
|
21084
|
+
});
|
|
21085
|
+
};
|
|
21086
|
+
return CheckYourAnswersComponent;
|
|
21087
|
+
}());
|
|
21088
|
+
CheckYourAnswersComponent.ɵfac = function CheckYourAnswersComponent_Factory(t) { return new (t || CheckYourAnswersComponent)(i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
21089
|
+
CheckYourAnswersComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
21090
|
+
if (rf & 1) {
|
|
21091
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
21092
|
+
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
21093
|
+
i0__namespace.ɵɵelementStart(2, "h1", 2);
|
|
21094
|
+
i0__namespace.ɵɵtext(3, "Check your answers");
|
|
21095
|
+
i0__namespace.ɵɵelementEnd();
|
|
21096
|
+
i0__namespace.ɵɵtemplate(4, CheckYourAnswersComponent_table_4_Template, 11, 2, "table", 3);
|
|
21097
|
+
i0__namespace.ɵɵelementStart(5, "table", 4);
|
|
21098
|
+
i0__namespace.ɵɵelementStart(6, "caption", 5);
|
|
21099
|
+
i0__namespace.ɵɵtext(7);
|
|
21100
|
+
i0__namespace.ɵɵelementEnd();
|
|
21101
|
+
i0__namespace.ɵɵelementStart(8, "thead", 6);
|
|
21102
|
+
i0__namespace.ɵɵelementStart(9, "tr", 7);
|
|
21103
|
+
i0__namespace.ɵɵelementStart(10, "th", 8);
|
|
21104
|
+
i0__namespace.ɵɵtext(11, "Case name and number");
|
|
21105
|
+
i0__namespace.ɵɵelementEnd();
|
|
21106
|
+
i0__namespace.ɵɵelementStart(12, "th", 8);
|
|
21107
|
+
i0__namespace.ɵɵtext(13, "Reasons for case link");
|
|
21108
|
+
i0__namespace.ɵɵelementEnd();
|
|
21109
|
+
i0__namespace.ɵɵelement(14, "th", 8);
|
|
21110
|
+
i0__namespace.ɵɵtemplate(15, CheckYourAnswersComponent_th_15_Template, 1, 0, "th", 9);
|
|
21111
|
+
i0__namespace.ɵɵelementEnd();
|
|
21112
|
+
i0__namespace.ɵɵelementEnd();
|
|
21113
|
+
i0__namespace.ɵɵelementStart(16, "tbody", 10);
|
|
21114
|
+
i0__namespace.ɵɵtemplate(17, CheckYourAnswersComponent_tr_17_Template, 11, 6, "tr", 11);
|
|
21115
|
+
i0__namespace.ɵɵtemplate(18, CheckYourAnswersComponent_tr_18_Template, 3, 0, "tr", 12);
|
|
21116
|
+
i0__namespace.ɵɵelementEnd();
|
|
21117
|
+
i0__namespace.ɵɵelementEnd();
|
|
21118
|
+
i0__namespace.ɵɵelementEnd();
|
|
21119
|
+
i0__namespace.ɵɵelementEnd();
|
|
21120
|
+
}
|
|
21121
|
+
if (rf & 2) {
|
|
21122
|
+
i0__namespace.ɵɵadvance(4);
|
|
21123
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx.isLinkCasesJourney);
|
|
21124
|
+
i0__namespace.ɵɵadvance(3);
|
|
21125
|
+
i0__namespace.ɵɵtextInterpolate(ctx.linkedCasesTableCaption);
|
|
21126
|
+
i0__namespace.ɵɵadvance(8);
|
|
21127
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.isLinkCasesJourney);
|
|
21128
|
+
i0__namespace.ɵɵadvance(2);
|
|
21129
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.linkedCases);
|
|
21130
|
+
i0__namespace.ɵɵadvance(1);
|
|
21131
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx.linkedCases.length);
|
|
21132
|
+
}
|
|
21133
|
+
}, styles: [".float-right[_ngcontent-%COMP%]{float:right}"] });
|
|
21134
|
+
(function () {
|
|
21135
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CheckYourAnswersComponent, [{
|
|
21136
|
+
type: i0.Component,
|
|
21137
|
+
args: [{
|
|
21138
|
+
selector: 'ccd-linked-cases-check-your-answers',
|
|
21139
|
+
templateUrl: './check-your-answers.component.html',
|
|
21140
|
+
styleUrls: ['./check-your-answers.component.scss']
|
|
21141
|
+
}]
|
|
21142
|
+
}], function () { return [{ type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
21143
|
+
type: i0.Output
|
|
21144
|
+
}] });
|
|
21145
|
+
})();
|
|
21146
|
+
|
|
21147
|
+
var ValidatorsUtils = /** @class */ (function () {
|
|
21148
|
+
function ValidatorsUtils() {
|
|
21149
|
+
}
|
|
21150
|
+
ValidatorsUtils.prototype.numberLengthValidator = function (inputLength) {
|
|
21151
|
+
return function (control) {
|
|
21152
|
+
return control.value.length !== inputLength ? { isValid: false } : null;
|
|
21153
|
+
};
|
|
21154
|
+
};
|
|
21155
|
+
ValidatorsUtils.prototype.formArraySelectedValidator = function () {
|
|
21156
|
+
return function (control) {
|
|
21157
|
+
return control.value.every(function (option) { return !option.selected; }) ? { isValid: false } : null;
|
|
21158
|
+
};
|
|
21159
|
+
};
|
|
21160
|
+
ValidatorsUtils.prototype.regexPattern = function (regexPattern) {
|
|
21161
|
+
return function (control) {
|
|
21162
|
+
var regex = new RegExp(regexPattern);
|
|
21163
|
+
return regex.test(control.value) ? null : { isValid: false };
|
|
21164
|
+
};
|
|
21165
|
+
};
|
|
21166
|
+
return ValidatorsUtils;
|
|
21167
|
+
}());
|
|
21168
|
+
ValidatorsUtils.ɵfac = function ValidatorsUtils_Factory(t) { return new (t || ValidatorsUtils)(); };
|
|
21169
|
+
ValidatorsUtils.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: ValidatorsUtils, factory: ValidatorsUtils.ɵfac, providedIn: 'root' });
|
|
21170
|
+
(function () {
|
|
21171
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ValidatorsUtils, [{
|
|
21172
|
+
type: i0.Injectable,
|
|
21173
|
+
args: [{ providedIn: 'root' }]
|
|
21174
|
+
}], null, null);
|
|
21175
|
+
})();
|
|
21176
|
+
|
|
21177
|
+
function LinkCasesComponent_div_8_span_4_Template(rf, ctx) {
|
|
21178
|
+
if (rf & 1) {
|
|
21179
|
+
i0__namespace.ɵɵelementStart(0, "span", 28);
|
|
21180
|
+
i0__namespace.ɵɵelementStart(1, "span", 29);
|
|
21181
|
+
i0__namespace.ɵɵtext(2, "Error:");
|
|
21182
|
+
i0__namespace.ɵɵelementEnd();
|
|
21183
|
+
i0__namespace.ɵɵtext(3);
|
|
21184
|
+
i0__namespace.ɵɵelementEnd();
|
|
21185
|
+
}
|
|
21186
|
+
if (rf & 2) {
|
|
21187
|
+
var ctx_r4 = i0__namespace.ɵɵnextContext(2);
|
|
21188
|
+
i0__namespace.ɵɵadvance(3);
|
|
21189
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r4.caseNumberError, " ");
|
|
21190
|
+
}
|
|
21191
|
+
}
|
|
21192
|
+
function LinkCasesComponent_div_8_span_10_Template(rf, ctx) {
|
|
21193
|
+
if (rf & 1) {
|
|
21194
|
+
i0__namespace.ɵɵelementStart(0, "span", 28);
|
|
21195
|
+
i0__namespace.ɵɵelementStart(1, "span", 29);
|
|
21196
|
+
i0__namespace.ɵɵtext(2, "Error:");
|
|
21197
|
+
i0__namespace.ɵɵelementEnd();
|
|
21198
|
+
i0__namespace.ɵɵtext(3);
|
|
21199
|
+
i0__namespace.ɵɵelementEnd();
|
|
21200
|
+
}
|
|
21201
|
+
if (rf & 2) {
|
|
21202
|
+
var ctx_r5 = i0__namespace.ɵɵnextContext(2);
|
|
21203
|
+
i0__namespace.ɵɵadvance(3);
|
|
21204
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r5.caseReasonError, " ");
|
|
21205
|
+
}
|
|
21206
|
+
}
|
|
21207
|
+
function LinkCasesComponent_div_8_div_12_Template(rf, ctx) {
|
|
21208
|
+
if (rf & 1) {
|
|
21209
|
+
i0__namespace.ɵɵelementStart(0, "div", 30);
|
|
21210
|
+
i0__namespace.ɵɵelement(1, "input", 31);
|
|
21211
|
+
i0__namespace.ɵɵelementStart(2, "label", 32);
|
|
21212
|
+
i0__namespace.ɵɵtext(3);
|
|
21213
|
+
i0__namespace.ɵɵelementEnd();
|
|
21214
|
+
i0__namespace.ɵɵelementEnd();
|
|
21215
|
+
}
|
|
21216
|
+
if (rf & 2) {
|
|
21217
|
+
var reason_r8 = ctx.$implicit;
|
|
21218
|
+
var pos_r9 = ctx.index;
|
|
21219
|
+
i0__namespace.ɵɵproperty("formGroupName", pos_r9);
|
|
21220
|
+
i0__namespace.ɵɵadvance(1);
|
|
21221
|
+
i0__namespace.ɵɵpropertyInterpolate("id", reason_r8.key);
|
|
21222
|
+
i0__namespace.ɵɵproperty("value", reason_r8.value_en);
|
|
21223
|
+
i0__namespace.ɵɵadvance(1);
|
|
21224
|
+
i0__namespace.ɵɵpropertyInterpolate("for", reason_r8.key);
|
|
21225
|
+
i0__namespace.ɵɵadvance(1);
|
|
21226
|
+
i0__namespace.ɵɵtextInterpolate(reason_r8.value_en);
|
|
21227
|
+
}
|
|
21228
|
+
}
|
|
21229
|
+
function LinkCasesComponent_div_8_span_15_Template(rf, ctx) {
|
|
21230
|
+
if (rf & 1) {
|
|
21231
|
+
i0__namespace.ɵɵelementStart(0, "span", 28);
|
|
21232
|
+
i0__namespace.ɵɵelementStart(1, "span", 29);
|
|
21233
|
+
i0__namespace.ɵɵtext(2, "Error:");
|
|
21234
|
+
i0__namespace.ɵɵelementEnd();
|
|
21235
|
+
i0__namespace.ɵɵtext(3);
|
|
21236
|
+
i0__namespace.ɵɵelementEnd();
|
|
21237
|
+
}
|
|
21238
|
+
if (rf & 2) {
|
|
21239
|
+
var ctx_r7 = i0__namespace.ɵɵnextContext(2);
|
|
21240
|
+
i0__namespace.ɵɵadvance(3);
|
|
21241
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r7.caseSelectionError, " ");
|
|
21242
|
+
}
|
|
21243
|
+
}
|
|
21244
|
+
var _c0$m = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
21245
|
+
function LinkCasesComponent_div_8_Template(rf, ctx) {
|
|
21246
|
+
if (rf & 1) {
|
|
21247
|
+
var _r11_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21248
|
+
i0__namespace.ɵɵelementStart(0, "div", 21);
|
|
21249
|
+
i0__namespace.ɵɵelementStart(1, "h3", 22);
|
|
21250
|
+
i0__namespace.ɵɵtext(2, "Enter case reference");
|
|
21251
|
+
i0__namespace.ɵɵelementEnd();
|
|
21252
|
+
i0__namespace.ɵɵelementStart(3, "div", 5);
|
|
21253
|
+
i0__namespace.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
|
|
21254
|
+
i0__namespace.ɵɵelement(5, "input", 23);
|
|
21255
|
+
i0__namespace.ɵɵelementEnd();
|
|
21256
|
+
i0__namespace.ɵɵelementStart(6, "h3", 22);
|
|
21257
|
+
i0__namespace.ɵɵtext(7, "Why should these cases be linked?");
|
|
21258
|
+
i0__namespace.ɵɵelementEnd();
|
|
21259
|
+
i0__namespace.ɵɵelementStart(8, "div", 24);
|
|
21260
|
+
i0__namespace.ɵɵtext(9, " Select all that apply. ");
|
|
21261
|
+
i0__namespace.ɵɵelementEnd();
|
|
21262
|
+
i0__namespace.ɵɵtemplate(10, LinkCasesComponent_div_8_span_10_Template, 4, 1, "span", 6);
|
|
21263
|
+
i0__namespace.ɵɵelementStart(11, "div", 25);
|
|
21264
|
+
i0__namespace.ɵɵtemplate(12, LinkCasesComponent_div_8_div_12_Template, 4, 5, "div", 26);
|
|
21265
|
+
i0__namespace.ɵɵelementEnd();
|
|
21266
|
+
i0__namespace.ɵɵelement(13, "br");
|
|
21267
|
+
i0__namespace.ɵɵelement(14, "br");
|
|
21268
|
+
i0__namespace.ɵɵtemplate(15, LinkCasesComponent_div_8_span_15_Template, 4, 1, "span", 6);
|
|
21269
|
+
i0__namespace.ɵɵelementStart(16, "button", 27);
|
|
21270
|
+
i0__namespace.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_16_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.submitCaseInfo(); });
|
|
21271
|
+
i0__namespace.ɵɵtext(17, "Propose case link");
|
|
21272
|
+
i0__namespace.ɵɵelementEnd();
|
|
21273
|
+
i0__namespace.ɵɵelementEnd();
|
|
21274
|
+
}
|
|
21275
|
+
if (rf & 2) {
|
|
21276
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
21277
|
+
i0__namespace.ɵɵproperty("formGroup", ctx_r0.linkCaseForm);
|
|
21278
|
+
i0__namespace.ɵɵadvance(3);
|
|
21279
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$m, !!ctx_r0.caseNumberError));
|
|
21280
|
+
i0__namespace.ɵɵadvance(1);
|
|
21281
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseNumberError);
|
|
21282
|
+
i0__namespace.ɵɵadvance(6);
|
|
21283
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseReasonError);
|
|
21284
|
+
i0__namespace.ɵɵadvance(1);
|
|
21285
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx_r0.caseReasonError));
|
|
21286
|
+
i0__namespace.ɵɵadvance(1);
|
|
21287
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkCaseReasons);
|
|
21288
|
+
i0__namespace.ɵɵadvance(3);
|
|
21289
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.caseSelectionError);
|
|
21290
|
+
}
|
|
21291
|
+
}
|
|
21292
|
+
function LinkCasesComponent_span_13_Template(rf, ctx) {
|
|
21293
|
+
if (rf & 1) {
|
|
21294
|
+
i0__namespace.ɵɵelementStart(0, "span", 28);
|
|
21295
|
+
i0__namespace.ɵɵelementStart(1, "span", 29);
|
|
21296
|
+
i0__namespace.ɵɵtext(2, "Error:");
|
|
21297
|
+
i0__namespace.ɵɵelementEnd();
|
|
21298
|
+
i0__namespace.ɵɵtext(3);
|
|
21299
|
+
i0__namespace.ɵɵelementEnd();
|
|
21300
|
+
}
|
|
21301
|
+
if (rf & 2) {
|
|
21302
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
21303
|
+
i0__namespace.ɵɵadvance(3);
|
|
21304
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.noSelectedCaseError, " ");
|
|
21305
|
+
}
|
|
21306
|
+
}
|
|
21307
|
+
function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) {
|
|
21308
|
+
if (rf & 1) {
|
|
21309
|
+
i0__namespace.ɵɵelementStart(0, "span");
|
|
21310
|
+
i0__namespace.ɵɵtext(1);
|
|
21311
|
+
i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
21312
|
+
i0__namespace.ɵɵelement(3, "br");
|
|
21313
|
+
i0__namespace.ɵɵelementEnd();
|
|
21314
|
+
}
|
|
21315
|
+
if (rf & 2) {
|
|
21316
|
+
var reason_r15 = ctx.$implicit;
|
|
21317
|
+
i0__namespace.ɵɵadvance(1);
|
|
21318
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, reason_r15.reasonCode));
|
|
21319
|
+
}
|
|
21320
|
+
}
|
|
21321
|
+
var _c1$6 = function (a0) { return { "table-group-error": a0 }; };
|
|
21322
|
+
function LinkCasesComponent_tr_31_Template(rf, ctx) {
|
|
21323
|
+
if (rf & 1) {
|
|
21324
|
+
var _r17_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21325
|
+
i0__namespace.ɵɵelementStart(0, "tr", 10);
|
|
21326
|
+
i0__namespace.ɵɵelementStart(1, "td", 33);
|
|
21327
|
+
i0__namespace.ɵɵelement(2, "div", 34);
|
|
21328
|
+
i0__namespace.ɵɵelementStart(3, "span");
|
|
21329
|
+
i0__namespace.ɵɵtext(4);
|
|
21330
|
+
i0__namespace.ɵɵelement(5, "br");
|
|
21331
|
+
i0__namespace.ɵɵtext(6);
|
|
21332
|
+
i0__namespace.ɵɵpipe(7, "ccdCaseReference");
|
|
21333
|
+
i0__namespace.ɵɵelementEnd();
|
|
21334
|
+
i0__namespace.ɵɵelementEnd();
|
|
21335
|
+
i0__namespace.ɵɵelementStart(8, "td", 35);
|
|
21336
|
+
i0__namespace.ɵɵtext(9);
|
|
21337
|
+
i0__namespace.ɵɵelementEnd();
|
|
21338
|
+
i0__namespace.ɵɵelementStart(10, "td", 33);
|
|
21339
|
+
i0__namespace.ɵɵtext(11);
|
|
21340
|
+
i0__namespace.ɵɵelementEnd();
|
|
21341
|
+
i0__namespace.ɵɵelementStart(12, "td", 35);
|
|
21342
|
+
i0__namespace.ɵɵtext(13);
|
|
21343
|
+
i0__namespace.ɵɵelementEnd();
|
|
21344
|
+
i0__namespace.ɵɵelementStart(14, "td", 33);
|
|
21345
|
+
i0__namespace.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 36);
|
|
21346
|
+
i0__namespace.ɵɵelementEnd();
|
|
21347
|
+
i0__namespace.ɵɵelementStart(16, "td", 33);
|
|
21348
|
+
i0__namespace.ɵɵelementStart(17, "a", 37);
|
|
21349
|
+
i0__namespace.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { i0__namespace.ɵɵrestoreView(_r17_1); var pos_r13 = ctx.index; var case_r12 = ctx.$implicit; var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onSelectedLinkedCaseRemove(pos_r13, case_r12.caseReference); });
|
|
21350
|
+
i0__namespace.ɵɵtext(18, "Remove");
|
|
21351
|
+
i0__namespace.ɵɵelementEnd();
|
|
21352
|
+
i0__namespace.ɵɵelementEnd();
|
|
21353
|
+
i0__namespace.ɵɵelementEnd();
|
|
21354
|
+
}
|
|
21355
|
+
if (rf & 2) {
|
|
21356
|
+
var case_r12 = ctx.$implicit;
|
|
21357
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
21358
|
+
i0__namespace.ɵɵadvance(2);
|
|
21359
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c1$6, ctx_r2.caseSelectionError && case_r12.caseReference === ctx_r2.linkCaseForm.value.caseNumber));
|
|
21360
|
+
i0__namespace.ɵɵadvance(2);
|
|
21361
|
+
i0__namespace.ɵɵtextInterpolate1("", case_r12.caseName, " ");
|
|
21362
|
+
i0__namespace.ɵɵadvance(2);
|
|
21363
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(7, 10, case_r12.caseReference), "");
|
|
21364
|
+
i0__namespace.ɵɵadvance(2);
|
|
21365
|
+
i0__namespace.ɵɵproperty("title", case_r12.caseTypeDescription);
|
|
21366
|
+
i0__namespace.ɵɵadvance(1);
|
|
21367
|
+
i0__namespace.ɵɵtextInterpolate(case_r12.caseType);
|
|
21368
|
+
i0__namespace.ɵɵadvance(2);
|
|
21369
|
+
i0__namespace.ɵɵtextInterpolate(case_r12.caseService);
|
|
21370
|
+
i0__namespace.ɵɵadvance(1);
|
|
21371
|
+
i0__namespace.ɵɵproperty("title", case_r12.caseStateDescription);
|
|
21372
|
+
i0__namespace.ɵɵadvance(1);
|
|
21373
|
+
i0__namespace.ɵɵtextInterpolate(case_r12.caseState);
|
|
21374
|
+
i0__namespace.ɵɵadvance(2);
|
|
21375
|
+
i0__namespace.ɵɵproperty("ngForOf", case_r12.reasons);
|
|
21376
|
+
i0__namespace.ɵɵadvance(2);
|
|
21377
|
+
i0__namespace.ɵɵattribute("id", case_r12.caseReference);
|
|
21378
|
+
}
|
|
21379
|
+
}
|
|
21380
|
+
function LinkCasesComponent_tr_32_Template(rf, ctx) {
|
|
21381
|
+
if (rf & 1) {
|
|
21382
|
+
i0__namespace.ɵɵelementStart(0, "tr", 10);
|
|
21383
|
+
i0__namespace.ɵɵelementStart(1, "td", 38);
|
|
21384
|
+
i0__namespace.ɵɵtext(2, " None ");
|
|
21385
|
+
i0__namespace.ɵɵelementEnd();
|
|
21386
|
+
i0__namespace.ɵɵelementEnd();
|
|
21387
|
+
}
|
|
21388
|
+
}
|
|
21389
|
+
var LinkCasesComponent = /** @class */ (function () {
|
|
21390
|
+
function LinkCasesComponent(casesService, fb, validatorsUtils, linkedCasesService) {
|
|
21391
|
+
this.casesService = casesService;
|
|
21392
|
+
this.fb = fb;
|
|
21393
|
+
this.validatorsUtils = validatorsUtils;
|
|
21394
|
+
this.linkedCasesService = linkedCasesService;
|
|
21395
|
+
this.linkedCasesStateEmitter = new i0.EventEmitter();
|
|
21396
|
+
this.errorMessages = [];
|
|
21397
|
+
this.selectedCases = [];
|
|
21398
|
+
this.linkCaseReasons = [];
|
|
21399
|
+
this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
|
|
21400
|
+
}
|
|
21401
|
+
LinkCasesComponent.prototype.ngOnInit = function () {
|
|
21402
|
+
this.caseId = this.linkedCasesService.caseId;
|
|
21403
|
+
this.caseName = this.linkedCasesService.caseName;
|
|
21404
|
+
this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
|
|
21405
|
+
this.initForm();
|
|
21406
|
+
if (this.linkedCasesService.editMode) {
|
|
21407
|
+
// this may have includes the currently added one but yet to be submitted.
|
|
21408
|
+
this.selectedCases = this.linkedCasesService.linkedCases;
|
|
21409
|
+
}
|
|
21410
|
+
else if (this.linkedCasesService.initialCaseLinks.length !== this.linkedCasesService.caseFieldValue.length) {
|
|
21411
|
+
this.linkedCasesService.linkedCases = this.linkedCasesService.initialCaseLinks;
|
|
21412
|
+
}
|
|
21413
|
+
};
|
|
21414
|
+
LinkCasesComponent.prototype.initForm = function () {
|
|
21415
|
+
this.linkCaseForm = this.fb.group({
|
|
21416
|
+
caseNumber: ['', [i2.Validators.minLength(16), this.validatorsUtils.regexPattern(exports.Patterns.CASE_REF)]],
|
|
21417
|
+
reasonType: this.getReasonTypeFormArray,
|
|
21418
|
+
});
|
|
21419
|
+
};
|
|
21420
|
+
Object.defineProperty(LinkCasesComponent.prototype, "getReasonTypeFormArray", {
|
|
21421
|
+
get: function () {
|
|
21422
|
+
var _this = this;
|
|
21423
|
+
return this.fb.array(this.linkCaseReasons.map(function (val) { return _this.fb.group({
|
|
21424
|
+
key: [val.key],
|
|
21425
|
+
value_en: [val.value_en],
|
|
21426
|
+
value_cy: [val.value_cy],
|
|
21427
|
+
hint_text_en: [val.hint_text_en],
|
|
21428
|
+
hint_text_cy: [val.hint_text_cy],
|
|
21429
|
+
lov_order: [val.lov_order],
|
|
21430
|
+
parent_key: [val.parent_key],
|
|
21431
|
+
selected: [!!val.selected],
|
|
21432
|
+
}); }), this.validatorsUtils.formArraySelectedValidator());
|
|
21433
|
+
},
|
|
21434
|
+
enumerable: false,
|
|
21435
|
+
configurable: true
|
|
21436
|
+
});
|
|
21437
|
+
LinkCasesComponent.prototype.submitCaseInfo = function () {
|
|
21438
|
+
this.errorMessages = [];
|
|
21439
|
+
this.caseReasonError = null;
|
|
21440
|
+
this.caseNumberError = null;
|
|
21441
|
+
this.caseSelectionError = null;
|
|
21442
|
+
this.noSelectedCaseError = null;
|
|
21443
|
+
if (this.linkCaseForm.valid &&
|
|
21444
|
+
!this.isCaseSelected(this.selectedCases) &&
|
|
21445
|
+
!this.isCaseSelected(this.linkedCasesService.linkedCases) &&
|
|
21446
|
+
!this.isCaseSelectedSameAsCurrentCase()) {
|
|
21447
|
+
this.getCaseInfo();
|
|
21448
|
+
}
|
|
21449
|
+
else {
|
|
21450
|
+
this.showErrorInfo();
|
|
21451
|
+
}
|
|
21452
|
+
};
|
|
21453
|
+
LinkCasesComponent.prototype.isCaseSelected = function (linkedCases) {
|
|
21454
|
+
if (linkedCases.length === 0) {
|
|
21455
|
+
return false;
|
|
21456
|
+
}
|
|
21457
|
+
var caseNumber = this.linkCaseForm.value.caseNumber;
|
|
21458
|
+
return !!linkedCases.find(function (caseLink) { return caseLink.caseReference.split('-').join('') === caseNumber.split('-').join(''); });
|
|
21459
|
+
};
|
|
21460
|
+
LinkCasesComponent.prototype.isCaseSelectedSameAsCurrentCase = function () {
|
|
21461
|
+
return this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('');
|
|
21462
|
+
};
|
|
21463
|
+
LinkCasesComponent.prototype.showErrorInfo = function () {
|
|
21464
|
+
if (this.linkCaseForm.controls.caseNumber.invalid) {
|
|
21465
|
+
this.caseNumberError = exports.LinkedCasesErrorMessages.CaseNumberError;
|
|
21466
|
+
this.errorMessages.push({
|
|
21467
|
+
title: 'dummy-case-number',
|
|
21468
|
+
description: exports.LinkedCasesErrorMessages.CaseNumberError,
|
|
21469
|
+
fieldId: 'caseNumber',
|
|
21470
|
+
});
|
|
21471
|
+
}
|
|
21472
|
+
if (this.linkCaseForm.controls.reasonType.invalid) {
|
|
21473
|
+
this.caseReasonError = exports.LinkedCasesErrorMessages.ReasonSelectionError;
|
|
21474
|
+
this.errorMessages.push({
|
|
21475
|
+
title: 'dummy-case-reason',
|
|
21476
|
+
description: exports.LinkedCasesErrorMessages.ReasonSelectionError,
|
|
21477
|
+
fieldId: 'caseReason',
|
|
21478
|
+
});
|
|
21479
|
+
}
|
|
21480
|
+
if (this.isCaseSelected(this.selectedCases)) {
|
|
21481
|
+
this.caseSelectionError = exports.LinkedCasesErrorMessages.CaseProposedError;
|
|
21482
|
+
this.errorMessages.push({
|
|
21483
|
+
title: 'dummy-case-number',
|
|
21484
|
+
description: exports.LinkedCasesErrorMessages.CaseProposedError,
|
|
21485
|
+
fieldId: 'caseNumber',
|
|
21486
|
+
});
|
|
21487
|
+
}
|
|
21488
|
+
if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
|
|
21489
|
+
this.caseSelectionError = exports.LinkedCasesErrorMessages.CasesLinkedError;
|
|
21490
|
+
this.errorMessages.push({
|
|
21491
|
+
title: 'dummy-case-number',
|
|
21492
|
+
description: exports.LinkedCasesErrorMessages.CasesLinkedError,
|
|
21493
|
+
fieldId: 'caseNumber',
|
|
21494
|
+
});
|
|
21495
|
+
}
|
|
21496
|
+
if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
|
|
21497
|
+
this.errorMessages.push({
|
|
21498
|
+
title: 'dummy-case-number',
|
|
21499
|
+
description: exports.LinkedCasesErrorMessages.ProposedCaseWithIn,
|
|
21500
|
+
fieldId: 'caseNumber',
|
|
21501
|
+
});
|
|
21502
|
+
}
|
|
21503
|
+
window.scrollTo(0, 0);
|
|
21504
|
+
this.emitLinkedCasesState(false);
|
|
21505
|
+
};
|
|
21506
|
+
LinkCasesComponent.prototype.getCaseInfo = function () {
|
|
21507
|
+
var _this = this;
|
|
21508
|
+
var caseNumberData = this.linkCaseForm.value.caseNumber.replace(/[- ]/g, '');
|
|
21509
|
+
this.casesService
|
|
21510
|
+
.getCaseViewV2(caseNumberData)
|
|
21511
|
+
.subscribe(function (caseView) {
|
|
21512
|
+
_this.linkedCasesService.caseDetails = caseView;
|
|
21513
|
+
var caseLink = {
|
|
21514
|
+
caseReference: caseView.case_id,
|
|
21515
|
+
reasons: _this.getSelectedCaseReasons(),
|
|
21516
|
+
createdDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
|
|
21517
|
+
caseType: caseView.case_type.name || '',
|
|
21518
|
+
caseTypeDescription: caseView.case_type.description || '',
|
|
21519
|
+
caseState: caseView.state.name || '',
|
|
21520
|
+
caseStateDescription: caseView.state.description || '',
|
|
21521
|
+
caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
|
|
21522
|
+
caseName: _this.linkedCasesService.getCaseName(caseView),
|
|
21523
|
+
};
|
|
21524
|
+
var ccdApiCaseLinkData = {
|
|
21525
|
+
CaseReference: caseView.case_id,
|
|
21526
|
+
CaseType: caseView.case_type.id,
|
|
21527
|
+
CreatedDateTime: moment__namespace(new Date()).format(_this.ISO_FORMAT),
|
|
21528
|
+
ReasonForLink: _this.getSelectedCCDTypeCaseReason()
|
|
21529
|
+
};
|
|
21530
|
+
if (!_this.linkedCasesService.caseFieldValue) {
|
|
21531
|
+
_this.linkedCasesService.caseFieldValue = [];
|
|
21532
|
+
}
|
|
21533
|
+
_this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
|
|
21534
|
+
_this.selectedCases.push(caseLink);
|
|
21535
|
+
_this.initForm();
|
|
21536
|
+
_this.emitLinkedCasesState(false);
|
|
21537
|
+
}, function (error) {
|
|
21538
|
+
_this.caseNumberError = exports.LinkedCasesErrorMessages.CaseCheckAgainError;
|
|
21539
|
+
_this.errorMessages.push({
|
|
21540
|
+
title: 'dummy-case-number',
|
|
21541
|
+
description: exports.LinkedCasesErrorMessages.CaseCheckAgainError,
|
|
21542
|
+
fieldId: 'caseNumber',
|
|
21543
|
+
});
|
|
21544
|
+
_this.emitLinkedCasesState(false);
|
|
21545
|
+
window.scrollTo(0, 0);
|
|
21546
|
+
return rxjs.throwError(error);
|
|
21547
|
+
});
|
|
21548
|
+
};
|
|
21549
|
+
// Return linked cases state and error messages to the parent
|
|
21550
|
+
LinkCasesComponent.prototype.emitLinkedCasesState = function (isNavigateToNextPage) {
|
|
21551
|
+
this.linkedCasesStateEmitter.emit({
|
|
21552
|
+
currentLinkedCasesPage: exports.LinkedCasesPages.LINK_CASE,
|
|
21553
|
+
errorMessages: this.errorMessages,
|
|
21554
|
+
navigateToNextPage: isNavigateToNextPage,
|
|
21555
|
+
});
|
|
21556
|
+
};
|
|
21557
|
+
LinkCasesComponent.prototype.getSelectedCaseReasons = function () {
|
|
21558
|
+
var selectedReasons = [];
|
|
21559
|
+
this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
|
|
21560
|
+
if (selectedReason.selected) {
|
|
21561
|
+
selectedReasons.push({
|
|
21562
|
+
reasonCode: selectedReason.key
|
|
21563
|
+
});
|
|
21564
|
+
}
|
|
21565
|
+
});
|
|
21566
|
+
return selectedReasons;
|
|
21567
|
+
};
|
|
21568
|
+
LinkCasesComponent.prototype.getSelectedCCDTypeCaseReason = function () {
|
|
21569
|
+
var selectedReasons = [];
|
|
21570
|
+
this.linkCaseForm.controls.reasonType.value.forEach(function (selectedReason) {
|
|
21571
|
+
if (selectedReason.selected) {
|
|
21572
|
+
selectedReasons.push({
|
|
21573
|
+
value: {
|
|
21574
|
+
Reason: selectedReason.key,
|
|
21575
|
+
}
|
|
21576
|
+
});
|
|
21577
|
+
}
|
|
21578
|
+
});
|
|
21579
|
+
return selectedReasons;
|
|
21580
|
+
};
|
|
21581
|
+
LinkCasesComponent.prototype.onSelectedLinkedCaseRemove = function (pos, selectedCaseReference) {
|
|
21582
|
+
var caseFieldValue = this.linkedCasesService.caseFieldValue || [];
|
|
21583
|
+
var updatedItems = caseFieldValue.filter(function (item) { return item.value && item.value.CaseReference !== selectedCaseReference; });
|
|
21584
|
+
if (updatedItems) {
|
|
21585
|
+
this.linkedCasesService.caseFieldValue = updatedItems;
|
|
21586
|
+
}
|
|
21587
|
+
this.selectedCases.splice(pos, 1);
|
|
21588
|
+
};
|
|
21589
|
+
LinkCasesComponent.prototype.onNext = function () {
|
|
21590
|
+
this.errorMessages = [];
|
|
21591
|
+
this.caseReasonError = null;
|
|
21592
|
+
this.caseNumberError = null;
|
|
21593
|
+
this.caseSelectionError = null;
|
|
21594
|
+
this.noSelectedCaseError = null;
|
|
21595
|
+
var navigateToNextPage = true;
|
|
21596
|
+
if (this.selectedCases.length) {
|
|
21597
|
+
this.linkedCasesService.linkedCases = this.selectedCases;
|
|
21598
|
+
}
|
|
21599
|
+
else {
|
|
21600
|
+
this.noSelectedCaseError = exports.LinkedCasesErrorMessages.CaseSelectionError;
|
|
21601
|
+
this.errorMessages.push({
|
|
21602
|
+
title: 'dummy-case-selection',
|
|
21603
|
+
description: exports.LinkedCasesErrorMessages.CaseSelectionError,
|
|
21604
|
+
fieldId: 'caseReason',
|
|
21605
|
+
});
|
|
21606
|
+
navigateToNextPage = false;
|
|
21607
|
+
}
|
|
21608
|
+
this.emitLinkedCasesState(navigateToNextPage);
|
|
21609
|
+
};
|
|
21610
|
+
return LinkCasesComponent;
|
|
21611
|
+
}());
|
|
21612
|
+
LinkCasesComponent.ɵfac = function LinkCasesComponent_Factory(t) { return new (t || LinkCasesComponent)(i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(ValidatorsUtils), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
21613
|
+
LinkCasesComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
21614
|
+
if (rf & 1) {
|
|
21615
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
21616
|
+
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
21617
|
+
i0__namespace.ɵɵelementStart(2, "div");
|
|
21618
|
+
i0__namespace.ɵɵelementStart(3, "span", 2);
|
|
21619
|
+
i0__namespace.ɵɵtext(4);
|
|
21620
|
+
i0__namespace.ɵɵpipe(5, "ccdCaseReference");
|
|
21621
|
+
i0__namespace.ɵɵelementEnd();
|
|
21622
|
+
i0__namespace.ɵɵelementStart(6, "h1", 3);
|
|
21623
|
+
i0__namespace.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
|
|
21624
|
+
i0__namespace.ɵɵelementEnd();
|
|
21625
|
+
i0__namespace.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 18, 11, "div", 4);
|
|
21626
|
+
i0__namespace.ɵɵelement(9, "hr");
|
|
21627
|
+
i0__namespace.ɵɵelement(10, "br");
|
|
21628
|
+
i0__namespace.ɵɵelement(11, "br");
|
|
21629
|
+
i0__namespace.ɵɵelementStart(12, "div", 5);
|
|
21630
|
+
i0__namespace.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
|
|
21631
|
+
i0__namespace.ɵɵelementStart(14, "table", 7);
|
|
21632
|
+
i0__namespace.ɵɵelementStart(15, "caption", 8);
|
|
21633
|
+
i0__namespace.ɵɵtext(16, "Proposed case links ");
|
|
21634
|
+
i0__namespace.ɵɵelementEnd();
|
|
21635
|
+
i0__namespace.ɵɵelementStart(17, "thead", 9);
|
|
21636
|
+
i0__namespace.ɵɵelementStart(18, "tr", 10);
|
|
21637
|
+
i0__namespace.ɵɵelementStart(19, "th", 11);
|
|
21638
|
+
i0__namespace.ɵɵtext(20, "Case name and number");
|
|
21639
|
+
i0__namespace.ɵɵelementEnd();
|
|
21640
|
+
i0__namespace.ɵɵelementStart(21, "th", 12);
|
|
21641
|
+
i0__namespace.ɵɵtext(22, "Case type ");
|
|
21642
|
+
i0__namespace.ɵɵelementEnd();
|
|
21643
|
+
i0__namespace.ɵɵelementStart(23, "th", 13);
|
|
21644
|
+
i0__namespace.ɵɵtext(24, "Service");
|
|
21645
|
+
i0__namespace.ɵɵelementEnd();
|
|
21646
|
+
i0__namespace.ɵɵelementStart(25, "th", 13);
|
|
21647
|
+
i0__namespace.ɵɵtext(26, "State");
|
|
21648
|
+
i0__namespace.ɵɵelementEnd();
|
|
21649
|
+
i0__namespace.ɵɵelementStart(27, "th", 14);
|
|
21650
|
+
i0__namespace.ɵɵtext(28, "Reasons for case link");
|
|
21651
|
+
i0__namespace.ɵɵelementEnd();
|
|
21652
|
+
i0__namespace.ɵɵelement(29, "th", 15);
|
|
21653
|
+
i0__namespace.ɵɵelementEnd();
|
|
21654
|
+
i0__namespace.ɵɵelementEnd();
|
|
21655
|
+
i0__namespace.ɵɵelementStart(30, "tbody", 16);
|
|
21656
|
+
i0__namespace.ɵɵtemplate(31, LinkCasesComponent_tr_31_Template, 19, 14, "tr", 17);
|
|
21657
|
+
i0__namespace.ɵɵtemplate(32, LinkCasesComponent_tr_32_Template, 3, 0, "tr", 18);
|
|
21658
|
+
i0__namespace.ɵɵelementEnd();
|
|
21659
|
+
i0__namespace.ɵɵelementEnd();
|
|
21660
|
+
i0__namespace.ɵɵelementEnd();
|
|
21661
|
+
i0__namespace.ɵɵelementStart(33, "div", 19);
|
|
21662
|
+
i0__namespace.ɵɵelementStart(34, "button", 20);
|
|
21663
|
+
i0__namespace.ɵɵlistener("click", function LinkCasesComponent_Template_button_click_34_listener() { return ctx.onNext(); });
|
|
21664
|
+
i0__namespace.ɵɵtext(35, "Next");
|
|
21665
|
+
i0__namespace.ɵɵelementEnd();
|
|
21666
|
+
i0__namespace.ɵɵelementEnd();
|
|
21667
|
+
i0__namespace.ɵɵelementEnd();
|
|
21668
|
+
i0__namespace.ɵɵelementEnd();
|
|
21669
|
+
i0__namespace.ɵɵelementEnd();
|
|
21670
|
+
}
|
|
21671
|
+
if (rf & 2) {
|
|
21672
|
+
i0__namespace.ɵɵadvance(4);
|
|
21673
|
+
i0__namespace.ɵɵtextInterpolate2("Link cases to ", ctx.caseName, " ", i0__namespace.ɵɵpipeBind1(5, 7, ctx.caseId), "");
|
|
21674
|
+
i0__namespace.ɵɵadvance(4);
|
|
21675
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.linkCaseForm);
|
|
21676
|
+
i0__namespace.ɵɵadvance(4);
|
|
21677
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(9, _c0$m, !!ctx.noSelectedCaseError));
|
|
21678
|
+
i0__namespace.ɵɵadvance(1);
|
|
21679
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.noSelectedCaseError);
|
|
21680
|
+
i0__namespace.ɵɵadvance(18);
|
|
21681
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.selectedCases);
|
|
21682
|
+
i0__namespace.ɵɵadvance(1);
|
|
21683
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx.selectedCases.length);
|
|
21684
|
+
}
|
|
21685
|
+
}, 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}"] });
|
|
21686
|
+
(function () {
|
|
21687
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkCasesComponent, [{
|
|
21688
|
+
type: i0.Component,
|
|
21689
|
+
args: [{
|
|
21690
|
+
selector: 'ccd-link-cases',
|
|
21691
|
+
styleUrls: ['./link-cases.component.scss'],
|
|
21692
|
+
templateUrl: './link-cases.component.html',
|
|
21693
|
+
}]
|
|
21694
|
+
}], function () { return [{ type: CasesService }, { type: i2__namespace.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
21695
|
+
type: i0.Output
|
|
21696
|
+
}] });
|
|
21697
|
+
})();
|
|
21698
|
+
|
|
21699
|
+
function LinkedCasesFromTableComponent_a_0_Template(rf, ctx) {
|
|
21700
|
+
if (rf & 1) {
|
|
21701
|
+
var _r3_1 = i0__namespace.ɵɵgetCurrentView();
|
|
21702
|
+
i0__namespace.ɵɵelementStart(0, "a", 2);
|
|
21703
|
+
i0__namespace.ɵɵlistener("click", function LinkedCasesFromTableComponent_a_0_Template_a_click_0_listener() { i0__namespace.ɵɵrestoreView(_r3_1); var ctx_r2 = i0__namespace.ɵɵnextContext(); return ctx_r2.onClick(); });
|
|
21704
|
+
i0__namespace.ɵɵtext(1);
|
|
21705
|
+
i0__namespace.ɵɵelementEnd();
|
|
21706
|
+
}
|
|
21707
|
+
if (rf & 2) {
|
|
21708
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
21709
|
+
i0__namespace.ɵɵadvance(1);
|
|
21710
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r0.showHideLinkText);
|
|
21711
|
+
}
|
|
21712
|
+
}
|
|
21713
|
+
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template(rf, ctx) {
|
|
21714
|
+
if (rf & 1) {
|
|
21715
|
+
i0__namespace.ɵɵelementStart(0, "span");
|
|
21716
|
+
i0__namespace.ɵɵtext(1);
|
|
21717
|
+
i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
21718
|
+
i0__namespace.ɵɵelement(3, "br");
|
|
21719
|
+
i0__namespace.ɵɵelementEnd();
|
|
21720
|
+
}
|
|
21721
|
+
if (rf & 2) {
|
|
21722
|
+
var reason_r11 = ctx.$implicit;
|
|
21723
|
+
i0__namespace.ɵɵadvance(1);
|
|
21724
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 1, reason_r11.reasonCode), " ");
|
|
21725
|
+
}
|
|
21726
|
+
}
|
|
21727
|
+
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template(rf, ctx) {
|
|
21728
|
+
if (rf & 1) {
|
|
21729
|
+
i0__namespace.ɵɵelementStart(0, "td", 14);
|
|
21730
|
+
i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_span_1_Template, 4, 3, "span", 17);
|
|
21731
|
+
i0__namespace.ɵɵelementEnd();
|
|
21732
|
+
}
|
|
21733
|
+
if (rf & 2) {
|
|
21734
|
+
var details_r9 = ctx.$implicit;
|
|
21735
|
+
i0__namespace.ɵɵadvance(1);
|
|
21736
|
+
i0__namespace.ɵɵproperty("ngForOf", details_r9.reasons);
|
|
21737
|
+
}
|
|
21738
|
+
}
|
|
21739
|
+
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template(rf, ctx) {
|
|
21740
|
+
if (rf & 1) {
|
|
21741
|
+
i0__namespace.ɵɵelementStart(0, "tr", 5);
|
|
21742
|
+
i0__namespace.ɵɵelementStart(1, "td", 11);
|
|
21743
|
+
i0__namespace.ɵɵelementStart(2, "p", 12);
|
|
21744
|
+
i0__namespace.ɵɵelementStart(3, "a", 13);
|
|
21745
|
+
i0__namespace.ɵɵelementStart(4, "span");
|
|
21746
|
+
i0__namespace.ɵɵtext(5);
|
|
21747
|
+
i0__namespace.ɵɵelement(6, "br");
|
|
21748
|
+
i0__namespace.ɵɵtext(7);
|
|
21749
|
+
i0__namespace.ɵɵpipe(8, "ccdCaseReference");
|
|
21750
|
+
i0__namespace.ɵɵelementEnd();
|
|
21751
|
+
i0__namespace.ɵɵelementEnd();
|
|
21752
|
+
i0__namespace.ɵɵelementEnd();
|
|
21753
|
+
i0__namespace.ɵɵelementEnd();
|
|
21754
|
+
i0__namespace.ɵɵelementStart(9, "td", 14);
|
|
21755
|
+
i0__namespace.ɵɵelementStart(10, "span", 15);
|
|
21756
|
+
i0__namespace.ɵɵtext(11);
|
|
21757
|
+
i0__namespace.ɵɵelementEnd();
|
|
21758
|
+
i0__namespace.ɵɵelementEnd();
|
|
21759
|
+
i0__namespace.ɵɵelementStart(12, "td", 14);
|
|
21760
|
+
i0__namespace.ɵɵelementStart(13, "span");
|
|
21761
|
+
i0__namespace.ɵɵtext(14);
|
|
21762
|
+
i0__namespace.ɵɵelementEnd();
|
|
21763
|
+
i0__namespace.ɵɵelementEnd();
|
|
21764
|
+
i0__namespace.ɵɵelementStart(15, "td", 14);
|
|
21765
|
+
i0__namespace.ɵɵelementStart(16, "span", 15);
|
|
21766
|
+
i0__namespace.ɵɵtext(17);
|
|
21767
|
+
i0__namespace.ɵɵelementEnd();
|
|
21768
|
+
i0__namespace.ɵɵelementEnd();
|
|
21769
|
+
i0__namespace.ɵɵtemplate(18, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_td_18_Template, 2, 1, "td", 16);
|
|
21770
|
+
i0__namespace.ɵɵelementEnd();
|
|
21771
|
+
}
|
|
21772
|
+
if (rf & 2) {
|
|
21773
|
+
var case_r7 = ctx.$implicit;
|
|
21774
|
+
i0__namespace.ɵɵadvance(3);
|
|
21775
|
+
i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r7.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
|
|
21776
|
+
i0__namespace.ɵɵadvance(2);
|
|
21777
|
+
i0__namespace.ɵɵtextInterpolate1("", case_r7.caseNameHmctsInternal, " ");
|
|
21778
|
+
i0__namespace.ɵɵadvance(2);
|
|
21779
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r7.caseReference), "");
|
|
21780
|
+
i0__namespace.ɵɵadvance(3);
|
|
21781
|
+
i0__namespace.ɵɵproperty("title", case_r7.ccdCaseTypeDescription);
|
|
21782
|
+
i0__namespace.ɵɵadvance(1);
|
|
21783
|
+
i0__namespace.ɵɵtextInterpolate(case_r7.ccdCaseType);
|
|
21784
|
+
i0__namespace.ɵɵadvance(3);
|
|
21785
|
+
i0__namespace.ɵɵtextInterpolate(case_r7.ccdJurisdiction);
|
|
21786
|
+
i0__namespace.ɵɵadvance(2);
|
|
21787
|
+
i0__namespace.ɵɵproperty("title", case_r7.stateDescription);
|
|
21788
|
+
i0__namespace.ɵɵadvance(1);
|
|
21789
|
+
i0__namespace.ɵɵtextInterpolate(case_r7.state);
|
|
21790
|
+
i0__namespace.ɵɵadvance(1);
|
|
21791
|
+
i0__namespace.ɵɵproperty("ngForOf", case_r7.linkDetails);
|
|
21792
|
+
}
|
|
21793
|
+
}
|
|
21794
|
+
function LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template(rf, ctx) {
|
|
21795
|
+
if (rf & 1) {
|
|
21796
|
+
i0__namespace.ɵɵelementStart(0, "tr", 5);
|
|
21797
|
+
i0__namespace.ɵɵelementStart(1, "td", 18);
|
|
21798
|
+
i0__namespace.ɵɵtext(2, " None ");
|
|
21799
|
+
i0__namespace.ɵɵelementEnd();
|
|
21800
|
+
i0__namespace.ɵɵelementEnd();
|
|
21801
|
+
}
|
|
21802
|
+
}
|
|
21803
|
+
function LinkedCasesFromTableComponent_table_1_tbody_13_Template(rf, ctx) {
|
|
21804
|
+
if (rf & 1) {
|
|
21805
|
+
i0__namespace.ɵɵelementStart(0, "tbody", 8);
|
|
21806
|
+
i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_tbody_13_tr_1_Template, 19, 11, "tr", 9);
|
|
21807
|
+
i0__namespace.ɵɵtemplate(2, LinkedCasesFromTableComponent_table_1_tbody_13_tr_2_Template, 3, 0, "tr", 10);
|
|
21808
|
+
i0__namespace.ɵɵelementEnd();
|
|
21809
|
+
}
|
|
21810
|
+
if (rf & 2) {
|
|
21811
|
+
var ctx_r4 = i0__namespace.ɵɵnextContext(2);
|
|
21812
|
+
i0__namespace.ɵɵadvance(1);
|
|
21813
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r4.getLinkedCasesResponse);
|
|
21814
|
+
i0__namespace.ɵɵadvance(1);
|
|
21815
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r4.noLinkedCases);
|
|
21816
|
+
}
|
|
21817
|
+
}
|
|
21818
|
+
function LinkedCasesFromTableComponent_table_1_Template(rf, ctx) {
|
|
21819
|
+
if (rf & 1) {
|
|
21820
|
+
i0__namespace.ɵɵelementStart(0, "table", 3);
|
|
21821
|
+
i0__namespace.ɵɵelementStart(1, "thead", 4);
|
|
21822
|
+
i0__namespace.ɵɵelementStart(2, "tr", 5);
|
|
21823
|
+
i0__namespace.ɵɵelementStart(3, "th", 6);
|
|
21824
|
+
i0__namespace.ɵɵtext(4, "Case name and number");
|
|
21825
|
+
i0__namespace.ɵɵelementEnd();
|
|
21826
|
+
i0__namespace.ɵɵelementStart(5, "th", 6);
|
|
21827
|
+
i0__namespace.ɵɵtext(6, "Case type ");
|
|
21828
|
+
i0__namespace.ɵɵelementEnd();
|
|
21829
|
+
i0__namespace.ɵɵelementStart(7, "th", 6);
|
|
21830
|
+
i0__namespace.ɵɵtext(8, "Service");
|
|
21831
|
+
i0__namespace.ɵɵelementEnd();
|
|
21832
|
+
i0__namespace.ɵɵelementStart(9, "th", 6);
|
|
21833
|
+
i0__namespace.ɵɵtext(10, "State");
|
|
21834
|
+
i0__namespace.ɵɵelementEnd();
|
|
21835
|
+
i0__namespace.ɵɵelementStart(11, "th", 6);
|
|
21836
|
+
i0__namespace.ɵɵtext(12, "Reasons for case link");
|
|
21837
|
+
i0__namespace.ɵɵelementEnd();
|
|
21838
|
+
i0__namespace.ɵɵelementEnd();
|
|
21839
|
+
i0__namespace.ɵɵelementEnd();
|
|
21840
|
+
i0__namespace.ɵɵtemplate(13, LinkedCasesFromTableComponent_table_1_tbody_13_Template, 3, 2, "tbody", 7);
|
|
21841
|
+
i0__namespace.ɵɵelementEnd();
|
|
21842
|
+
}
|
|
21843
|
+
if (rf & 2) {
|
|
21844
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
21845
|
+
i0__namespace.ɵɵadvance(13);
|
|
21846
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r1.getLinkedCasesResponse && (!ctx_r1.isServerError && !ctx_r1.linkedCasesService.isServerReasonCodeError));
|
|
21847
|
+
}
|
|
21848
|
+
}
|
|
21849
|
+
exports.PageType = void 0;
|
|
21850
|
+
(function (PageType) {
|
|
21851
|
+
PageType["LINKEDCASESTABLBEVIEW"] = "linkedCasesTableView";
|
|
21852
|
+
PageType["PROPOSEDCASELINK"] = "proposedCaseLink";
|
|
21853
|
+
})(exports.PageType || (exports.PageType = {}));
|
|
21854
|
+
var LinkedCasesFromTableComponent = /** @class */ (function () {
|
|
21855
|
+
function LinkedCasesFromTableComponent(route, casesService, linkedCasesService) {
|
|
21856
|
+
this.route = route;
|
|
21857
|
+
this.casesService = casesService;
|
|
21858
|
+
this.linkedCasesService = linkedCasesService;
|
|
21859
|
+
this.notifyAPIFailure = new i0.EventEmitter(false);
|
|
21860
|
+
this.pageType = exports.PageType;
|
|
21861
|
+
this.getLinkedCasesResponse = [];
|
|
21862
|
+
this.showHideLinkText = 'Show';
|
|
21863
|
+
this.noLinkedCases = true;
|
|
21864
|
+
this.isServerError = false;
|
|
21865
|
+
}
|
|
21866
|
+
LinkedCasesFromTableComponent.prototype.ngAfterViewInit = function () {
|
|
21867
|
+
var labelField = document.getElementsByClassName('case-viewer-label');
|
|
21868
|
+
if (labelField && labelField.length) {
|
|
21869
|
+
labelField[0].replaceWith('');
|
|
21870
|
+
}
|
|
21871
|
+
};
|
|
21872
|
+
LinkedCasesFromTableComponent.prototype.ngOnInit = function () {
|
|
21873
|
+
this.fetchPageData();
|
|
21874
|
+
if (this.route.snapshot.data.case) {
|
|
21875
|
+
this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
|
|
21876
|
+
}
|
|
21877
|
+
};
|
|
21878
|
+
LinkedCasesFromTableComponent.prototype.fetchPageData = function () {
|
|
21879
|
+
var _this = this;
|
|
21880
|
+
this.caseId = this.route.snapshot.data.case.case_id;
|
|
21881
|
+
this.getLinkedCases().subscribe(function (response) {
|
|
21882
|
+
_this.isServerError = false;
|
|
21883
|
+
_this.getLinkedCasesResponse = response.linkedCases && response.linkedCases.map(function (item) {
|
|
21884
|
+
var mappedCasetype = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE', item.ccdCaseType);
|
|
21885
|
+
var mappedCasetypeDescription = _this.mapLookupIDToValueFromJurisdictions('CASE_TYPE_DESCRIPTION', item.ccdCaseType);
|
|
21886
|
+
var mappedCaseState = _this.mapLookupIDToValueFromJurisdictions('STATE', item.state);
|
|
21887
|
+
var mappedCaseStateDescription = _this.mapLookupIDToValueFromJurisdictions('STATE_DESCRIPTION', item.state);
|
|
21888
|
+
var mappedCaseService = _this.mapLookupIDToValueFromJurisdictions('JURISDICTION', item.ccdJurisdiction);
|
|
21889
|
+
return Object.assign(Object.assign({}, item), { ccdCaseType: mappedCasetype, ccdCaseTypeDescription: mappedCasetypeDescription, ccdJurisdiction: mappedCaseService, state: mappedCaseState, stateDescription: mappedCaseStateDescription, caseNameHmctsInternal: item.caseNameHmctsInternal || LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT });
|
|
21890
|
+
});
|
|
21891
|
+
_this.noLinkedCases = !response.linkedCases || !response.linkedCases.length;
|
|
21892
|
+
}, function (err) {
|
|
21893
|
+
_this.isServerError = true;
|
|
21894
|
+
_this.notifyAPIFailure.emit(true);
|
|
21895
|
+
});
|
|
21896
|
+
};
|
|
21897
|
+
LinkedCasesFromTableComponent.prototype.getLinkedCases = function () {
|
|
21898
|
+
return this.casesService.getLinkedCases(this.caseId);
|
|
21899
|
+
};
|
|
21900
|
+
LinkedCasesFromTableComponent.prototype.mapLookupIDToValueFromJurisdictions = function (fieldName, fieldValue) {
|
|
21901
|
+
return this.linkedCasesService.mapLookupIDToValueFromJurisdictions(fieldName, fieldValue);
|
|
21902
|
+
};
|
|
21903
|
+
LinkedCasesFromTableComponent.prototype.onClick = function () {
|
|
21904
|
+
this.showHideLinkText = this.showHideLinkText === 'Show'
|
|
21905
|
+
? 'Hide'
|
|
21906
|
+
: 'Show';
|
|
21907
|
+
};
|
|
21908
|
+
return LinkedCasesFromTableComponent;
|
|
21909
|
+
}());
|
|
21910
|
+
LinkedCasesFromTableComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
|
|
21911
|
+
LinkedCasesFromTableComponent.ɵfac = function LinkedCasesFromTableComponent_Factory(t) { return new (t || LinkedCasesFromTableComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
21912
|
+
LinkedCasesFromTableComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
21913
|
+
if (rf & 1) {
|
|
21914
|
+
i0__namespace.ɵɵtemplate(0, LinkedCasesFromTableComponent_a_0_Template, 2, 1, "a", 0);
|
|
21915
|
+
i0__namespace.ɵɵtemplate(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
|
|
21916
|
+
}
|
|
21917
|
+
if (rf & 2) {
|
|
21918
|
+
i0__namespace.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
|
|
21919
|
+
i0__namespace.ɵɵadvance(1);
|
|
21920
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.getLinkedCasesResponse && ctx.showHideLinkText === "Hide" || ctx.noLinkedCases);
|
|
21921
|
+
}
|
|
21922
|
+
}, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}.heading-h2[_ngcontent-%COMP%]{margin-bottom:0}"] });
|
|
21923
|
+
(function () {
|
|
21924
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
|
|
21925
|
+
type: i0.Component,
|
|
21926
|
+
args: [{
|
|
21927
|
+
selector: 'ccd-linked-cases-from-table',
|
|
21928
|
+
templateUrl: './linked-cases-from-table.component.html',
|
|
21929
|
+
styleUrls: ['./linked-cases-from-table.component.scss']
|
|
21930
|
+
}]
|
|
21931
|
+
}], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }]; }, { caseField: [{
|
|
21932
|
+
type: i0.Input
|
|
21933
|
+
}], notifyAPIFailure: [{
|
|
21934
|
+
type: i0.Output
|
|
21935
|
+
}] });
|
|
21936
|
+
})();
|
|
21937
|
+
|
|
21938
|
+
function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template(rf, ctx) {
|
|
21939
|
+
if (rf & 1) {
|
|
21940
|
+
i0__namespace.ɵɵelementStart(0, "a", 16);
|
|
21941
|
+
i0__namespace.ɵɵtext(1);
|
|
21942
|
+
i0__namespace.ɵɵelementEnd();
|
|
21943
|
+
}
|
|
21944
|
+
if (rf & 2) {
|
|
21945
|
+
var case_r3 = i0__namespace.ɵɵnextContext(3).$implicit;
|
|
21946
|
+
var ctx_r9 = i0__namespace.ɵɵnextContext(2);
|
|
21947
|
+
i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
|
|
21948
|
+
i0__namespace.ɵɵadvance(1);
|
|
21949
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r9.getCaseRefereneLink(case_r3.caseReference));
|
|
21950
|
+
}
|
|
21951
|
+
}
|
|
21952
|
+
function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template(rf, ctx) {
|
|
21953
|
+
if (rf & 1) {
|
|
21954
|
+
i0__namespace.ɵɵelement(0, "br");
|
|
21955
|
+
}
|
|
21956
|
+
}
|
|
21957
|
+
function LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template(rf, ctx) {
|
|
21958
|
+
if (rf & 1) {
|
|
21959
|
+
i0__namespace.ɵɵelementStart(0, "span");
|
|
21960
|
+
i0__namespace.ɵɵtext(1);
|
|
21961
|
+
i0__namespace.ɵɵpipe(2, "ccdLinkCasesReasonValue");
|
|
21962
|
+
i0__namespace.ɵɵelementStart(3, "span");
|
|
21963
|
+
i0__namespace.ɵɵtemplate(4, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_a_4_Template, 2, 2, "a", 15);
|
|
21964
|
+
i0__namespace.ɵɵelementEnd();
|
|
21965
|
+
i0__namespace.ɵɵtemplate(5, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_br_5_Template, 1, 0, "br", 13);
|
|
21966
|
+
i0__namespace.ɵɵelementEnd();
|
|
21967
|
+
}
|
|
21968
|
+
if (rf & 2) {
|
|
21969
|
+
var reason_r6 = ctx.$implicit;
|
|
21970
|
+
var isLast_r8 = ctx.last;
|
|
21971
|
+
var ctx_r5 = i0__namespace.ɵɵnextContext(4);
|
|
21972
|
+
i0__namespace.ɵɵadvance(1);
|
|
21973
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(2, 3, reason_r6), "");
|
|
21974
|
+
i0__namespace.ɵɵadvance(3);
|
|
21975
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r5.hasLeadCaseOrConsolidated(reason_r6));
|
|
21976
|
+
i0__namespace.ɵɵadvance(1);
|
|
21977
|
+
i0__namespace.ɵɵproperty("ngIf", !isLast_r8);
|
|
21978
|
+
}
|
|
21979
|
+
}
|
|
21980
|
+
function LinkedCasesToTableComponent_table_2_tr_14_td_18_Template(rf, ctx) {
|
|
21981
|
+
if (rf & 1) {
|
|
21982
|
+
i0__namespace.ɵɵelementStart(0, "td");
|
|
21983
|
+
i0__namespace.ɵɵtemplate(1, LinkedCasesToTableComponent_table_2_tr_14_td_18_span_1_Template, 6, 5, "span", 14);
|
|
21984
|
+
i0__namespace.ɵɵelementEnd();
|
|
21985
|
+
}
|
|
21986
|
+
if (rf & 2) {
|
|
21987
|
+
var case_r3 = i0__namespace.ɵɵnextContext().$implicit;
|
|
21988
|
+
i0__namespace.ɵɵadvance(1);
|
|
21989
|
+
i0__namespace.ɵɵproperty("ngForOf", case_r3.reasons);
|
|
21990
|
+
}
|
|
21991
|
+
}
|
|
21992
|
+
function LinkedCasesToTableComponent_table_2_tr_14_Template(rf, ctx) {
|
|
21993
|
+
if (rf & 1) {
|
|
21994
|
+
i0__namespace.ɵɵelementStart(0, "tr", 4);
|
|
21995
|
+
i0__namespace.ɵɵelementStart(1, "td");
|
|
21996
|
+
i0__namespace.ɵɵelementStart(2, "p", 9);
|
|
21997
|
+
i0__namespace.ɵɵelementStart(3, "a", 10);
|
|
21998
|
+
i0__namespace.ɵɵelementStart(4, "span", 11);
|
|
21999
|
+
i0__namespace.ɵɵtext(5);
|
|
22000
|
+
i0__namespace.ɵɵelement(6, "br");
|
|
22001
|
+
i0__namespace.ɵɵtext(7);
|
|
22002
|
+
i0__namespace.ɵɵpipe(8, "ccdCaseReference");
|
|
22003
|
+
i0__namespace.ɵɵelementEnd();
|
|
22004
|
+
i0__namespace.ɵɵelementEnd();
|
|
22005
|
+
i0__namespace.ɵɵelementEnd();
|
|
22006
|
+
i0__namespace.ɵɵelementEnd();
|
|
22007
|
+
i0__namespace.ɵɵelementStart(9, "td");
|
|
22008
|
+
i0__namespace.ɵɵelementStart(10, "span", 12);
|
|
22009
|
+
i0__namespace.ɵɵtext(11);
|
|
22010
|
+
i0__namespace.ɵɵelementEnd();
|
|
22011
|
+
i0__namespace.ɵɵelementEnd();
|
|
22012
|
+
i0__namespace.ɵɵelementStart(12, "td");
|
|
22013
|
+
i0__namespace.ɵɵelementStart(13, "span");
|
|
22014
|
+
i0__namespace.ɵɵtext(14);
|
|
22015
|
+
i0__namespace.ɵɵelementEnd();
|
|
22016
|
+
i0__namespace.ɵɵelementEnd();
|
|
22017
|
+
i0__namespace.ɵɵelementStart(15, "td");
|
|
22018
|
+
i0__namespace.ɵɵelementStart(16, "span", 12);
|
|
22019
|
+
i0__namespace.ɵɵtext(17);
|
|
22020
|
+
i0__namespace.ɵɵelementEnd();
|
|
22021
|
+
i0__namespace.ɵɵelementEnd();
|
|
22022
|
+
i0__namespace.ɵɵtemplate(18, LinkedCasesToTableComponent_table_2_tr_14_td_18_Template, 2, 1, "td", 13);
|
|
22023
|
+
i0__namespace.ɵɵelementEnd();
|
|
22024
|
+
}
|
|
22025
|
+
if (rf & 2) {
|
|
22026
|
+
var case_r3 = ctx.$implicit;
|
|
22027
|
+
i0__namespace.ɵɵadvance(3);
|
|
22028
|
+
i0__namespace.ɵɵpropertyInterpolate1("href", "cases/case-details/", case_r3.caseReference, "", i0__namespace.ɵɵsanitizeUrl);
|
|
22029
|
+
i0__namespace.ɵɵadvance(2);
|
|
22030
|
+
i0__namespace.ɵɵtextInterpolate1("", case_r3.caseName, " ");
|
|
22031
|
+
i0__namespace.ɵɵadvance(2);
|
|
22032
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind1(8, 9, case_r3.caseReference), "");
|
|
22033
|
+
i0__namespace.ɵɵadvance(3);
|
|
22034
|
+
i0__namespace.ɵɵproperty("title", case_r3.caseTypeDescription);
|
|
22035
|
+
i0__namespace.ɵɵadvance(1);
|
|
22036
|
+
i0__namespace.ɵɵtextInterpolate(case_r3.caseType);
|
|
22037
|
+
i0__namespace.ɵɵadvance(3);
|
|
22038
|
+
i0__namespace.ɵɵtextInterpolate(case_r3.service);
|
|
22039
|
+
i0__namespace.ɵɵadvance(2);
|
|
22040
|
+
i0__namespace.ɵɵproperty("title", case_r3.stateDescription);
|
|
22041
|
+
i0__namespace.ɵɵadvance(1);
|
|
22042
|
+
i0__namespace.ɵɵtextInterpolate(case_r3.state);
|
|
22043
|
+
i0__namespace.ɵɵadvance(1);
|
|
22044
|
+
i0__namespace.ɵɵproperty("ngIf", case_r3 && case_r3.reasons);
|
|
22045
|
+
}
|
|
22046
|
+
}
|
|
22047
|
+
function LinkedCasesToTableComponent_table_2_tr_15_Template(rf, ctx) {
|
|
22048
|
+
if (rf & 1) {
|
|
22049
|
+
i0__namespace.ɵɵelementStart(0, "tr", 4);
|
|
22050
|
+
i0__namespace.ɵɵelementStart(1, "td", 17);
|
|
22051
|
+
i0__namespace.ɵɵtext(2, " None ");
|
|
22052
|
+
i0__namespace.ɵɵelementEnd();
|
|
22053
|
+
i0__namespace.ɵɵelementEnd();
|
|
22054
|
+
}
|
|
22055
|
+
}
|
|
22056
|
+
function LinkedCasesToTableComponent_table_2_Template(rf, ctx) {
|
|
22057
|
+
if (rf & 1) {
|
|
22058
|
+
i0__namespace.ɵɵelementStart(0, "table", 3);
|
|
22059
|
+
i0__namespace.ɵɵelementStart(1, "thead");
|
|
22060
|
+
i0__namespace.ɵɵelementStart(2, "tr", 4);
|
|
22061
|
+
i0__namespace.ɵɵelementStart(3, "th", 5);
|
|
22062
|
+
i0__namespace.ɵɵtext(4, "Case name and number");
|
|
22063
|
+
i0__namespace.ɵɵelementEnd();
|
|
22064
|
+
i0__namespace.ɵɵelementStart(5, "th", 5);
|
|
22065
|
+
i0__namespace.ɵɵtext(6, "Case type ");
|
|
22066
|
+
i0__namespace.ɵɵelementEnd();
|
|
22067
|
+
i0__namespace.ɵɵelementStart(7, "th", 5);
|
|
22068
|
+
i0__namespace.ɵɵtext(8, "Service");
|
|
22069
|
+
i0__namespace.ɵɵelementEnd();
|
|
22070
|
+
i0__namespace.ɵɵelementStart(9, "th", 5);
|
|
22071
|
+
i0__namespace.ɵɵtext(10, "State");
|
|
22072
|
+
i0__namespace.ɵɵelementEnd();
|
|
22073
|
+
i0__namespace.ɵɵelementStart(11, "th", 5);
|
|
22074
|
+
i0__namespace.ɵɵtext(12, "Reasons for case link");
|
|
22075
|
+
i0__namespace.ɵɵelementEnd();
|
|
22076
|
+
i0__namespace.ɵɵelementEnd();
|
|
22077
|
+
i0__namespace.ɵɵelementEnd();
|
|
22078
|
+
i0__namespace.ɵɵelementStart(13, "tbody", 6);
|
|
22079
|
+
i0__namespace.ɵɵtemplate(14, LinkedCasesToTableComponent_table_2_tr_14_Template, 19, 11, "tr", 7);
|
|
22080
|
+
i0__namespace.ɵɵtemplate(15, LinkedCasesToTableComponent_table_2_tr_15_Template, 3, 0, "tr", 8);
|
|
22081
|
+
i0__namespace.ɵɵelementEnd();
|
|
22082
|
+
i0__namespace.ɵɵelementEnd();
|
|
22083
|
+
}
|
|
22084
|
+
if (rf & 2) {
|
|
22085
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
22086
|
+
i0__namespace.ɵɵadvance(14);
|
|
22087
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.linkedCasesFromResponse);
|
|
22088
|
+
i0__namespace.ɵɵadvance(1);
|
|
22089
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.linkedCasesFromResponse && ctx_r0.linkedCasesFromResponse.length === 0 && (!ctx_r0.isServerError && !ctx_r0.linkedCasesService.isServerReasonCodeError));
|
|
22090
|
+
}
|
|
22091
|
+
}
|
|
22092
|
+
var LinkedCasesToTableComponent = /** @class */ (function () {
|
|
22093
|
+
function LinkedCasesToTableComponent(route, linkedCasesService, casesService) {
|
|
22094
|
+
this.route = route;
|
|
22095
|
+
this.linkedCasesService = linkedCasesService;
|
|
22096
|
+
this.casesService = casesService;
|
|
22097
|
+
this.notifyAPIFailure = new i0.EventEmitter(false);
|
|
22098
|
+
this.linkedCasesFromResponse = [];
|
|
22099
|
+
this.isServerError = false;
|
|
22100
|
+
this.jurisdictionsResponse = [];
|
|
22101
|
+
}
|
|
22102
|
+
LinkedCasesToTableComponent.prototype.ngAfterViewInit = function () {
|
|
22103
|
+
var labelField = document.getElementsByClassName('govuk-heading-l');
|
|
22104
|
+
if (labelField && labelField.length) {
|
|
22105
|
+
labelField[0].replaceWith('');
|
|
22106
|
+
}
|
|
22107
|
+
labelField = document.getElementsByClassName('heading-h2');
|
|
22108
|
+
if (labelField && labelField.length) {
|
|
22109
|
+
labelField[0].replaceWith('');
|
|
22110
|
+
}
|
|
22111
|
+
};
|
|
22112
|
+
LinkedCasesToTableComponent.prototype.ngOnInit = function () {
|
|
22113
|
+
this.caseId = this.route.snapshot && this.route.snapshot.data && this.route.snapshot.data.case.case_id;
|
|
22114
|
+
this.getAllLinkedCaseInformation();
|
|
22115
|
+
if (this.route.snapshot.data.case) {
|
|
22116
|
+
this.linkedCasesService.caseDetails = this.route.snapshot.data.case;
|
|
22117
|
+
}
|
|
22118
|
+
};
|
|
22119
|
+
LinkedCasesToTableComponent.prototype.getCaseRefereneLink = function (caseRef) {
|
|
22120
|
+
return caseRef.slice(this.caseId.length - 4);
|
|
22121
|
+
};
|
|
22122
|
+
LinkedCasesToTableComponent.prototype.sortLinkedCasesByReasonCode = function (searchCasesResponse) {
|
|
22123
|
+
var topLevelresultArray = [];
|
|
22124
|
+
var secondLevelresultArray = [];
|
|
22125
|
+
searchCasesResponse.forEach(function (item) {
|
|
22126
|
+
var reasons = item && item.reasons || [];
|
|
22127
|
+
var consolidatedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE; });
|
|
22128
|
+
var progressedStateReason = reasons.map(function (x) { return x; }).find(function (reason) { return reason === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE; });
|
|
22129
|
+
var arrayItem;
|
|
22130
|
+
if (progressedStateReason) {
|
|
22131
|
+
arrayItem = Object.assign({}, item);
|
|
22132
|
+
topLevelresultArray.push(arrayItem);
|
|
22133
|
+
}
|
|
22134
|
+
else if (consolidatedStateReason) {
|
|
22135
|
+
arrayItem = Object.assign({}, item);
|
|
22136
|
+
secondLevelresultArray = __spread([Object.assign({}, item)], secondLevelresultArray);
|
|
22137
|
+
}
|
|
22138
|
+
else {
|
|
22139
|
+
arrayItem = Object.assign({}, item);
|
|
22140
|
+
secondLevelresultArray.push(Object.assign({}, item));
|
|
22141
|
+
}
|
|
22142
|
+
});
|
|
22143
|
+
return topLevelresultArray.concat(secondLevelresultArray);
|
|
22144
|
+
};
|
|
22145
|
+
LinkedCasesToTableComponent.prototype.getAllLinkedCaseInformation = function () {
|
|
22146
|
+
var _this = this;
|
|
22147
|
+
var searchCasesResponse = [];
|
|
22148
|
+
var caseFieldValue = this.caseField ? this.caseField.value : [];
|
|
22149
|
+
// Generate the list of observables
|
|
22150
|
+
caseFieldValue.forEach(function (fieldValue) {
|
|
22151
|
+
if (fieldValue && fieldValue.id) {
|
|
22152
|
+
searchCasesResponse.push(_this.casesService.getCaseViewV2(fieldValue.id));
|
|
22153
|
+
}
|
|
22154
|
+
});
|
|
22155
|
+
if (searchCasesResponse.length) {
|
|
22156
|
+
this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
|
|
22157
|
+
var casesResponse = [];
|
|
22158
|
+
searchCases.forEach(function (response) {
|
|
22159
|
+
casesResponse.push(_this.mapResponse(response));
|
|
22160
|
+
});
|
|
22161
|
+
_this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
|
|
22162
|
+
_this.isLoaded = true;
|
|
22163
|
+
var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
|
|
22164
|
+
return {
|
|
22165
|
+
caseReference: item.caseReference,
|
|
22166
|
+
caseName: item.caseName,
|
|
22167
|
+
caseService: item.service,
|
|
22168
|
+
caseType: item.caseType,
|
|
22169
|
+
unlink: false,
|
|
22170
|
+
reasons: item.reasons && item.reasons.map(function (reason) {
|
|
22171
|
+
return {
|
|
22172
|
+
reasonCode: reason
|
|
22173
|
+
};
|
|
22174
|
+
}),
|
|
22175
|
+
};
|
|
22176
|
+
});
|
|
22177
|
+
_this.linkedCasesService.initialCaseLinks = caseLinks;
|
|
22178
|
+
_this.linkedCasesService.linkedCases = caseLinks;
|
|
22179
|
+
_this.isServerError = false;
|
|
22180
|
+
}, function (err) {
|
|
22181
|
+
_this.isServerError = true;
|
|
22182
|
+
_this.notifyAPIFailure.emit(true);
|
|
22183
|
+
});
|
|
22184
|
+
}
|
|
22185
|
+
};
|
|
22186
|
+
LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
|
|
22187
|
+
return rxjs.forkJoin(searchCasesResponse);
|
|
22188
|
+
};
|
|
22189
|
+
LinkedCasesToTableComponent.prototype.hasLeadCaseOrConsolidated = function (reasonCode) {
|
|
22190
|
+
return reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE ||
|
|
22191
|
+
reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE;
|
|
22192
|
+
};
|
|
22193
|
+
LinkedCasesToTableComponent.prototype.mapResponse = function (esSearchCasesResponse) {
|
|
22194
|
+
var caseInfo = this.caseField.value.find(function (item) { return item.value && item.value.CaseReference === esSearchCasesResponse.case_id; });
|
|
22195
|
+
return caseInfo && {
|
|
22196
|
+
caseReference: esSearchCasesResponse.case_id,
|
|
22197
|
+
caseName: this.linkedCasesService.getCaseName(esSearchCasesResponse),
|
|
22198
|
+
caseType: esSearchCasesResponse.case_type.name || '',
|
|
22199
|
+
caseTypeDescription: esSearchCasesResponse.case_type.description || '',
|
|
22200
|
+
service: esSearchCasesResponse.case_type && esSearchCasesResponse.case_type.jurisdiction.description || '',
|
|
22201
|
+
state: esSearchCasesResponse.state.name || '',
|
|
22202
|
+
stateDescription: esSearchCasesResponse.state.description || '',
|
|
22203
|
+
reasons: caseInfo.value && caseInfo.value.ReasonForLink &&
|
|
22204
|
+
caseInfo.value.ReasonForLink.map(function (reason) { return reason.value && reason.value.Reason; }),
|
|
22205
|
+
};
|
|
22206
|
+
};
|
|
22207
|
+
return LinkedCasesToTableComponent;
|
|
22208
|
+
}());
|
|
22209
|
+
LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE = 'CLRC015';
|
|
22210
|
+
LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE = 'CLRC016';
|
|
22211
|
+
LinkedCasesToTableComponent.ɵfac = function LinkedCasesToTableComponent_Factory(t) { return new (t || LinkedCasesToTableComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CasesService)); };
|
|
22212
|
+
LinkedCasesToTableComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
22213
|
+
if (rf & 1) {
|
|
22214
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
22215
|
+
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
22216
|
+
i0__namespace.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
|
|
22217
|
+
i0__namespace.ɵɵelementEnd();
|
|
22218
|
+
i0__namespace.ɵɵelementEnd();
|
|
22219
|
+
}
|
|
22220
|
+
if (rf & 2) {
|
|
22221
|
+
i0__namespace.ɵɵadvance(2);
|
|
22222
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesFromResponse);
|
|
22223
|
+
}
|
|
22224
|
+
}, styles: [".case-table-column[_ngcontent-%COMP%]{min-width:20%;max-width:20%}"] });
|
|
22225
|
+
(function () {
|
|
22226
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
|
|
22227
|
+
type: i0.Component,
|
|
22228
|
+
args: [{
|
|
22229
|
+
selector: 'ccd-linked-cases-to-table',
|
|
22230
|
+
templateUrl: './linked-cases-to-table.component.html',
|
|
22231
|
+
styleUrls: ['./linked-cases-to-table.component.scss']
|
|
22232
|
+
}]
|
|
22233
|
+
}], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }]; }, { caseField: [{
|
|
22234
|
+
type: i0.Input
|
|
22235
|
+
}], notifyAPIFailure: [{
|
|
22236
|
+
type: i0.Output
|
|
22237
|
+
}] });
|
|
22238
|
+
})();
|
|
22239
|
+
|
|
22240
|
+
function NoLinkedCasesComponent_h1_2_Template(rf, ctx) {
|
|
22241
|
+
if (rf & 1) {
|
|
22242
|
+
i0__namespace.ɵɵelementStart(0, "h1", 9);
|
|
22243
|
+
i0__namespace.ɵɵtext(1, "There is a problem");
|
|
22244
|
+
i0__namespace.ɵɵelementEnd();
|
|
22245
|
+
}
|
|
22246
|
+
}
|
|
22247
|
+
function NoLinkedCasesComponent_p_3_Template(rf, ctx) {
|
|
22248
|
+
if (rf & 1) {
|
|
22249
|
+
i0__namespace.ɵɵelementStart(0, "p", 10);
|
|
22250
|
+
i0__namespace.ɵɵelementStart(1, "span", 11);
|
|
22251
|
+
i0__namespace.ɵɵtext(2, "Error:");
|
|
22252
|
+
i0__namespace.ɵɵelementEnd();
|
|
22253
|
+
i0__namespace.ɵɵtext(3);
|
|
22254
|
+
i0__namespace.ɵɵelementEnd();
|
|
22255
|
+
}
|
|
22256
|
+
if (rf & 2) {
|
|
22257
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
22258
|
+
i0__namespace.ɵɵadvance(3);
|
|
22259
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.linkedCasesService.serverLinkedApiError.message, " ");
|
|
22260
|
+
}
|
|
22261
|
+
}
|
|
22262
|
+
function NoLinkedCasesComponent_ng_template_4_Template(rf, ctx) {
|
|
22263
|
+
if (rf & 1) {
|
|
22264
|
+
i0__namespace.ɵɵelementStart(0, "p", 5);
|
|
22265
|
+
i0__namespace.ɵɵtext(1, "There are no cases linked to this one.");
|
|
22266
|
+
i0__namespace.ɵɵelementEnd();
|
|
22267
|
+
}
|
|
22268
|
+
}
|
|
22269
|
+
var NoLinkedCasesComponent = /** @class */ (function () {
|
|
22270
|
+
function NoLinkedCasesComponent(router, linkedCasesService) {
|
|
22271
|
+
this.router = router;
|
|
22272
|
+
this.linkedCasesService = linkedCasesService;
|
|
22273
|
+
}
|
|
22274
|
+
NoLinkedCasesComponent.prototype.onBack = function () {
|
|
22275
|
+
this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseId]).then(function () {
|
|
22276
|
+
window.location.hash = 'Linked cases';
|
|
22277
|
+
});
|
|
22278
|
+
};
|
|
22279
|
+
return NoLinkedCasesComponent;
|
|
22280
|
+
}());
|
|
22281
|
+
NoLinkedCasesComponent.ɵfac = function NoLinkedCasesComponent_Factory(t) { return new (t || NoLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
22282
|
+
NoLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
22283
|
+
if (rf & 1) {
|
|
22284
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
22285
|
+
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
22286
|
+
i0__namespace.ɵɵtemplate(2, NoLinkedCasesComponent_h1_2_Template, 2, 0, "h1", 2);
|
|
22287
|
+
i0__namespace.ɵɵtemplate(3, NoLinkedCasesComponent_p_3_Template, 4, 1, "p", 3);
|
|
22288
|
+
i0__namespace.ɵɵtemplate(4, NoLinkedCasesComponent_ng_template_4_Template, 2, 0, "ng-template", null, 4, i0__namespace.ɵɵtemplateRefExtractor);
|
|
22289
|
+
i0__namespace.ɵɵelementStart(6, "p", 5);
|
|
22290
|
+
i0__namespace.ɵɵelementStart(7, "a", 6);
|
|
22291
|
+
i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_a_click_7_listener() { return ctx.onBack(); });
|
|
22292
|
+
i0__namespace.ɵɵtext(8, "Go back to the Linked cases tab");
|
|
22293
|
+
i0__namespace.ɵɵelementEnd();
|
|
22294
|
+
i0__namespace.ɵɵelementEnd();
|
|
22295
|
+
i0__namespace.ɵɵelementStart(9, "div", 7);
|
|
22296
|
+
i0__namespace.ɵɵelementStart(10, "button", 8);
|
|
22297
|
+
i0__namespace.ɵɵlistener("click", function NoLinkedCasesComponent_Template_button_click_10_listener() { return ctx.onBack(); });
|
|
22298
|
+
i0__namespace.ɵɵtext(11, "Back");
|
|
22299
|
+
i0__namespace.ɵɵelementEnd();
|
|
22300
|
+
i0__namespace.ɵɵelementEnd();
|
|
22301
|
+
i0__namespace.ɵɵelementEnd();
|
|
22302
|
+
i0__namespace.ɵɵelementEnd();
|
|
22303
|
+
}
|
|
22304
|
+
if (rf & 2) {
|
|
22305
|
+
var _r2 = i0__namespace.ɵɵreference(5);
|
|
22306
|
+
i0__namespace.ɵɵadvance(2);
|
|
22307
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError);
|
|
22308
|
+
i0__namespace.ɵɵadvance(1);
|
|
22309
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.linkedCasesService.serverLinkedApiError)("ngIfElse", _r2);
|
|
22310
|
+
}
|
|
22311
|
+
}, directives: [i1__namespace.NgIf], encapsulation: 2 });
|
|
22312
|
+
(function () {
|
|
22313
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NoLinkedCasesComponent, [{
|
|
22314
|
+
type: i0.Component,
|
|
22315
|
+
args: [{
|
|
22316
|
+
selector: 'ccd-no-linked-cases',
|
|
22317
|
+
templateUrl: './no-linked-cases.component.html'
|
|
22318
|
+
}]
|
|
22319
|
+
}], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }]; }, null);
|
|
22320
|
+
})();
|
|
22321
|
+
|
|
22322
|
+
function UnLinkCasesComponent_div_0_div_4_p_1_Template(rf, ctx) {
|
|
22323
|
+
if (rf & 1) {
|
|
22324
|
+
i0__namespace.ɵɵelementStart(0, "p", 11);
|
|
22325
|
+
i0__namespace.ɵɵelementStart(1, "span", 12);
|
|
22326
|
+
i0__namespace.ɵɵtext(2, "Error:");
|
|
22327
|
+
i0__namespace.ɵɵelementEnd();
|
|
22328
|
+
i0__namespace.ɵɵtext(3);
|
|
22329
|
+
i0__namespace.ɵɵelementEnd();
|
|
22330
|
+
}
|
|
22331
|
+
if (rf & 2) {
|
|
22332
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext(3);
|
|
22333
|
+
i0__namespace.ɵɵadvance(3);
|
|
22334
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r2.unlinkErrorMessage, " ");
|
|
22335
|
+
}
|
|
22336
|
+
}
|
|
22337
|
+
function UnLinkCasesComponent_div_0_div_4_div_3_Template(rf, ctx) {
|
|
22338
|
+
if (rf & 1) {
|
|
22339
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22340
|
+
i0__namespace.ɵɵelementStart(0, "div", 13);
|
|
22341
|
+
i0__namespace.ɵɵelementStart(1, "input", 14);
|
|
22342
|
+
i0__namespace.ɵɵlistener("change", function UnLinkCasesComponent_div_0_div_4_div_3_Template_input_change_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(3); return ctx_r5.onChange($event.target); });
|
|
22343
|
+
i0__namespace.ɵɵelementEnd();
|
|
22344
|
+
i0__namespace.ɵɵelementStart(2, "label", 15);
|
|
22345
|
+
i0__namespace.ɵɵtext(3);
|
|
22346
|
+
i0__namespace.ɵɵpipe(4, "ccdCaseReference");
|
|
22347
|
+
i0__namespace.ɵɵelementEnd();
|
|
22348
|
+
i0__namespace.ɵɵelementEnd();
|
|
22349
|
+
}
|
|
22350
|
+
if (rf & 2) {
|
|
22351
|
+
var case_r4 = ctx.$implicit;
|
|
22352
|
+
i0__namespace.ɵɵadvance(1);
|
|
22353
|
+
i0__namespace.ɵɵpropertyInterpolate1("id", "case-reference-", case_r4.caseReference, "");
|
|
22354
|
+
i0__namespace.ɵɵproperty("value", case_r4.caseReference)("checked", case_r4.unlink);
|
|
22355
|
+
i0__namespace.ɵɵadvance(1);
|
|
22356
|
+
i0__namespace.ɵɵpropertyInterpolate("for", case_r4.caseReference);
|
|
22357
|
+
i0__namespace.ɵɵadvance(1);
|
|
22358
|
+
i0__namespace.ɵɵtextInterpolate2(" ", case_r4.caseName, " ", i0__namespace.ɵɵpipeBind1(4, 6, case_r4.caseReference), " ");
|
|
22359
|
+
}
|
|
22360
|
+
}
|
|
22361
|
+
var _c0$l = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
22362
|
+
function UnLinkCasesComponent_div_0_div_4_Template(rf, ctx) {
|
|
22363
|
+
if (rf & 1) {
|
|
22364
|
+
i0__namespace.ɵɵelementStart(0, "div", 7);
|
|
22365
|
+
i0__namespace.ɵɵtemplate(1, UnLinkCasesComponent_div_0_div_4_p_1_Template, 4, 1, "p", 8);
|
|
22366
|
+
i0__namespace.ɵɵelementStart(2, "div", 9);
|
|
22367
|
+
i0__namespace.ɵɵtemplate(3, UnLinkCasesComponent_div_0_div_4_div_3_Template, 5, 8, "div", 10);
|
|
22368
|
+
i0__namespace.ɵɵelementEnd();
|
|
22369
|
+
i0__namespace.ɵɵelementEnd();
|
|
22370
|
+
}
|
|
22371
|
+
if (rf & 2) {
|
|
22372
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
22373
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c0$l, ctx_r1.unlinkErrorMessage))("formGroup", ctx_r1.unlinkCaseForm);
|
|
22374
|
+
i0__namespace.ɵɵadvance(1);
|
|
22375
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r1.unlinkErrorMessage);
|
|
22376
|
+
i0__namespace.ɵɵadvance(2);
|
|
22377
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r1.linkedCases);
|
|
22378
|
+
}
|
|
22379
|
+
}
|
|
22380
|
+
function UnLinkCasesComponent_div_0_Template(rf, ctx) {
|
|
22381
|
+
if (rf & 1) {
|
|
22382
|
+
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22383
|
+
i0__namespace.ɵɵelementStart(0, "div", 1);
|
|
22384
|
+
i0__namespace.ɵɵelementStart(1, "div", 2);
|
|
22385
|
+
i0__namespace.ɵɵelementStart(2, "h1", 3);
|
|
22386
|
+
i0__namespace.ɵɵtext(3, "Select the cases you want to unlink from this case");
|
|
22387
|
+
i0__namespace.ɵɵelementEnd();
|
|
22388
|
+
i0__namespace.ɵɵtemplate(4, UnLinkCasesComponent_div_0_div_4_Template, 4, 6, "div", 4);
|
|
22389
|
+
i0__namespace.ɵɵelementStart(5, "div", 5);
|
|
22390
|
+
i0__namespace.ɵɵelementStart(6, "button", 6);
|
|
22391
|
+
i0__namespace.ɵɵlistener("click", function UnLinkCasesComponent_div_0_Template_button_click_6_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onNext(); });
|
|
22392
|
+
i0__namespace.ɵɵtext(7, "Next");
|
|
22393
|
+
i0__namespace.ɵɵelementEnd();
|
|
22394
|
+
i0__namespace.ɵɵelementEnd();
|
|
22395
|
+
i0__namespace.ɵɵelementEnd();
|
|
22396
|
+
i0__namespace.ɵɵelementEnd();
|
|
22397
|
+
}
|
|
22398
|
+
if (rf & 2) {
|
|
22399
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
22400
|
+
i0__namespace.ɵɵadvance(4);
|
|
22401
|
+
i0__namespace.ɵɵproperty("ngIf", ctx_r0.unlinkCaseForm);
|
|
22402
|
+
}
|
|
22403
|
+
}
|
|
22404
|
+
var UnLinkCasesComponent = /** @class */ (function () {
|
|
22405
|
+
function UnLinkCasesComponent(caseEdit, fb, casesService, linkedCasesService) {
|
|
22406
|
+
this.caseEdit = caseEdit;
|
|
22407
|
+
this.fb = fb;
|
|
22408
|
+
this.casesService = casesService;
|
|
22409
|
+
this.linkedCasesService = linkedCasesService;
|
|
22410
|
+
this.linkedCasesStateEmitter = new i0.EventEmitter();
|
|
22411
|
+
this.notifyAPIFailure = new i0.EventEmitter(false);
|
|
22412
|
+
this.linkedCases = [];
|
|
22413
|
+
this.errorMessages = [];
|
|
22414
|
+
this.isServerError = false;
|
|
22415
|
+
}
|
|
22416
|
+
UnLinkCasesComponent.prototype.ngOnInit = function () {
|
|
22417
|
+
this.getLinkedCases();
|
|
22418
|
+
};
|
|
22419
|
+
UnLinkCasesComponent.prototype.getLinkedCases = function () {
|
|
22420
|
+
var _this = this;
|
|
22421
|
+
this.caseId = this.linkedCasesService.caseId;
|
|
22422
|
+
if (this.linkedCasesService.linkedCases.length > 0) {
|
|
22423
|
+
this.linkedCases = this.linkedCasesService.linkedCases;
|
|
22424
|
+
this.getAllLinkedCaseInformation();
|
|
22425
|
+
}
|
|
22426
|
+
else {
|
|
22427
|
+
this.casesService.getCaseViewV2(this.caseId).subscribe(function (caseView) {
|
|
22428
|
+
var linkedCasesTab = caseView.tabs.find(function (tab) { return tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID; });
|
|
22429
|
+
if (linkedCasesTab) {
|
|
22430
|
+
var linkedCases = linkedCasesTab.fields[0].value;
|
|
22431
|
+
_this.linkedCases = linkedCases;
|
|
22432
|
+
_this.linkedCasesService.linkedCases = linkedCases;
|
|
22433
|
+
_this.getAllLinkedCaseInformation();
|
|
22434
|
+
}
|
|
22435
|
+
});
|
|
22436
|
+
}
|
|
22437
|
+
};
|
|
22438
|
+
UnLinkCasesComponent.prototype.getAllLinkedCaseInformation = function () {
|
|
22439
|
+
var _this = this;
|
|
22440
|
+
var searchCasesResponse = [];
|
|
22441
|
+
this.linkedCases.forEach(function (linkedCase) {
|
|
22442
|
+
searchCasesResponse.push(_this.casesService.getCaseViewV2(linkedCase.caseReference));
|
|
22443
|
+
});
|
|
22444
|
+
if (searchCasesResponse.length) {
|
|
22445
|
+
this.searchCasesByCaseIds(searchCasesResponse).subscribe(function (searchCases) {
|
|
22446
|
+
searchCases.forEach(function (response) {
|
|
22447
|
+
var linkedCaseFromList = _this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; });
|
|
22448
|
+
if (linkedCaseFromList) {
|
|
22449
|
+
var caseName = _this.linkedCasesService.getCaseName(response);
|
|
22450
|
+
_this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === response.case_id; }).caseName = caseName;
|
|
22451
|
+
}
|
|
22452
|
+
});
|
|
22453
|
+
_this.initForm();
|
|
22454
|
+
_this.linkedCasesService.linkedCases = _this.linkedCases;
|
|
22455
|
+
_this.isServerError = false;
|
|
22456
|
+
}, function (err) {
|
|
22457
|
+
_this.isServerError = true;
|
|
22458
|
+
_this.notifyAPIFailure.emit(true);
|
|
22459
|
+
});
|
|
22460
|
+
}
|
|
22461
|
+
};
|
|
22462
|
+
UnLinkCasesComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
|
|
22463
|
+
return rxjs.forkJoin(searchCasesResponse);
|
|
22464
|
+
};
|
|
22465
|
+
UnLinkCasesComponent.prototype.initForm = function () {
|
|
22466
|
+
this.unlinkCaseForm = this.fb.group({
|
|
22467
|
+
linkedCases: this.getLinkedCasesFormArray
|
|
22468
|
+
});
|
|
22469
|
+
};
|
|
22470
|
+
Object.defineProperty(UnLinkCasesComponent.prototype, "getLinkedCasesFormArray", {
|
|
22471
|
+
get: function () {
|
|
22472
|
+
var _this = this;
|
|
22473
|
+
var formFieldArray = this.linkedCases.map(function (val) { return _this.fb.group({
|
|
22474
|
+
caseReference: val.caseReference,
|
|
22475
|
+
reasons: val.reasons,
|
|
22476
|
+
createdDateTime: val.createdDateTime,
|
|
22477
|
+
caseType: val.caseType,
|
|
22478
|
+
caseState: val.caseState,
|
|
22479
|
+
caseService: val.caseService,
|
|
22480
|
+
caseName: val.caseName || UnLinkCasesComponent.CASE_NAME_MISSING_TEXT,
|
|
22481
|
+
unlink: val.unlink
|
|
22482
|
+
}); });
|
|
22483
|
+
return this.fb.array(formFieldArray);
|
|
22484
|
+
},
|
|
22485
|
+
enumerable: false,
|
|
22486
|
+
configurable: true
|
|
22487
|
+
});
|
|
22488
|
+
UnLinkCasesComponent.prototype.onChange = function (caseSelected) {
|
|
22489
|
+
this.resetErrorMessages();
|
|
22490
|
+
var selectedCase = this.linkedCases.find(function (linkedCase) { return linkedCase.caseReference === caseSelected.value; });
|
|
22491
|
+
if (selectedCase) {
|
|
22492
|
+
selectedCase.unlink = caseSelected.checked ? true : false;
|
|
22493
|
+
}
|
|
22494
|
+
};
|
|
22495
|
+
UnLinkCasesComponent.prototype.onNext = function () {
|
|
22496
|
+
this.resetErrorMessages();
|
|
22497
|
+
var navigateToNextPage = true;
|
|
22498
|
+
var casesMarkedToUnlink = this.linkedCases.find(function (linkedCase) { return linkedCase.unlink && linkedCase.unlink === true; });
|
|
22499
|
+
if (!casesMarkedToUnlink) {
|
|
22500
|
+
this.errorMessages.push({
|
|
22501
|
+
title: 'case-selection',
|
|
22502
|
+
description: exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError,
|
|
22503
|
+
fieldId: "case-reference-" + this.linkedCases[0].caseReference
|
|
22504
|
+
});
|
|
22505
|
+
this.unlinkErrorMessage = exports.LinkedCasesErrorMessages.UnlinkCaseSelectionError;
|
|
22506
|
+
navigateToNextPage = false;
|
|
22507
|
+
}
|
|
22508
|
+
var unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(function (item) { return item.unlink; }).map(function (item) { return item.caseReference; });
|
|
22509
|
+
var updatedLinkedCases = this.linkedCasesService.caseFieldValue.filter(function (item) { return unlinkedCaseRefereneIds.indexOf(item.value.CaseReference) === -1; });
|
|
22510
|
+
this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(updatedLinkedCases || []) });
|
|
22511
|
+
// Return linked cases state and error messages to the parent
|
|
22512
|
+
this.linkedCasesStateEmitter.emit({
|
|
22513
|
+
currentLinkedCasesPage: exports.LinkedCasesPages.UNLINK_CASE,
|
|
22514
|
+
errorMessages: this.errorMessages,
|
|
22515
|
+
navigateToNextPage: navigateToNextPage
|
|
22516
|
+
});
|
|
22517
|
+
};
|
|
22518
|
+
UnLinkCasesComponent.prototype.resetErrorMessages = function () {
|
|
22519
|
+
this.errorMessages = [];
|
|
22520
|
+
this.unlinkErrorMessage = null;
|
|
22521
|
+
};
|
|
22522
|
+
return UnLinkCasesComponent;
|
|
22523
|
+
}());
|
|
22524
|
+
UnLinkCasesComponent.LINKED_CASES_TAB_ID = 'linked_cases_sscs';
|
|
22525
|
+
UnLinkCasesComponent.CASE_NAME_MISSING_TEXT = 'Case name missing';
|
|
22526
|
+
UnLinkCasesComponent.ɵfac = function UnLinkCasesComponent_Factory(t) { return new (t || UnLinkCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i2__namespace.FormBuilder), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
22527
|
+
UnLinkCasesComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
22528
|
+
if (rf & 1) {
|
|
22529
|
+
i0__namespace.ɵɵtemplate(0, UnLinkCasesComponent_div_0_Template, 8, 1, "div", 0);
|
|
22530
|
+
}
|
|
22531
|
+
if (rf & 2) {
|
|
22532
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.linkedCases.length > 0);
|
|
22533
|
+
}
|
|
22534
|
+
}, directives: [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgForOf, i2__namespace.FormArrayName], pipes: [CaseReferencePipe], encapsulation: 2 });
|
|
22535
|
+
(function () {
|
|
22536
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(UnLinkCasesComponent, [{
|
|
22537
|
+
type: i0.Component,
|
|
22538
|
+
args: [{
|
|
22539
|
+
selector: 'ccd-unlink-cases',
|
|
22540
|
+
templateUrl: './unlink-cases.component.html'
|
|
22541
|
+
}]
|
|
22542
|
+
}], function () { return [{ type: CaseEditComponent }, { type: i2__namespace.FormBuilder }, { type: CasesService }, { type: LinkedCasesService }]; }, { linkedCasesStateEmitter: [{
|
|
22543
|
+
type: i0.Output
|
|
22544
|
+
}], notifyAPIFailure: [{
|
|
22545
|
+
type: i0.Output
|
|
22546
|
+
}] });
|
|
22547
|
+
})();
|
|
22548
|
+
|
|
22549
|
+
function WriteLinkedCasesComponent_div_0_div_3_Template(rf, ctx) {
|
|
22550
|
+
if (rf & 1) {
|
|
22551
|
+
var _r9_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22552
|
+
i0__namespace.ɵɵelementStart(0, "div", 7);
|
|
22553
|
+
i0__namespace.ɵɵelementStart(1, "ul", 8);
|
|
22554
|
+
i0__namespace.ɵɵelementStart(2, "li");
|
|
22555
|
+
i0__namespace.ɵɵelementStart(3, "a", 9);
|
|
22556
|
+
i0__namespace.ɵɵlistener("click", function WriteLinkedCasesComponent_div_0_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var errorMessage_r7 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
|
|
22557
|
+
i0__namespace.ɵɵtext(4);
|
|
22558
|
+
i0__namespace.ɵɵelementEnd();
|
|
22559
|
+
i0__namespace.ɵɵelementEnd();
|
|
22560
|
+
i0__namespace.ɵɵelementEnd();
|
|
22561
|
+
i0__namespace.ɵɵelementEnd();
|
|
22562
|
+
}
|
|
22563
|
+
if (rf & 2) {
|
|
22564
|
+
var errorMessage_r7 = ctx.$implicit;
|
|
22565
|
+
i0__namespace.ɵɵadvance(4);
|
|
22566
|
+
i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
|
|
22567
|
+
}
|
|
22568
|
+
}
|
|
22569
|
+
function WriteLinkedCasesComponent_div_0_Template(rf, ctx) {
|
|
22570
|
+
if (rf & 1) {
|
|
22571
|
+
i0__namespace.ɵɵelementStart(0, "div", 4);
|
|
22572
|
+
i0__namespace.ɵɵelementStart(1, "h2", 5);
|
|
22573
|
+
i0__namespace.ɵɵtext(2, " There is a problem ");
|
|
22574
|
+
i0__namespace.ɵɵelementEnd();
|
|
22575
|
+
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_div_0_div_3_Template, 5, 1, "div", 6);
|
|
22576
|
+
i0__namespace.ɵɵelementEnd();
|
|
22577
|
+
}
|
|
22578
|
+
if (rf & 2) {
|
|
22579
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
22580
|
+
i0__namespace.ɵɵadvance(3);
|
|
22581
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
|
|
22582
|
+
}
|
|
22583
|
+
}
|
|
22584
|
+
function WriteLinkedCasesComponent_ng_container_3_Template(rf, ctx) {
|
|
22585
|
+
if (rf & 1) {
|
|
22586
|
+
var _r11_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22587
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
22588
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 10);
|
|
22589
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_3_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.onLinkedCasesStateEmitted($event); });
|
|
22590
|
+
i0__namespace.ɵɵelementEnd();
|
|
22591
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
22592
|
+
}
|
|
22593
|
+
}
|
|
22594
|
+
function WriteLinkedCasesComponent_ng_container_4_Template(rf, ctx) {
|
|
22595
|
+
if (rf & 1) {
|
|
22596
|
+
var _r13_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22597
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
22598
|
+
i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 10);
|
|
22599
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_4_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r13_1); var ctx_r12 = i0__namespace.ɵɵnextContext(); return ctx_r12.onLinkedCasesStateEmitted($event); });
|
|
22600
|
+
i0__namespace.ɵɵelementEnd();
|
|
22601
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
22602
|
+
}
|
|
22603
|
+
}
|
|
22604
|
+
function WriteLinkedCasesComponent_ng_container_5_Template(rf, ctx) {
|
|
22605
|
+
if (rf & 1) {
|
|
22606
|
+
var _r15_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22607
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
22608
|
+
i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 10);
|
|
22609
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_5_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r15_1); var ctx_r14 = i0__namespace.ɵɵnextContext(); return ctx_r14.onLinkedCasesStateEmitted($event); });
|
|
22610
|
+
i0__namespace.ɵɵelementEnd();
|
|
22611
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
22612
|
+
}
|
|
22613
|
+
}
|
|
22614
|
+
function WriteLinkedCasesComponent_ng_container_6_Template(rf, ctx) {
|
|
22615
|
+
if (rf & 1) {
|
|
22616
|
+
var _r17_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22617
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
22618
|
+
i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
|
|
22619
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
|
|
22620
|
+
i0__namespace.ɵɵelementEnd();
|
|
22621
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
22622
|
+
}
|
|
22623
|
+
}
|
|
22624
|
+
function WriteLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
|
|
22625
|
+
if (rf & 1) {
|
|
22626
|
+
var _r19_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22627
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
22628
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 10);
|
|
22629
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesComponent_ng_container_7_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r19_1); var ctx_r18 = i0__namespace.ɵɵnextContext(); return ctx_r18.onLinkedCasesStateEmitted($event); });
|
|
22630
|
+
i0__namespace.ɵɵelementEnd();
|
|
22631
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
22632
|
+
}
|
|
22633
|
+
}
|
|
22634
|
+
var WriteLinkedCasesComponent = /** @class */ (function (_super) {
|
|
22635
|
+
__extends(WriteLinkedCasesComponent, _super);
|
|
22636
|
+
function WriteLinkedCasesComponent(caseEdit, appConfig, commonDataService, casesService, linkedCasesService, caseEditDataService) {
|
|
22637
|
+
var _this = _super.call(this) || this;
|
|
22638
|
+
_this.caseEdit = caseEdit;
|
|
22639
|
+
_this.appConfig = appConfig;
|
|
22640
|
+
_this.commonDataService = commonDataService;
|
|
22641
|
+
_this.casesService = casesService;
|
|
22642
|
+
_this.linkedCasesService = linkedCasesService;
|
|
22643
|
+
_this.caseEditDataService = caseEditDataService;
|
|
22644
|
+
_this.onLinkedCasesSelected = new i0.EventEmitter();
|
|
22645
|
+
_this.isLinkedCasesJourney = false;
|
|
22646
|
+
_this.linkedCasesPages = exports.LinkedCasesPages;
|
|
22647
|
+
_this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
|
|
22648
|
+
_this.linkedCases = [];
|
|
22649
|
+
_this.errorMessages = [];
|
|
22650
|
+
return _this;
|
|
22651
|
+
}
|
|
22652
|
+
WriteLinkedCasesComponent.prototype.ngOnInit = function () {
|
|
22653
|
+
var _this = this;
|
|
22654
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
22655
|
+
this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
|
|
22656
|
+
this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
|
|
22657
|
+
this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
|
|
22658
|
+
this.linkedCasesService.editMode = false;
|
|
22659
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
|
|
22660
|
+
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
22661
|
+
next: function (reasons) {
|
|
22662
|
+
_this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
|
|
22663
|
+
}
|
|
22664
|
+
});
|
|
22665
|
+
this.getLinkedCases();
|
|
22666
|
+
this.caseEditDataService.caseEventTriggerName$.subscribe({
|
|
22667
|
+
next: function (name) {
|
|
22668
|
+
_this.linkedCasesService.isLinkedCasesEventTrigger
|
|
22669
|
+
= (name === exports.LinkedCasesEventTriggers.LINK_CASES);
|
|
22670
|
+
}
|
|
22671
|
+
});
|
|
22672
|
+
};
|
|
22673
|
+
WriteLinkedCasesComponent.prototype.ngAfterViewInit = function () {
|
|
22674
|
+
var labelField = document.getElementsByClassName('govuk-heading-l');
|
|
22675
|
+
if (labelField && labelField.length) {
|
|
22676
|
+
labelField[0].replaceWith('');
|
|
22677
|
+
}
|
|
22678
|
+
labelField = document.getElementsByClassName('heading-h2');
|
|
22679
|
+
if (labelField && labelField.length) {
|
|
22680
|
+
labelField[0].replaceWith('');
|
|
22681
|
+
}
|
|
22682
|
+
};
|
|
22683
|
+
WriteLinkedCasesComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
|
|
22684
|
+
var _this = this;
|
|
22685
|
+
this.errorMessages = [];
|
|
22686
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
22687
|
+
if (linkedCasesState.navigateToNextPage) {
|
|
22688
|
+
this.linkedCasesPage = this.getNextPage(linkedCasesState);
|
|
22689
|
+
this.setContinueButtonValidationErrorMessage();
|
|
22690
|
+
this.proceedToNextPage();
|
|
22691
|
+
}
|
|
22692
|
+
else {
|
|
22693
|
+
if (linkedCasesState.errorMessages && linkedCasesState.errorMessages.length) {
|
|
22694
|
+
linkedCasesState.errorMessages.forEach(function (errorMessage, index) {
|
|
22695
|
+
_this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
|
|
22696
|
+
});
|
|
22697
|
+
}
|
|
22698
|
+
}
|
|
22699
|
+
};
|
|
22700
|
+
WriteLinkedCasesComponent.prototype.isAtFinalState = function () {
|
|
22701
|
+
return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
|
|
22702
|
+
};
|
|
22703
|
+
WriteLinkedCasesComponent.prototype.setContinueButtonValidationErrorMessage = function () {
|
|
22704
|
+
var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
|
|
22705
|
+
? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
|
|
22706
|
+
: exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
|
|
22707
|
+
var buttonId = this.linkedCasesService.linkedCases.length === 0
|
|
22708
|
+
? 'back-button'
|
|
22709
|
+
: 'next-button';
|
|
22710
|
+
this.caseEditDataService.setCaseLinkError({
|
|
22711
|
+
componentId: buttonId,
|
|
22712
|
+
errorMessage: errorMessage
|
|
22713
|
+
});
|
|
22714
|
+
};
|
|
22715
|
+
WriteLinkedCasesComponent.prototype.proceedToNextPage = function () {
|
|
22716
|
+
if (this.isAtFinalPage()) {
|
|
22717
|
+
// Continue button event must be allowed in final page
|
|
22718
|
+
this.caseEditDataService.clearCaseLinkError();
|
|
22719
|
+
// Trigger validation to clear the "notAtFinalPage" error if now at the final state
|
|
22720
|
+
this.formGroup.updateValueAndValidity();
|
|
22721
|
+
// update form value
|
|
22722
|
+
this.onLinkedCasesSelected.emit();
|
|
22723
|
+
this.caseEdit.form.controls['data'] = new i2.FormGroup({ caseLinks: new i2.FormControl(this.linkedCasesService.caseFieldValue) });
|
|
22724
|
+
}
|
|
22725
|
+
};
|
|
22726
|
+
WriteLinkedCasesComponent.prototype.isAtFinalPage = function () {
|
|
22727
|
+
return this.linkedCasesPage === this.linkedCasesPages.CHECK_YOUR_ANSWERS;
|
|
22728
|
+
};
|
|
22729
|
+
WriteLinkedCasesComponent.prototype.getNextPage = function (linkedCasesState) {
|
|
22730
|
+
if ((this.linkedCasesPage === exports.LinkedCasesPages.BEFORE_YOU_START) ||
|
|
22731
|
+
(linkedCasesState.currentLinkedCasesPage === exports.LinkedCasesPages.CHECK_YOUR_ANSWERS && linkedCasesState.navigateToPreviousPage)) {
|
|
22732
|
+
return this.isLinkedCasesJourney
|
|
22733
|
+
? exports.LinkedCasesPages.LINK_CASE
|
|
22734
|
+
: exports.LinkedCasesPages.UNLINK_CASE;
|
|
22735
|
+
}
|
|
22736
|
+
return exports.LinkedCasesPages.CHECK_YOUR_ANSWERS;
|
|
22737
|
+
};
|
|
22738
|
+
WriteLinkedCasesComponent.prototype.getLinkedCases = function () {
|
|
22739
|
+
var _this = this;
|
|
22740
|
+
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
|
|
22741
|
+
var caseViewFiltered = caseView.tabs.filter(function (tab) {
|
|
22742
|
+
var linkField = tab.fields.some(function (_a) {
|
|
22743
|
+
var field_type = _a.field_type;
|
|
22744
|
+
return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
|
|
22745
|
+
});
|
|
22746
|
+
return linkField;
|
|
22747
|
+
});
|
|
22748
|
+
if (caseViewFiltered) {
|
|
22749
|
+
var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { return filtered.fields.length && filtered.fields[0].value; });
|
|
22750
|
+
_this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
|
|
22751
|
+
_this.linkedCasesService.getAllLinkedCaseInformation();
|
|
22752
|
+
}
|
|
22753
|
+
// Initialise the first page to display
|
|
22754
|
+
_this.linkedCasesPage = _this.linkedCasesService.isLinkedCasesEventTrigger ||
|
|
22755
|
+
(_this.linkedCasesService.caseFieldValue && _this.linkedCasesService.caseFieldValue.length > 0
|
|
22756
|
+
&& !_this.linkedCasesService.serverLinkedApiError)
|
|
22757
|
+
? exports.LinkedCasesPages.BEFORE_YOU_START
|
|
22758
|
+
: exports.LinkedCasesPages.NO_LINKED_CASES;
|
|
22759
|
+
// Initialise the error to be displayed when clicked on Continue button
|
|
22760
|
+
_this.setContinueButtonValidationErrorMessage();
|
|
22761
|
+
});
|
|
22762
|
+
};
|
|
22763
|
+
WriteLinkedCasesComponent.prototype.navigateToErrorElement = function (elementId) {
|
|
22764
|
+
if (elementId) {
|
|
22765
|
+
var htmlElement = document.getElementById(elementId);
|
|
22766
|
+
if (htmlElement) {
|
|
22767
|
+
htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
22768
|
+
htmlElement.focus();
|
|
22769
|
+
}
|
|
22770
|
+
}
|
|
22771
|
+
};
|
|
22772
|
+
return WriteLinkedCasesComponent;
|
|
22773
|
+
}(AbstractFieldWriteComponent));
|
|
22774
|
+
WriteLinkedCasesComponent.ɵfac = function WriteLinkedCasesComponent_Factory(t) { return new (t || WriteLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
22775
|
+
WriteLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesComponent, selectors: [["ccd-write-linked-cases"]], inputs: { caseFields: "caseFields", caseField: "caseField", isLinkedCasesJourney: "isLinkedCasesJourney", formGroup: "formGroup" }, outputs: { onLinkedCasesSelected: "onLinkedCasesSelected" }, features: [i0__namespace.ɵɵ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) {
|
|
22776
|
+
if (rf & 1) {
|
|
22777
|
+
i0__namespace.ɵɵtemplate(0, WriteLinkedCasesComponent_div_0_Template, 4, 1, "div", 0);
|
|
22778
|
+
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
22779
|
+
i0__namespace.ɵɵelementStart(2, "div", 2);
|
|
22780
|
+
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesComponent_ng_container_3_Template, 2, 0, "ng-container", 3);
|
|
22781
|
+
i0__namespace.ɵɵtemplate(4, WriteLinkedCasesComponent_ng_container_4_Template, 2, 0, "ng-container", 3);
|
|
22782
|
+
i0__namespace.ɵɵtemplate(5, WriteLinkedCasesComponent_ng_container_5_Template, 2, 0, "ng-container", 3);
|
|
22783
|
+
i0__namespace.ɵɵtemplate(6, WriteLinkedCasesComponent_ng_container_6_Template, 2, 0, "ng-container", 3);
|
|
22784
|
+
i0__namespace.ɵɵtemplate(7, WriteLinkedCasesComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
|
|
22785
|
+
i0__namespace.ɵɵelementEnd();
|
|
22786
|
+
i0__namespace.ɵɵelementEnd();
|
|
22787
|
+
}
|
|
22788
|
+
if (rf & 2) {
|
|
22789
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
|
|
22790
|
+
i0__namespace.ɵɵadvance(1);
|
|
22791
|
+
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
22792
|
+
i0__namespace.ɵɵadvance(1);
|
|
22793
|
+
i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
|
|
22794
|
+
i0__namespace.ɵɵadvance(1);
|
|
22795
|
+
i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.BEFORE_YOU_START);
|
|
22796
|
+
i0__namespace.ɵɵadvance(1);
|
|
22797
|
+
i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.NO_LINKED_CASES);
|
|
22798
|
+
i0__namespace.ɵɵadvance(1);
|
|
22799
|
+
i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.LINK_CASE);
|
|
22800
|
+
i0__namespace.ɵɵadvance(1);
|
|
22801
|
+
i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.UNLINK_CASE);
|
|
22802
|
+
i0__namespace.ɵɵadvance(1);
|
|
22803
|
+
i0__namespace.ɵɵproperty("ngSwitchCase", ctx.linkedCasesPages.CHECK_YOUR_ANSWERS);
|
|
22804
|
+
}
|
|
22805
|
+
}, encapsulation: 2 });
|
|
22806
|
+
(function () {
|
|
22807
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteLinkedCasesComponent, [{
|
|
22808
|
+
type: i0.Component,
|
|
22809
|
+
args: [{
|
|
22810
|
+
selector: 'ccd-write-linked-cases',
|
|
22811
|
+
templateUrl: './write-linked-cases.component.html'
|
|
22812
|
+
}]
|
|
22813
|
+
}], function () { return [{ type: CaseEditComponent }, { type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }]; }, { caseFields: [{
|
|
22814
|
+
type: i0.Input
|
|
22815
|
+
}], caseField: [{
|
|
22816
|
+
type: i0.Input
|
|
22817
|
+
}], onLinkedCasesSelected: [{
|
|
22818
|
+
type: i0.Output
|
|
22819
|
+
}], isLinkedCasesJourney: [{
|
|
22820
|
+
type: i0.Input
|
|
22821
|
+
}], formGroup: [{
|
|
22822
|
+
type: i0.Input
|
|
22823
|
+
}] });
|
|
22824
|
+
})();
|
|
22825
|
+
|
|
22826
|
+
function ReadLinkedCasesComponent_ng_container_7_Template(rf, ctx) {
|
|
22827
|
+
if (rf & 1) {
|
|
22828
|
+
i0__namespace.ɵɵelementContainer(0);
|
|
22829
|
+
}
|
|
22830
|
+
}
|
|
22831
|
+
function ReadLinkedCasesComponent_ng_container_8_Template(rf, ctx) {
|
|
22832
|
+
if (rf & 1) {
|
|
22833
|
+
i0__namespace.ɵɵelementContainer(0);
|
|
22834
|
+
}
|
|
22835
|
+
}
|
|
22836
|
+
function ReadLinkedCasesComponent_ng_container_14_Template(rf, ctx) {
|
|
22837
|
+
if (rf & 1) {
|
|
22838
|
+
i0__namespace.ɵɵelementContainer(0);
|
|
22839
|
+
}
|
|
22840
|
+
}
|
|
22841
|
+
function ReadLinkedCasesComponent_ng_container_15_Template(rf, ctx) {
|
|
22842
|
+
if (rf & 1) {
|
|
22843
|
+
i0__namespace.ɵɵelementContainer(0);
|
|
22844
|
+
}
|
|
22845
|
+
}
|
|
22846
|
+
function ReadLinkedCasesComponent_ng_template_16_Template(rf, ctx) {
|
|
22847
|
+
if (rf & 1) {
|
|
22848
|
+
var _r9_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22849
|
+
i0__namespace.ɵɵelementStart(0, "div", 8);
|
|
22850
|
+
i0__namespace.ɵɵelementStart(1, "p", 9);
|
|
22851
|
+
i0__namespace.ɵɵtext(2);
|
|
22852
|
+
i0__namespace.ɵɵelementEnd();
|
|
22853
|
+
i0__namespace.ɵɵelementStart(3, "span", 10);
|
|
22854
|
+
i0__namespace.ɵɵelementStart(4, "a", 11);
|
|
22855
|
+
i0__namespace.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_16_Template_a_click_4_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var ctx_r8 = i0__namespace.ɵɵnextContext(); return ctx_r8.reloadCurrentRoute(); });
|
|
22856
|
+
i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
|
|
22857
|
+
i0__namespace.ɵɵelementEnd();
|
|
22858
|
+
i0__namespace.ɵɵelementEnd();
|
|
22859
|
+
i0__namespace.ɵɵelementEnd();
|
|
22860
|
+
}
|
|
22861
|
+
if (rf & 2) {
|
|
22862
|
+
var ctx_r5 = i0__namespace.ɵɵnextContext();
|
|
22863
|
+
i0__namespace.ɵɵadvance(2);
|
|
22864
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r5.serverLinkedApiError.message);
|
|
22865
|
+
}
|
|
22866
|
+
}
|
|
22867
|
+
function ReadLinkedCasesComponent_ng_template_18_Template(rf, ctx) {
|
|
22868
|
+
if (rf & 1) {
|
|
22869
|
+
var _r11_1 = i0__namespace.ɵɵgetCurrentView();
|
|
22870
|
+
i0__namespace.ɵɵelementStart(0, "div", 8);
|
|
22871
|
+
i0__namespace.ɵɵelementStart(1, "p", 9);
|
|
22872
|
+
i0__namespace.ɵɵtext(2);
|
|
22873
|
+
i0__namespace.ɵɵelementEnd();
|
|
22874
|
+
i0__namespace.ɵɵelementStart(3, "span", 10);
|
|
22875
|
+
i0__namespace.ɵɵelementStart(4, "a", 11);
|
|
22876
|
+
i0__namespace.ɵɵlistener("click", function ReadLinkedCasesComponent_ng_template_18_Template_a_click_4_listener() { i0__namespace.ɵɵrestoreView(_r11_1); var ctx_r10 = i0__namespace.ɵɵnextContext(); return ctx_r10.reloadCurrentRoute(); });
|
|
22877
|
+
i0__namespace.ɵɵtext(5, "Reload the Linked cases tab");
|
|
22878
|
+
i0__namespace.ɵɵelementEnd();
|
|
22879
|
+
i0__namespace.ɵɵelementEnd();
|
|
22880
|
+
i0__namespace.ɵɵelementEnd();
|
|
22881
|
+
}
|
|
22882
|
+
if (rf & 2) {
|
|
22883
|
+
var ctx_r7 = i0__namespace.ɵɵnextContext();
|
|
22884
|
+
i0__namespace.ɵɵadvance(2);
|
|
22885
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r7.serverError.message);
|
|
22886
|
+
}
|
|
22887
|
+
}
|
|
22888
|
+
var ReadLinkedCasesComponent = /** @class */ (function () {
|
|
22889
|
+
function ReadLinkedCasesComponent(router, linkedCasesService, appConfig, commonDataService) {
|
|
22890
|
+
this.router = router;
|
|
22891
|
+
this.linkedCasesService = linkedCasesService;
|
|
22892
|
+
this.appConfig = appConfig;
|
|
22893
|
+
this.commonDataService = commonDataService;
|
|
22894
|
+
this.reasonListLoaded = false;
|
|
22895
|
+
this.reload = false;
|
|
22896
|
+
this.serverError = null;
|
|
22897
|
+
this.serverLinkedApiError = null;
|
|
22898
|
+
this.isServerReasonCodeError = false;
|
|
22899
|
+
this.isServerJurisdictionError = false;
|
|
22900
|
+
this.isServerLinkedFromError = false;
|
|
22901
|
+
this.isServerLinkedToError = false;
|
|
22902
|
+
}
|
|
22903
|
+
ReadLinkedCasesComponent.prototype.ngOnInit = function () {
|
|
22904
|
+
var _this = this;
|
|
22905
|
+
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
22906
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + '/lov/categories/CaseLinkingReasonCode';
|
|
22907
|
+
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
22908
|
+
next: function (reasons) {
|
|
22909
|
+
_this.reasonListLoaded = true;
|
|
22910
|
+
_this.linkedCasesService.linkCaseReasons = reasons.list_of_values.sort(function (a, b) { return (a.value_en > b.value_en) ? 1 : -1; });
|
|
22911
|
+
},
|
|
22912
|
+
error: function (error) {
|
|
22913
|
+
_this.isServerReasonCodeError = true;
|
|
22914
|
+
_this.linkedCasesService.isServerReasonCodeError = true;
|
|
22915
|
+
}
|
|
22916
|
+
});
|
|
22917
|
+
this.serverLinkedApiError = {
|
|
22918
|
+
id: 'backendError', message: 'Some case information is not available at the moment'
|
|
22919
|
+
};
|
|
22920
|
+
this.serverError = {
|
|
22921
|
+
id: 'backendError', message: 'There has been a system error and your request could not be processed.'
|
|
22922
|
+
};
|
|
22923
|
+
};
|
|
22924
|
+
ReadLinkedCasesComponent.prototype.ngAfterViewInit = function () {
|
|
22925
|
+
this.linkedCasesService.caseFieldValue = this.caseField.value || [];
|
|
22926
|
+
var labelField = document.getElementsByClassName('govuk-heading-l');
|
|
22927
|
+
if (labelField && labelField.length) {
|
|
22928
|
+
labelField[0].replaceWith('');
|
|
22929
|
+
}
|
|
22930
|
+
labelField = document.getElementsByClassName('heading-h2');
|
|
22931
|
+
if (labelField && labelField.length) {
|
|
22932
|
+
labelField[0].replaceWith('');
|
|
22933
|
+
}
|
|
22934
|
+
labelField = document.getElementsByClassName('case-viewer-label');
|
|
22935
|
+
if (labelField && labelField.length) {
|
|
22936
|
+
labelField[0].replaceWith('');
|
|
22937
|
+
}
|
|
22938
|
+
};
|
|
22939
|
+
ReadLinkedCasesComponent.prototype.reloadCurrentRoute = function () {
|
|
22940
|
+
this.router.navigate(['cases', 'case-details', this.linkedCasesService.caseDetails.case_id]).then(function () {
|
|
22941
|
+
window.location.hash = 'Linked cases';
|
|
22942
|
+
});
|
|
22943
|
+
};
|
|
22944
|
+
ReadLinkedCasesComponent.prototype.getFailureLinkedToNotification = function (evt) {
|
|
22945
|
+
this.isServerLinkedToError = true;
|
|
22946
|
+
};
|
|
22947
|
+
ReadLinkedCasesComponent.prototype.getFailureLinkedFromNotification = function (evt) {
|
|
22948
|
+
this.isServerLinkedFromError = true;
|
|
22949
|
+
};
|
|
22950
|
+
return ReadLinkedCasesComponent;
|
|
22951
|
+
}());
|
|
22952
|
+
ReadLinkedCasesComponent.ɵfac = function ReadLinkedCasesComponent_Factory(t) { return new (t || ReadLinkedCasesComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService)); };
|
|
22953
|
+
ReadLinkedCasesComponent.ɵcmp = i0__namespace.ɵɵ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) {
|
|
22954
|
+
if (rf & 1) {
|
|
22955
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
22956
|
+
i0__namespace.ɵɵelementStart(1, "div", 0);
|
|
22957
|
+
i0__namespace.ɵɵelementStart(2, "h1", 1);
|
|
22958
|
+
i0__namespace.ɵɵtext(3, "Linked cases");
|
|
22959
|
+
i0__namespace.ɵɵelementEnd();
|
|
22960
|
+
i0__namespace.ɵɵelementStart(4, "label", 2);
|
|
22961
|
+
i0__namespace.ɵɵtext(5, "This case is linked to");
|
|
22962
|
+
i0__namespace.ɵɵelementEnd();
|
|
22963
|
+
i0__namespace.ɵɵelementStart(6, "ccd-linked-cases-to-table", 3);
|
|
22964
|
+
i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_to_table_notifyAPIFailure_6_listener($event) { return ctx.getFailureLinkedToNotification($event); });
|
|
22965
|
+
i0__namespace.ɵɵelementEnd();
|
|
22966
|
+
i0__namespace.ɵɵtemplate(7, ReadLinkedCasesComponent_ng_container_7_Template, 1, 0, "ng-container", 4);
|
|
22967
|
+
i0__namespace.ɵɵtemplate(8, ReadLinkedCasesComponent_ng_container_8_Template, 1, 0, "ng-container", 4);
|
|
22968
|
+
i0__namespace.ɵɵelementEnd();
|
|
22969
|
+
i0__namespace.ɵɵelementStart(9, "div", 5);
|
|
22970
|
+
i0__namespace.ɵɵelementStart(10, "label", 2);
|
|
22971
|
+
i0__namespace.ɵɵtext(11, "This case is linked from");
|
|
22972
|
+
i0__namespace.ɵɵelementEnd();
|
|
22973
|
+
i0__namespace.ɵɵelement(12, "br");
|
|
22974
|
+
i0__namespace.ɵɵelementStart(13, "ccd-linked-cases-from-table", 3);
|
|
22975
|
+
i0__namespace.ɵɵlistener("notifyAPIFailure", function ReadLinkedCasesComponent_Template_ccd_linked_cases_from_table_notifyAPIFailure_13_listener($event) { return ctx.getFailureLinkedFromNotification($event); });
|
|
22976
|
+
i0__namespace.ɵɵelementEnd();
|
|
22977
|
+
i0__namespace.ɵɵtemplate(14, ReadLinkedCasesComponent_ng_container_14_Template, 1, 0, "ng-container", 4);
|
|
22978
|
+
i0__namespace.ɵɵtemplate(15, ReadLinkedCasesComponent_ng_container_15_Template, 1, 0, "ng-container", 4);
|
|
22979
|
+
i0__namespace.ɵɵelementEnd();
|
|
22980
|
+
i0__namespace.ɵɵelementEnd();
|
|
22981
|
+
i0__namespace.ɵɵtemplate(16, ReadLinkedCasesComponent_ng_template_16_Template, 6, 1, "ng-template", null, 6, i0__namespace.ɵɵtemplateRefExtractor);
|
|
22982
|
+
i0__namespace.ɵɵtemplate(18, ReadLinkedCasesComponent_ng_template_18_Template, 6, 1, "ng-template", null, 7, i0__namespace.ɵɵtemplateRefExtractor);
|
|
22983
|
+
}
|
|
22984
|
+
if (rf & 2) {
|
|
22985
|
+
var _r4 = i0__namespace.ɵɵreference(17);
|
|
22986
|
+
var _r6 = i0__namespace.ɵɵreference(19);
|
|
22987
|
+
i0__namespace.ɵɵadvance(6);
|
|
22988
|
+
i0__namespace.ɵɵproperty("caseField", ctx.caseField);
|
|
22989
|
+
i0__namespace.ɵɵadvance(1);
|
|
22990
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
|
|
22991
|
+
i0__namespace.ɵɵadvance(1);
|
|
22992
|
+
i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedToError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedToError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
|
|
22993
|
+
i0__namespace.ɵɵadvance(5);
|
|
22994
|
+
i0__namespace.ɵɵproperty("caseField", ctx.caseField);
|
|
22995
|
+
i0__namespace.ɵɵadvance(1);
|
|
22996
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError)("ngIfThen", _r6);
|
|
22997
|
+
i0__namespace.ɵɵadvance(1);
|
|
22998
|
+
i0__namespace.ɵɵproperty("ngIf", !(ctx.isServerLinkedFromError && ctx.isServerJurisdictionError && ctx.isServerReasonCodeError) && (ctx.isServerLinkedFromError || ctx.isServerJurisdictionError || ctx.isServerReasonCodeError))("ngIfThen", _r4);
|
|
22999
|
+
}
|
|
23000
|
+
}, styles: [".table-sub-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700}"] });
|
|
23001
|
+
(function () {
|
|
23002
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadLinkedCasesComponent, [{
|
|
23003
|
+
type: i0.Component,
|
|
23004
|
+
args: [{
|
|
23005
|
+
selector: 'ccd-read-linked-cases',
|
|
23006
|
+
templateUrl: './read-linked-cases.component.html',
|
|
23007
|
+
styleUrls: ['./read-linked-cases.component.scss']
|
|
23008
|
+
}]
|
|
23009
|
+
}], function () { return [{ type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, { caseField: [{
|
|
23010
|
+
type: i0.Input
|
|
23011
|
+
}] });
|
|
23012
|
+
})();
|
|
23013
|
+
|
|
23014
|
+
var LinkCaseReason = /** @class */ (function () {
|
|
23015
|
+
function LinkCaseReason() {
|
|
23016
|
+
}
|
|
23017
|
+
return LinkCaseReason;
|
|
23018
|
+
}());
|
|
23019
|
+
var CCDCaseLinkType = /** @class */ (function () {
|
|
23020
|
+
function CCDCaseLinkType() {
|
|
23021
|
+
}
|
|
23022
|
+
return CCDCaseLinkType;
|
|
23023
|
+
}());
|
|
23024
|
+
var CaseLink = /** @class */ (function () {
|
|
23025
|
+
function CaseLink() {
|
|
23026
|
+
}
|
|
23027
|
+
return CaseLink;
|
|
23028
|
+
}());
|
|
23029
|
+
var LinkReason = /** @class */ (function () {
|
|
23030
|
+
function LinkReason() {
|
|
23031
|
+
}
|
|
23032
|
+
return LinkReason;
|
|
23033
|
+
}());
|
|
23034
|
+
var LinkedCasesResponse = /** @class */ (function () {
|
|
23035
|
+
function LinkedCasesResponse() {
|
|
23036
|
+
}
|
|
23037
|
+
return LinkedCasesResponse;
|
|
23038
|
+
}());
|
|
23039
|
+
var CaseLinkResponse = /** @class */ (function () {
|
|
23040
|
+
function CaseLinkResponse() {
|
|
23041
|
+
}
|
|
23042
|
+
return CaseLinkResponse;
|
|
23043
|
+
}());
|
|
23044
|
+
var LinkDetails = /** @class */ (function () {
|
|
23045
|
+
function LinkDetails() {
|
|
23046
|
+
}
|
|
23047
|
+
return LinkDetails;
|
|
23048
|
+
}());
|
|
23049
|
+
var Terms = /** @class */ (function () {
|
|
23050
|
+
function Terms() {
|
|
23051
|
+
}
|
|
23052
|
+
return Terms;
|
|
23053
|
+
}());
|
|
23054
|
+
var ESQueryType = /** @class */ (function () {
|
|
23055
|
+
function ESQueryType() {
|
|
23056
|
+
}
|
|
23057
|
+
return ESQueryType;
|
|
23058
|
+
}());
|
|
23059
|
+
|
|
20456
23060
|
var CollectionCreateCheckerService = /** @class */ (function () {
|
|
20457
23061
|
function CollectionCreateCheckerService() {
|
|
20458
23062
|
}
|
|
@@ -22497,6 +25101,7 @@
|
|
|
22497
25101
|
ReadComplexFieldTableComponent,
|
|
22498
25102
|
ReadComplexFieldCollectionTableComponent,
|
|
22499
25103
|
ReadCaseFlagFieldComponent,
|
|
25104
|
+
ReadLinkedCasesComponent,
|
|
22500
25105
|
// Write
|
|
22501
25106
|
WriteJudicialUserFieldComponent,
|
|
22502
25107
|
WriteAddressFieldComponent,
|
|
@@ -22532,7 +25137,15 @@
|
|
|
22532
25137
|
CaseFileViewFolderSortComponent,
|
|
22533
25138
|
CaseFileViewOverlayMenuComponent,
|
|
22534
25139
|
CaseFileViewFolderDocumentActionsComponent,
|
|
22535
|
-
CaseFileViewFolderSelectorComponent
|
|
25140
|
+
CaseFileViewFolderSelectorComponent,
|
|
25141
|
+
LinkedCasesToTableComponent,
|
|
25142
|
+
LinkedCasesFromTableComponent,
|
|
25143
|
+
BeforeYouStartComponent,
|
|
25144
|
+
LinkCasesComponent,
|
|
25145
|
+
CheckYourAnswersComponent,
|
|
25146
|
+
WriteLinkedCasesComponent,
|
|
25147
|
+
UnLinkCasesComponent,
|
|
25148
|
+
NoLinkedCasesComponent
|
|
22536
25149
|
];
|
|
22537
25150
|
var PaletteModule = /** @class */ (function () {
|
|
22538
25151
|
function PaletteModule() {
|
|
@@ -22551,6 +25164,7 @@
|
|
|
22551
25164
|
FileUploadStateService,
|
|
22552
25165
|
FileUploadProgressGuard,
|
|
22553
25166
|
WindowService,
|
|
25167
|
+
LinkedCasesService,
|
|
22554
25168
|
CommonDataService,
|
|
22555
25169
|
JurisdictionService,
|
|
22556
25170
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -22582,7 +25196,7 @@
|
|
|
22582
25196
|
i3.PaymentLibModule,
|
|
22583
25197
|
i2$1.ScrollToModule.forRoot(),
|
|
22584
25198
|
i1$3.MatDialogModule,
|
|
22585
|
-
|
|
25199
|
+
i12.MediaViewerModule,
|
|
22586
25200
|
LoadingModule
|
|
22587
25201
|
], i4.NgxMatDatetimePickerModule,
|
|
22588
25202
|
i4.NgxMatNativeDateModule,
|
|
@@ -22646,6 +25260,7 @@
|
|
|
22646
25260
|
ReadComplexFieldTableComponent,
|
|
22647
25261
|
ReadComplexFieldCollectionTableComponent,
|
|
22648
25262
|
ReadCaseFlagFieldComponent,
|
|
25263
|
+
ReadLinkedCasesComponent,
|
|
22649
25264
|
// Write
|
|
22650
25265
|
WriteJudicialUserFieldComponent,
|
|
22651
25266
|
WriteAddressFieldComponent,
|
|
@@ -22681,7 +25296,15 @@
|
|
|
22681
25296
|
CaseFileViewFolderSortComponent,
|
|
22682
25297
|
CaseFileViewOverlayMenuComponent,
|
|
22683
25298
|
CaseFileViewFolderDocumentActionsComponent,
|
|
22684
|
-
CaseFileViewFolderSelectorComponent
|
|
25299
|
+
CaseFileViewFolderSelectorComponent,
|
|
25300
|
+
LinkedCasesToTableComponent,
|
|
25301
|
+
LinkedCasesFromTableComponent,
|
|
25302
|
+
BeforeYouStartComponent,
|
|
25303
|
+
LinkCasesComponent,
|
|
25304
|
+
CheckYourAnswersComponent,
|
|
25305
|
+
WriteLinkedCasesComponent,
|
|
25306
|
+
UnLinkCasesComponent,
|
|
25307
|
+
NoLinkedCasesComponent], imports: [i1.CommonModule,
|
|
22685
25308
|
i1$1.RouterModule,
|
|
22686
25309
|
i2.FormsModule,
|
|
22687
25310
|
i2.ReactiveFormsModule,
|
|
@@ -22706,7 +25329,7 @@
|
|
|
22706
25329
|
i7.CdkTreeModule,
|
|
22707
25330
|
i1$4.OverlayModule,
|
|
22708
25331
|
i3.PaymentLibModule, i2__namespace$1.ScrollToModule, i1$3.MatDialogModule,
|
|
22709
|
-
|
|
25332
|
+
i12.MediaViewerModule,
|
|
22710
25333
|
LoadingModule], exports: [i4.NgxMatDatetimePickerModule,
|
|
22711
25334
|
i4.NgxMatNativeDateModule,
|
|
22712
25335
|
i4.NgxMatTimepickerModule,
|
|
@@ -22755,6 +25378,7 @@
|
|
|
22755
25378
|
ReadComplexFieldTableComponent,
|
|
22756
25379
|
ReadComplexFieldCollectionTableComponent,
|
|
22757
25380
|
ReadCaseFlagFieldComponent,
|
|
25381
|
+
ReadLinkedCasesComponent,
|
|
22758
25382
|
// Write
|
|
22759
25383
|
WriteJudicialUserFieldComponent,
|
|
22760
25384
|
WriteAddressFieldComponent,
|
|
@@ -22790,7 +25414,15 @@
|
|
|
22790
25414
|
CaseFileViewFolderSortComponent,
|
|
22791
25415
|
CaseFileViewOverlayMenuComponent,
|
|
22792
25416
|
CaseFileViewFolderDocumentActionsComponent,
|
|
22793
|
-
CaseFileViewFolderSelectorComponent
|
|
25417
|
+
CaseFileViewFolderSelectorComponent,
|
|
25418
|
+
LinkedCasesToTableComponent,
|
|
25419
|
+
LinkedCasesFromTableComponent,
|
|
25420
|
+
BeforeYouStartComponent,
|
|
25421
|
+
LinkCasesComponent,
|
|
25422
|
+
CheckYourAnswersComponent,
|
|
25423
|
+
WriteLinkedCasesComponent,
|
|
25424
|
+
UnLinkCasesComponent,
|
|
25425
|
+
NoLinkedCasesComponent] });
|
|
22794
25426
|
})();
|
|
22795
25427
|
(function () {
|
|
22796
25428
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PaletteModule, [{
|
|
@@ -22824,7 +25456,7 @@
|
|
|
22824
25456
|
i3.PaymentLibModule,
|
|
22825
25457
|
i2$1.ScrollToModule.forRoot(),
|
|
22826
25458
|
i1$3.MatDialogModule,
|
|
22827
|
-
|
|
25459
|
+
i12.MediaViewerModule,
|
|
22828
25460
|
LoadingModule
|
|
22829
25461
|
],
|
|
22830
25462
|
declarations: __spread([
|
|
@@ -22860,6 +25492,7 @@
|
|
|
22860
25492
|
FileUploadStateService,
|
|
22861
25493
|
FileUploadProgressGuard,
|
|
22862
25494
|
WindowService,
|
|
25495
|
+
LinkedCasesService,
|
|
22863
25496
|
CommonDataService,
|
|
22864
25497
|
JurisdictionService,
|
|
22865
25498
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -22878,6 +25511,7 @@
|
|
|
22878
25511
|
i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryFieldComponent, [i1__namespace.NgForOf, ReadOrderSummaryRowComponent,
|
|
22879
25512
|
ReadMoneyGbpFieldComponent], []);
|
|
22880
25513
|
i0__namespace.ɵɵsetComponentScope(ReadOrderSummaryRowComponent, [ReadMoneyGbpFieldComponent], []);
|
|
25514
|
+
i0__namespace.ɵɵsetComponentScope(ReadCaseLinkFieldComponent, [i1__namespace.NgIf, ReadLinkedCasesComponent], [CaseReferencePipe]);
|
|
22881
25515
|
i0__namespace.ɵɵsetComponentScope(ReadComplexFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, ReadComplexFieldRawComponent,
|
|
22882
25516
|
ReadComplexFieldCollectionTableComponent, i1__namespace.NgSwitchDefault, ReadComplexFieldTableComponent], []);
|
|
22883
25517
|
i0__namespace.ɵɵsetComponentScope(ReadComplexFieldRawComponent, [i1__namespace.NgForOf, FieldReadComponent], [ReadFieldsFilterPipe]);
|
|
@@ -22885,6 +25519,7 @@
|
|
|
22885
25519
|
i0__namespace.ɵɵsetComponentScope(ReadComplexFieldCollectionTableComponent, [i1__namespace.NgForOf, i1__namespace.NgIf, FieldReadComponent,
|
|
22886
25520
|
ReadCaseLinkFieldComponent], [ReadFieldsFilterPipe, CcdCollectionTableCaseFieldsFilterPipe, i1__namespace.KeyValuePipe, IsCompoundPipe]);
|
|
22887
25521
|
i0__namespace.ɵɵsetComponentScope(ReadCaseFlagFieldComponent, [i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, CaseFlagSummaryListComponent, i1__namespace.NgSwitchDefault, i1__namespace.NgForOf, i1__namespace.NgIf, CaseFlagTableComponent], []);
|
|
25522
|
+
i0__namespace.ɵɵsetComponentScope(ReadLinkedCasesComponent, [LinkedCasesToTableComponent, i1__namespace.NgIf, LinkedCasesFromTableComponent], []);
|
|
22888
25523
|
i0__namespace.ɵɵsetComponentScope(WriteAddressFieldComponent, [i1__namespace.NgIf, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, i2__namespace.SelectControlValueAccessor, i1__namespace.NgForOf, i2__namespace.NgSelectOption, i2__namespace.ɵangular_packages_forms_forms_z, WriteComplexFieldComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
|
|
22889
25524
|
i0__namespace.ɵɵsetComponentScope(WriteComplexFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, FieldReadComponent, LabelSubstitutorDirective, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, FieldWriteComponent], [FieldLabelPipe, IsReadOnlyPipe]);
|
|
22890
25525
|
i0__namespace.ɵɵsetComponentScope(WriteDocumentFieldComponent, [i1__namespace.NgClass, i1__namespace.NgIf, ReadDocumentFieldComponent], [FieldLabelPipe]);
|
|
@@ -22899,11 +25534,21 @@
|
|
|
22899
25534
|
WriteOrganisationComplexFieldComponent], [i1__namespace.AsyncPipe]);
|
|
22900
25535
|
i0__namespace.ɵɵsetComponentScope(WriteOrderSummaryFieldComponent, [ReadOrderSummaryFieldComponent], []);
|
|
22901
25536
|
i0__namespace.ɵɵsetComponentScope(WriteDateContainerFieldComponent, [i1__namespace.NgIf, DatetimePickerComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, WriteDateFieldComponent], []);
|
|
25537
|
+
i0__namespace.ɵɵsetComponentScope(WriteCaseLinkFieldComponent, [i1__namespace.NgIf, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlDirective, WriteLinkedCasesComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe]);
|
|
22902
25538
|
i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
|
|
22903
25539
|
i0__namespace.ɵɵsetComponentScope(
|
|
22904
25540
|
// ComponentLauncher web components
|
|
22905
|
-
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent,
|
|
22906
|
-
i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent,
|
|
25541
|
+
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
|
|
25542
|
+
i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i12__namespace.ɵcs], []);
|
|
25543
|
+
i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
25544
|
+
i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
25545
|
+
i0__namespace.ɵɵsetComponentScope(LinkCasesComponent, [i1__namespace.NgIf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlName, i2__namespace.FormArrayName, i1__namespace.NgForOf, i2__namespace.FormGroupName, i2__namespace.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
25546
|
+
i0__namespace.ɵɵsetComponentScope(CheckYourAnswersComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
25547
|
+
i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
|
|
25548
|
+
NoLinkedCasesComponent,
|
|
25549
|
+
LinkCasesComponent,
|
|
25550
|
+
UnLinkCasesComponent,
|
|
25551
|
+
CheckYourAnswersComponent], []);
|
|
22907
25552
|
|
|
22908
25553
|
var Confirmation = /** @class */ (function () {
|
|
22909
25554
|
function Confirmation(caseId, status, header, body) {
|
|
@@ -32601,8 +35246,10 @@
|
|
|
32601
35246
|
exports.AuthService = AuthService;
|
|
32602
35247
|
exports.Banner = Banner;
|
|
32603
35248
|
exports.BannersService = BannersService;
|
|
35249
|
+
exports.BeforeYouStartComponent = BeforeYouStartComponent;
|
|
32604
35250
|
exports.BodyComponent = BodyComponent;
|
|
32605
35251
|
exports.BrowserService = BrowserService;
|
|
35252
|
+
exports.CCDCaseLinkType = CCDCaseLinkType;
|
|
32606
35253
|
exports.CallbackErrorsComponent = CallbackErrorsComponent;
|
|
32607
35254
|
exports.CallbackErrorsContext = CallbackErrorsContext;
|
|
32608
35255
|
exports.CaseAccessUtils = CaseAccessUtils;
|
|
@@ -32642,6 +35289,8 @@
|
|
|
32642
35289
|
exports.CaseHeaderComponent = CaseHeaderComponent;
|
|
32643
35290
|
exports.CaseHeaderModule = CaseHeaderModule;
|
|
32644
35291
|
exports.CaseHistoryViewerFieldComponent = CaseHistoryViewerFieldComponent;
|
|
35292
|
+
exports.CaseLink = CaseLink;
|
|
35293
|
+
exports.CaseLinkResponse = CaseLinkResponse;
|
|
32645
35294
|
exports.CaseListComponent = CaseListComponent;
|
|
32646
35295
|
exports.CaseListFiltersComponent = CaseListFiltersComponent;
|
|
32647
35296
|
exports.CaseListFiltersModule = CaseListFiltersModule;
|
|
@@ -32674,6 +35323,7 @@
|
|
|
32674
35323
|
exports.CcdCollectionTableCaseFieldsFilterPipe = CcdCollectionTableCaseFieldsFilterPipe;
|
|
32675
35324
|
exports.CcdPageFieldsPipe = CcdPageFieldsPipe;
|
|
32676
35325
|
exports.CcdTabFieldsPipe = CcdTabFieldsPipe;
|
|
35326
|
+
exports.CheckYourAnswersComponent = CheckYourAnswersComponent;
|
|
32677
35327
|
exports.ConditionalShowFormDirective = ConditionalShowFormDirective;
|
|
32678
35328
|
exports.ConditionalShowModule = ConditionalShowModule;
|
|
32679
35329
|
exports.ConditionalShowRegistrarService = ConditionalShowRegistrarService;
|
|
@@ -32703,6 +35353,7 @@
|
|
|
32703
35353
|
exports.DraftService = DraftService;
|
|
32704
35354
|
exports.DynamicListPipe = DynamicListPipe;
|
|
32705
35355
|
exports.DynamicRadioListPipe = DynamicRadioListPipe;
|
|
35356
|
+
exports.ESQueryType = ESQueryType;
|
|
32706
35357
|
exports.Embedded = Embedded;
|
|
32707
35358
|
exports.ErrorMessageComponent = ErrorMessageComponent;
|
|
32708
35359
|
exports.ErrorNotifierService = ErrorNotifierService;
|
|
@@ -32760,6 +35411,14 @@
|
|
|
32760
35411
|
exports.LabelFieldComponent = LabelFieldComponent;
|
|
32761
35412
|
exports.LabelSubstitutorDirective = LabelSubstitutorDirective;
|
|
32762
35413
|
exports.LabelSubstitutorModule = LabelSubstitutorModule;
|
|
35414
|
+
exports.LinkCaseReason = LinkCaseReason;
|
|
35415
|
+
exports.LinkCasesComponent = LinkCasesComponent;
|
|
35416
|
+
exports.LinkCasesReasonValuePipe = LinkCasesReasonValuePipe;
|
|
35417
|
+
exports.LinkDetails = LinkDetails;
|
|
35418
|
+
exports.LinkReason = LinkReason;
|
|
35419
|
+
exports.LinkedCasesFromTableComponent = LinkedCasesFromTableComponent;
|
|
35420
|
+
exports.LinkedCasesResponse = LinkedCasesResponse;
|
|
35421
|
+
exports.LinkedCasesToTableComponent = LinkedCasesToTableComponent;
|
|
32763
35422
|
exports.LoadingModule = LoadingModule;
|
|
32764
35423
|
exports.LoadingService = LoadingService;
|
|
32765
35424
|
exports.LoadingSpinnerComponent = LoadingSpinnerComponent;
|
|
@@ -32773,6 +35432,7 @@
|
|
|
32773
35432
|
exports.NavigationComponent = NavigationComponent;
|
|
32774
35433
|
exports.NavigationItemComponent = NavigationItemComponent;
|
|
32775
35434
|
exports.NavigationNotifierService = NavigationNotifierService;
|
|
35435
|
+
exports.NoLinkedCasesComponent = NoLinkedCasesComponent;
|
|
32776
35436
|
exports.NoTasksAvailableComponent = NoTasksAvailableComponent;
|
|
32777
35437
|
exports.NotificationBannerComponent = NotificationBannerComponent;
|
|
32778
35438
|
exports.OrderService = OrderService;
|
|
@@ -32809,6 +35469,7 @@
|
|
|
32809
35469
|
exports.ReadFixedListFieldComponent = ReadFixedListFieldComponent;
|
|
32810
35470
|
exports.ReadFixedRadioListFieldComponent = ReadFixedRadioListFieldComponent;
|
|
32811
35471
|
exports.ReadJudicialUserFieldComponent = ReadJudicialUserFieldComponent;
|
|
35472
|
+
exports.ReadLinkedCasesComponent = ReadLinkedCasesComponent;
|
|
32812
35473
|
exports.ReadMoneyGbpFieldComponent = ReadMoneyGbpFieldComponent;
|
|
32813
35474
|
exports.ReadMultiSelectListFieldComponent = ReadMultiSelectListFieldComponent;
|
|
32814
35475
|
exports.ReadNumberFieldComponent = ReadNumberFieldComponent;
|
|
@@ -32852,7 +35513,9 @@
|
|
|
32852
35513
|
exports.TaskCancelledComponent = TaskCancelledComponent;
|
|
32853
35514
|
exports.TaskConflictComponent = TaskConflictComponent;
|
|
32854
35515
|
exports.TaskUnassignedComponent = TaskUnassignedComponent;
|
|
35516
|
+
exports.Terms = Terms;
|
|
32855
35517
|
exports.TestRouteSnapshotBuilder = TestRouteSnapshotBuilder;
|
|
35518
|
+
exports.UnLinkCasesComponent = UnLinkCasesComponent;
|
|
32856
35519
|
exports.UnsupportedFieldComponent = UnsupportedFieldComponent;
|
|
32857
35520
|
exports.UpdateFlagComponent = UpdateFlagComponent;
|
|
32858
35521
|
exports.WaysToPayFieldComponent = WaysToPayFieldComponent;
|
|
@@ -32881,6 +35544,7 @@
|
|
|
32881
35544
|
exports.WriteFixedListFieldComponent = WriteFixedListFieldComponent;
|
|
32882
35545
|
exports.WriteFixedRadioListFieldComponent = WriteFixedRadioListFieldComponent;
|
|
32883
35546
|
exports.WriteJudicialUserFieldComponent = WriteJudicialUserFieldComponent;
|
|
35547
|
+
exports.WriteLinkedCasesComponent = WriteLinkedCasesComponent;
|
|
32884
35548
|
exports.WriteMoneyGbpFieldComponent = WriteMoneyGbpFieldComponent;
|
|
32885
35549
|
exports.WriteMultiSelectListFieldComponent = WriteMultiSelectListFieldComponent;
|
|
32886
35550
|
exports.WriteNumberFieldComponent = WriteNumberFieldComponent;
|