@hmcts/ccd-case-ui-toolkit 7.1.38-qualifying-questions → 7.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +37 -15
- package/esm2022/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.mjs +13 -1
- package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.mjs +3 -2
- package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +4 -3
- package/esm2022/lib/shared/components/case-editor/services/cases.service.mjs +4 -3
- package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +5 -4
- package/esm2022/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.mjs +10 -5
- package/esm2022/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.mjs +16 -6
- package/esm2022/lib/shared/components/case-viewer/services/event-trigger.resolver.mjs +9 -5
- package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +36 -48
- package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +5 -3
- package/esm2022/lib/shared/components/pagination/pagination.component.mjs +3 -3
- package/esm2022/lib/shared/components/palette/document/write-document-field.component.mjs +2 -2
- package/esm2022/lib/shared/components/palette/history/event-log/event-log-table.component.mjs +2 -2
- package/esm2022/lib/shared/components/palette/history/event-log/event-log.component.mjs +9 -9
- package/esm2022/lib/shared/components/palette/palette.module.mjs +3 -2
- package/esm2022/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.mjs +20 -12
- package/esm2022/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-options/qualifying-question-options.component.mjs +4 -4
- package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +50 -29
- package/esm2022/lib/shared/components/palette/query-management/components/query-details/query-details.component.mjs +158 -104
- package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.mjs +104 -41
- package/esm2022/lib/shared/components/palette/query-management/read-query-management-field.component.mjs +4 -21
- package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
- package/esm2022/lib/shared/services/http/http-error.service.mjs +11 -4
- package/esm2022/lib/shared/services/loading/loading.service.mjs +13 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +1076 -899
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +6 -2
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts +2 -0
- package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts +3 -2
- package/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +4 -2
- package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/event-trigger.resolver.d.ts +3 -1
- package/lib/shared/components/case-viewer/services/event-trigger.resolver.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +2 -3
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/palette/history/event-log/event-log-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts +5 -1
- package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts +17 -5
- package/lib/shared/components/palette/query-management/components/query-details/query-details.component.d.ts.map +1 -1
- package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts +17 -5
- package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts.map +1 -1
- package/lib/shared/domain/work-allocation/Task.d.ts +1 -0
- package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
- package/lib/shared/services/http/http-error.service.d.ts +3 -1
- package/lib/shared/services/http/http-error.service.d.ts.map +1 -1
- package/lib/shared/services/loading/loading.service.d.ts +4 -0
- package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ import * as i1$1 from '@angular/router';
|
|
|
8
8
|
import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
|
|
9
9
|
import * as i4 from '@angular/forms';
|
|
10
10
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
11
|
-
import { throwError, Subject, EMPTY, Observable,
|
|
11
|
+
import { BehaviorSubject, throwError, Subject, EMPTY, Observable, of, timer, fromEvent, forkJoin, Subscription, combineLatest } from 'rxjs';
|
|
12
12
|
import * as i1$2 from '@angular/common/http';
|
|
13
13
|
import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
14
|
-
import { catchError, map, publish, refCount, switchMap, debounceTime, delay,
|
|
14
|
+
import { distinctUntilChanged, catchError, map, publish, refCount, switchMap, debounceTime, delay, finalize, timeout, mergeMap, retryWhen, tap, delayWhen, publishReplay, take, first, takeUntil, filter } from 'rxjs/operators';
|
|
15
15
|
import { polling } from 'rx-polling-hmcts';
|
|
16
16
|
import { Type, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
|
|
17
17
|
import moment from 'moment';
|
|
@@ -59,7 +59,7 @@ import { MatLegacyTabsModule } from '@angular/material/legacy-tabs';
|
|
|
59
59
|
import { decompressFromUTF16, compressToUTF16 } from 'lz-string';
|
|
60
60
|
|
|
61
61
|
const _c0$14 = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
62
|
-
const _c1$
|
|
62
|
+
const _c1$u = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
63
63
|
function FooterComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
64
64
|
i0.ɵɵelementStart(0, "div", 3)(1, "div", 4);
|
|
65
65
|
i0.ɵɵprojection(2);
|
|
@@ -135,7 +135,7 @@ class FooterComponent {
|
|
|
135
135
|
phone;
|
|
136
136
|
workhours;
|
|
137
137
|
static ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
138
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$
|
|
138
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$u, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) { if (rf & 1) {
|
|
139
139
|
i0.ɵɵprojectionDef(_c0$14);
|
|
140
140
|
i0.ɵɵelementStart(0, "footer", 0)(1, "div", 1);
|
|
141
141
|
i0.ɵɵtemplate(2, FooterComponent_div_2_Template, 20, 15, "div", 2)(3, FooterComponent_div_3_Template, 20, 16, "div", 2);
|
|
@@ -164,7 +164,7 @@ class FooterComponent {
|
|
|
164
164
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FooterComponent, { className: "FooterComponent", filePath: "lib/components/footer/footer.component.ts", lineNumber: 8 }); })();
|
|
165
165
|
|
|
166
166
|
const _c0$13 = [[["", "headerNavigation", ""]]];
|
|
167
|
-
const _c1$
|
|
167
|
+
const _c1$t = ["[headerNavigation]"];
|
|
168
168
|
function HeaderBarComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
169
169
|
i0.ɵɵelementStart(0, "div")(1, "a", 12);
|
|
170
170
|
i0.ɵɵelement(2, "img", 13);
|
|
@@ -206,7 +206,7 @@ class HeaderBarComponent {
|
|
|
206
206
|
this.signOutRequest.emit();
|
|
207
207
|
}
|
|
208
208
|
static ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
209
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$
|
|
209
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$t, decls: 17, vars: 14, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
210
210
|
i0.ɵɵprojectionDef(_c0$13);
|
|
211
211
|
i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "div", 2);
|
|
212
212
|
i0.ɵɵtemplate(3, HeaderBarComponent_div_3_Template, 5, 3, "div", 3)(4, HeaderBarComponent_div_4_Template, 5, 3, "div", 4);
|
|
@@ -258,11 +258,11 @@ class HeaderBarComponent {
|
|
|
258
258
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(HeaderBarComponent, { className: "HeaderBarComponent", filePath: "lib/components/header/header-bar/header-bar.component.ts", lineNumber: 8 }); })();
|
|
259
259
|
|
|
260
260
|
const _c0$12 = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
261
|
-
const _c1$
|
|
261
|
+
const _c1$s = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
262
262
|
class NavigationComponent {
|
|
263
263
|
isSolicitor;
|
|
264
264
|
static ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
265
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$
|
|
265
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$s, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
266
266
|
i0.ɵɵprojectionDef(_c0$12);
|
|
267
267
|
i0.ɵɵelementStart(0, "div")(1, "nav", 0);
|
|
268
268
|
i0.ɵɵprojection(2);
|
|
@@ -383,10 +383,10 @@ class HeadersModule {
|
|
|
383
383
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(HeadersModule, { declarations: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent], imports: [CommonModule, RouterModule, i1.RpxTranslationModule], exports: [PhaseComponent, HeaderBarComponent, NavigationComponent, NavigationItemComponent] }); })();
|
|
384
384
|
|
|
385
385
|
const _c0$11 = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
386
|
-
const _c1$
|
|
386
|
+
const _c1$r = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
387
387
|
class BodyComponent {
|
|
388
388
|
static ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
389
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$
|
|
389
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$r, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) { if (rf & 1) {
|
|
390
390
|
i0.ɵɵprojectionDef(_c0$11);
|
|
391
391
|
i0.ɵɵelementStart(0, "div", 0);
|
|
392
392
|
i0.ɵɵprojection(1);
|
|
@@ -1001,7 +1001,7 @@ class NotificationBannerComponent {
|
|
|
1001
1001
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NotificationBannerComponent, { className: "NotificationBannerComponent", filePath: "lib/components/banners/notification-banner/notification-banner.component.ts", lineNumber: 10 }); })();
|
|
1002
1002
|
|
|
1003
1003
|
const _c0$_ = ["*"];
|
|
1004
|
-
const _c1$
|
|
1004
|
+
const _c1$q = a0 => ({ "js-hidden": a0 });
|
|
1005
1005
|
class TabComponent {
|
|
1006
1006
|
id;
|
|
1007
1007
|
title;
|
|
@@ -1013,7 +1013,7 @@ class TabComponent {
|
|
|
1013
1013
|
i0.ɵɵprojection(1);
|
|
1014
1014
|
i0.ɵɵelementEnd();
|
|
1015
1015
|
} if (rf & 2) {
|
|
1016
|
-
i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c1$
|
|
1016
|
+
i0.ɵɵproperty("id", ctx.id)("ngClass", i0.ɵɵpureFunction1(3, _c1$q, !ctx.selected));
|
|
1017
1017
|
i0.ɵɵattribute("aria-hidden", !ctx.selected);
|
|
1018
1018
|
} }, dependencies: [i5.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:0px;border-color:#bfc1c3;padding-bottom:11px;margin-bottom:0;color:#0b0c0c}}"] });
|
|
1019
1019
|
}
|
|
@@ -1030,7 +1030,7 @@ class TabComponent {
|
|
|
1030
1030
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TabComponent, { className: "TabComponent", filePath: "lib/components/tabs/tab.component.ts", lineNumber: 10 }); })();
|
|
1031
1031
|
|
|
1032
1032
|
const _c0$Z = ["tab"];
|
|
1033
|
-
const _c1$
|
|
1033
|
+
const _c1$p = ["*"];
|
|
1034
1034
|
const _c2$4 = () => ["."];
|
|
1035
1035
|
const _c3 = a0 => ({ "tabs-toggle-selected": a0 });
|
|
1036
1036
|
function TabsComponent_li_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -1080,7 +1080,7 @@ class TabsComponent {
|
|
|
1080
1080
|
} if (rf & 2) {
|
|
1081
1081
|
let _t;
|
|
1082
1082
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabs = _t);
|
|
1083
|
-
} }, ngContentSelectors: _c1$
|
|
1083
|
+
} }, ngContentSelectors: _c1$p, decls: 5, vars: 1, consts: [["tab", ""], [1, "tabs"], ["role", "list", 1, "tabs-list"], ["class", "tabs-list-item", 4, "ngFor", "ngForOf"], [1, "tabs-content"], [1, "tabs-list-item"], ["role", "tab", "tabindex", "0", 1, "tabs-toggle", 3, "click", "routerLink", "fragment", "ngClass"]], template: function TabsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1084
1084
|
i0.ɵɵprojectionDef();
|
|
1085
1085
|
i0.ɵɵelementStart(0, "div", 1)(1, "ul", 2);
|
|
1086
1086
|
i0.ɵɵtemplate(2, TabsComponent_li_2_Template, 5, 11, "li", 3);
|
|
@@ -1400,10 +1400,70 @@ class AuthService {
|
|
|
1400
1400
|
args: [DOCUMENT]
|
|
1401
1401
|
}] }], null); })();
|
|
1402
1402
|
|
|
1403
|
+
class LoadingService {
|
|
1404
|
+
registered = new Map();
|
|
1405
|
+
loading = new BehaviorSubject(false);
|
|
1406
|
+
sharedSpinners = [];
|
|
1407
|
+
get isLoading() {
|
|
1408
|
+
return this.loading.pipe(distinctUntilChanged());
|
|
1409
|
+
}
|
|
1410
|
+
register() {
|
|
1411
|
+
const token = this.generateToken();
|
|
1412
|
+
this.registered.set(token, token);
|
|
1413
|
+
this.loading.next(true);
|
|
1414
|
+
return token;
|
|
1415
|
+
}
|
|
1416
|
+
unregister(token) {
|
|
1417
|
+
this.registered.delete(token);
|
|
1418
|
+
this.loading.next(this.registered.size > 0);
|
|
1419
|
+
}
|
|
1420
|
+
addSharedSpinner(spinnerId) {
|
|
1421
|
+
this.sharedSpinners.push(spinnerId);
|
|
1422
|
+
}
|
|
1423
|
+
hasSharedSpinner() {
|
|
1424
|
+
return this.sharedSpinners.length > 0;
|
|
1425
|
+
}
|
|
1426
|
+
unregisterSharedSpinner() {
|
|
1427
|
+
this.registered.delete(this.sharedSpinners[0]);
|
|
1428
|
+
this.sharedSpinners.shift();
|
|
1429
|
+
this.loading.next(this.registered.size > 0);
|
|
1430
|
+
}
|
|
1431
|
+
generateToken() {
|
|
1432
|
+
const timestamp = window.performance.now();
|
|
1433
|
+
return `toolkit-loading-${timestamp}`; // format: [source-library]-[unique incrementing number]
|
|
1434
|
+
}
|
|
1435
|
+
static ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
|
|
1436
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LoadingService, factory: LoadingService.ɵfac });
|
|
1437
|
+
}
|
|
1438
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingService, [{
|
|
1439
|
+
type: Injectable
|
|
1440
|
+
}], null, null); })();
|
|
1441
|
+
|
|
1442
|
+
class LoadingModule {
|
|
1443
|
+
static ɵfac = function LoadingModule_Factory(t) { return new (t || LoadingModule)(); };
|
|
1444
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: LoadingModule });
|
|
1445
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
1446
|
+
LoadingService
|
|
1447
|
+
] });
|
|
1448
|
+
}
|
|
1449
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingModule, [{
|
|
1450
|
+
type: NgModule,
|
|
1451
|
+
args: [{
|
|
1452
|
+
imports: [],
|
|
1453
|
+
declarations: [],
|
|
1454
|
+
exports: [],
|
|
1455
|
+
providers: [
|
|
1456
|
+
LoadingService
|
|
1457
|
+
]
|
|
1458
|
+
}]
|
|
1459
|
+
}], null, null); })();
|
|
1460
|
+
|
|
1403
1461
|
class HttpErrorService {
|
|
1404
1462
|
authService;
|
|
1405
|
-
|
|
1463
|
+
loadingService;
|
|
1464
|
+
constructor(authService, loadingService) {
|
|
1406
1465
|
this.authService = authService;
|
|
1466
|
+
this.loadingService = loadingService;
|
|
1407
1467
|
}
|
|
1408
1468
|
static CONTENT_TYPE = 'Content-Type';
|
|
1409
1469
|
static JSON = 'json';
|
|
@@ -1447,18 +1507,21 @@ class HttpErrorService {
|
|
|
1447
1507
|
handle(error, redirectIfNotAuthorised = true) {
|
|
1448
1508
|
console.error('Handling error in http error service.');
|
|
1449
1509
|
console.error(error);
|
|
1510
|
+
if (this.loadingService.hasSharedSpinner()) {
|
|
1511
|
+
this.loadingService.unregisterSharedSpinner();
|
|
1512
|
+
}
|
|
1450
1513
|
const httpError = HttpErrorService.convertToHttpError(error);
|
|
1451
1514
|
if (redirectIfNotAuthorised && httpError.status === 401) {
|
|
1452
1515
|
this.authService.signIn();
|
|
1453
1516
|
}
|
|
1454
1517
|
return throwError(httpError);
|
|
1455
1518
|
}
|
|
1456
|
-
static ɵfac = function HttpErrorService_Factory(t) { return new (t || HttpErrorService)(i0.ɵɵinject(AuthService)); };
|
|
1519
|
+
static ɵfac = function HttpErrorService_Factory(t) { return new (t || HttpErrorService)(i0.ɵɵinject(AuthService), i0.ɵɵinject(LoadingService)); };
|
|
1457
1520
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: HttpErrorService, factory: HttpErrorService.ɵfac });
|
|
1458
1521
|
}
|
|
1459
1522
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HttpErrorService, [{
|
|
1460
1523
|
type: Injectable
|
|
1461
|
-
}], () => [{ type: AuthService }], null); })();
|
|
1524
|
+
}], () => [{ type: AuthService }, { type: LoadingService }], null); })();
|
|
1462
1525
|
|
|
1463
1526
|
class HttpService {
|
|
1464
1527
|
httpclient;
|
|
@@ -7319,33 +7382,6 @@ class RequestOptionsBuilder {
|
|
|
7319
7382
|
type: Injectable
|
|
7320
7383
|
}], null, null); })();
|
|
7321
7384
|
|
|
7322
|
-
class LoadingService {
|
|
7323
|
-
registered = new Map();
|
|
7324
|
-
loading = new BehaviorSubject(false);
|
|
7325
|
-
get isLoading() {
|
|
7326
|
-
return this.loading.pipe(distinctUntilChanged());
|
|
7327
|
-
}
|
|
7328
|
-
register() {
|
|
7329
|
-
const token = this.generateToken();
|
|
7330
|
-
this.registered.set(token, token);
|
|
7331
|
-
this.loading.next(true);
|
|
7332
|
-
return token;
|
|
7333
|
-
}
|
|
7334
|
-
unregister(token) {
|
|
7335
|
-
this.registered.delete(token);
|
|
7336
|
-
this.loading.next(this.registered.size > 0);
|
|
7337
|
-
}
|
|
7338
|
-
generateToken() {
|
|
7339
|
-
const timestamp = window.performance.now();
|
|
7340
|
-
return `toolkit-loading-${timestamp}`; // format: [source-library]-[unique incrementing number]
|
|
7341
|
-
}
|
|
7342
|
-
static ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
|
|
7343
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LoadingService, factory: LoadingService.ɵfac });
|
|
7344
|
-
}
|
|
7345
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingService, [{
|
|
7346
|
-
type: Injectable
|
|
7347
|
-
}], null, null); })();
|
|
7348
|
-
|
|
7349
7385
|
class SearchService {
|
|
7350
7386
|
appConfig;
|
|
7351
7387
|
httpService;
|
|
@@ -7798,25 +7834,6 @@ class BrowserService {
|
|
|
7798
7834
|
type: Injectable
|
|
7799
7835
|
}], null, null); })();
|
|
7800
7836
|
|
|
7801
|
-
class LoadingModule {
|
|
7802
|
-
static ɵfac = function LoadingModule_Factory(t) { return new (t || LoadingModule)(); };
|
|
7803
|
-
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: LoadingModule });
|
|
7804
|
-
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
7805
|
-
LoadingService
|
|
7806
|
-
] });
|
|
7807
|
-
}
|
|
7808
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingModule, [{
|
|
7809
|
-
type: NgModule,
|
|
7810
|
-
args: [{
|
|
7811
|
-
imports: [],
|
|
7812
|
-
declarations: [],
|
|
7813
|
-
exports: [],
|
|
7814
|
-
providers: [
|
|
7815
|
-
LoadingService
|
|
7816
|
-
]
|
|
7817
|
-
}]
|
|
7818
|
-
}], null, null); })();
|
|
7819
|
-
|
|
7820
7837
|
class CaseAccessUtils {
|
|
7821
7838
|
// User role mapping
|
|
7822
7839
|
static JUDGE_ROLE = 'judge';
|
|
@@ -8036,455 +8053,6 @@ class WizardPageFieldToCaseFieldMapper {
|
|
|
8036
8053
|
}]
|
|
8037
8054
|
}], null, null); })();
|
|
8038
8055
|
|
|
8039
|
-
function convertNonASCIICharacter(character) {
|
|
8040
|
-
if (character === '£') {
|
|
8041
|
-
// pound sign will be frequently used and works for btoa despite being non-ASCII
|
|
8042
|
-
// note: this could be done for other characters provided they work for btoa()
|
|
8043
|
-
return character;
|
|
8044
|
-
}
|
|
8045
|
-
// Note: Will convert to HTML entity
|
|
8046
|
-
return CaseEditUtils.PREFIX + character.charCodeAt(0) + CaseEditUtils.SUFFIX;
|
|
8047
|
-
}
|
|
8048
|
-
class CaseEditUtils {
|
|
8049
|
-
static PREFIX = '&#';
|
|
8050
|
-
static SUFFIX = ';';
|
|
8051
|
-
convertNonASCIICharacters(rawString) {
|
|
8052
|
-
return rawString ? rawString.replace(/[^\x20-\x7E]/g, function (c) {
|
|
8053
|
-
return convertNonASCIICharacter(c);
|
|
8054
|
-
}) : '';
|
|
8055
|
-
}
|
|
8056
|
-
convertHTMLEntities(editedString) {
|
|
8057
|
-
const revertedCharacterList = editedString.split(CaseEditUtils.PREFIX);
|
|
8058
|
-
let rawString = revertedCharacterList[0];
|
|
8059
|
-
for (let index = 1; index < revertedCharacterList.length; index++) {
|
|
8060
|
-
const currentSection = revertedCharacterList[index];
|
|
8061
|
-
if (!currentSection.includes(CaseEditUtils.SUFFIX)) {
|
|
8062
|
-
return rawString.concat(currentSection);
|
|
8063
|
-
}
|
|
8064
|
-
else {
|
|
8065
|
-
const suffixSplitList = currentSection.split(CaseEditUtils.SUFFIX);
|
|
8066
|
-
const characterCode = Number(suffixSplitList[0]);
|
|
8067
|
-
rawString = rawString.concat(String.fromCharCode(characterCode), suffixSplitList[1]);
|
|
8068
|
-
}
|
|
8069
|
-
}
|
|
8070
|
-
return rawString;
|
|
8071
|
-
}
|
|
8072
|
-
}
|
|
8073
|
-
|
|
8074
|
-
class CasesService {
|
|
8075
|
-
http;
|
|
8076
|
-
appConfig;
|
|
8077
|
-
orderService;
|
|
8078
|
-
errorService;
|
|
8079
|
-
wizardPageFieldToCaseFieldMapper;
|
|
8080
|
-
loadingService;
|
|
8081
|
-
sessionStorageService;
|
|
8082
|
-
retryUtil;
|
|
8083
|
-
// Internal (UI) API
|
|
8084
|
-
static V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
|
|
8085
|
-
static V2_MEDIATYPE_START_CASE_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8';
|
|
8086
|
-
static V2_MEDIATYPE_START_EVENT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8';
|
|
8087
|
-
static V2_MEDIATYPE_START_DRAFT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-draft-trigger.v2+json;charset=UTF-8';
|
|
8088
|
-
// External (Data Store) API
|
|
8089
|
-
static V2_MEDIATYPE_CASE_DOCUMENTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-documents.v2+json;charset=UTF-8';
|
|
8090
|
-
static V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8';
|
|
8091
|
-
static V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
8092
|
-
static V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
8093
|
-
static PUI_CASE_MANAGER = 'pui-case-manager';
|
|
8094
|
-
get = this.getCaseView;
|
|
8095
|
-
static updateChallengedAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
|
|
8096
|
-
return httpClient.post(`/api/challenged-access-request/update-attributes`, {
|
|
8097
|
-
caseId,
|
|
8098
|
-
attributesToUpdate
|
|
8099
|
-
});
|
|
8100
|
-
}
|
|
8101
|
-
static updateSpecificAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
|
|
8102
|
-
return httpClient.post(`/api/specific-access-request/update-attributes`, {
|
|
8103
|
-
caseId,
|
|
8104
|
-
attributesToUpdate
|
|
8105
|
-
});
|
|
8106
|
-
}
|
|
8107
|
-
constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService, retryUtil) {
|
|
8108
|
-
this.http = http;
|
|
8109
|
-
this.appConfig = appConfig;
|
|
8110
|
-
this.orderService = orderService;
|
|
8111
|
-
this.errorService = errorService;
|
|
8112
|
-
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
8113
|
-
this.loadingService = loadingService;
|
|
8114
|
-
this.sessionStorageService = sessionStorageService;
|
|
8115
|
-
this.retryUtil = retryUtil;
|
|
8116
|
-
}
|
|
8117
|
-
getCaseView(jurisdictionId, caseTypeId, caseId) {
|
|
8118
|
-
const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
|
|
8119
|
-
const loadingToken = this.loadingService.register();
|
|
8120
|
-
return this.http
|
|
8121
|
-
.get(url)
|
|
8122
|
-
.pipe(catchError(error => {
|
|
8123
|
-
this.errorService.setError(error);
|
|
8124
|
-
return throwError(error);
|
|
8125
|
-
}), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
8126
|
-
}
|
|
8127
|
-
getCaseViewV2(caseId) {
|
|
8128
|
-
const url = `${this.appConfig.getCaseDataUrl()}/internal/cases/${caseId}`;
|
|
8129
|
-
const headers = new HttpHeaders()
|
|
8130
|
-
.set('experimental', 'true')
|
|
8131
|
-
.set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
|
|
8132
|
-
.set('Content-Type', 'application/json');
|
|
8133
|
-
const loadingToken = this.loadingService.register();
|
|
8134
|
-
let http$ = this.http.get(url, { headers, observe: 'body' });
|
|
8135
|
-
const artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
|
|
8136
|
-
const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
|
|
8137
|
-
console.log(`Timeout periods: ${timeoutPeriods} seconds.`);
|
|
8138
|
-
if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
|
|
8139
|
-
http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
|
|
8140
|
-
}
|
|
8141
|
-
else {
|
|
8142
|
-
console.warn('Skipping to pipe a retry mechanism!');
|
|
8143
|
-
}
|
|
8144
|
-
http$ = this.pipeErrorProcessor(http$);
|
|
8145
|
-
http$ = http$.pipe(finalize(() => this.finalizeGetCaseViewWith(caseId, loadingToken)));
|
|
8146
|
-
return http$;
|
|
8147
|
-
}
|
|
8148
|
-
pipeErrorProcessor(in$) {
|
|
8149
|
-
const out$ = in$.pipe(catchError(error => {
|
|
8150
|
-
console.error(`Error while getting case view with getCaseViewV2! Error type: '${typeof error}, Error name: '${error?.name}'`);
|
|
8151
|
-
console.error(error);
|
|
8152
|
-
this.errorService.setError(error);
|
|
8153
|
-
return throwError(error);
|
|
8154
|
-
}));
|
|
8155
|
-
return out$;
|
|
8156
|
-
}
|
|
8157
|
-
finalizeGetCaseViewWith(caseId, loadingToken) {
|
|
8158
|
-
this.loadingService.unregister(loadingToken);
|
|
8159
|
-
}
|
|
8160
|
-
syncWait(seconds) {
|
|
8161
|
-
const end = Date.now() + seconds * 1000;
|
|
8162
|
-
while (Date.now() < end)
|
|
8163
|
-
continue;
|
|
8164
|
-
}
|
|
8165
|
-
getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
8166
|
-
ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
|
|
8167
|
-
const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
|
|
8168
|
-
let headers = new HttpHeaders();
|
|
8169
|
-
headers = headers.set('experimental', 'true');
|
|
8170
|
-
headers = headers.set('Content-Type', 'application/json');
|
|
8171
|
-
headers = this.addClientContextHeader(headers);
|
|
8172
|
-
if (Draft.isDraft(caseId)) {
|
|
8173
|
-
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
|
|
8174
|
-
}
|
|
8175
|
-
else if (caseId !== undefined && caseId !== null) {
|
|
8176
|
-
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_EVENT_TRIGGER);
|
|
8177
|
-
}
|
|
8178
|
-
else {
|
|
8179
|
-
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
|
|
8180
|
-
}
|
|
8181
|
-
return this.http
|
|
8182
|
-
.get(url, { headers, observe: 'response' })
|
|
8183
|
-
.pipe(map((response) => {
|
|
8184
|
-
this.updateClientContextStorage(response.headers);
|
|
8185
|
-
return FieldsUtils.handleNestedDynamicLists(response.body);
|
|
8186
|
-
}), catchError(error => {
|
|
8187
|
-
this.errorService.setError(error);
|
|
8188
|
-
return throwError(error);
|
|
8189
|
-
}), map((p) => plainToClass(CaseEventTrigger, p)), tap(eventTrigger => this.initialiseEventTrigger(eventTrigger)));
|
|
8190
|
-
}
|
|
8191
|
-
createEvent(caseDetails, eventData) {
|
|
8192
|
-
const caseId = caseDetails.case_id;
|
|
8193
|
-
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
|
|
8194
|
-
let headers = new HttpHeaders()
|
|
8195
|
-
.set('experimental', 'true')
|
|
8196
|
-
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
8197
|
-
.set('Content-Type', 'application/json');
|
|
8198
|
-
headers = this.addClientContextHeader(headers);
|
|
8199
|
-
return this.http
|
|
8200
|
-
.post(url, eventData, { headers, observe: 'response' })
|
|
8201
|
-
.pipe(map((response) => {
|
|
8202
|
-
this.updateClientContextStorage(response.headers);
|
|
8203
|
-
return response.body;
|
|
8204
|
-
}), catchError(error => {
|
|
8205
|
-
this.errorService.setError(error);
|
|
8206
|
-
return throwError(error);
|
|
8207
|
-
}));
|
|
8208
|
-
}
|
|
8209
|
-
validateCase(ctid, eventData, pageId) {
|
|
8210
|
-
const pageIdString = pageId ? `?pageId=${pageId}` : '';
|
|
8211
|
-
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
|
|
8212
|
-
let headers = new HttpHeaders()
|
|
8213
|
-
.set('experimental', 'true')
|
|
8214
|
-
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
8215
|
-
.set('Content-Type', 'application/json');
|
|
8216
|
-
headers = this.addClientContextHeader(headers);
|
|
8217
|
-
return this.http
|
|
8218
|
-
.post(url, eventData, { headers, observe: 'response' })
|
|
8219
|
-
.pipe(map((response) => {
|
|
8220
|
-
this.updateClientContextStorage(response.headers);
|
|
8221
|
-
return response.body;
|
|
8222
|
-
}), catchError(error => {
|
|
8223
|
-
this.errorService.setError(error);
|
|
8224
|
-
return throwError(error);
|
|
8225
|
-
}));
|
|
8226
|
-
}
|
|
8227
|
-
createCase(ctid, eventData) {
|
|
8228
|
-
let ignoreWarning = 'false';
|
|
8229
|
-
if (eventData.ignore_warning) {
|
|
8230
|
-
ignoreWarning = 'true';
|
|
8231
|
-
}
|
|
8232
|
-
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
8233
|
-
let headers = new HttpHeaders()
|
|
8234
|
-
.set('experimental', 'true')
|
|
8235
|
-
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
8236
|
-
.set('Content-Type', 'application/json');
|
|
8237
|
-
headers = this.addClientContextHeader(headers);
|
|
8238
|
-
return this.http
|
|
8239
|
-
.post(url, eventData, { headers, observe: 'response' })
|
|
8240
|
-
.pipe(map((response) => {
|
|
8241
|
-
this.updateClientContextStorage(response.headers);
|
|
8242
|
-
return response.body;
|
|
8243
|
-
}), catchError(error => {
|
|
8244
|
-
this.errorService.setError(error);
|
|
8245
|
-
return throwError(error);
|
|
8246
|
-
}));
|
|
8247
|
-
}
|
|
8248
|
-
getPrintDocuments(caseId) {
|
|
8249
|
-
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
|
|
8250
|
-
let headers = new HttpHeaders()
|
|
8251
|
-
.set('experimental', 'true')
|
|
8252
|
-
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
8253
|
-
.set('Content-Type', 'application/json');
|
|
8254
|
-
headers = this.addClientContextHeader(headers);
|
|
8255
|
-
return this.http
|
|
8256
|
-
.get(url, { headers, observe: 'response' })
|
|
8257
|
-
.pipe(map((response) => {
|
|
8258
|
-
this.updateClientContextStorage(response.headers);
|
|
8259
|
-
return response.body.documentResources;
|
|
8260
|
-
}), catchError(error => {
|
|
8261
|
-
this.errorService.setError(error);
|
|
8262
|
-
return throwError(error);
|
|
8263
|
-
}));
|
|
8264
|
-
}
|
|
8265
|
-
buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
8266
|
-
let url = `${this.appConfig.getCaseDataUrl()}/internal`;
|
|
8267
|
-
if (Draft.isDraft(caseId)) {
|
|
8268
|
-
url += `/drafts/${caseId}`
|
|
8269
|
-
+ `/event-trigger`
|
|
8270
|
-
+ `?ignore-warning=${ignoreWarning}`;
|
|
8271
|
-
}
|
|
8272
|
-
else if (caseTypeId === undefined || caseTypeId === null) {
|
|
8273
|
-
url += `/cases/${caseId}`
|
|
8274
|
-
+ `/event-triggers/${eventTriggerId}`
|
|
8275
|
-
+ `?ignore-warning=${ignoreWarning}`;
|
|
8276
|
-
}
|
|
8277
|
-
else {
|
|
8278
|
-
url += `/case-types/${caseTypeId}`
|
|
8279
|
-
+ `/event-triggers/${eventTriggerId}`
|
|
8280
|
-
+ `?ignore-warning=${ignoreWarning}`;
|
|
8281
|
-
}
|
|
8282
|
-
return url;
|
|
8283
|
-
}
|
|
8284
|
-
initialiseEventTrigger(eventTrigger) {
|
|
8285
|
-
if (!eventTrigger.wizard_pages) {
|
|
8286
|
-
eventTrigger.wizard_pages = [];
|
|
8287
|
-
}
|
|
8288
|
-
eventTrigger.wizard_pages.forEach((wizardPage) => {
|
|
8289
|
-
wizardPage.parsedShowCondition = ShowCondition.getInstance(wizardPage.show_condition);
|
|
8290
|
-
wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
|
|
8291
|
-
});
|
|
8292
|
-
}
|
|
8293
|
-
getCourtOrHearingCentreName(locationId) {
|
|
8294
|
-
return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
|
|
8295
|
-
}
|
|
8296
|
-
createChallengedAccessRequest(caseId, request) {
|
|
8297
|
-
// Assignment API endpoint
|
|
8298
|
-
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
8299
|
-
const camUtils = new CaseAccessUtils();
|
|
8300
|
-
let userInfo;
|
|
8301
|
-
if (userInfoStr) {
|
|
8302
|
-
userInfo = JSON.parse(userInfoStr);
|
|
8303
|
-
}
|
|
8304
|
-
const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
8305
|
-
const roleName = camUtils.getAMRoleName('challenged', roleCategory);
|
|
8306
|
-
const beginTime = new Date();
|
|
8307
|
-
const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
|
|
8308
|
-
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
8309
|
-
const isNew = true;
|
|
8310
|
-
const payload = camUtils.getAMPayload(id, id, roleName, roleCategory, 'CHALLENGED', caseId, request, beginTime, endTime, isNew);
|
|
8311
|
-
return this.http.post(`/api/challenged-access-request`, payload);
|
|
8312
|
-
}
|
|
8313
|
-
createSpecificAccessRequest(caseId, sar) {
|
|
8314
|
-
// Assignment API endpoint
|
|
8315
|
-
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
8316
|
-
const camUtils = new CaseAccessUtils();
|
|
8317
|
-
let userInfo;
|
|
8318
|
-
if (userInfoStr) {
|
|
8319
|
-
userInfo = JSON.parse(userInfoStr);
|
|
8320
|
-
}
|
|
8321
|
-
const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
8322
|
-
const roleName = camUtils.getAMRoleName('specific', roleCategory);
|
|
8323
|
-
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
8324
|
-
const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
|
|
8325
|
-
payload.roleRequest = {
|
|
8326
|
-
...payload.roleRequest,
|
|
8327
|
-
process: 'specific-access',
|
|
8328
|
-
replaceExisting: true,
|
|
8329
|
-
assignerId: payload.requestedRoles[0].actorId,
|
|
8330
|
-
reference: `${caseId}/${roleName}/${payload.requestedRoles[0].actorId}`
|
|
8331
|
-
};
|
|
8332
|
-
payload.requestedRoles[0] = {
|
|
8333
|
-
...payload.requestedRoles[0],
|
|
8334
|
-
roleName: 'specific-access-requested',
|
|
8335
|
-
roleCategory,
|
|
8336
|
-
classification: 'PRIVATE',
|
|
8337
|
-
endTime: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
8338
|
-
beginTime: null,
|
|
8339
|
-
grantType: 'BASIC',
|
|
8340
|
-
readOnly: true
|
|
8341
|
-
};
|
|
8342
|
-
payload.requestedRoles[0].attributes = {
|
|
8343
|
-
...payload.requestedRoles[0].attributes,
|
|
8344
|
-
requestedRole: roleName,
|
|
8345
|
-
specificAccessReason: sar.specificReason
|
|
8346
|
-
};
|
|
8347
|
-
payload.requestedRoles[0].notes[0] = {
|
|
8348
|
-
...payload.requestedRoles[0].notes[0],
|
|
8349
|
-
userId: payload.requestedRoles[0].actorId
|
|
8350
|
-
};
|
|
8351
|
-
return this.http.post(`/api/specific-access-request`, payload);
|
|
8352
|
-
}
|
|
8353
|
-
getLinkedCases(caseId) {
|
|
8354
|
-
const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
|
|
8355
|
-
return this.http
|
|
8356
|
-
.get(url)
|
|
8357
|
-
.pipe(catchError(error => throwError(error)));
|
|
8358
|
-
}
|
|
8359
|
-
addClientContextHeader(headers) {
|
|
8360
|
-
const clientContextDetails = this.sessionStorageService.getItem('clientContext');
|
|
8361
|
-
if (clientContextDetails) {
|
|
8362
|
-
const caseEditUtils = new CaseEditUtils();
|
|
8363
|
-
// below changes non-ASCII characters
|
|
8364
|
-
const editedClientContext = caseEditUtils.convertNonASCIICharacters(clientContextDetails);
|
|
8365
|
-
const clientContext = window.btoa(editedClientContext);
|
|
8366
|
-
if (clientContext) {
|
|
8367
|
-
headers = headers.set('Client-Context', clientContext);
|
|
8368
|
-
}
|
|
8369
|
-
}
|
|
8370
|
-
return headers;
|
|
8371
|
-
}
|
|
8372
|
-
updateClientContextStorage(headers) {
|
|
8373
|
-
if (headers && headers.get('Client-Context')) {
|
|
8374
|
-
const caseEditUtils = new CaseEditUtils();
|
|
8375
|
-
const clientContextString = window.atob(headers.get('Client-Context'));
|
|
8376
|
-
// below reverts non-ASCII characters
|
|
8377
|
-
const editedClientContextString = caseEditUtils.convertHTMLEntities(clientContextString);
|
|
8378
|
-
this.sessionStorageService.setItem('clientContext', editedClientContextString);
|
|
8379
|
-
}
|
|
8380
|
-
}
|
|
8381
|
-
static ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(RetryUtil)); };
|
|
8382
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
8383
|
-
}
|
|
8384
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
|
|
8385
|
-
type: Injectable
|
|
8386
|
-
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }, { type: RetryUtil }], null); })();
|
|
8387
|
-
|
|
8388
|
-
class EventTriggerService {
|
|
8389
|
-
eventTriggerSource = new Subject();
|
|
8390
|
-
announceEventTrigger(eventTrigger) {
|
|
8391
|
-
this.eventTriggerSource.next(eventTrigger);
|
|
8392
|
-
}
|
|
8393
|
-
static ɵfac = function EventTriggerService_Factory(t) { return new (t || EventTriggerService)(); };
|
|
8394
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTriggerService, factory: EventTriggerService.ɵfac, providedIn: 'root' });
|
|
8395
|
-
}
|
|
8396
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerService, [{
|
|
8397
|
-
type: Injectable,
|
|
8398
|
-
args: [{
|
|
8399
|
-
providedIn: 'root',
|
|
8400
|
-
}]
|
|
8401
|
-
}], null, null); })();
|
|
8402
|
-
|
|
8403
|
-
function CaseCreateComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
8404
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
8405
|
-
i0.ɵɵelementStart(0, "div")(1, "ccd-case-edit", 1);
|
|
8406
|
-
i0.ɵɵlistener("cancelled", function CaseCreateComponent_div_0_Template_ccd_case_edit_cancelled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitCancelled($event)); })("submitted", function CaseCreateComponent_div_0_Template_ccd_case_edit_submitted_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitSubmitted($event)); });
|
|
8407
|
-
i0.ɵɵelementEnd()();
|
|
8408
|
-
} if (rf & 2) {
|
|
8409
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
8410
|
-
i0.ɵɵadvance();
|
|
8411
|
-
i0.ɵɵproperty("submit", ctx_r1.submit())("validate", ctx_r1.validate())("saveDraft", ctx_r1.saveDraft())("eventTrigger", ctx_r1.eventTrigger);
|
|
8412
|
-
} }
|
|
8413
|
-
class CaseCreateComponent {
|
|
8414
|
-
casesService;
|
|
8415
|
-
alertService;
|
|
8416
|
-
draftService;
|
|
8417
|
-
eventTriggerService;
|
|
8418
|
-
jurisdiction;
|
|
8419
|
-
caseType;
|
|
8420
|
-
event;
|
|
8421
|
-
cancelled = new EventEmitter();
|
|
8422
|
-
submitted = new EventEmitter();
|
|
8423
|
-
eventTrigger;
|
|
8424
|
-
constructor(casesService, alertService, draftService, eventTriggerService) {
|
|
8425
|
-
this.casesService = casesService;
|
|
8426
|
-
this.alertService = alertService;
|
|
8427
|
-
this.draftService = draftService;
|
|
8428
|
-
this.eventTriggerService = eventTriggerService;
|
|
8429
|
-
}
|
|
8430
|
-
ngOnInit() {
|
|
8431
|
-
this.casesService.getEventTrigger(this.caseType, this.event).toPromise()
|
|
8432
|
-
.then(eventTrigger => {
|
|
8433
|
-
this.eventTrigger = eventTrigger;
|
|
8434
|
-
this.eventTriggerService.announceEventTrigger(eventTrigger);
|
|
8435
|
-
})
|
|
8436
|
-
.catch((error) => {
|
|
8437
|
-
this.alertService.error({ phrase: error.message });
|
|
8438
|
-
return throwError(error);
|
|
8439
|
-
});
|
|
8440
|
-
}
|
|
8441
|
-
submit() {
|
|
8442
|
-
return (sanitizedEditForm) => {
|
|
8443
|
-
sanitizedEditForm.draft_id = this.eventTrigger.case_id;
|
|
8444
|
-
return this.casesService.createCase(this.caseType, sanitizedEditForm);
|
|
8445
|
-
};
|
|
8446
|
-
}
|
|
8447
|
-
validate() {
|
|
8448
|
-
return (sanitizedEditForm, pageId) => this.casesService
|
|
8449
|
-
.validateCase(this.caseType, sanitizedEditForm, pageId);
|
|
8450
|
-
}
|
|
8451
|
-
saveDraft() {
|
|
8452
|
-
if (this.eventTrigger.can_save_draft) {
|
|
8453
|
-
return (caseEventData) => this.draftService.createOrUpdateDraft(this.caseType, this.eventTrigger.case_id, caseEventData);
|
|
8454
|
-
}
|
|
8455
|
-
}
|
|
8456
|
-
emitCancelled(event) {
|
|
8457
|
-
this.cancelled.emit(event);
|
|
8458
|
-
}
|
|
8459
|
-
emitSubmitted(event) {
|
|
8460
|
-
this.submitted.emit(event);
|
|
8461
|
-
}
|
|
8462
|
-
isDataLoaded() {
|
|
8463
|
-
return this.eventTrigger ? true : false;
|
|
8464
|
-
}
|
|
8465
|
-
static ɵfac = function CaseCreateComponent_Factory(t) { return new (t || CaseCreateComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(EventTriggerService)); };
|
|
8466
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseCreateComponent, selectors: [["ccd-case-create"]], inputs: { jurisdiction: "jurisdiction", caseType: "caseType", event: "event" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "cancelled", "submitted", "submit", "validate", "saveDraft", "eventTrigger"]], template: function CaseCreateComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8467
|
-
i0.ɵɵtemplate(0, CaseCreateComponent_div_0_Template, 2, 4, "div", 0);
|
|
8468
|
-
} if (rf & 2) {
|
|
8469
|
-
i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
|
|
8470
|
-
} }, encapsulation: 2 });
|
|
8471
|
-
}
|
|
8472
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseCreateComponent, [{
|
|
8473
|
-
type: Component,
|
|
8474
|
-
args: [{ selector: 'ccd-case-create', template: "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-edit [submit]=\"submit()\"\n [validate]=\"validate()\"\n [saveDraft]=\"saveDraft()\"\n [eventTrigger]=\"eventTrigger\"\n (cancelled)=\"emitCancelled($event)\"\n (submitted)=\"emitSubmitted($event)\"></ccd-case-edit>\n</div>" }]
|
|
8475
|
-
}], () => [{ type: CasesService }, { type: AlertService }, { type: DraftService }, { type: EventTriggerService }], { jurisdiction: [{
|
|
8476
|
-
type: Input
|
|
8477
|
-
}], caseType: [{
|
|
8478
|
-
type: Input
|
|
8479
|
-
}], event: [{
|
|
8480
|
-
type: Input
|
|
8481
|
-
}], cancelled: [{
|
|
8482
|
-
type: Output
|
|
8483
|
-
}], submitted: [{
|
|
8484
|
-
type: Output
|
|
8485
|
-
}] }); })();
|
|
8486
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseCreateComponent, { className: "CaseCreateComponent", filePath: "lib/shared/components/case-editor/case-create/case-create.component.ts", lineNumber: 17 }); })();
|
|
8487
|
-
|
|
8488
8056
|
class Confirmation {
|
|
8489
8057
|
caseId;
|
|
8490
8058
|
status;
|
|
@@ -8622,6 +8190,21 @@ class ConvertHrefToRouterService {
|
|
|
8622
8190
|
type: Injectable
|
|
8623
8191
|
}], () => [{ type: i1$1.Router }], null); })();
|
|
8624
8192
|
|
|
8193
|
+
class EventTriggerService {
|
|
8194
|
+
eventTriggerSource = new Subject();
|
|
8195
|
+
announceEventTrigger(eventTrigger) {
|
|
8196
|
+
this.eventTriggerSource.next(eventTrigger);
|
|
8197
|
+
}
|
|
8198
|
+
static ɵfac = function EventTriggerService_Factory(t) { return new (t || EventTriggerService)(); };
|
|
8199
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTriggerService, factory: EventTriggerService.ɵfac, providedIn: 'root' });
|
|
8200
|
+
}
|
|
8201
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerService, [{
|
|
8202
|
+
type: Injectable,
|
|
8203
|
+
args: [{
|
|
8204
|
+
providedIn: 'root',
|
|
8205
|
+
}]
|
|
8206
|
+
}], null, null); })();
|
|
8207
|
+
|
|
8625
8208
|
class WizardFactoryService {
|
|
8626
8209
|
create(eventTrigger) {
|
|
8627
8210
|
return new Wizard(eventTrigger.wizard_pages);
|
|
@@ -8904,7 +8487,7 @@ class EventCompletionStateMachineService {
|
|
|
8904
8487
|
entryActionForStateCompleteEventAndTask(state, context) {
|
|
8905
8488
|
// Trigger final state to complete processing of state machine
|
|
8906
8489
|
state.trigger(EventCompletionStates.Final);
|
|
8907
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8490
|
+
const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
8908
8491
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8909
8492
|
if (userTask?.task_data) {
|
|
8910
8493
|
context.sessionStorageService.setItem('assignNeeded', 'false');
|
|
@@ -8927,7 +8510,7 @@ class EventCompletionStateMachineService {
|
|
|
8927
8510
|
entryActionForStateTaskUnassigned(state, context) {
|
|
8928
8511
|
// Trigger final state to complete processing of state machine
|
|
8929
8512
|
state.trigger(EventCompletionStates.Final);
|
|
8930
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8513
|
+
const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
8931
8514
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8932
8515
|
if (userTask?.task_data) {
|
|
8933
8516
|
context.sessionStorageService.setItem('assignNeeded', 'true');
|
|
@@ -8967,7 +8550,7 @@ class EventCompletionStateMachineService {
|
|
|
8967
8550
|
this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
|
|
8968
8551
|
}
|
|
8969
8552
|
taskPresentInSessionStorage(context) {
|
|
8970
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8553
|
+
const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
8971
8554
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8972
8555
|
return !!userTask.task_data;
|
|
8973
8556
|
}
|
|
@@ -9334,8 +8917,11 @@ class CaseEditComponent {
|
|
|
9334
8917
|
workAllocationService;
|
|
9335
8918
|
alertService;
|
|
9336
8919
|
abstractConfig;
|
|
8920
|
+
cookieService;
|
|
9337
8921
|
static ORIGIN_QUERY_PARAM = 'origin';
|
|
9338
8922
|
static ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
|
|
8923
|
+
static CLIENT_CONTEXT = 'clientContext';
|
|
8924
|
+
static TASK_EVENT_COMPLETION_INFO = 'taskEventCompletionInfo';
|
|
9339
8925
|
eventTrigger;
|
|
9340
8926
|
submit;
|
|
9341
8927
|
validate;
|
|
@@ -9359,7 +8945,7 @@ class CaseEditComponent {
|
|
|
9359
8945
|
error;
|
|
9360
8946
|
callbackErrorsSubject = new Subject();
|
|
9361
8947
|
validPageList = [];
|
|
9362
|
-
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig) {
|
|
8948
|
+
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig, cookieService) {
|
|
9363
8949
|
this.fb = fb;
|
|
9364
8950
|
this.caseNotifier = caseNotifier;
|
|
9365
8951
|
this.router = router;
|
|
@@ -9377,6 +8963,7 @@ class CaseEditComponent {
|
|
|
9377
8963
|
this.workAllocationService = workAllocationService;
|
|
9378
8964
|
this.alertService = alertService;
|
|
9379
8965
|
this.abstractConfig = abstractConfig;
|
|
8966
|
+
this.cookieService = cookieService;
|
|
9380
8967
|
}
|
|
9381
8968
|
ngOnInit() {
|
|
9382
8969
|
this.wizard = this.wizardFactory.create(this.eventTrigger);
|
|
@@ -9483,12 +9070,12 @@ class CaseEditComponent {
|
|
|
9483
9070
|
this.isSubmitting = true;
|
|
9484
9071
|
// We have to run the event completion checks if task in session storage
|
|
9485
9072
|
// and if the task is in session storage, then is it associated to the case
|
|
9486
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
9073
|
+
const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9487
9074
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9488
9075
|
const taskInSessionStorage = userTask ? userTask.task_data : null;
|
|
9489
9076
|
let taskEventCompletionInfo;
|
|
9490
9077
|
let userInfo;
|
|
9491
|
-
const taskEventCompletionStr = this.sessionStorageService.getItem(
|
|
9078
|
+
const taskEventCompletionStr = this.sessionStorageService.getItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
9492
9079
|
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
9493
9080
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded');
|
|
9494
9081
|
if (taskEventCompletionStr) {
|
|
@@ -9518,7 +9105,7 @@ class CaseEditComponent {
|
|
|
9518
9105
|
taskId: taskInSessionStorage.id,
|
|
9519
9106
|
createdTimestamp: Date.now()
|
|
9520
9107
|
};
|
|
9521
|
-
this.sessionStorageService.setItem(
|
|
9108
|
+
this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
|
|
9522
9109
|
this.isEventCompletionChecksRequired = true;
|
|
9523
9110
|
}
|
|
9524
9111
|
else {
|
|
@@ -9690,8 +9277,9 @@ class CaseEditComponent {
|
|
|
9690
9277
|
}), finalize(() => {
|
|
9691
9278
|
this.loadingService.unregister(loadingSpinnerToken);
|
|
9692
9279
|
// on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
|
|
9693
|
-
|
|
9694
|
-
this.sessionStorageService.removeItem(
|
|
9280
|
+
// Note - Not removeTaskFromClientContext because could interfere with other logic
|
|
9281
|
+
this.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9282
|
+
this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
9695
9283
|
this.isSubmitting = false;
|
|
9696
9284
|
}))
|
|
9697
9285
|
.subscribe(() => {
|
|
@@ -9719,7 +9307,7 @@ class CaseEditComponent {
|
|
|
9719
9307
|
});
|
|
9720
9308
|
}
|
|
9721
9309
|
postCompleteTaskIfRequired() {
|
|
9722
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
9310
|
+
const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9723
9311
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9724
9312
|
const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
|
|
9725
9313
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
|
|
@@ -9731,111 +9319,572 @@ class CaseEditComponent {
|
|
|
9731
9319
|
this.abstractConfig.logMessage(`postCompleteTaskIfRequired: taskId ${task.id} and event name ${this.eventTrigger.name}`);
|
|
9732
9320
|
return this.workAllocationService.completeTask(task.id, this.eventTrigger.name);
|
|
9733
9321
|
}
|
|
9734
|
-
return of(true);
|
|
9322
|
+
return of(true);
|
|
9323
|
+
}
|
|
9324
|
+
finishEventCompletionLogic(eventResponse) {
|
|
9325
|
+
this.caseNotifier.cachedCaseView = null;
|
|
9326
|
+
this.sessionStorageService.removeItem('eventUrl');
|
|
9327
|
+
const confirmation = this.buildConfirmation(eventResponse);
|
|
9328
|
+
if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
|
|
9329
|
+
this.confirm(confirmation);
|
|
9330
|
+
}
|
|
9331
|
+
else {
|
|
9332
|
+
this.emitSubmitted(eventResponse);
|
|
9333
|
+
}
|
|
9334
|
+
}
|
|
9335
|
+
buildConfirmation(response) {
|
|
9336
|
+
if (response['after_submit_callback_response']) {
|
|
9337
|
+
return new Confirmation(response['id'], response['callback_response_status'], response['after_submit_callback_response']['confirmation_header'], response['after_submit_callback_response']['confirmation_body']);
|
|
9338
|
+
}
|
|
9339
|
+
else {
|
|
9340
|
+
return null;
|
|
9341
|
+
}
|
|
9342
|
+
}
|
|
9343
|
+
// checks whether current clientContext relevant for the event
|
|
9344
|
+
taskExistsForThisEvent(taskInSessionStorage, taskEventCompletionInfo, eventDetails) {
|
|
9345
|
+
if (!taskInSessionStorage || taskInSessionStorage.case_id !== eventDetails.caseId) {
|
|
9346
|
+
return false;
|
|
9347
|
+
}
|
|
9348
|
+
if (!taskEventCompletionInfo) {
|
|
9349
|
+
// if no task event present then there is no task to complete from previous event present
|
|
9350
|
+
// EXUI-2668 - Add additional logic to confirm the task is relevant to the event
|
|
9351
|
+
if (this.taskIsForEvent(taskInSessionStorage, eventDetails)) {
|
|
9352
|
+
return true;
|
|
9353
|
+
}
|
|
9354
|
+
else {
|
|
9355
|
+
// client context still needed for language
|
|
9356
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
9357
|
+
return false;
|
|
9358
|
+
}
|
|
9359
|
+
}
|
|
9360
|
+
else {
|
|
9361
|
+
if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
|
|
9362
|
+
return true;
|
|
9363
|
+
}
|
|
9364
|
+
else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
|
|
9365
|
+
this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
|
|
9366
|
+
|| this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
|
|
9367
|
+
// if the session storage not related to event, ignore it and remove
|
|
9368
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
9369
|
+
this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
9370
|
+
return false;
|
|
9371
|
+
}
|
|
9372
|
+
if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
|
|
9373
|
+
// if the user does not match task assignee, assign is now needed
|
|
9374
|
+
// data cannot be deleted and ignored as it matches understanding
|
|
9375
|
+
this.sessionStorageService.setItem('assignNeeded', 'true');
|
|
9376
|
+
}
|
|
9377
|
+
return true;
|
|
9378
|
+
}
|
|
9379
|
+
}
|
|
9380
|
+
onEventCanBeCompleted({ eventTrigger, eventCanBeCompleted, caseDetails, form, submit }) {
|
|
9381
|
+
if (eventCanBeCompleted) {
|
|
9382
|
+
// Submit
|
|
9383
|
+
const caseEventData = this.generateCaseEventData({ eventTrigger, form });
|
|
9384
|
+
this.caseSubmit({ form, caseEventData, submit });
|
|
9385
|
+
}
|
|
9386
|
+
else {
|
|
9387
|
+
// Navigate to tasks tab on case details page
|
|
9388
|
+
this.router.navigate([`/cases/case-details/${this.getCaseId(caseDetails)}/tasks`], { relativeTo: this.route });
|
|
9389
|
+
}
|
|
9390
|
+
}
|
|
9391
|
+
getStatus(response) {
|
|
9392
|
+
return this.hasCallbackFailed(response) ? response['callback_response_status'] : response['delete_draft_response_status'];
|
|
9393
|
+
}
|
|
9394
|
+
hasCallbackFailed(response) {
|
|
9395
|
+
return response['callback_response_status'] !== 'CALLBACK_COMPLETED';
|
|
9396
|
+
}
|
|
9397
|
+
eventMoreThanDayAgo(timestamp) {
|
|
9398
|
+
if ((new Date().getTime() - timestamp) > (24 * 60 * 60 * 1000)) {
|
|
9399
|
+
return true;
|
|
9400
|
+
}
|
|
9401
|
+
return false;
|
|
9402
|
+
}
|
|
9403
|
+
eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails) {
|
|
9404
|
+
if (taskEventCompletionInfo.eventId !== eventDetails.eventId
|
|
9405
|
+
|| taskEventCompletionInfo.caseId !== eventDetails.caseId
|
|
9406
|
+
|| taskEventCompletionInfo.userId !== eventDetails.userId) {
|
|
9407
|
+
return true;
|
|
9408
|
+
}
|
|
9409
|
+
return false;
|
|
9410
|
+
}
|
|
9411
|
+
taskIsForEvent(task, eventDetails) {
|
|
9412
|
+
// EXUI-2668 - Ensure description for task includes event ID
|
|
9413
|
+
// Note - This is a failsafe for an edge case that may never occur again
|
|
9414
|
+
// Description may not include eventId in some cases which may mean task not completed (however this will be easy to check)
|
|
9415
|
+
// In instances of the above taskEventCompletionInfo will be created to block this check from occurring
|
|
9416
|
+
this.abstractConfig.logMessage(`checking taskIsForEvent: task ID ${task.id}, task description ${task.description}, event name ${eventDetails.eventId}`);
|
|
9417
|
+
return task.case_id === eventDetails.caseId && (task.description?.includes(eventDetails.eventId));
|
|
9418
|
+
}
|
|
9419
|
+
static ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ReadCookieService)); };
|
|
9420
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditComponent, selectors: [["ccd-case-edit"]], inputs: { eventTrigger: "eventTrigger", submit: "submit", validate: "validate", saveDraft: "saveDraft", caseDetails: "caseDetails" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9421
|
+
i0.ɵɵelement(0, "router-outlet");
|
|
9422
|
+
} }, dependencies: [i1$1.RouterOutlet], styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
|
|
9423
|
+
}
|
|
9424
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
|
|
9425
|
+
type: Component,
|
|
9426
|
+
args: [{ selector: 'ccd-case-edit', providers: [GreyBarService], template: "<router-outlet></router-outlet>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}\n"] }]
|
|
9427
|
+
}], () => [{ type: i4.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: WorkAllocationService }, { type: AlertService }, { type: AbstractAppConfig }, { type: ReadCookieService }], { eventTrigger: [{
|
|
9428
|
+
type: Input
|
|
9429
|
+
}], submit: [{
|
|
9430
|
+
type: Input
|
|
9431
|
+
}], validate: [{
|
|
9432
|
+
type: Input
|
|
9433
|
+
}], saveDraft: [{
|
|
9434
|
+
type: Input
|
|
9435
|
+
}], caseDetails: [{
|
|
9436
|
+
type: Input
|
|
9437
|
+
}], cancelled: [{
|
|
9438
|
+
type: Output
|
|
9439
|
+
}], submitted: [{
|
|
9440
|
+
type: Output
|
|
9441
|
+
}] }); })();
|
|
9442
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 37 }); })();
|
|
9443
|
+
|
|
9444
|
+
function convertNonASCIICharacter(character) {
|
|
9445
|
+
if (character === '£') {
|
|
9446
|
+
// pound sign will be frequently used and works for btoa despite being non-ASCII
|
|
9447
|
+
// note: this could be done for other characters provided they work for btoa()
|
|
9448
|
+
return character;
|
|
9449
|
+
}
|
|
9450
|
+
// Note: Will convert to HTML entity
|
|
9451
|
+
return CaseEditUtils.PREFIX + character.charCodeAt(0) + CaseEditUtils.SUFFIX;
|
|
9452
|
+
}
|
|
9453
|
+
class CaseEditUtils {
|
|
9454
|
+
static PREFIX = '&#';
|
|
9455
|
+
static SUFFIX = ';';
|
|
9456
|
+
convertNonASCIICharacters(rawString) {
|
|
9457
|
+
return rawString ? rawString.replace(/[^\x20-\x7E]/g, function (c) {
|
|
9458
|
+
return convertNonASCIICharacter(c);
|
|
9459
|
+
}) : '';
|
|
9460
|
+
}
|
|
9461
|
+
convertHTMLEntities(editedString) {
|
|
9462
|
+
const revertedCharacterList = editedString.split(CaseEditUtils.PREFIX);
|
|
9463
|
+
let rawString = revertedCharacterList[0];
|
|
9464
|
+
for (let index = 1; index < revertedCharacterList.length; index++) {
|
|
9465
|
+
const currentSection = revertedCharacterList[index];
|
|
9466
|
+
if (!currentSection.includes(CaseEditUtils.SUFFIX)) {
|
|
9467
|
+
return rawString.concat(currentSection);
|
|
9468
|
+
}
|
|
9469
|
+
else {
|
|
9470
|
+
const suffixSplitList = currentSection.split(CaseEditUtils.SUFFIX);
|
|
9471
|
+
const characterCode = Number(suffixSplitList[0]);
|
|
9472
|
+
rawString = rawString.concat(String.fromCharCode(characterCode), suffixSplitList[1]);
|
|
9473
|
+
}
|
|
9474
|
+
}
|
|
9475
|
+
return rawString;
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9478
|
+
function removeTaskFromClientContext(sessionStorageService) {
|
|
9479
|
+
if (!sessionStorageService) {
|
|
9480
|
+
return;
|
|
9481
|
+
}
|
|
9482
|
+
const clientContextString = sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9483
|
+
const clientContext = clientContextString ? JSON.parse(clientContextString) : null;
|
|
9484
|
+
if (clientContext?.client_context?.user_task) {
|
|
9485
|
+
delete clientContext.client_context.user_task;
|
|
9486
|
+
sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
|
|
9487
|
+
}
|
|
9488
|
+
}
|
|
9489
|
+
|
|
9490
|
+
class CasesService {
|
|
9491
|
+
http;
|
|
9492
|
+
appConfig;
|
|
9493
|
+
orderService;
|
|
9494
|
+
errorService;
|
|
9495
|
+
wizardPageFieldToCaseFieldMapper;
|
|
9496
|
+
loadingService;
|
|
9497
|
+
sessionStorageService;
|
|
9498
|
+
retryUtil;
|
|
9499
|
+
// Internal (UI) API
|
|
9500
|
+
static V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
|
|
9501
|
+
static V2_MEDIATYPE_START_CASE_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8';
|
|
9502
|
+
static V2_MEDIATYPE_START_EVENT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8';
|
|
9503
|
+
static V2_MEDIATYPE_START_DRAFT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-draft-trigger.v2+json;charset=UTF-8';
|
|
9504
|
+
// External (Data Store) API
|
|
9505
|
+
static V2_MEDIATYPE_CASE_DOCUMENTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-documents.v2+json;charset=UTF-8';
|
|
9506
|
+
static V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8';
|
|
9507
|
+
static V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
9508
|
+
static V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
9509
|
+
static PUI_CASE_MANAGER = 'pui-case-manager';
|
|
9510
|
+
get = this.getCaseView;
|
|
9511
|
+
static updateChallengedAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
|
|
9512
|
+
return httpClient.post(`/api/challenged-access-request/update-attributes`, {
|
|
9513
|
+
caseId,
|
|
9514
|
+
attributesToUpdate
|
|
9515
|
+
});
|
|
9516
|
+
}
|
|
9517
|
+
static updateSpecificAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
|
|
9518
|
+
return httpClient.post(`/api/specific-access-request/update-attributes`, {
|
|
9519
|
+
caseId,
|
|
9520
|
+
attributesToUpdate
|
|
9521
|
+
});
|
|
9522
|
+
}
|
|
9523
|
+
constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService, retryUtil) {
|
|
9524
|
+
this.http = http;
|
|
9525
|
+
this.appConfig = appConfig;
|
|
9526
|
+
this.orderService = orderService;
|
|
9527
|
+
this.errorService = errorService;
|
|
9528
|
+
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
9529
|
+
this.loadingService = loadingService;
|
|
9530
|
+
this.sessionStorageService = sessionStorageService;
|
|
9531
|
+
this.retryUtil = retryUtil;
|
|
9532
|
+
}
|
|
9533
|
+
getCaseView(jurisdictionId, caseTypeId, caseId) {
|
|
9534
|
+
const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
|
|
9535
|
+
const loadingToken = this.loadingService.register();
|
|
9536
|
+
return this.http
|
|
9537
|
+
.get(url)
|
|
9538
|
+
.pipe(catchError(error => {
|
|
9539
|
+
this.errorService.setError(error);
|
|
9540
|
+
return throwError(error);
|
|
9541
|
+
}), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
9542
|
+
}
|
|
9543
|
+
getCaseViewV2(caseId) {
|
|
9544
|
+
const url = `${this.appConfig.getCaseDataUrl()}/internal/cases/${caseId}`;
|
|
9545
|
+
const headers = new HttpHeaders()
|
|
9546
|
+
.set('experimental', 'true')
|
|
9547
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
|
|
9548
|
+
.set('Content-Type', 'application/json');
|
|
9549
|
+
const loadingToken = this.loadingService.register();
|
|
9550
|
+
let http$ = this.http.get(url, { headers, observe: 'body' });
|
|
9551
|
+
const artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
|
|
9552
|
+
const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
|
|
9553
|
+
console.log(`Timeout periods: ${timeoutPeriods} seconds.`);
|
|
9554
|
+
if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
|
|
9555
|
+
http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
|
|
9556
|
+
}
|
|
9557
|
+
else {
|
|
9558
|
+
console.warn('Skipping to pipe a retry mechanism!');
|
|
9559
|
+
}
|
|
9560
|
+
http$ = this.pipeErrorProcessor(http$);
|
|
9561
|
+
http$ = http$.pipe(finalize(() => this.finalizeGetCaseViewWith(caseId, loadingToken)));
|
|
9562
|
+
return http$;
|
|
9563
|
+
}
|
|
9564
|
+
pipeErrorProcessor(in$) {
|
|
9565
|
+
const out$ = in$.pipe(catchError(error => {
|
|
9566
|
+
console.error(`Error while getting case view with getCaseViewV2! Error type: '${typeof error}, Error name: '${error?.name}'`);
|
|
9567
|
+
console.error(error);
|
|
9568
|
+
this.errorService.setError(error);
|
|
9569
|
+
return throwError(error);
|
|
9570
|
+
}));
|
|
9571
|
+
return out$;
|
|
9572
|
+
}
|
|
9573
|
+
finalizeGetCaseViewWith(caseId, loadingToken) {
|
|
9574
|
+
this.loadingService.unregister(loadingToken);
|
|
9575
|
+
}
|
|
9576
|
+
syncWait(seconds) {
|
|
9577
|
+
const end = Date.now() + seconds * 1000;
|
|
9578
|
+
while (Date.now() < end)
|
|
9579
|
+
continue;
|
|
9580
|
+
}
|
|
9581
|
+
getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
9582
|
+
ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
|
|
9583
|
+
const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
|
|
9584
|
+
let headers = new HttpHeaders();
|
|
9585
|
+
headers = headers.set('experimental', 'true');
|
|
9586
|
+
headers = headers.set('Content-Type', 'application/json');
|
|
9587
|
+
headers = this.addClientContextHeader(headers);
|
|
9588
|
+
if (Draft.isDraft(caseId)) {
|
|
9589
|
+
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
|
|
9590
|
+
}
|
|
9591
|
+
else if (caseId !== undefined && caseId !== null) {
|
|
9592
|
+
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_EVENT_TRIGGER);
|
|
9593
|
+
}
|
|
9594
|
+
else {
|
|
9595
|
+
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
|
|
9596
|
+
}
|
|
9597
|
+
return this.http
|
|
9598
|
+
.get(url, { headers, observe: 'response' })
|
|
9599
|
+
.pipe(map((response) => {
|
|
9600
|
+
this.updateClientContextStorage(response.headers);
|
|
9601
|
+
return FieldsUtils.handleNestedDynamicLists(response.body);
|
|
9602
|
+
}), catchError(error => {
|
|
9603
|
+
this.errorService.setError(error);
|
|
9604
|
+
return throwError(error);
|
|
9605
|
+
}), map((p) => plainToClass(CaseEventTrigger, p)), tap(eventTrigger => this.initialiseEventTrigger(eventTrigger)));
|
|
9606
|
+
}
|
|
9607
|
+
createEvent(caseDetails, eventData) {
|
|
9608
|
+
const caseId = caseDetails.case_id;
|
|
9609
|
+
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
|
|
9610
|
+
let headers = new HttpHeaders()
|
|
9611
|
+
.set('experimental', 'true')
|
|
9612
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
9613
|
+
.set('Content-Type', 'application/json');
|
|
9614
|
+
headers = this.addClientContextHeader(headers);
|
|
9615
|
+
return this.http
|
|
9616
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
9617
|
+
.pipe(map((response) => {
|
|
9618
|
+
this.updateClientContextStorage(response.headers);
|
|
9619
|
+
return response.body;
|
|
9620
|
+
}), catchError(error => {
|
|
9621
|
+
this.errorService.setError(error);
|
|
9622
|
+
return throwError(error);
|
|
9623
|
+
}));
|
|
9624
|
+
}
|
|
9625
|
+
validateCase(ctid, eventData, pageId) {
|
|
9626
|
+
const pageIdString = pageId ? `?pageId=${pageId}` : '';
|
|
9627
|
+
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
|
|
9628
|
+
let headers = new HttpHeaders()
|
|
9629
|
+
.set('experimental', 'true')
|
|
9630
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
9631
|
+
.set('Content-Type', 'application/json');
|
|
9632
|
+
headers = this.addClientContextHeader(headers);
|
|
9633
|
+
return this.http
|
|
9634
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
9635
|
+
.pipe(map((response) => {
|
|
9636
|
+
this.updateClientContextStorage(response.headers);
|
|
9637
|
+
return response.body;
|
|
9638
|
+
}), catchError(error => {
|
|
9639
|
+
this.errorService.setError(error);
|
|
9640
|
+
return throwError(error);
|
|
9641
|
+
}));
|
|
9642
|
+
}
|
|
9643
|
+
createCase(ctid, eventData) {
|
|
9644
|
+
let ignoreWarning = 'false';
|
|
9645
|
+
if (eventData.ignore_warning) {
|
|
9646
|
+
ignoreWarning = 'true';
|
|
9647
|
+
}
|
|
9648
|
+
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
9649
|
+
let headers = new HttpHeaders()
|
|
9650
|
+
.set('experimental', 'true')
|
|
9651
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
9652
|
+
.set('Content-Type', 'application/json');
|
|
9653
|
+
headers = this.addClientContextHeader(headers);
|
|
9654
|
+
return this.http
|
|
9655
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
9656
|
+
.pipe(map((response) => {
|
|
9657
|
+
this.updateClientContextStorage(response.headers);
|
|
9658
|
+
return response.body;
|
|
9659
|
+
}), catchError(error => {
|
|
9660
|
+
this.errorService.setError(error);
|
|
9661
|
+
return throwError(error);
|
|
9662
|
+
}));
|
|
9735
9663
|
}
|
|
9736
|
-
|
|
9737
|
-
this.
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9664
|
+
getPrintDocuments(caseId) {
|
|
9665
|
+
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
|
|
9666
|
+
let headers = new HttpHeaders()
|
|
9667
|
+
.set('experimental', 'true')
|
|
9668
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
9669
|
+
.set('Content-Type', 'application/json');
|
|
9670
|
+
headers = this.addClientContextHeader(headers);
|
|
9671
|
+
return this.http
|
|
9672
|
+
.get(url, { headers, observe: 'response' })
|
|
9673
|
+
.pipe(map((response) => {
|
|
9674
|
+
this.updateClientContextStorage(response.headers);
|
|
9675
|
+
return response.body.documentResources;
|
|
9676
|
+
}), catchError(error => {
|
|
9677
|
+
this.errorService.setError(error);
|
|
9678
|
+
return throwError(error);
|
|
9679
|
+
}));
|
|
9680
|
+
}
|
|
9681
|
+
buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
9682
|
+
let url = `${this.appConfig.getCaseDataUrl()}/internal`;
|
|
9683
|
+
if (Draft.isDraft(caseId)) {
|
|
9684
|
+
url += `/drafts/${caseId}`
|
|
9685
|
+
+ `/event-trigger`
|
|
9686
|
+
+ `?ignore-warning=${ignoreWarning}`;
|
|
9687
|
+
}
|
|
9688
|
+
else if (caseTypeId === undefined || caseTypeId === null) {
|
|
9689
|
+
url += `/cases/${caseId}`
|
|
9690
|
+
+ `/event-triggers/${eventTriggerId}`
|
|
9691
|
+
+ `?ignore-warning=${ignoreWarning}`;
|
|
9742
9692
|
}
|
|
9743
9693
|
else {
|
|
9744
|
-
|
|
9694
|
+
url += `/case-types/${caseTypeId}`
|
|
9695
|
+
+ `/event-triggers/${eventTriggerId}`
|
|
9696
|
+
+ `?ignore-warning=${ignoreWarning}`;
|
|
9745
9697
|
}
|
|
9698
|
+
return url;
|
|
9746
9699
|
}
|
|
9747
|
-
|
|
9748
|
-
if (
|
|
9749
|
-
|
|
9750
|
-
}
|
|
9751
|
-
else {
|
|
9752
|
-
return null;
|
|
9700
|
+
initialiseEventTrigger(eventTrigger) {
|
|
9701
|
+
if (!eventTrigger.wizard_pages) {
|
|
9702
|
+
eventTrigger.wizard_pages = [];
|
|
9753
9703
|
}
|
|
9704
|
+
eventTrigger.wizard_pages.forEach((wizardPage) => {
|
|
9705
|
+
wizardPage.parsedShowCondition = ShowCondition.getInstance(wizardPage.show_condition);
|
|
9706
|
+
wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
|
|
9707
|
+
});
|
|
9754
9708
|
}
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9709
|
+
getCourtOrHearingCentreName(locationId) {
|
|
9710
|
+
return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
|
|
9711
|
+
}
|
|
9712
|
+
createChallengedAccessRequest(caseId, request) {
|
|
9713
|
+
// Assignment API endpoint
|
|
9714
|
+
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
9715
|
+
const camUtils = new CaseAccessUtils();
|
|
9716
|
+
let userInfo;
|
|
9717
|
+
if (userInfoStr) {
|
|
9718
|
+
userInfo = JSON.parse(userInfoStr);
|
|
9759
9719
|
}
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9720
|
+
const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
9721
|
+
const roleName = camUtils.getAMRoleName('challenged', roleCategory);
|
|
9722
|
+
const beginTime = new Date();
|
|
9723
|
+
const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
|
|
9724
|
+
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
9725
|
+
const isNew = true;
|
|
9726
|
+
const payload = camUtils.getAMPayload(id, id, roleName, roleCategory, 'CHALLENGED', caseId, request, beginTime, endTime, isNew);
|
|
9727
|
+
return this.http.post(`/api/challenged-access-request`, payload);
|
|
9728
|
+
}
|
|
9729
|
+
createSpecificAccessRequest(caseId, sar) {
|
|
9730
|
+
// Assignment API endpoint
|
|
9731
|
+
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
9732
|
+
const camUtils = new CaseAccessUtils();
|
|
9733
|
+
let userInfo;
|
|
9734
|
+
if (userInfoStr) {
|
|
9735
|
+
userInfo = JSON.parse(userInfoStr);
|
|
9763
9736
|
}
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9737
|
+
const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
9738
|
+
const roleName = camUtils.getAMRoleName('specific', roleCategory);
|
|
9739
|
+
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
9740
|
+
const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
|
|
9741
|
+
payload.roleRequest = {
|
|
9742
|
+
...payload.roleRequest,
|
|
9743
|
+
process: 'specific-access',
|
|
9744
|
+
replaceExisting: true,
|
|
9745
|
+
assignerId: payload.requestedRoles[0].actorId,
|
|
9746
|
+
reference: `${caseId}/${roleName}/${payload.requestedRoles[0].actorId}`
|
|
9747
|
+
};
|
|
9748
|
+
payload.requestedRoles[0] = {
|
|
9749
|
+
...payload.requestedRoles[0],
|
|
9750
|
+
roleName: 'specific-access-requested',
|
|
9751
|
+
roleCategory,
|
|
9752
|
+
classification: 'PRIVATE',
|
|
9753
|
+
endTime: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
9754
|
+
beginTime: null,
|
|
9755
|
+
grantType: 'BASIC',
|
|
9756
|
+
readOnly: true
|
|
9757
|
+
};
|
|
9758
|
+
payload.requestedRoles[0].attributes = {
|
|
9759
|
+
...payload.requestedRoles[0].attributes,
|
|
9760
|
+
requestedRole: roleName,
|
|
9761
|
+
specificAccessReason: sar.specificReason
|
|
9762
|
+
};
|
|
9763
|
+
payload.requestedRoles[0].notes[0] = {
|
|
9764
|
+
...payload.requestedRoles[0].notes[0],
|
|
9765
|
+
userId: payload.requestedRoles[0].actorId
|
|
9766
|
+
};
|
|
9767
|
+
return this.http.post(`/api/specific-access-request`, payload);
|
|
9768
|
+
}
|
|
9769
|
+
getLinkedCases(caseId) {
|
|
9770
|
+
const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
|
|
9771
|
+
return this.http
|
|
9772
|
+
.get(url)
|
|
9773
|
+
.pipe(catchError(error => throwError(error)));
|
|
9774
|
+
}
|
|
9775
|
+
addClientContextHeader(headers) {
|
|
9776
|
+
const clientContextDetails = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9777
|
+
if (clientContextDetails) {
|
|
9778
|
+
const caseEditUtils = new CaseEditUtils();
|
|
9779
|
+
// below changes non-ASCII characters
|
|
9780
|
+
const editedClientContext = caseEditUtils.convertNonASCIICharacters(clientContextDetails);
|
|
9781
|
+
const clientContext = window.btoa(editedClientContext);
|
|
9782
|
+
if (clientContext) {
|
|
9783
|
+
headers = headers.set('Client-Context', clientContext);
|
|
9780
9784
|
}
|
|
9781
|
-
return true;
|
|
9782
9785
|
}
|
|
9786
|
+
return headers;
|
|
9783
9787
|
}
|
|
9784
|
-
|
|
9785
|
-
if (
|
|
9786
|
-
|
|
9787
|
-
const
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
// Navigate to tasks tab on case details page
|
|
9792
|
-
this.router.navigate([`/cases/case-details/${this.getCaseId(caseDetails)}/tasks`], { relativeTo: this.route });
|
|
9788
|
+
updateClientContextStorage(headers) {
|
|
9789
|
+
if (headers && headers.get('Client-Context')) {
|
|
9790
|
+
const caseEditUtils = new CaseEditUtils();
|
|
9791
|
+
const clientContextString = window.atob(headers.get('Client-Context'));
|
|
9792
|
+
// below reverts non-ASCII characters
|
|
9793
|
+
const editedClientContextString = caseEditUtils.convertHTMLEntities(clientContextString);
|
|
9794
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, editedClientContextString);
|
|
9793
9795
|
}
|
|
9794
9796
|
}
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
+
static ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(RetryUtil)); };
|
|
9798
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
9799
|
+
}
|
|
9800
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
|
|
9801
|
+
type: Injectable
|
|
9802
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }, { type: RetryUtil }], null); })();
|
|
9803
|
+
|
|
9804
|
+
function CaseCreateComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
9805
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
9806
|
+
i0.ɵɵelementStart(0, "div")(1, "ccd-case-edit", 1);
|
|
9807
|
+
i0.ɵɵlistener("cancelled", function CaseCreateComponent_div_0_Template_ccd_case_edit_cancelled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitCancelled($event)); })("submitted", function CaseCreateComponent_div_0_Template_ccd_case_edit_submitted_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitSubmitted($event)); });
|
|
9808
|
+
i0.ɵɵelementEnd()();
|
|
9809
|
+
} if (rf & 2) {
|
|
9810
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
9811
|
+
i0.ɵɵadvance();
|
|
9812
|
+
i0.ɵɵproperty("submit", ctx_r1.submit())("validate", ctx_r1.validate())("saveDraft", ctx_r1.saveDraft())("eventTrigger", ctx_r1.eventTrigger);
|
|
9813
|
+
} }
|
|
9814
|
+
class CaseCreateComponent {
|
|
9815
|
+
casesService;
|
|
9816
|
+
alertService;
|
|
9817
|
+
draftService;
|
|
9818
|
+
eventTriggerService;
|
|
9819
|
+
jurisdiction;
|
|
9820
|
+
caseType;
|
|
9821
|
+
event;
|
|
9822
|
+
cancelled = new EventEmitter();
|
|
9823
|
+
submitted = new EventEmitter();
|
|
9824
|
+
eventTrigger;
|
|
9825
|
+
constructor(casesService, alertService, draftService, eventTriggerService) {
|
|
9826
|
+
this.casesService = casesService;
|
|
9827
|
+
this.alertService = alertService;
|
|
9828
|
+
this.draftService = draftService;
|
|
9829
|
+
this.eventTriggerService = eventTriggerService;
|
|
9797
9830
|
}
|
|
9798
|
-
|
|
9799
|
-
|
|
9831
|
+
ngOnInit() {
|
|
9832
|
+
this.casesService.getEventTrigger(this.caseType, this.event).toPromise()
|
|
9833
|
+
.then(eventTrigger => {
|
|
9834
|
+
this.eventTrigger = eventTrigger;
|
|
9835
|
+
this.eventTriggerService.announceEventTrigger(eventTrigger);
|
|
9836
|
+
})
|
|
9837
|
+
.catch((error) => {
|
|
9838
|
+
this.alertService.error({ phrase: error.message });
|
|
9839
|
+
return throwError(error);
|
|
9840
|
+
});
|
|
9800
9841
|
}
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9842
|
+
submit() {
|
|
9843
|
+
return (sanitizedEditForm) => {
|
|
9844
|
+
sanitizedEditForm.draft_id = this.eventTrigger.case_id;
|
|
9845
|
+
return this.casesService.createCase(this.caseType, sanitizedEditForm);
|
|
9846
|
+
};
|
|
9806
9847
|
}
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9848
|
+
validate() {
|
|
9849
|
+
return (sanitizedEditForm, pageId) => this.casesService
|
|
9850
|
+
.validateCase(this.caseType, sanitizedEditForm, pageId);
|
|
9851
|
+
}
|
|
9852
|
+
saveDraft() {
|
|
9853
|
+
if (this.eventTrigger.can_save_draft) {
|
|
9854
|
+
return (caseEventData) => this.draftService.createOrUpdateDraft(this.caseType, this.eventTrigger.case_id, caseEventData);
|
|
9812
9855
|
}
|
|
9813
|
-
return false;
|
|
9814
9856
|
}
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9857
|
+
emitCancelled(event) {
|
|
9858
|
+
this.cancelled.emit(event);
|
|
9859
|
+
}
|
|
9860
|
+
emitSubmitted(event) {
|
|
9861
|
+
this.submitted.emit(event);
|
|
9862
|
+
}
|
|
9863
|
+
isDataLoaded() {
|
|
9864
|
+
return this.eventTrigger ? true : false;
|
|
9865
|
+
}
|
|
9866
|
+
static ɵfac = function CaseCreateComponent_Factory(t) { return new (t || CaseCreateComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(EventTriggerService)); };
|
|
9867
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseCreateComponent, selectors: [["ccd-case-create"]], inputs: { jurisdiction: "jurisdiction", caseType: "caseType", event: "event" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "cancelled", "submitted", "submit", "validate", "saveDraft", "eventTrigger"]], template: function CaseCreateComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9868
|
+
i0.ɵɵtemplate(0, CaseCreateComponent_div_0_Template, 2, 4, "div", 0);
|
|
9869
|
+
} if (rf & 2) {
|
|
9870
|
+
i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
|
|
9871
|
+
} }, encapsulation: 2 });
|
|
9819
9872
|
}
|
|
9820
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
9873
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseCreateComponent, [{
|
|
9821
9874
|
type: Component,
|
|
9822
|
-
args: [{ selector: 'ccd-case-
|
|
9823
|
-
}], () => [{ type:
|
|
9824
|
-
type: Input
|
|
9825
|
-
}], submit: [{
|
|
9826
|
-
type: Input
|
|
9827
|
-
}], validate: [{
|
|
9875
|
+
args: [{ selector: 'ccd-case-create', template: "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-edit [submit]=\"submit()\"\n [validate]=\"validate()\"\n [saveDraft]=\"saveDraft()\"\n [eventTrigger]=\"eventTrigger\"\n (cancelled)=\"emitCancelled($event)\"\n (submitted)=\"emitSubmitted($event)\"></ccd-case-edit>\n</div>" }]
|
|
9876
|
+
}], () => [{ type: CasesService }, { type: AlertService }, { type: DraftService }, { type: EventTriggerService }], { jurisdiction: [{
|
|
9828
9877
|
type: Input
|
|
9829
|
-
}],
|
|
9878
|
+
}], caseType: [{
|
|
9830
9879
|
type: Input
|
|
9831
|
-
}],
|
|
9880
|
+
}], event: [{
|
|
9832
9881
|
type: Input
|
|
9833
9882
|
}], cancelled: [{
|
|
9834
9883
|
type: Output
|
|
9835
9884
|
}], submitted: [{
|
|
9836
9885
|
type: Output
|
|
9837
9886
|
}] }); })();
|
|
9838
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(
|
|
9887
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseCreateComponent, { className: "CaseCreateComponent", filePath: "lib/shared/components/case-editor/case-create/case-create.component.ts", lineNumber: 17 }); })();
|
|
9839
9888
|
|
|
9840
9889
|
function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
9841
9890
|
i0.ɵɵelement(0, "div");
|
|
@@ -11260,7 +11309,7 @@ class CaseEventCompletionTaskCancelledComponent {
|
|
|
11260
11309
|
}
|
|
11261
11310
|
onContinue() {
|
|
11262
11311
|
// Removes task to complete so event completes without task
|
|
11263
|
-
this.context.sessionStorageService.removeItem(
|
|
11312
|
+
this.context.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
11264
11313
|
// may be able to remove this call below since it is now unneccesary
|
|
11265
11314
|
this.notifyEventCompletionCancelled.emit(true);
|
|
11266
11315
|
}
|
|
@@ -11446,7 +11495,7 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
11446
11495
|
}
|
|
11447
11496
|
onContinue() {
|
|
11448
11497
|
// Get task details
|
|
11449
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
11498
|
+
const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
11450
11499
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
11451
11500
|
const task = userTask ? userTask.task_data : null;
|
|
11452
11501
|
// not complete_task not utilised here as related to event completion
|
|
@@ -11476,7 +11525,7 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
11476
11525
|
}], notifyEventCompletionReassigned: [{
|
|
11477
11526
|
type: Output
|
|
11478
11527
|
}] }); })();
|
|
11479
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber:
|
|
11528
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 16 }); })();
|
|
11480
11529
|
|
|
11481
11530
|
class AddressOption {
|
|
11482
11531
|
description;
|
|
@@ -11774,7 +11823,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11774
11823
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteComplexFieldComponent, { className: "WriteComplexFieldComponent", filePath: "lib/shared/components/palette/complex/write-complex-field.component.ts", lineNumber: 21 }); })();
|
|
11775
11824
|
|
|
11776
11825
|
const _c0$V = ["writeComplexFieldComponent"];
|
|
11777
|
-
const _c1$
|
|
11826
|
+
const _c1$o = a0 => ({ "form-group-error": a0 });
|
|
11778
11827
|
const _c2$3 = a0 => ({ "govuk-input--error": a0 });
|
|
11779
11828
|
function WriteAddressFieldComponent_div_1_div_4_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
11780
11829
|
i0.ɵɵelementStart(0, "span", 14);
|
|
@@ -11801,7 +11850,7 @@ function WriteAddressFieldComponent_div_1_div_4_Template(rf, ctx) { if (rf & 1)
|
|
|
11801
11850
|
i0.ɵɵelementEnd()();
|
|
11802
11851
|
} if (rf & 2) {
|
|
11803
11852
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
11804
|
-
i0.ɵɵproperty("id", ctx_r1.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$
|
|
11853
|
+
i0.ɵɵproperty("id", ctx_r1.createElementId("postcodeLookup"))("ngClass", i0.ɵɵpureFunction1(13, _c1$o, ctx_r1.missingPostcode));
|
|
11805
11854
|
i0.ɵɵadvance();
|
|
11806
11855
|
i0.ɵɵproperty("for", ctx_r1.createElementId("postcodeInput"));
|
|
11807
11856
|
i0.ɵɵadvance(2);
|
|
@@ -11847,7 +11896,7 @@ function WriteAddressFieldComponent_div_1_div_5_Template(rf, ctx) { if (rf & 1)
|
|
|
11847
11896
|
i0.ɵɵelementEnd()();
|
|
11848
11897
|
} if (rf & 2) {
|
|
11849
11898
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
11850
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$
|
|
11899
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$o, ctx_r1.noAddressSelected));
|
|
11851
11900
|
i0.ɵɵadvance();
|
|
11852
11901
|
i0.ɵɵproperty("for", ctx_r1.createElementId("addressList"));
|
|
11853
11902
|
i0.ɵɵadvance(2);
|
|
@@ -13280,7 +13329,7 @@ class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
|
|
|
13280
13329
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadCaseLinkFieldComponent, { className: "ReadCaseLinkFieldComponent", filePath: "lib/shared/components/palette/case-link/read-case-link-field.component.ts", lineNumber: 8 }); })();
|
|
13281
13330
|
|
|
13282
13331
|
const _c0$U = ["writeComplexFieldComponent"];
|
|
13283
|
-
const _c1$
|
|
13332
|
+
const _c1$n = a0 => ({ "form-group-error": a0 });
|
|
13284
13333
|
function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
13285
13334
|
i0.ɵɵelementStart(0, "span", 6);
|
|
13286
13335
|
i0.ɵɵtext(1);
|
|
@@ -13372,7 +13421,7 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13372
13421
|
i0.ɵɵelement(5, "input", 5);
|
|
13373
13422
|
i0.ɵɵelementEnd();
|
|
13374
13423
|
} if (rf & 2) {
|
|
13375
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$
|
|
13424
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$n, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
13376
13425
|
i0.ɵɵadvance();
|
|
13377
13426
|
i0.ɵɵproperty("for", ctx.id());
|
|
13378
13427
|
i0.ɵɵadvance();
|
|
@@ -13395,7 +13444,7 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13395
13444
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteCaseLinkFieldComponent, { className: "WriteCaseLinkFieldComponent", filePath: "lib/shared/components/palette/case-link/write-case-link-field.component.ts", lineNumber: 11 }); })();
|
|
13396
13445
|
|
|
13397
13446
|
const _c0$T = (a0, a1, a2, a3, a4, a5) => ({ id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 });
|
|
13398
|
-
const _c1$
|
|
13447
|
+
const _c1$m = (a0, a1, a2, a3, a4) => ({ id: a0, label: a1, field_type: a2, value: a3, hidden: a4 });
|
|
13399
13448
|
function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf & 1) {
|
|
13400
13449
|
i0.ɵɵelementStart(0, "tbody")(1, "tr");
|
|
13401
13450
|
i0.ɵɵelement(2, "th", 4);
|
|
@@ -13416,7 +13465,7 @@ function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { i
|
|
|
13416
13465
|
const i_r3 = ctx.index;
|
|
13417
13466
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
13418
13467
|
i0.ɵɵadvance(2);
|
|
13419
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$
|
|
13468
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$m, i_r3, ctx_r0.caseField.label + " " + (i_r3 + 1), ctx_r0.caseField.field_type.collection_field_type, item_r2.value, ctx_r0.caseField.hidden))("context", ctx_r0.context)("topLevelFormGroup", ctx_r0.topLevelFormGroup)("idPrefix", ctx_r0.buildIdPrefix(i_r3));
|
|
13420
13469
|
} }
|
|
13421
13470
|
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
|
|
13422
13471
|
i0.ɵɵelementStart(0, "tbody");
|
|
@@ -14222,7 +14271,7 @@ class FileUploadStateService {
|
|
|
14222
14271
|
}], null, null); })();
|
|
14223
14272
|
|
|
14224
14273
|
const _c0$R = ["fileInput"];
|
|
14225
|
-
const _c1$
|
|
14274
|
+
const _c1$l = a0 => ({ "form-group-error bottom-30": a0 });
|
|
14226
14275
|
function WriteDocumentFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
14227
14276
|
i0.ɵɵelementStart(0, "span", 12);
|
|
14228
14277
|
i0.ɵɵtext(1);
|
|
@@ -14344,7 +14393,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14344
14393
|
fileChangeEvent(fileInput, allowedRegex) {
|
|
14345
14394
|
let fileTypeRegex;
|
|
14346
14395
|
if (allowedRegex) {
|
|
14347
|
-
fileTypeRegex = new RegExp(`(${allowedRegex.replace(/,/g, '|')})
|
|
14396
|
+
fileTypeRegex = new RegExp(`(${allowedRegex.replace(/,/g, '|')})`, 'i');
|
|
14348
14397
|
}
|
|
14349
14398
|
if (fileInput.target?.files[0] && !fileInput.target?.files[0]?.name?.match(fileTypeRegex)) {
|
|
14350
14399
|
this.invalidFileFormat();
|
|
@@ -14611,7 +14660,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14611
14660
|
i0.ɵɵpipe(17, "rpxTranslate");
|
|
14612
14661
|
i0.ɵɵelementEnd()();
|
|
14613
14662
|
} if (rf & 2) {
|
|
14614
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$
|
|
14663
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1$l, !ctx.valid));
|
|
14615
14664
|
i0.ɵɵadvance();
|
|
14616
14665
|
i0.ɵɵproperty("for", ctx.id());
|
|
14617
14666
|
i0.ɵɵadvance();
|
|
@@ -15139,7 +15188,7 @@ class ReadDynamicRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
|
15139
15188
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadDynamicRadioListFieldComponent, { className: "ReadDynamicRadioListFieldComponent", filePath: "lib/shared/components/palette/dynamic-radio-list/read-dynamic-radio-list-field.component.ts", lineNumber: 8 }); })();
|
|
15140
15189
|
|
|
15141
15190
|
const _c0$O = a0 => ({ "form-group-error": a0 });
|
|
15142
|
-
const _c1$
|
|
15191
|
+
const _c1$k = a0 => ({ selected: a0 });
|
|
15143
15192
|
function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
15144
15193
|
i0.ɵɵelementStart(0, "span", 7);
|
|
15145
15194
|
i0.ɵɵtext(1);
|
|
@@ -15189,7 +15238,7 @@ function WriteDynamicRadioListFieldComponent_div_9_Template(rf, ctx) { if (rf &
|
|
|
15189
15238
|
} if (rf & 2) {
|
|
15190
15239
|
const radioButton_r2 = ctx.$implicit;
|
|
15191
15240
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
15192
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$
|
|
15241
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$k, ctx_r0.dynamicRadioListControl.value === radioButton_r2.code));
|
|
15193
15242
|
i0.ɵɵadvance();
|
|
15194
15243
|
i0.ɵɵproperty("id", ctx_r0.createElementId(radioButton_r2.code))("name", ctx_r0.id())("formControl", ctx_r0.dynamicRadioListControl)("value", radioButton_r2.code);
|
|
15195
15244
|
i0.ɵɵadvance();
|
|
@@ -15287,7 +15336,7 @@ class ReadEmailFieldComponent extends AbstractFieldReadComponent {
|
|
|
15287
15336
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadEmailFieldComponent, { className: "ReadEmailFieldComponent", filePath: "lib/shared/components/palette/email/read-email-field.component.ts", lineNumber: 10 }); })();
|
|
15288
15337
|
|
|
15289
15338
|
const _c0$N = a0 => ({ "form-group-error": a0 });
|
|
15290
|
-
const _c1$
|
|
15339
|
+
const _c1$j = a0 => ({ "govuk-input--error": a0 });
|
|
15291
15340
|
function WriteEmailFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
15292
15341
|
i0.ɵɵelementStart(0, "span", 6);
|
|
15293
15342
|
i0.ɵɵtext(1);
|
|
@@ -15342,7 +15391,7 @@ class WriteEmailFieldComponent extends AbstractFieldWriteComponent {
|
|
|
15342
15391
|
i0.ɵɵadvance();
|
|
15343
15392
|
i0.ɵɵproperty("ngIf", ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched));
|
|
15344
15393
|
i0.ɵɵadvance();
|
|
15345
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
15394
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$j, ctx.emailControl.errors && (ctx.emailControl.dirty || ctx.emailControl.touched)))("id", ctx.id())("formControl", ctx.emailControl);
|
|
15346
15395
|
} }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
15347
15396
|
}
|
|
15348
15397
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteEmailFieldComponent, [{
|
|
@@ -15510,7 +15559,7 @@ class ReadFixedRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
|
15510
15559
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadFixedRadioListFieldComponent, { className: "ReadFixedRadioListFieldComponent", filePath: "lib/shared/components/palette/fixed-radio-list/read-fixed-radio-list-field.component.ts", lineNumber: 8 }); })();
|
|
15511
15560
|
|
|
15512
15561
|
const _c0$L = a0 => ({ "form-group-error": a0 });
|
|
15513
|
-
const _c1$
|
|
15562
|
+
const _c1$i = a0 => ({ selected: a0 });
|
|
15514
15563
|
function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
15515
15564
|
i0.ɵɵelementStart(0, "span", 6);
|
|
15516
15565
|
i0.ɵɵtext(1);
|
|
@@ -15551,7 +15600,7 @@ function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1)
|
|
|
15551
15600
|
} if (rf & 2) {
|
|
15552
15601
|
const radioButton_r2 = ctx.$implicit;
|
|
15553
15602
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
15554
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$
|
|
15603
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c1$i, ctx_r0.fixedRadioListControl.value === radioButton_r2.code));
|
|
15555
15604
|
i0.ɵɵadvance();
|
|
15556
15605
|
i0.ɵɵproperty("id", ctx_r0.id() + "-" + radioButton_r2.code)("name", ctx_r0.id())("formControl", ctx_r0.fixedRadioListControl)("value", radioButton_r2.code);
|
|
15557
15606
|
i0.ɵɵadvance();
|
|
@@ -15654,7 +15703,7 @@ class ReadJudicialUserFieldComponent extends AbstractFieldReadComponent {
|
|
|
15654
15703
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadJudicialUserFieldComponent, { className: "ReadJudicialUserFieldComponent", filePath: "lib/shared/components/palette/judicial-user/read-judicial-user-field.component.ts", lineNumber: 11 }); })();
|
|
15655
15704
|
|
|
15656
15705
|
const _c0$K = a0 => ({ "form-group-error": a0 });
|
|
15657
|
-
const _c1$
|
|
15706
|
+
const _c1$h = a0 => ({ "hide-autocomplete": a0 });
|
|
15658
15707
|
function WriteJudicialUserFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
15659
15708
|
i0.ɵɵelementStart(0, "span", 10);
|
|
15660
15709
|
i0.ɵɵtext(1);
|
|
@@ -15693,7 +15742,7 @@ function WriteJudicialUserFieldComponent_mat_option_8_Template(rf, ctx) { if (rf
|
|
|
15693
15742
|
} if (rf & 2) {
|
|
15694
15743
|
const judicialUser_r4 = ctx.$implicit;
|
|
15695
15744
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
15696
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$
|
|
15745
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c1$h, !ctx_r1.showAutocomplete))("value", judicialUser_r4);
|
|
15697
15746
|
i0.ɵɵadvance();
|
|
15698
15747
|
i0.ɵɵtextInterpolate2(" ", (judicialUser_r4 == null ? null : judicialUser_r4.fullName) ? judicialUser_r4.fullName : "", "", (judicialUser_r4 == null ? null : judicialUser_r4.emailId) ? " (" + judicialUser_r4.emailId + ")" : "", " ");
|
|
15699
15748
|
} }
|
|
@@ -16419,7 +16468,7 @@ class ValidatorsUtils {
|
|
|
16419
16468
|
}], null, null); })();
|
|
16420
16469
|
|
|
16421
16470
|
const _c0$J = a0 => ({ "govuk-form-group--error": a0 });
|
|
16422
|
-
const _c1$
|
|
16471
|
+
const _c1$g = a0 => ({ "table-group-error": a0 });
|
|
16423
16472
|
function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
16424
16473
|
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
16425
16474
|
i0.ɵɵtext(2, "Error:");
|
|
@@ -16596,7 +16645,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
|
16596
16645
|
const case_r9 = ctx.$implicit;
|
|
16597
16646
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
16598
16647
|
i0.ɵɵadvance(2);
|
|
16599
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$
|
|
16648
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(12, _c1$g, ctx_r1.caseSelectionError && case_r9.caseReference === ctx_r1.linkCaseForm.value.caseNumber));
|
|
16600
16649
|
i0.ɵɵadvance(2);
|
|
16601
16650
|
i0.ɵɵtextInterpolate1("", case_r9.caseName, " ");
|
|
16602
16651
|
i0.ɵɵadvance(2);
|
|
@@ -18626,7 +18675,7 @@ class ReadNumberFieldComponent extends AbstractFieldReadComponent {
|
|
|
18626
18675
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadNumberFieldComponent, { className: "ReadNumberFieldComponent", filePath: "lib/shared/components/palette/number/read-number-field.component.ts", lineNumber: 8 }); })();
|
|
18627
18676
|
|
|
18628
18677
|
const _c0$F = a0 => ({ "form-group-error": a0 });
|
|
18629
|
-
const _c1$
|
|
18678
|
+
const _c1$f = a0 => ({ "govuk-input--error": a0 });
|
|
18630
18679
|
function WriteNumberFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
18631
18680
|
i0.ɵɵelementStart(0, "span", 6);
|
|
18632
18681
|
i0.ɵɵtext(1);
|
|
@@ -18681,7 +18730,7 @@ class WriteNumberFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18681
18730
|
i0.ɵɵadvance();
|
|
18682
18731
|
i0.ɵɵproperty("ngIf", ctx.numberControl.errors && ctx.numberControl.dirty);
|
|
18683
18732
|
i0.ɵɵadvance();
|
|
18684
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
18733
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$f, ctx.numberControl.errors && ctx.numberControl.dirty))("id", ctx.id())("formControl", ctx.numberControl);
|
|
18685
18734
|
} }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NumberValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
18686
18735
|
}
|
|
18687
18736
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteNumberFieldComponent, [{
|
|
@@ -19309,7 +19358,7 @@ class ReadPhoneUKFieldComponent extends AbstractFieldReadComponent {
|
|
|
19309
19358
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadPhoneUKFieldComponent, { className: "ReadPhoneUKFieldComponent", filePath: "lib/shared/components/palette/phone-uk/read-phone-uk-field.component.ts", lineNumber: 8 }); })();
|
|
19310
19359
|
|
|
19311
19360
|
const _c0$D = a0 => ({ "form-group-error": a0 });
|
|
19312
|
-
const _c1$
|
|
19361
|
+
const _c1$e = a0 => ({ "govuk-input--error": a0 });
|
|
19313
19362
|
function WritePhoneUKFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
19314
19363
|
i0.ɵɵelementStart(0, "span", 6);
|
|
19315
19364
|
i0.ɵɵtext(1);
|
|
@@ -19364,7 +19413,7 @@ class WritePhoneUKFieldComponent extends AbstractFieldWriteComponent {
|
|
|
19364
19413
|
i0.ɵɵadvance();
|
|
19365
19414
|
i0.ɵɵproperty("ngIf", ctx.phoneUkControl.errors && (ctx.phoneUkControl.dirty || ctx.phoneUkControl.touched));
|
|
19366
19415
|
i0.ɵɵadvance();
|
|
19367
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$
|
|
19416
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c1$e, ctx.phoneUkControl.errors && ctx.phoneUkControl.dirty))("id", ctx.id())("formControl", ctx.phoneUkControl);
|
|
19368
19417
|
} }, dependencies: [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.FormControlDirective, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], encapsulation: 2 });
|
|
19369
19418
|
}
|
|
19370
19419
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WritePhoneUKFieldComponent, [{
|
|
@@ -19585,36 +19634,44 @@ const caseMessagesMockData = [
|
|
|
19585
19634
|
|
|
19586
19635
|
function QualifyingQuestionDetailComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
19587
19636
|
i0.ɵɵelementContainerStart(0);
|
|
19588
|
-
i0.ɵɵelementStart(1, "
|
|
19637
|
+
i0.ɵɵelementStart(1, "span", 1);
|
|
19589
19638
|
i0.ɵɵtext(2);
|
|
19590
19639
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
19591
19640
|
i0.ɵɵelementEnd();
|
|
19592
|
-
i0.ɵɵ
|
|
19593
|
-
i0.ɵɵ
|
|
19641
|
+
i0.ɵɵelementStart(4, "h1", 2);
|
|
19642
|
+
i0.ɵɵtext(5);
|
|
19643
|
+
i0.ɵɵpipe(6, "rpxTranslate");
|
|
19644
|
+
i0.ɵɵelementEnd();
|
|
19645
|
+
i0.ɵɵelementStart(7, "div", 3);
|
|
19646
|
+
i0.ɵɵelement(8, "ccd-markdown", 4);
|
|
19647
|
+
i0.ɵɵpipe(9, "rpxTranslate");
|
|
19648
|
+
i0.ɵɵelementEnd();
|
|
19594
19649
|
i0.ɵɵelementContainerEnd();
|
|
19595
19650
|
} if (rf & 2) {
|
|
19596
19651
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
19597
19652
|
i0.ɵɵadvance(2);
|
|
19598
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3,
|
|
19599
|
-
i0.ɵɵadvance(
|
|
19600
|
-
i0.ɵɵ
|
|
19653
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 3, "Are you contacting us about any of the following:"), " ");
|
|
19654
|
+
i0.ɵɵadvance(3);
|
|
19655
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 5, ctx_r0.qualifyingQuestion.name), " ");
|
|
19656
|
+
i0.ɵɵadvance(3);
|
|
19657
|
+
i0.ɵɵproperty("content", i0.ɵɵpipeBind1(9, 7, ctx_r0.qualifyingQuestion.markdown));
|
|
19601
19658
|
} }
|
|
19602
19659
|
class QualifyingQuestionDetailComponent {
|
|
19603
19660
|
qualifyingQuestion;
|
|
19604
19661
|
static ɵfac = function QualifyingQuestionDetailComponent_Factory(t) { return new (t || QualifyingQuestionDetailComponent)(); };
|
|
19605
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionDetailComponent, selectors: [["ccd-qualifying-question-detail"]], inputs: { qualifyingQuestion: "qualifyingQuestion" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-heading-l"], [3, "content"]], template: function QualifyingQuestionDetailComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19606
|
-
i0.ɵɵtemplate(0, QualifyingQuestionDetailComponent_ng_container_0_Template,
|
|
19662
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionDetailComponent, selectors: [["ccd-qualifying-question-detail"]], inputs: { qualifyingQuestion: "qualifyingQuestion" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-caption-l"], [1, "govuk-heading-l"], [1, "qm-qualifying-question"], [3, "content"]], template: function QualifyingQuestionDetailComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19663
|
+
i0.ɵɵtemplate(0, QualifyingQuestionDetailComponent_ng_container_0_Template, 10, 9, "ng-container", 0);
|
|
19607
19664
|
} if (rf & 2) {
|
|
19608
19665
|
i0.ɵɵproperty("ngIf", ctx.qualifyingQuestion == null ? null : ctx.qualifyingQuestion.markdown);
|
|
19609
|
-
} }, dependencies: [i5.NgIf, MarkdownComponent, i1.RpxTranslatePipe],
|
|
19666
|
+
} }, dependencies: [i5.NgIf, MarkdownComponent, i1.RpxTranslatePipe], styles: [".qm-qualifying-question[_ngcontent-%COMP%] .markdown[_ngcontent-%COMP%]{font-size:19px}"] });
|
|
19610
19667
|
}
|
|
19611
19668
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionDetailComponent, [{
|
|
19612
19669
|
type: Component,
|
|
19613
|
-
args: [{ selector: 'ccd-qualifying-question-detail', template: "<ng-container *ngIf=\"qualifyingQuestion?.markdown\">\n <h1 class=\"govuk-heading-l\">\n {{ qualifyingQuestion.name | rpxTranslate }}\n </h1>\n <ccd-markdown\n [content]=\"qualifyingQuestion.markdown | rpxTranslate\">\n </ccd-markdown>\n</ng-container>\n" }]
|
|
19670
|
+
args: [{ selector: 'ccd-qualifying-question-detail', template: "<ng-container *ngIf=\"qualifyingQuestion?.markdown\">\n <span class=\"govuk-caption-l\">\n {{ 'Are you contacting us about any of the following:' | rpxTranslate }}\n </span>\n <h1 class=\"govuk-heading-l\">\n {{ qualifyingQuestion.name | rpxTranslate }}\n </h1>\n <div class=\"qm-qualifying-question\">\n <ccd-markdown\n [content]=\"qualifyingQuestion.markdown | rpxTranslate\">\n </ccd-markdown>\n </div>\n</ng-container>\n", styles: [".qm-qualifying-question .markdown{font-size:19px}\n"] }]
|
|
19614
19671
|
}], null, { qualifyingQuestion: [{
|
|
19615
19672
|
type: Input
|
|
19616
19673
|
}] }); })();
|
|
19617
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionDetailComponent, { className: "QualifyingQuestionDetailComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.ts", lineNumber:
|
|
19674
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionDetailComponent, { className: "QualifyingQuestionDetailComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.ts", lineNumber: 9 }); })();
|
|
19618
19675
|
|
|
19619
19676
|
var RaiseQueryErrorMessage;
|
|
19620
19677
|
(function (RaiseQueryErrorMessage) {
|
|
@@ -19691,7 +19748,7 @@ function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_ng_co
|
|
|
19691
19748
|
i0.ɵɵelementContainerEnd();
|
|
19692
19749
|
} if (rf & 2) {
|
|
19693
19750
|
i0.ɵɵadvance(2);
|
|
19694
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "
|
|
19751
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "or"));
|
|
19695
19752
|
} }
|
|
19696
19753
|
function QualifyingQuestionOptionsComponent_ng_container_0_ng_container_12_Template(rf, ctx) { if (rf & 1) {
|
|
19697
19754
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -19740,7 +19797,7 @@ function QualifyingQuestionOptionsComponent_ng_container_0_Template(rf, ctx) { i
|
|
|
19740
19797
|
i0.ɵɵadvance(4);
|
|
19741
19798
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, "Raise a new query"), " ");
|
|
19742
19799
|
i0.ɵɵadvance(3);
|
|
19743
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 8, "
|
|
19800
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 8, "Select the type of query you are raising:"), " ");
|
|
19744
19801
|
i0.ɵɵadvance(2);
|
|
19745
19802
|
i0.ɵɵproperty("ngIf", ctx_r0.displayError);
|
|
19746
19803
|
i0.ɵɵadvance(2);
|
|
@@ -19782,7 +19839,7 @@ class QualifyingQuestionOptionsComponent {
|
|
|
19782
19839
|
}
|
|
19783
19840
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionOptionsComponent, [{
|
|
19784
19841
|
type: Component,
|
|
19785
|
-
args: [{ selector: 'ccd-qualifying-question-options', template: "<ng-container *ngIf=\"qualifyingQuestionsControl\">\n <div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"displayError\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ 'Raise a new query' | rpxTranslate }}\n </h1>\n </legend>\n <h2 class=\"govuk-heading-m govuk-!-margin-top-10\">\n {{ '
|
|
19842
|
+
args: [{ selector: 'ccd-qualifying-question-options', template: "<ng-container *ngIf=\"qualifyingQuestionsControl\">\n <div class=\"govuk-form-group\" [class.govuk-form-group--error]=\"displayError\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{ 'Raise a new query' | rpxTranslate }}\n </h1>\n </legend>\n <h2 class=\"govuk-heading-m govuk-!-margin-top-10\">\n {{ 'Select the type of query you are raising:' | rpxTranslate }}\n </h2>\n\n <ng-container *ngIf=\"displayError\">\n <p class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{\n qualifyingQuestionsErrorMessage.SELECT_AN_OPTION | rpxTranslate }}\n </p>\n </ng-container>\n\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <ng-container *ngFor=\"let qualifyingQuestion of qualifyingQuestions$ | async; let isLast = last\">\n <ng-container *ngIf=\"isLast\">\n <div class=\"govuk-radios__divider\">{{ 'or' | rpxTranslate }}</div>\n </ng-container>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"{{qualifyingQuestion.name}}\" name=\"qualifyingQuestionOption\"\n type=\"radio\" [formControl]=\"qualifyingQuestionsControl\" [value]=\"qualifyingQuestion\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"qualifyingQuestion.name\">{{ qualifyingQuestion.name |\n rpxTranslate }}</label>\n </div>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</ng-container>\n" }]
|
|
19786
19843
|
}], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: QualifyingQuestionService }], { qualifyingQuestionsControl: [{
|
|
19787
19844
|
type: Input
|
|
19788
19845
|
}], qualifyingQuestions$: [{
|
|
@@ -20273,6 +20330,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
20273
20330
|
caseViewTrigger;
|
|
20274
20331
|
caseDetails;
|
|
20275
20332
|
queryId;
|
|
20333
|
+
tid;
|
|
20276
20334
|
createEventSubscription;
|
|
20277
20335
|
searchTasksSubscription;
|
|
20278
20336
|
queryCreateContextEnum = QueryCreateContext;
|
|
@@ -20281,6 +20339,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
20281
20339
|
fieldId;
|
|
20282
20340
|
attachments;
|
|
20283
20341
|
errorMessages = [];
|
|
20342
|
+
filteredTask = [];
|
|
20284
20343
|
constructor(route, router, casesService, caseNotifier, workAllocationService, sessionStorageService, qualifyingQuestionService) {
|
|
20285
20344
|
this.route = route;
|
|
20286
20345
|
this.router = router;
|
|
@@ -20292,6 +20351,7 @@ class QueryCheckYourAnswersComponent {
|
|
|
20292
20351
|
}
|
|
20293
20352
|
ngOnInit() {
|
|
20294
20353
|
this.queryId = this.route.snapshot.params.qid;
|
|
20354
|
+
this.tid = this.route.snapshot.queryParams?.tid;
|
|
20295
20355
|
this.caseNotifier.caseView.pipe(take(1)).subscribe((caseDetails) => {
|
|
20296
20356
|
this.caseDetails = caseDetails;
|
|
20297
20357
|
// Find the appropriate event trigger based on the queryCreateContext
|
|
@@ -20304,6 +20364,23 @@ class QueryCheckYourAnswersComponent {
|
|
|
20304
20364
|
// Get the document attachments
|
|
20305
20365
|
this.getDocumentAttachments();
|
|
20306
20366
|
this.setCaseQueriesCollectionData();
|
|
20367
|
+
if (this.queryCreateContext === QueryCreateContext.RESPOND) {
|
|
20368
|
+
this.searchTasksSubscription = this.workAllocationService.getTasksByCaseIdAndEventId(this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID, this.caseDetails.case_id, this.caseDetails.case_type.id, this.caseDetails.case_type.jurisdiction.id)
|
|
20369
|
+
.subscribe({
|
|
20370
|
+
next: (response) => {
|
|
20371
|
+
// Filter task by query id
|
|
20372
|
+
if (response.tasks?.length > 1) {
|
|
20373
|
+
this.filteredTask = response.tasks?.find((task) => task.case_id === this.tid);
|
|
20374
|
+
}
|
|
20375
|
+
else {
|
|
20376
|
+
this.filteredTask = response.tasks;
|
|
20377
|
+
}
|
|
20378
|
+
},
|
|
20379
|
+
error: (error) => {
|
|
20380
|
+
console.error('Error in searchTasksSubscription:', error);
|
|
20381
|
+
}
|
|
20382
|
+
});
|
|
20383
|
+
}
|
|
20307
20384
|
}
|
|
20308
20385
|
ngOnDestroy() {
|
|
20309
20386
|
this.createEventSubscription?.unsubscribe();
|
|
@@ -20326,7 +20403,25 @@ class QueryCheckYourAnswersComponent {
|
|
|
20326
20403
|
return;
|
|
20327
20404
|
}
|
|
20328
20405
|
const data = this.generateCaseQueriesCollectionData();
|
|
20329
|
-
|
|
20406
|
+
const createEvent$ = this.createEvent(data);
|
|
20407
|
+
if (this.queryCreateContext === QueryCreateContext.RESPOND) {
|
|
20408
|
+
const completeTask$ = this.workAllocationService.completeTask(this.filteredTask[0].id, this.caseViewTrigger.name);
|
|
20409
|
+
this.createEventSubscription = forkJoin([createEvent$, completeTask$]).subscribe({
|
|
20410
|
+
next: ([createEventResponse, tasksResponse]) => {
|
|
20411
|
+
this.finaliseSubmission();
|
|
20412
|
+
},
|
|
20413
|
+
error: (error) => this.handleError(error)
|
|
20414
|
+
});
|
|
20415
|
+
}
|
|
20416
|
+
else {
|
|
20417
|
+
this.createEventSubscription = createEvent$.subscribe({
|
|
20418
|
+
next: () => this.finaliseSubmission(),
|
|
20419
|
+
error: (error) => this.handleError(error)
|
|
20420
|
+
});
|
|
20421
|
+
}
|
|
20422
|
+
}
|
|
20423
|
+
createEvent(data) {
|
|
20424
|
+
return this.casesService.createEvent(this.caseDetails, {
|
|
20330
20425
|
data,
|
|
20331
20426
|
event: {
|
|
20332
20427
|
id: this.caseViewTrigger?.id,
|
|
@@ -20335,34 +20430,16 @@ class QueryCheckYourAnswersComponent {
|
|
|
20335
20430
|
},
|
|
20336
20431
|
event_token: this.eventData?.event_token,
|
|
20337
20432
|
ignore_warning: false
|
|
20338
|
-
}).subscribe(() => {
|
|
20339
|
-
// Search and complete task
|
|
20340
|
-
this.searchAndCompleteTask();
|
|
20341
|
-
// Emit query submitted event
|
|
20342
|
-
this.querySubmitted.emit(true);
|
|
20343
|
-
this.qualifyingQuestionService.clearQualifyingQuestionSelection();
|
|
20344
|
-
},
|
|
20345
|
-
// Error
|
|
20346
|
-
() => this.router.navigate(['/', 'service-down']));
|
|
20347
|
-
}
|
|
20348
|
-
searchAndCompleteTask() {
|
|
20349
|
-
// Search Task
|
|
20350
|
-
const searchParameter = { ccdId: this.caseDetails.case_id };
|
|
20351
|
-
this.searchTasksSubscription = this.workAllocationService.searchTasks(searchParameter)
|
|
20352
|
-
.subscribe((response) => {
|
|
20353
|
-
// Filter task by query id
|
|
20354
|
-
const filteredTask = response.tasks?.find((task) => Object.values(task.additional_properties).some((value) => value === this.queryId));
|
|
20355
|
-
// Trigger event completion
|
|
20356
|
-
this.eventCompletionParams = {
|
|
20357
|
-
caseId: this.caseDetails.case_id,
|
|
20358
|
-
eventId: this.RESPOND_TO_QUERY_EVENT_TRIGGER_ID,
|
|
20359
|
-
task: filteredTask
|
|
20360
|
-
};
|
|
20361
|
-
}, (error) => {
|
|
20362
|
-
console.error('Error in searchTasksSubscription:', error);
|
|
20363
|
-
// Handle error appropriately
|
|
20364
20433
|
});
|
|
20365
20434
|
}
|
|
20435
|
+
finaliseSubmission() {
|
|
20436
|
+
this.querySubmitted.emit(true);
|
|
20437
|
+
this.qualifyingQuestionService.clearQualifyingQuestionSelection();
|
|
20438
|
+
}
|
|
20439
|
+
handleError(error) {
|
|
20440
|
+
console.error('Error in API calls:', error);
|
|
20441
|
+
this.router.navigate(['/', 'service-down']);
|
|
20442
|
+
}
|
|
20366
20443
|
generateCaseQueriesCollectionData() {
|
|
20367
20444
|
const currentUserDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
20368
20445
|
const caseMessage = this.queryCreateContext === QueryCreateContext.NEW_QUERY
|
|
@@ -20571,10 +20648,32 @@ class QueryCheckYourAnswersComponent {
|
|
|
20571
20648
|
}], querySubmitted: [{
|
|
20572
20649
|
type: Output
|
|
20573
20650
|
}] }); })();
|
|
20574
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber:
|
|
20651
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCheckYourAnswersComponent, { className: "QueryCheckYourAnswersComponent", filePath: "lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.ts", lineNumber: 26 }); })();
|
|
20575
20652
|
|
|
20576
|
-
function
|
|
20577
|
-
i0.ɵɵelementStart(0, "
|
|
20653
|
+
function QueryDetailsComponent_ng_container_0_cut_alert_1_Template(rf, ctx) { if (rf & 1) {
|
|
20654
|
+
i0.ɵɵelementStart(0, "cut-alert", 11);
|
|
20655
|
+
i0.ɵɵelementContainerStart(1);
|
|
20656
|
+
i0.ɵɵtext(2);
|
|
20657
|
+
i0.ɵɵelementContainerEnd();
|
|
20658
|
+
i0.ɵɵelementEnd();
|
|
20659
|
+
} if (rf & 2) {
|
|
20660
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
20661
|
+
i0.ɵɵadvance(2);
|
|
20662
|
+
i0.ɵɵtextInterpolate(ctx_r0.message);
|
|
20663
|
+
} }
|
|
20664
|
+
function QueryDetailsComponent_ng_container_0_p_3_Template(rf, ctx) { if (rf & 1) {
|
|
20665
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
20666
|
+
i0.ɵɵelementStart(0, "p")(1, "a", 12);
|
|
20667
|
+
i0.ɵɵlistener("click", function QueryDetailsComponent_ng_container_0_p_3_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onBack()); });
|
|
20668
|
+
i0.ɵɵtext(2);
|
|
20669
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
20670
|
+
i0.ɵɵelementEnd()();
|
|
20671
|
+
} if (rf & 2) {
|
|
20672
|
+
i0.ɵɵadvance(2);
|
|
20673
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "Back to query list"));
|
|
20674
|
+
} }
|
|
20675
|
+
function QueryDetailsComponent_ng_container_0_tr_44_Template(rf, ctx) { if (rf & 1) {
|
|
20676
|
+
i0.ɵɵelementStart(0, "tr", 13)(1, "th", 7);
|
|
20578
20677
|
i0.ɵɵtext(2);
|
|
20579
20678
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
20580
20679
|
i0.ɵɵelementEnd();
|
|
@@ -20583,34 +20682,34 @@ function QueryDetailsComponent_ng_container_0_tr_46_Template(rf, ctx) { if (rf &
|
|
|
20583
20682
|
i0.ɵɵpipe(6, "date");
|
|
20584
20683
|
i0.ɵɵelementEnd()();
|
|
20585
20684
|
} if (rf & 2) {
|
|
20586
|
-
const
|
|
20685
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
20587
20686
|
i0.ɵɵadvance(2);
|
|
20588
20687
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "What is the date of the hearing?"));
|
|
20589
20688
|
i0.ɵɵadvance(3);
|
|
20590
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(6, 4,
|
|
20689
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(6, 4, ctx_r0.query.hearingDate, "dd MMM yyyy"));
|
|
20591
20690
|
} }
|
|
20592
|
-
function
|
|
20593
|
-
i0.ɵɵelement(0, "ccd-query-attachments-read",
|
|
20691
|
+
function QueryDetailsComponent_ng_container_0_tr_45_ccd_query_attachments_read_5_Template(rf, ctx) { if (rf & 1) {
|
|
20692
|
+
i0.ɵɵelement(0, "ccd-query-attachments-read", 15);
|
|
20594
20693
|
} if (rf & 2) {
|
|
20595
|
-
const
|
|
20596
|
-
i0.ɵɵproperty("attachments",
|
|
20694
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
20695
|
+
i0.ɵɵproperty("attachments", ctx_r0.query.attachments);
|
|
20597
20696
|
} }
|
|
20598
|
-
function
|
|
20697
|
+
function QueryDetailsComponent_ng_container_0_tr_45_Template(rf, ctx) { if (rf & 1) {
|
|
20599
20698
|
i0.ɵɵelementStart(0, "tr", 6)(1, "th", 7);
|
|
20600
20699
|
i0.ɵɵtext(2);
|
|
20601
20700
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
20602
20701
|
i0.ɵɵelementEnd();
|
|
20603
20702
|
i0.ɵɵelementStart(4, "td", 8);
|
|
20604
|
-
i0.ɵɵtemplate(5,
|
|
20703
|
+
i0.ɵɵtemplate(5, QueryDetailsComponent_ng_container_0_tr_45_ccd_query_attachments_read_5_Template, 1, 1, "ccd-query-attachments-read", 14);
|
|
20605
20704
|
i0.ɵɵelementEnd()();
|
|
20606
20705
|
} if (rf & 2) {
|
|
20607
|
-
const
|
|
20706
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
20608
20707
|
i0.ɵɵadvance(2);
|
|
20609
20708
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "Attachments"));
|
|
20610
20709
|
i0.ɵɵadvance(3);
|
|
20611
|
-
i0.ɵɵproperty("ngIf",
|
|
20710
|
+
i0.ɵɵproperty("ngIf", ctx_r0.query.attachments);
|
|
20612
20711
|
} }
|
|
20613
|
-
function
|
|
20712
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_tr_15_Template(rf, ctx) { if (rf & 1) {
|
|
20614
20713
|
i0.ɵɵelementStart(0, "tr", 6)(1, "th", 7);
|
|
20615
20714
|
i0.ɵɵtext(2);
|
|
20616
20715
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -20625,19 +20724,19 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20625
20724
|
i0.ɵɵadvance(3);
|
|
20626
20725
|
i0.ɵɵtextInterpolate(child_r3.name);
|
|
20627
20726
|
} }
|
|
20628
|
-
function
|
|
20629
|
-
i0.ɵɵelement(0, "ccd-query-attachments-read",
|
|
20727
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_tr_22_ccd_query_attachments_read_5_Template(rf, ctx) { if (rf & 1) {
|
|
20728
|
+
i0.ɵɵelement(0, "ccd-query-attachments-read", 15);
|
|
20630
20729
|
} if (rf & 2) {
|
|
20631
20730
|
const child_r3 = i0.ɵɵnextContext(3).$implicit;
|
|
20632
20731
|
i0.ɵɵproperty("attachments", child_r3.attachments);
|
|
20633
20732
|
} }
|
|
20634
|
-
function
|
|
20733
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_tr_22_Template(rf, ctx) { if (rf & 1) {
|
|
20635
20734
|
i0.ɵɵelementStart(0, "tr", 6)(1, "th", 7);
|
|
20636
20735
|
i0.ɵɵtext(2);
|
|
20637
20736
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
20638
20737
|
i0.ɵɵelementEnd();
|
|
20639
20738
|
i0.ɵɵelementStart(4, "td", 8);
|
|
20640
|
-
i0.ɵɵtemplate(5,
|
|
20739
|
+
i0.ɵɵtemplate(5, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_tr_22_ccd_query_attachments_read_5_Template, 1, 1, "ccd-query-attachments-read", 14);
|
|
20641
20740
|
i0.ɵɵelementEnd()();
|
|
20642
20741
|
} if (rf & 2) {
|
|
20643
20742
|
const child_r3 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -20646,7 +20745,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20646
20745
|
i0.ɵɵadvance(3);
|
|
20647
20746
|
i0.ɵɵproperty("ngIf", child_r3.attachments);
|
|
20648
20747
|
} }
|
|
20649
|
-
function
|
|
20748
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
20650
20749
|
i0.ɵɵelementContainerStart(0);
|
|
20651
20750
|
i0.ɵɵelementStart(1, "table", 3);
|
|
20652
20751
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -20662,7 +20761,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20662
20761
|
i0.ɵɵtext(13);
|
|
20663
20762
|
i0.ɵɵpipe(14, "date");
|
|
20664
20763
|
i0.ɵɵelementEnd()();
|
|
20665
|
-
i0.ɵɵtemplate(15,
|
|
20764
|
+
i0.ɵɵtemplate(15, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_tr_15_Template, 6, 4, "tr", 10);
|
|
20666
20765
|
i0.ɵɵelementStart(16, "tr", 6)(17, "th", 7);
|
|
20667
20766
|
i0.ɵɵtext(18);
|
|
20668
20767
|
i0.ɵɵpipe(19, "rpxTranslate");
|
|
@@ -20670,12 +20769,12 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20670
20769
|
i0.ɵɵelementStart(20, "td", 8);
|
|
20671
20770
|
i0.ɵɵtext(21);
|
|
20672
20771
|
i0.ɵɵelementEnd()();
|
|
20673
|
-
i0.ɵɵtemplate(22,
|
|
20772
|
+
i0.ɵɵtemplate(22, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_tr_22_Template, 6, 4, "tr", 10);
|
|
20674
20773
|
i0.ɵɵelementEnd()();
|
|
20675
20774
|
i0.ɵɵelementContainerEnd();
|
|
20676
20775
|
} if (rf & 2) {
|
|
20677
20776
|
const child_r3 = i0.ɵɵnextContext().$implicit;
|
|
20678
|
-
const
|
|
20777
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
20679
20778
|
i0.ɵɵadvance();
|
|
20680
20779
|
i0.ɵɵattribute("aria-describedby", i0.ɵɵpipeBind1(2, 8, "Response of the query"));
|
|
20681
20780
|
i0.ɵɵadvance(4);
|
|
@@ -20685,7 +20784,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20685
20784
|
i0.ɵɵadvance(3);
|
|
20686
20785
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(14, 14, child_r3.createdOn, "dd MMM yyyy"));
|
|
20687
20786
|
i0.ɵɵadvance(2);
|
|
20688
|
-
i0.ɵɵproperty("ngIf",
|
|
20787
|
+
i0.ɵɵproperty("ngIf", ctx_r0.isCaseworker());
|
|
20689
20788
|
i0.ɵɵadvance(3);
|
|
20690
20789
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(19, 17, "Response detail"));
|
|
20691
20790
|
i0.ɵɵadvance(3);
|
|
@@ -20693,19 +20792,19 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20693
20792
|
i0.ɵɵadvance();
|
|
20694
20793
|
i0.ɵɵproperty("ngIf", child_r3.attachments.length > 0);
|
|
20695
20794
|
} }
|
|
20696
|
-
function
|
|
20697
|
-
i0.ɵɵelement(0, "ccd-query-attachments-read",
|
|
20795
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_template_2_tr_26_ccd_query_attachments_read_5_Template(rf, ctx) { if (rf & 1) {
|
|
20796
|
+
i0.ɵɵelement(0, "ccd-query-attachments-read", 15);
|
|
20698
20797
|
} if (rf & 2) {
|
|
20699
20798
|
const child_r3 = i0.ɵɵnextContext(3).$implicit;
|
|
20700
20799
|
i0.ɵɵproperty("attachments", child_r3.attachments);
|
|
20701
20800
|
} }
|
|
20702
|
-
function
|
|
20801
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_template_2_tr_26_Template(rf, ctx) { if (rf & 1) {
|
|
20703
20802
|
i0.ɵɵelementStart(0, "tr", 6)(1, "th", 7);
|
|
20704
20803
|
i0.ɵɵtext(2);
|
|
20705
20804
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
20706
20805
|
i0.ɵɵelementEnd();
|
|
20707
20806
|
i0.ɵɵelementStart(4, "td", 8);
|
|
20708
|
-
i0.ɵɵtemplate(5,
|
|
20807
|
+
i0.ɵɵtemplate(5, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_template_2_tr_26_ccd_query_attachments_read_5_Template, 1, 1, "ccd-query-attachments-read", 14);
|
|
20709
20808
|
i0.ɵɵelementEnd()();
|
|
20710
20809
|
} if (rf & 2) {
|
|
20711
20810
|
const child_r3 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -20714,7 +20813,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20714
20813
|
i0.ɵɵadvance(3);
|
|
20715
20814
|
i0.ɵɵproperty("ngIf", child_r3.attachments);
|
|
20716
20815
|
} }
|
|
20717
|
-
function
|
|
20816
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
20718
20817
|
i0.ɵɵelementStart(0, "table", 3);
|
|
20719
20818
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
20720
20819
|
i0.ɵɵelementStart(2, "caption", 4)(3, "div");
|
|
@@ -20743,7 +20842,7 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20743
20842
|
i0.ɵɵelementStart(24, "td", 8);
|
|
20744
20843
|
i0.ɵɵtext(25);
|
|
20745
20844
|
i0.ɵɵelementEnd()();
|
|
20746
|
-
i0.ɵɵtemplate(26,
|
|
20845
|
+
i0.ɵɵtemplate(26, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_template_2_tr_26_Template, 6, 4, "tr", 10);
|
|
20747
20846
|
i0.ɵɵelementEnd()();
|
|
20748
20847
|
} if (rf & 2) {
|
|
20749
20848
|
const child_r3 = i0.ɵɵnextContext().$implicit;
|
|
@@ -20765,9 +20864,9 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_ng_
|
|
|
20765
20864
|
i0.ɵɵadvance();
|
|
20766
20865
|
i0.ɵɵproperty("ngIf", child_r3.attachments.length > 0);
|
|
20767
20866
|
} }
|
|
20768
|
-
function
|
|
20867
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
20769
20868
|
i0.ɵɵelementContainerStart(0);
|
|
20770
|
-
i0.ɵɵtemplate(1,
|
|
20869
|
+
i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_container_1_Template, 23, 19, "ng-container", 17)(2, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_ng_template_2_Template, 27, 22, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
20771
20870
|
i0.ɵɵelementContainerEnd();
|
|
20772
20871
|
} if (rf & 2) {
|
|
20773
20872
|
const i_r4 = ctx.index;
|
|
@@ -20775,117 +20874,125 @@ function QueryDetailsComponent_ng_container_0_ng_container_48_ng_container_1_Tem
|
|
|
20775
20874
|
i0.ɵɵadvance();
|
|
20776
20875
|
i0.ɵɵproperty("ngIf", i_r4 % 2 === 0)("ngIfElse", followUpMessage_r5);
|
|
20777
20876
|
} }
|
|
20778
|
-
function
|
|
20877
|
+
function QueryDetailsComponent_ng_container_0_ng_container_46_Template(rf, ctx) { if (rf & 1) {
|
|
20779
20878
|
i0.ɵɵelementContainerStart(0);
|
|
20780
|
-
i0.ɵɵtemplate(1,
|
|
20879
|
+
i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_ng_container_46_ng_container_1_Template, 4, 2, "ng-container", 16);
|
|
20781
20880
|
i0.ɵɵelementContainerEnd();
|
|
20782
20881
|
} if (rf & 2) {
|
|
20783
|
-
const
|
|
20882
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
20784
20883
|
i0.ɵɵadvance();
|
|
20785
|
-
i0.ɵɵproperty("ngForOf",
|
|
20884
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.query.children);
|
|
20786
20885
|
} }
|
|
20787
20886
|
function QueryDetailsComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
20788
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
20789
20887
|
i0.ɵɵelementContainerStart(0);
|
|
20790
|
-
i0.ɵɵ
|
|
20791
|
-
i0.ɵɵ
|
|
20792
|
-
i0.ɵɵ
|
|
20793
|
-
i0.ɵɵ
|
|
20794
|
-
i0.ɵɵpipe(
|
|
20795
|
-
i0.ɵɵ
|
|
20796
|
-
i0.ɵɵ
|
|
20797
|
-
i0.ɵɵpipe(
|
|
20798
|
-
i0.ɵɵelementStart(9, "caption", 4)(10, "div");
|
|
20799
|
-
i0.ɵɵtext(11);
|
|
20800
|
-
i0.ɵɵpipe(12, "rpxTranslate");
|
|
20888
|
+
i0.ɵɵtemplate(1, QueryDetailsComponent_ng_container_0_cut_alert_1_Template, 3, 1, "cut-alert", 2);
|
|
20889
|
+
i0.ɵɵelement(2, "br");
|
|
20890
|
+
i0.ɵɵtemplate(3, QueryDetailsComponent_ng_container_0_p_3_Template, 4, 3, "p", 1);
|
|
20891
|
+
i0.ɵɵelementStart(4, "div")(5, "table", 3);
|
|
20892
|
+
i0.ɵɵpipe(6, "rpxTranslate");
|
|
20893
|
+
i0.ɵɵelementStart(7, "caption", 4)(8, "div");
|
|
20894
|
+
i0.ɵɵtext(9);
|
|
20895
|
+
i0.ɵɵpipe(10, "rpxTranslate");
|
|
20801
20896
|
i0.ɵɵelementEnd()();
|
|
20802
|
-
i0.ɵɵelementStart(
|
|
20803
|
-
i0.ɵɵtext(
|
|
20804
|
-
i0.ɵɵpipe(
|
|
20897
|
+
i0.ɵɵelementStart(11, "tbody", 5)(12, "tr", 6)(13, "th", 7);
|
|
20898
|
+
i0.ɵɵtext(14);
|
|
20899
|
+
i0.ɵɵpipe(15, "rpxTranslate");
|
|
20805
20900
|
i0.ɵɵelementEnd();
|
|
20806
|
-
i0.ɵɵelementStart(
|
|
20807
|
-
i0.ɵɵtext(
|
|
20901
|
+
i0.ɵɵelementStart(16, "td", 8);
|
|
20902
|
+
i0.ɵɵtext(17);
|
|
20808
20903
|
i0.ɵɵelementEnd()();
|
|
20809
|
-
i0.ɵɵelementStart(
|
|
20810
|
-
i0.ɵɵtext(
|
|
20811
|
-
i0.ɵɵpipe(
|
|
20904
|
+
i0.ɵɵelementStart(18, "tr", 6)(19, "th", 7);
|
|
20905
|
+
i0.ɵɵtext(20);
|
|
20906
|
+
i0.ɵɵpipe(21, "rpxTranslate");
|
|
20812
20907
|
i0.ɵɵelementEnd();
|
|
20813
|
-
i0.ɵɵelementStart(
|
|
20814
|
-
i0.ɵɵtext(
|
|
20815
|
-
i0.ɵɵpipe(
|
|
20908
|
+
i0.ɵɵelementStart(22, "td", 8);
|
|
20909
|
+
i0.ɵɵtext(23);
|
|
20910
|
+
i0.ɵɵpipe(24, "date");
|
|
20816
20911
|
i0.ɵɵelementEnd()();
|
|
20817
|
-
i0.ɵɵelementStart(
|
|
20818
|
-
i0.ɵɵtext(
|
|
20819
|
-
i0.ɵɵpipe(
|
|
20912
|
+
i0.ɵɵelementStart(25, "tr", 6)(26, "th", 7);
|
|
20913
|
+
i0.ɵɵtext(27);
|
|
20914
|
+
i0.ɵɵpipe(28, "rpxTranslate");
|
|
20820
20915
|
i0.ɵɵelementEnd();
|
|
20821
|
-
i0.ɵɵelementStart(
|
|
20822
|
-
i0.ɵɵtext(
|
|
20916
|
+
i0.ɵɵelementStart(29, "td", 8);
|
|
20917
|
+
i0.ɵɵtext(30);
|
|
20823
20918
|
i0.ɵɵelementEnd()();
|
|
20824
|
-
i0.ɵɵelementStart(
|
|
20825
|
-
i0.ɵɵtext(
|
|
20826
|
-
i0.ɵɵpipe(
|
|
20919
|
+
i0.ɵɵelementStart(31, "tr", 6)(32, "th", 7);
|
|
20920
|
+
i0.ɵɵtext(33);
|
|
20921
|
+
i0.ɵɵpipe(34, "rpxTranslate");
|
|
20827
20922
|
i0.ɵɵelementEnd();
|
|
20828
|
-
i0.ɵɵelementStart(
|
|
20829
|
-
i0.ɵɵtext(
|
|
20923
|
+
i0.ɵɵelementStart(35, "td", 8);
|
|
20924
|
+
i0.ɵɵtext(36);
|
|
20830
20925
|
i0.ɵɵelementEnd()();
|
|
20831
|
-
i0.ɵɵelementStart(
|
|
20832
|
-
i0.ɵɵtext(
|
|
20833
|
-
i0.ɵɵpipe(
|
|
20926
|
+
i0.ɵɵelementStart(37, "tr", 6)(38, "th", 7);
|
|
20927
|
+
i0.ɵɵtext(39);
|
|
20928
|
+
i0.ɵɵpipe(40, "rpxTranslate");
|
|
20834
20929
|
i0.ɵɵelementEnd();
|
|
20835
|
-
i0.ɵɵelementStart(
|
|
20836
|
-
i0.ɵɵtext(
|
|
20837
|
-
i0.ɵɵpipe(
|
|
20930
|
+
i0.ɵɵelementStart(41, "td", 8);
|
|
20931
|
+
i0.ɵɵtext(42);
|
|
20932
|
+
i0.ɵɵpipe(43, "rpxTranslate");
|
|
20838
20933
|
i0.ɵɵelementEnd()();
|
|
20839
|
-
i0.ɵɵtemplate(
|
|
20934
|
+
i0.ɵɵtemplate(44, QueryDetailsComponent_ng_container_0_tr_44_Template, 7, 7, "tr", 9)(45, QueryDetailsComponent_ng_container_0_tr_45_Template, 6, 4, "tr", 10);
|
|
20840
20935
|
i0.ɵɵelementEnd()()();
|
|
20841
|
-
i0.ɵɵtemplate(
|
|
20936
|
+
i0.ɵɵtemplate(46, QueryDetailsComponent_ng_container_0_ng_container_46_Template, 2, 1, "ng-container", 1);
|
|
20842
20937
|
i0.ɵɵelementContainerEnd();
|
|
20843
20938
|
} if (rf & 2) {
|
|
20844
|
-
const
|
|
20845
|
-
i0.ɵɵadvance(
|
|
20846
|
-
i0.ɵɵ
|
|
20847
|
-
i0.ɵɵadvance(
|
|
20848
|
-
i0.ɵɵ
|
|
20939
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
20940
|
+
i0.ɵɵadvance();
|
|
20941
|
+
i0.ɵɵproperty("ngIf", ctx_r0.hasRespondedToQuery());
|
|
20942
|
+
i0.ɵɵadvance(2);
|
|
20943
|
+
i0.ɵɵproperty("ngIf", ctx_r0.showLink);
|
|
20944
|
+
i0.ɵɵadvance(2);
|
|
20945
|
+
i0.ɵɵattribute("aria-describedby", i0.ɵɵpipeBind1(6, 21, "Details of the query"));
|
|
20849
20946
|
i0.ɵɵadvance(4);
|
|
20850
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
20947
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 23, "Query details"));
|
|
20851
20948
|
i0.ɵɵadvance(5);
|
|
20852
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
20949
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 25, "Last submitted by"));
|
|
20853
20950
|
i0.ɵɵadvance(3);
|
|
20854
|
-
i0.ɵɵtextInterpolate(
|
|
20951
|
+
i0.ɵɵtextInterpolate(ctx_r0.query.lastSubmittedBy);
|
|
20855
20952
|
i0.ɵɵadvance(3);
|
|
20856
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
20953
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(21, 27, "Submission date"));
|
|
20857
20954
|
i0.ɵɵadvance(3);
|
|
20858
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(
|
|
20955
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(24, 29, ctx_r0.query.createdOn, "dd MMM yyyy"));
|
|
20859
20956
|
i0.ɵɵadvance(4);
|
|
20860
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
20957
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(28, 32, "Query subject"));
|
|
20861
20958
|
i0.ɵɵadvance(3);
|
|
20862
|
-
i0.ɵɵtextInterpolate(
|
|
20959
|
+
i0.ɵɵtextInterpolate(ctx_r0.query.subject);
|
|
20863
20960
|
i0.ɵɵadvance(3);
|
|
20864
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
20961
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(34, 34, "Query body"));
|
|
20865
20962
|
i0.ɵɵadvance(3);
|
|
20866
|
-
i0.ɵɵtextInterpolate(
|
|
20963
|
+
i0.ɵɵtextInterpolate(ctx_r0.query.body);
|
|
20867
20964
|
i0.ɵɵadvance(2);
|
|
20868
|
-
i0.ɵɵclassProp("govuk-table__header--no-border",
|
|
20965
|
+
i0.ɵɵclassProp("govuk-table__header--no-border", ctx_r0.query.isHearingRelated);
|
|
20869
20966
|
i0.ɵɵadvance();
|
|
20870
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(
|
|
20967
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(40, 36, "Is the query hearing related?"), " ");
|
|
20871
20968
|
i0.ɵɵadvance(2);
|
|
20872
|
-
i0.ɵɵclassProp("govuk-table__cell--no-border",
|
|
20969
|
+
i0.ɵɵclassProp("govuk-table__cell--no-border", ctx_r0.query.isHearingRelated);
|
|
20873
20970
|
i0.ɵɵadvance();
|
|
20874
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(
|
|
20971
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(43, 38, "Is the query hearing related?", null, ctx_r0.query.isHearingRelated), "");
|
|
20875
20972
|
i0.ɵɵadvance(2);
|
|
20876
|
-
i0.ɵɵproperty("ngIf",
|
|
20973
|
+
i0.ɵɵproperty("ngIf", ctx_r0.query.isHearingRelated === "Yes");
|
|
20877
20974
|
i0.ɵɵadvance();
|
|
20878
|
-
i0.ɵɵproperty("ngIf",
|
|
20975
|
+
i0.ɵɵproperty("ngIf", ctx_r0.query.attachments.length > 0);
|
|
20879
20976
|
i0.ɵɵadvance();
|
|
20880
|
-
i0.ɵɵproperty("ngIf", (
|
|
20977
|
+
i0.ɵɵproperty("ngIf", (ctx_r0.query.children == null ? null : ctx_r0.query.children.length) > 0);
|
|
20881
20978
|
} }
|
|
20882
20979
|
class QueryDetailsComponent {
|
|
20883
20980
|
sessionStorageService;
|
|
20981
|
+
route;
|
|
20982
|
+
router;
|
|
20884
20983
|
query;
|
|
20885
20984
|
backClicked = new EventEmitter();
|
|
20886
20985
|
caseId;
|
|
20887
|
-
|
|
20986
|
+
hasResponded = new EventEmitter();
|
|
20987
|
+
totalNumberOfQueryChildren;
|
|
20988
|
+
showLink = true;
|
|
20989
|
+
message;
|
|
20990
|
+
static QUERY_ITEM_RESPOND = '3';
|
|
20991
|
+
queryItemId;
|
|
20992
|
+
constructor(sessionStorageService, route, router) {
|
|
20888
20993
|
this.sessionStorageService = sessionStorageService;
|
|
20994
|
+
this.route = route;
|
|
20995
|
+
this.router = router;
|
|
20889
20996
|
}
|
|
20890
20997
|
onBack() {
|
|
20891
20998
|
this.backClicked.emit(true);
|
|
@@ -20896,24 +21003,45 @@ class QueryDetailsComponent {
|
|
|
20896
21003
|
&& !(userDetails.roles.includes('pui-case-manager')
|
|
20897
21004
|
|| userDetails.roles.some((role) => role.toLowerCase().includes('judge')));
|
|
20898
21005
|
}
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
21006
|
+
ngOnChanges() {
|
|
21007
|
+
this.toggleLinkVisibility();
|
|
21008
|
+
this.hasRespondedToQuery();
|
|
21009
|
+
}
|
|
21010
|
+
toggleLinkVisibility() {
|
|
21011
|
+
this.queryItemId = this.route.snapshot.params.qid;
|
|
21012
|
+
this.showLink = this.queryItemId !== QueryDetailsComponent.QUERY_ITEM_RESPOND;
|
|
21013
|
+
}
|
|
21014
|
+
hasRespondedToQuery() {
|
|
21015
|
+
if (this.totalNumberOfQueryChildren >= 0 && this.isCaseworker() && this.totalNumberOfQueryChildren % 2 !== 0) {
|
|
21016
|
+
this.message = Constants.TASK_COMPLETION_ERROR;
|
|
21017
|
+
this.hasResponded.emit(true);
|
|
21018
|
+
return true;
|
|
21019
|
+
}
|
|
21020
|
+
this.hasResponded.emit(false);
|
|
21021
|
+
return false;
|
|
21022
|
+
}
|
|
21023
|
+
static ɵfac = function QueryDetailsComponent_Factory(t) { return new (t || QueryDetailsComponent)(i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router)); };
|
|
21024
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryDetailsComponent, selectors: [["ccd-query-details"]], inputs: { query: "query", caseId: "caseId", totalNumberOfQueryChildren: "totalNumberOfQueryChildren" }, outputs: { backClicked: "backClicked", hasResponded: "hasResponded" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["followUpMessage", ""], [4, "ngIf"], ["type", "error", 4, "ngIf"], [1, "govuk-table", "query-details-table"], [1, "govuk-table__caption", "govuk-table__caption--l"], [1, "govuk-table__body"], [1, "govuk-table__row"], ["scope", "row", 1, "govuk-table__header"], [1, "govuk-table__cell"], ["class", "govuk-table__row govuk-table__row--isHearingRelated", 4, "ngIf"], ["class", "govuk-table__row", 4, "ngIf"], ["type", "error"], ["href", "javascript:void(0)", 1, "govuk-link", 3, "click"], [1, "govuk-table__row", "govuk-table__row--isHearingRelated"], [3, "attachments", 4, "ngIf"], [3, "attachments"], [4, "ngFor", "ngForOf"], [4, "ngIf", "ngIfElse"]], template: function QueryDetailsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21025
|
+
i0.ɵɵtemplate(0, QueryDetailsComponent_ng_container_0_Template, 47, 42, "ng-container", 1);
|
|
20902
21026
|
} if (rf & 2) {
|
|
20903
21027
|
i0.ɵɵproperty("ngIf", ctx.query);
|
|
20904
21028
|
} }, styles: [".query-details-table[_ngcontent-%COMP%] .govuk-table__header[_ngcontent-%COMP%]{width:330px}"] });
|
|
20905
21029
|
}
|
|
20906
21030
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryDetailsComponent, [{
|
|
20907
21031
|
type: Component,
|
|
20908
|
-
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <br/>\n <p>\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"query.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr *ngIf=\"isCaseworker()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <!-- <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div> -->\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
|
|
20909
|
-
}], () => [{ type: SessionStorageService }], { query: [{
|
|
21032
|
+
args: [{ selector: 'ccd-query-details', template: "<ng-container *ngIf=\"query\">\n <cut-alert type=\"error\" *ngIf=\"hasRespondedToQuery()\">\n <ng-container>{{message}}</ng-container>\n </cut-alert>\n\n <br/>\n <p *ngIf=\"showLink\">\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"onBack()\">{{ 'Back to query list' | rpxTranslate }}</a>\n </p>\n <div>\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Details of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Query details' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.lastSubmittedBy }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query subject' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.subject }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query body' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.body }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" [class.govuk-table__header--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </th>\n <td class=\"govuk-table__cell\" [class.govuk-table__cell--no-border]=\"query.isHearingRelated\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : (query.isHearingRelated) }}</td>\n </tr>\n <tr class=\"govuk-table__row govuk-table__row--isHearingRelated\" *ngIf=\"query.isHearingRelated === 'Yes'\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'What is the date of the hearing?' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ query.hearingDate | date: 'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"query.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"query.attachments\"\n [attachments]=\"query.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <ng-container *ngIf=\"query.children?.length > 0\">\n <ng-container *ngFor=\"let child of query.children; let i = index;\">\n <ng-container *ngIf=\"i % 2 === 0; else followUpMessage\">\n <table class=\"govuk-table query-details-table\" [attr.aria-describedby]=\"'Response of the query' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Response' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last response date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr *ngIf=\"isCaseworker()\" class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Caseworker name' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Response detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n\n <ng-template #followUpMessage>\n <!-- <div class=\"query_details_caption\">{{ 'Follow-up' | rpxTranslate }}</div> -->\n <table class=\"govuk-table query-details-table\"\n [attr.aria-describedby]=\"'Follow-up of the response' | rpxTranslate\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\">\n <div>{{ 'Follow up query' | rpxTranslate }}</div>\n </caption>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submission date' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.createdOn | date: 'dd MMM yyyy' }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Last submitted by' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.name }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Query detail' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">{{ child.body }}</td>\n </tr>\n\n <tr class=\"govuk-table__row\" *ngIf=\"child.attachments.length > 0\">\n <th scope=\"row\" class=\"govuk-table__header\">{{ 'Attachments' | rpxTranslate }}</th>\n <td class=\"govuk-table__cell\">\n <ccd-query-attachments-read\n *ngIf=\"child.attachments\"\n [attachments]=\"child.attachments\"\n >\n </ccd-query-attachments-read>\n </td>\n </tr>\n </tbody>\n </table>\n </ng-template>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".query-details-table .govuk-table__header{width:330px}\n"] }]
|
|
21033
|
+
}], () => [{ type: SessionStorageService }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }], { query: [{
|
|
20910
21034
|
type: Input
|
|
20911
21035
|
}], backClicked: [{
|
|
20912
21036
|
type: Output
|
|
20913
21037
|
}], caseId: [{
|
|
20914
21038
|
type: Input
|
|
21039
|
+
}], hasResponded: [{
|
|
21040
|
+
type: Output
|
|
21041
|
+
}], totalNumberOfQueryChildren: [{
|
|
21042
|
+
type: Input
|
|
20915
21043
|
}] }); })();
|
|
20916
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber:
|
|
21044
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryDetailsComponent, { className: "QueryDetailsComponent", filePath: "lib/shared/components/palette/query-management/components/query-details/query-details.component.ts", lineNumber: 11 }); })();
|
|
20917
21045
|
|
|
20918
21046
|
class QueryEventCompletionComponent {
|
|
20919
21047
|
eventCompletionParams;
|
|
@@ -21505,8 +21633,8 @@ class QueryWriteRaiseQueryComponent {
|
|
|
21505
21633
|
}] }); })();
|
|
21506
21634
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 8 }); })();
|
|
21507
21635
|
|
|
21508
|
-
function
|
|
21509
|
-
i0.ɵɵelementStart(0, "p",
|
|
21636
|
+
function QueryWriteRespondToQueryComponent_div_12_div_1_p_10_Template(rf, ctx) { if (rf & 1) {
|
|
21637
|
+
i0.ɵɵelementStart(0, "p", 16)(1, "span", 17);
|
|
21510
21638
|
i0.ɵɵtext(2);
|
|
21511
21639
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
21512
21640
|
i0.ɵɵelementEnd();
|
|
@@ -21514,66 +21642,123 @@ function QueryWriteRespondToQueryComponent_div_12_p_11_Template(rf, ctx) { if (r
|
|
|
21514
21642
|
i0.ɵɵpipe(5, "rpxTranslate");
|
|
21515
21643
|
i0.ɵɵelementEnd();
|
|
21516
21644
|
} if (rf & 2) {
|
|
21517
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
21645
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
21518
21646
|
i0.ɵɵadvance(2);
|
|
21519
21647
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
|
|
21520
21648
|
i0.ɵɵadvance(2);
|
|
21521
21649
|
i0.ɵɵtextInterpolate1("", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND ? ctx_r0.raiseQueryErrorMessages.RESPOND_QUERY_BODY : i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessages.QUERY_BODY), " ");
|
|
21522
21650
|
} }
|
|
21523
|
-
function
|
|
21524
|
-
i0.ɵɵelementStart(0, "div"
|
|
21525
|
-
i0.ɵɵtext(
|
|
21526
|
-
i0.ɵɵpipe(
|
|
21651
|
+
function QueryWriteRespondToQueryComponent_div_12_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
21652
|
+
i0.ɵɵelementStart(0, "div")(1, "h1", 9);
|
|
21653
|
+
i0.ɵɵtext(2);
|
|
21654
|
+
i0.ɵɵpipe(3, "rpxTranslate");
|
|
21527
21655
|
i0.ɵɵelementEnd();
|
|
21528
|
-
i0.ɵɵelementStart(
|
|
21529
|
-
i0.ɵɵtext(
|
|
21530
|
-
i0.ɵɵpipe(
|
|
21656
|
+
i0.ɵɵelementStart(4, "div", 10)(5, "div", 11)(6, "div", 12)(7, "label", 13);
|
|
21657
|
+
i0.ɵɵtext(8);
|
|
21658
|
+
i0.ɵɵpipe(9, "rpxTranslate");
|
|
21531
21659
|
i0.ɵɵelementEnd()();
|
|
21532
|
-
i0.ɵɵtemplate(
|
|
21533
|
-
i0.ɵɵelementStart(
|
|
21534
|
-
i0.ɵɵtext(
|
|
21535
|
-
i0.ɵɵelementEnd()()()()
|
|
21660
|
+
i0.ɵɵtemplate(10, QueryWriteRespondToQueryComponent_div_12_div_1_p_10_Template, 6, 6, "p", 14);
|
|
21661
|
+
i0.ɵɵelementStart(11, "textarea", 15);
|
|
21662
|
+
i0.ɵɵtext(12, " ");
|
|
21663
|
+
i0.ɵɵelementEnd()()()();
|
|
21536
21664
|
} if (rf & 2) {
|
|
21537
|
-
let
|
|
21538
|
-
let tmp_5_0;
|
|
21665
|
+
let tmp_4_0;
|
|
21539
21666
|
let tmp_6_0;
|
|
21540
|
-
|
|
21541
|
-
i0.ɵɵ
|
|
21542
|
-
i0.ɵɵ
|
|
21667
|
+
let tmp_7_0;
|
|
21668
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
21669
|
+
i0.ɵɵadvance(2);
|
|
21670
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND ? "Respond to a query" : i0.ɵɵpipeBind1(3, 9, "Ask a follow-up question"), " ");
|
|
21543
21671
|
i0.ɵɵadvance(2);
|
|
21544
21672
|
i0.ɵɵproperty("formGroup", ctx_r0.formGroup);
|
|
21545
21673
|
i0.ɵɵadvance();
|
|
21546
|
-
i0.ɵɵclassProp("govuk-form-group--error", ctx_r0.submitted && ((
|
|
21674
|
+
i0.ɵɵclassProp("govuk-form-group--error", ctx_r0.submitted && ((tmp_4_0 = ctx_r0.formGroup.get("body")) == null ? null : tmp_4_0.hasError("required")));
|
|
21547
21675
|
i0.ɵɵadvance(3);
|
|
21548
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(
|
|
21676
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(9, 11, "Query Body"), " ");
|
|
21549
21677
|
i0.ɵɵadvance(2);
|
|
21550
|
-
i0.ɵɵproperty("ngIf", ctx_r0.submitted && ((
|
|
21678
|
+
i0.ɵɵproperty("ngIf", ctx_r0.submitted && ((tmp_6_0 = ctx_r0.formGroup.get("body")) == null ? null : tmp_6_0.hasError("required")));
|
|
21551
21679
|
i0.ɵɵadvance();
|
|
21552
|
-
i0.ɵɵclassProp("govuk-textarea--error", ctx_r0.submitted && ((
|
|
21680
|
+
i0.ɵɵclassProp("govuk-textarea--error", ctx_r0.submitted && ((tmp_7_0 = ctx_r0.formGroup.get("body")) == null ? null : tmp_7_0.hasError("required")));
|
|
21553
21681
|
i0.ɵɵproperty("formControlName", "body");
|
|
21554
21682
|
} }
|
|
21683
|
+
function QueryWriteRespondToQueryComponent_div_12_Template(rf, ctx) { if (rf & 1) {
|
|
21684
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
21685
|
+
i0.ɵɵtemplate(1, QueryWriteRespondToQueryComponent_div_12_div_1_Template, 13, 13, "div", 8);
|
|
21686
|
+
i0.ɵɵelementEnd();
|
|
21687
|
+
} if (rf & 2) {
|
|
21688
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
21689
|
+
i0.ɵɵadvance();
|
|
21690
|
+
i0.ɵɵproperty("ngIf", !ctx_r0.hasRespondedToQuery);
|
|
21691
|
+
} }
|
|
21555
21692
|
class QueryWriteRespondToQueryComponent {
|
|
21556
21693
|
caseNotifier;
|
|
21694
|
+
route;
|
|
21557
21695
|
queryItem;
|
|
21558
21696
|
formGroup;
|
|
21559
21697
|
queryCreateContext;
|
|
21560
21698
|
submitted = false;
|
|
21699
|
+
caseQueriesCollections;
|
|
21561
21700
|
showForm;
|
|
21701
|
+
hasRespondedToQueryTask = new EventEmitter();
|
|
21562
21702
|
queryCreateContextEnum = QueryCreateContext;
|
|
21563
21703
|
raiseQueryErrorMessages = RaiseQueryErrorMessage;
|
|
21564
21704
|
caseId;
|
|
21705
|
+
queryItemId;
|
|
21565
21706
|
caseDetails;
|
|
21566
|
-
|
|
21707
|
+
totalNumberOfQueryChildren;
|
|
21708
|
+
queryItemDisplay;
|
|
21709
|
+
hasRespondedToQuery = false;
|
|
21710
|
+
static QUERY_ITEM_RESPOND = '3';
|
|
21711
|
+
static QUERY_ITEM_FOLLOWUP = '4';
|
|
21712
|
+
constructor(caseNotifier, route) {
|
|
21567
21713
|
this.caseNotifier = caseNotifier;
|
|
21714
|
+
this.route = route;
|
|
21568
21715
|
}
|
|
21569
21716
|
ngOnInit() {
|
|
21570
|
-
this.
|
|
21571
|
-
|
|
21572
|
-
|
|
21717
|
+
this.queryItemId = this.route.snapshot.params.qid;
|
|
21718
|
+
this.caseNotifier.caseView.pipe(take(1)).subscribe({
|
|
21719
|
+
next: (caseDetails) => {
|
|
21720
|
+
this.caseId = caseDetails?.case_id ?? '';
|
|
21721
|
+
this.caseDetails = caseDetails;
|
|
21722
|
+
},
|
|
21723
|
+
error: (err) => {
|
|
21724
|
+
console.error('Error retrieving case details:', err);
|
|
21725
|
+
}
|
|
21573
21726
|
});
|
|
21574
21727
|
}
|
|
21575
|
-
|
|
21576
|
-
|
|
21728
|
+
ngOnChanges() {
|
|
21729
|
+
if (this.queryItemId === QueryWriteRespondToQueryComponent.QUERY_ITEM_RESPOND
|
|
21730
|
+
&& this.caseQueriesCollections?.length > 0) {
|
|
21731
|
+
if (!this.caseQueriesCollections[0]) {
|
|
21732
|
+
console.error('caseQueriesCollections[0] is undefined!', this.caseQueriesCollections);
|
|
21733
|
+
return;
|
|
21734
|
+
}
|
|
21735
|
+
const numberOfQueryChildren = new QueryListData(this.caseQueriesCollections[0]);
|
|
21736
|
+
this.totalNumberOfQueryChildren = numberOfQueryChildren?.queries?.[0]?.children?.length || 0;
|
|
21737
|
+
const messageId = this.route.snapshot.params.dataid;
|
|
21738
|
+
if (!messageId) {
|
|
21739
|
+
console.warn('No messageId found in route params:', this.route.snapshot.params);
|
|
21740
|
+
return;
|
|
21741
|
+
}
|
|
21742
|
+
const filteredMessages = this.caseQueriesCollections
|
|
21743
|
+
.map((caseData) => caseData?.caseMessages || []) // Ensure caseMessages is always an array
|
|
21744
|
+
.flat() // Flatten into a single array of messages
|
|
21745
|
+
.filter((message) => message?.value?.id === messageId); // Safe access
|
|
21746
|
+
if (filteredMessages.length > 0) {
|
|
21747
|
+
const matchingMessage = filteredMessages[0]?.value;
|
|
21748
|
+
if (matchingMessage) {
|
|
21749
|
+
this.queryItemDisplay = new QueryListItem();
|
|
21750
|
+
Object.assign(this.queryItemDisplay, matchingMessage);
|
|
21751
|
+
this.queryItem = this.queryItemDisplay;
|
|
21752
|
+
}
|
|
21753
|
+
}
|
|
21754
|
+
}
|
|
21755
|
+
}
|
|
21756
|
+
hasResponded(value) {
|
|
21757
|
+
this.hasRespondedToQuery = value;
|
|
21758
|
+
this.hasRespondedToQueryTask.emit(value);
|
|
21759
|
+
}
|
|
21760
|
+
static ɵfac = function QueryWriteRespondToQueryComponent_Factory(t) { return new (t || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute)); };
|
|
21761
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", caseQueriesCollections: "caseQueriesCollections", showForm: "showForm" }, outputs: { hasRespondedToQueryTask: "hasRespondedToQueryTask" }, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 10, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], [3, "hasResponded", "query", "totalNumberOfQueryChildren"], ["class", "query-respond", 4, "ngIf"], [1, "query-respond"], [4, "ngIf"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21577
21762
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 0)(2, "div", 1);
|
|
21578
21763
|
i0.ɵɵtext(3);
|
|
21579
21764
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -21585,27 +21770,27 @@ class QueryWriteRespondToQueryComponent {
|
|
|
21585
21770
|
i0.ɵɵelementStart(8, "div", 3);
|
|
21586
21771
|
i0.ɵɵelement(9, "ccd-query-case-details-header", 4);
|
|
21587
21772
|
i0.ɵɵelementEnd();
|
|
21588
|
-
i0.ɵɵelementStart(10, "div");
|
|
21589
|
-
i0.ɵɵ
|
|
21590
|
-
i0.ɵɵelementEnd()();
|
|
21591
|
-
i0.ɵɵtemplate(12, QueryWriteRespondToQueryComponent_div_12_Template,
|
|
21773
|
+
i0.ɵɵelementStart(10, "div")(11, "ccd-query-details", 5);
|
|
21774
|
+
i0.ɵɵlistener("hasResponded", function QueryWriteRespondToQueryComponent_Template_ccd_query_details_hasResponded_11_listener($event) { return ctx.hasResponded($event); });
|
|
21775
|
+
i0.ɵɵelementEnd()()();
|
|
21776
|
+
i0.ɵɵtemplate(12, QueryWriteRespondToQueryComponent_div_12_Template, 2, 1, "div", 6);
|
|
21592
21777
|
} if (rf & 2) {
|
|
21593
21778
|
i0.ɵɵadvance(3);
|
|
21594
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4,
|
|
21779
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 6, "Respond to a query"));
|
|
21595
21780
|
i0.ɵɵadvance(3);
|
|
21596
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7,
|
|
21781
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 8, "Query details"));
|
|
21597
21782
|
i0.ɵɵadvance(3);
|
|
21598
21783
|
i0.ɵɵproperty("caseDetails", ctx.caseDetails);
|
|
21599
21784
|
i0.ɵɵadvance(2);
|
|
21600
|
-
i0.ɵɵproperty("query", ctx.queryItem);
|
|
21785
|
+
i0.ɵɵproperty("query", ctx.queryItem)("totalNumberOfQueryChildren", ctx.totalNumberOfQueryChildren);
|
|
21601
21786
|
i0.ɵɵadvance();
|
|
21602
21787
|
i0.ɵɵproperty("ngIf", ctx.showForm);
|
|
21603
21788
|
} }, styles: [".query-respond[_ngcontent-%COMP%]{width:100%;max-width:720px}"] });
|
|
21604
21789
|
}
|
|
21605
21790
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRespondToQueryComponent, [{
|
|
21606
21791
|
type: Component,
|
|
21607
|
-
args: [{ selector: 'ccd-query-write-respond-to-query', template: "<div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Respond to a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-0\">{{ 'Query details' | rpxTranslate }}</h1>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryItem\"></ccd-query-details>\n </div>\n</div>\n
|
|
21608
|
-
}], () => [{ type: CaseNotifier }], { queryItem: [{
|
|
21792
|
+
args: [{ selector: 'ccd-query-write-respond-to-query', template: "<div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Respond to a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-0\">{{ 'Query details' | rpxTranslate }}</h1>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryItem\"\n [totalNumberOfQueryChildren]=\"totalNumberOfQueryChildren\"\n (hasResponded)=\"hasResponded($event)\"></ccd-query-details>\n </div>\n</div>\n<div class=\"query-respond\" *ngIf=\"showForm\">\n <div *ngIf=\"!hasRespondedToQuery\">\n <h1 class=\"govuk-heading-m\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Respond to a query' : 'Ask a follow-up question' | rpxTranslate }}\n </h1>\n\n <div [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group body-textarea\"\n [class.govuk-form-group--error]=\"submitted && formGroup.get('body')?.hasError('required')\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query Body' | rpxTranslate }}\n </label>\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body')?.hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ queryCreateContext === queryCreateContextEnum.RESPOND ? raiseQueryErrorMessages.RESPOND_QUERY_BODY : raiseQueryErrorMessages.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\" class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body')?.hasError('required')\" id=\"body\"\n name=\"body\" rows=\"5\" aria-describedby=\"body-hint body-error\">\n </textarea>\n </div>\n </div>\n </div>\n</div>\n", styles: [".query-respond{width:100%;max-width:720px}\n"] }]
|
|
21793
|
+
}], () => [{ type: CaseNotifier }, { type: i1$1.ActivatedRoute }], { queryItem: [{
|
|
21609
21794
|
type: Input
|
|
21610
21795
|
}], formGroup: [{
|
|
21611
21796
|
type: Input
|
|
@@ -21613,8 +21798,12 @@ class QueryWriteRespondToQueryComponent {
|
|
|
21613
21798
|
type: Input
|
|
21614
21799
|
}], submitted: [{
|
|
21615
21800
|
type: Input
|
|
21801
|
+
}], caseQueriesCollections: [{
|
|
21802
|
+
type: Input
|
|
21616
21803
|
}], showForm: [{
|
|
21617
21804
|
type: Input
|
|
21805
|
+
}], hasRespondedToQueryTask: [{
|
|
21806
|
+
type: Output
|
|
21618
21807
|
}] }); })();
|
|
21619
21808
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber: 14 }); })();
|
|
21620
21809
|
|
|
@@ -21745,7 +21934,6 @@ class QueryConfirmationComponent {
|
|
|
21745
21934
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryConfirmationComponent, { className: "QueryConfirmationComponent", filePath: "lib/shared/components/palette/query-management/components/query-confirmation/query-confirmation.component.ts", lineNumber: 9 }); })();
|
|
21746
21935
|
|
|
21747
21936
|
const _c0$B = (a0, a1) => ["/query-management", "query", a0, "4", a1];
|
|
21748
|
-
const _c1$e = (a0, a1) => ["/query-management", "query", a0, "3", a1];
|
|
21749
21937
|
function ReadQueryManagementFieldComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
21750
21938
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
21751
21939
|
i0.ɵɵelementStart(0, "div", 5)(1, "ccd-query-list", 6);
|
|
@@ -21813,33 +22001,17 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template
|
|
|
21813
22001
|
i0.ɵɵadvance();
|
|
21814
22002
|
i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) > 0 && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) % 2 === 1)("ngIfElse", queryIsInReview_r5);
|
|
21815
22003
|
} }
|
|
21816
|
-
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
21817
|
-
i0.ɵɵelementContainerStart(0);
|
|
21818
|
-
i0.ɵɵelementStart(1, "button", 9);
|
|
21819
|
-
i0.ɵɵtext(2);
|
|
21820
|
-
i0.ɵɵpipe(3, "rpxTranslate");
|
|
21821
|
-
i0.ɵɵelementEnd();
|
|
21822
|
-
i0.ɵɵelementContainerEnd();
|
|
21823
|
-
} if (rf & 2) {
|
|
21824
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
21825
|
-
i0.ɵɵadvance();
|
|
21826
|
-
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction2(4, _c1$e, ctx_r1.caseId, ctx_r1.query.id));
|
|
21827
|
-
i0.ɵɵadvance();
|
|
21828
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Respond to a query"), " ");
|
|
21829
|
-
} }
|
|
21830
22004
|
function ReadQueryManagementFieldComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
21831
22005
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
21832
22006
|
i0.ɵɵelementStart(0, "ccd-query-details", 7);
|
|
21833
22007
|
i0.ɵɵlistener("backClicked", function ReadQueryManagementFieldComponent_ng_template_1_Template_ccd_query_details_backClicked_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showQueryList = true); });
|
|
21834
22008
|
i0.ɵɵelementEnd();
|
|
21835
|
-
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 8)
|
|
22009
|
+
i0.ɵɵtemplate(1, ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template, 4, 2, "ng-container", 8);
|
|
21836
22010
|
} if (rf & 2) {
|
|
21837
22011
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
21838
22012
|
i0.ɵɵproperty("query", ctx_r1.query)("caseId", ctx_r1.caseId);
|
|
21839
22013
|
i0.ɵɵadvance();
|
|
21840
22014
|
i0.ɵɵproperty("ngIf", !ctx_r1.isCaseworker());
|
|
21841
|
-
i0.ɵɵadvance();
|
|
21842
|
-
i0.ɵɵproperty("ngIf", (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) >= 0 && ctx_r1.isCaseworker() && (ctx_r1.query == null ? null : ctx_r1.query.children == null ? null : ctx_r1.query.children.length) % 2 === 0);
|
|
21843
22015
|
} }
|
|
21844
22016
|
class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
21845
22017
|
route;
|
|
@@ -21898,7 +22070,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
21898
22070
|
}
|
|
21899
22071
|
static ɵfac = function ReadQueryManagementFieldComponent_Factory(t) { return new (t || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier)); };
|
|
21900
22072
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21901
|
-
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 2)(1, ReadQueryManagementFieldComponent_ng_template_1_Template,
|
|
22073
|
+
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 2)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
21902
22074
|
} if (rf & 2) {
|
|
21903
22075
|
const singleQueryDetails_r6 = i0.ɵɵreference(2);
|
|
21904
22076
|
i0.ɵɵproperty("ngIf", ctx.showQueryList)("ngIfElse", singleQueryDetails_r6);
|
|
@@ -21906,7 +22078,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
21906
22078
|
}
|
|
21907
22079
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
21908
22080
|
type: Component,
|
|
21909
|
-
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isCaseworker()\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and will respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n
|
|
22081
|
+
args: [{ selector: 'ccd-read-query-management-field', template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isCaseworker()\">\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and will respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-container>\n</ng-template>\n" }]
|
|
21910
22082
|
}], () => [{ type: i1$1.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }], null); })();
|
|
21911
22083
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 14 }); })();
|
|
21912
22084
|
|
|
@@ -27648,7 +27820,7 @@ class EventLogTableComponent {
|
|
|
27648
27820
|
}
|
|
27649
27821
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogTableComponent, [{
|
|
27650
27822
|
type: Component,
|
|
27651
|
-
args: [{ selector: 'ccd-event-log-table', template: "<table class=\"EventLogTable\">\n <caption><h2 class=\"heading-h2\">{{'History' | rpxTranslate}}</h2></caption>\n <thead>\n <tr>\n <th><span class=\"text-16\">{{'Event' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Date' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Author' | rpxTranslate}}</span></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let event of events\" (click)=\"select(event)\" (keyup)=\"select(event)\" [ngClass]=\"{'EventLogTable-Selected': selected === event}\" tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforRow(event)}}\">\n <td>\n <ng-container [ngSwitch]=\"isPartOfCaseTimeline\">\n <div id=\"case-timeline\" *ngSwitchCase=\"true\">\n <a (click)=\"caseHistoryClicked(event.id)\"\n *ngIf=\"event.state_id !== 'Draft'\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n </div>\n <div *ngSwitchCase=\"false\">\n <a [routerLink]=\"['./', 'event', event.id, 'history']\"\n [target]=\"'_blank'\"\n *ngIf=\"event.state_id !== 'Draft'\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n </div>\n </ng-container>\n <span *ngIf=\"event.state_id === 'Draft'\">{{event.event_name}}</span>\n <div class=\"tooltip\" *ngIf=\"significantItemExist(event)\">\n <a href=\"{{getSignificantItemUrl(event)}}\" target=\"_blank\" rel=\"noopener\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">\n <img class=\"doc-img\" alt=\"document image\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABoCAYAAABmOHdtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAkoSURBVHhe7d33c5RFHAZw/wCKiF0s2LAwiigq9l5G/UV/UUeFkEAoQqiWoKKI1Dg6YxQQbGmkXQoJIQQiaSShhiQMkgIphCSXkN4buPtcnnDG9fXCa+FN9mY+M5Lce7f3ZPb2u/vu+3rRsKn+Z4ey4e7BIB4XnQ8doA7QHB2gSTpAk3SAJlk+wOG9VL/7L+gATbrgAxzlHgAM6skVcTDhw2i4daENXvbZCXd9EAU8fqRbADi/5j9JB2jSBRvg2Hmh8MAnMbAl/Ths+jUPqhvboLapHXJKTkPU/mKI2FcEdyyJhOvmhoLqvczQAZp0wQU4YVEAuPnGw5GTtdDd0wOdXd3Q1uGQXVID/HlXdw+0tHVCWU0zvLMhFSZ5R4Dqvc+HDtCkCybAW8RAIHn6xkJpuR3aOrqgqqEVPDanwZu+u8HLLwPY1aduTAF7fSvwuLqmNliweRfc6x0JqrYMxN8FONwj9Cz0Pq8/HWBvEP2Do389wFHugTDROxqOldcDu2hmfiXcucQGN8wLgxHiWOnc6zjKncs9t8DVs4Ih+kAxFFY2QK0IUXr1q11wvRhYJOc2DQSD6B8cDXMLPAuKYyUd4P8d4Eg3B7+UfOgRA4V0XHxYafx7kcCCePT0IHhudTyEZZ6Al9YlAAO+bEbQH8RlnYT6lg4oqW6CG+eHw7Apfg6KNhrRAVo9wAeXxcKu3DJgOTLn53S4cmYwMLiA1AI4VdsCja0dwC5feroZOKXjcWO9woDHtbSLMkfYmHgMVG1zhQ7Q6gHyg/IDnbA3AssRLiLM/SUDyutagc8vrmoEDj4suAsqGuCa2SFwuWcQLAzIhJ6eMxCYVgi3LY4AVRuN6ACtHuALaxKgobUT8kUI0uRlMcAy5+fkfOjsktO5nr4pHrvmG75JUFzdDE1iGie9/s1uuHiaP7y4NgH4B8gtrYFJH8eAqo1GdIBWD5BTs6KqJmCZMW5RBLAgfmd9MvDxeeRhYNe7QhTPUqWYvkFdC2xK/A34fl9EHYZ80b2lmqZ2GPNuKDi3zRU6QKsHyC7F4PjB7vsoBi6eFgCBaQXQ0dkN2cWn4VJRJEvsgtuzSqFdPEd6ZlU8cKr31BfxwN/zDzdZlFKSqo1GdIBWD3D8+1HAQvhQUTWc+/J3BLj1QDHwyz+zwA4MhoH/euQUsJzhFO8SjwC4X4QscZks6Wg5vOKzE1RtNKIDtHqAb36bBOVieiXVN7cDB4crZ24Bt+9TgQXwmpgc4GDDQrm6oRUqxAAi+cTmwAg3f+Agwikfnz9mdjCo2mhEB2j1AN/6Lgn4gVhWjFtkg9EegbA8MgvYNW37ioFTNRbUHIRYmE8XJZLE5TD+u0EMWNLpxjbg8ao2GtEBWj3AmxeEAx9ZYgCR5vllAAeR2EMl0NDSDnweBxGWKzyxztObj6/YDix3uHzGQcS2twg42KjaaEQHaPUAH/9cfEChTgwcUm1zBzz82TZgF14hvvglLiYE7SkEdmEuzXM5jIW55w9pwFMHM8R/S/0Ld8t2YR2g4ocD4bYxBfYXVgG/3Lm5iEv67ptSgY8vt+UCt7dd+24osBzilo5l4QeBC7OrtmYDyxwue42ZEwKqNhrRAVo9QBbMreILXWIXfHtDCnAQCU4/DpzK7cmrgNHTRRcXuBiwJ68S+HrPrNoBl4ivAenplduBiwmJuWXAKZ6qjUZ0gIMlwOa2DiiqaoS31ydDX4BiwJAYYNqxCmB5wkEnI98OXJx4emU8jHKX2z/8UepIDHBXThnoAIdqgAyKm4h4ovxGr1DoG0S+TwE+1okBRLpFFOHSdXPDgEv6nBouDT0AfL/V0Yfhz4NIKDi3zRU6QKsH+NCnscBFBBbULLA5SKyMzgYu6funFsBVs4Lh5gU2KBGhSXy9KRuSgYsJM3/cAyyX8srrYaxXOKjaaEQHaPUAOYXqFhN/iSfMFwdmAhcLth8uBXbxgyeqgL/nhTbx4jkSNylxcOAmo4dEqSNxEAkRpZH0wtoEULXRiA7Q6gG+9nUiFFY2Aif549+LAJYpq7bmABdUt4iSRrp6dghwaZ8bJ9mFueWDS/qzf0qHxtZOsNe3ADdmqtpoRAdo9QB5OrFYfGiJZcWED6OAWzs8f0wHnlRaHpEFXJBlucM/AKeEH4UdAC4mrI3NBS46cAsIl8VUbTSiA7R6gFyOYnBHy+pgmiiaJW5L25F9ErhIkHy0HPj7J1bEAZfFuPD66PI44GDz8Kdiyie0d3ZBgpjGSc+K6Z2kaqMRHaDVA3xMfDiJW3W5NfeRz7YBP3h45nHoEKWJtK/QDiy0n1udAPx5S3sX3Lt0KzDo59fsAAbIQnri0mhQtdGIDtDqAbJ8mLIhBbi5nFs6eKE0p2B8LAnaCzfNDwdukOQF2OzK3MrB91sXmwMn7A3ARQXLDiI6QMUPzwfLDE76+XMW0ryEn4PDT0l5wNOeDJqDREh6IfAPwdOaz68WXVjglJCD1kTRzSXnNrlCBzhYAvwrnIIliBJG4pI+bzLBJX8+n4MO/yA8ngFy0OKUMPVYBXDp3/m9XaEDHOwBcirHDZWcyn0spmcSp3CqY50xUF4yxsHjVE0z8JYDqmON6AAHe4C8gIYX1jBAn225wPJFdawzBsibVHARgUFyEFIda0QHONgDpK/jcoHlB28e4WoBfKmY7kncUtzVLW/S091XHvHiRtWxRnSAgz7A3ptBcNmLS/a8+VjU/iLg7U5YtvB4bioatzAceHkrb27Bk0osf/7w3i7QAQ76AHtxAyVPlPNWTly6z8ivhDd8d8NLPjvBY1Mq8CZlvClZQXkd8OJDHaAO0DWTvG3gtTkRePqSgwJPmPMSLm5zO3PmDBRW1IPHehGucNuicFC9lyt0gEMtQLr7gyjg1g0uCrCrcoq2t8AOyb9VABcTbl9sA9VrD4QOUPHaA2HZAIk3Fxsx1Q/u8Y4GBsugeVKJ2+FUr3U+dIAmWT7A/5sO0CQdoEk6QJN0gCbpAE0yHSBfYKgaMcMG/YMjHeDfMB2g6iDtHB2gSTpAk3SAJukATdIBmvSvBcj/UUnfGwxWitCcKcNxhQ7QQRmOK1iIql50KFGG4wodoIMyHFfoAB2U4bhCB+igDMcVOkAHZTiu0AFK/md/Bw8XevIIyEqZAAAAAElFTkSuQmCC\"/>\n </a>\n <span class=\"tooltiptext doc-tooltip\">{{getSignificantItemDesc(event)}}</span>\n </div>\n </td>\n <td tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforColumn(event)}}\" (keydown.enter)=\"select(event)\"><div class=\"tooltip text-16\">{{event.timestamp | ccdDate : 'local'}}\n <span class=\"tooltiptext\">{{'Local:' | rpxTranslate}} {{event.timestamp | ccdDate : 'local'}}</span>\n </div></td>\n <td tabindex=\"0\"><span class=\"text-16\">{{event.user_first_name | titlecase}} {{event.user_last_name | uppercase}}</span></td>\n </tr>\n </tbody>\n</table
|
|
27823
|
+
args: [{ selector: 'ccd-event-log-table', template: "<table class=\"EventLogTable\">\n <caption><h2 class=\"heading-h2\">{{'History' | rpxTranslate}}</h2></caption>\n <thead>\n <tr>\n <th><span class=\"text-16\">{{'Event' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Date' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Author' | rpxTranslate}}</span></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let event of events\" (click)=\"select(event)\" (keyup)=\"select(event)\" [ngClass]=\"{'EventLogTable-Selected': selected === event}\" tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforRow(event)}}\">\n <td>\n <ng-container [ngSwitch]=\"isPartOfCaseTimeline\">\n <div id=\"case-timeline\" *ngSwitchCase=\"true\">\n <a (click)=\"caseHistoryClicked(event.id)\"\n *ngIf=\"event.state_id !== 'Draft'\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n </div>\n <div *ngSwitchCase=\"false\">\n <a [routerLink]=\"['./', 'event', event.id, 'history']\"\n [target]=\"'_blank'\"\n *ngIf=\"event.state_id !== 'Draft'\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n </div>\n </ng-container>\n <span *ngIf=\"event.state_id === 'Draft'\">{{event.event_name}}</span>\n <div class=\"tooltip\" *ngIf=\"significantItemExist(event)\">\n <a href=\"{{getSignificantItemUrl(event)}}\" target=\"_blank\" rel=\"noopener\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">\n <img class=\"doc-img\" alt=\"document image\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABoCAYAAABmOHdtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAkoSURBVHhe7d33c5RFHAZw/wCKiF0s2LAwiigq9l5G/UV/UUeFkEAoQqiWoKKI1Dg6YxQQbGmkXQoJIQQiaSShhiQMkgIphCSXkN4buPtcnnDG9fXCa+FN9mY+M5Lce7f3ZPb2u/vu+3rRsKn+Z4ey4e7BIB4XnQ8doA7QHB2gSTpAk3SAJlk+wOG9VL/7L+gATbrgAxzlHgAM6skVcTDhw2i4daENXvbZCXd9EAU8fqRbADi/5j9JB2jSBRvg2Hmh8MAnMbAl/Ths+jUPqhvboLapHXJKTkPU/mKI2FcEdyyJhOvmhoLqvczQAZp0wQU4YVEAuPnGw5GTtdDd0wOdXd3Q1uGQXVID/HlXdw+0tHVCWU0zvLMhFSZ5R4Dqvc+HDtCkCybAW8RAIHn6xkJpuR3aOrqgqqEVPDanwZu+u8HLLwPY1aduTAF7fSvwuLqmNliweRfc6x0JqrYMxN8FONwj9Cz0Pq8/HWBvEP2Do389wFHugTDROxqOldcDu2hmfiXcucQGN8wLgxHiWOnc6zjKncs9t8DVs4Ih+kAxFFY2QK0IUXr1q11wvRhYJOc2DQSD6B8cDXMLPAuKYyUd4P8d4Eg3B7+UfOgRA4V0XHxYafx7kcCCePT0IHhudTyEZZ6Al9YlAAO+bEbQH8RlnYT6lg4oqW6CG+eHw7Apfg6KNhrRAVo9wAeXxcKu3DJgOTLn53S4cmYwMLiA1AI4VdsCja0dwC5feroZOKXjcWO9woDHtbSLMkfYmHgMVG1zhQ7Q6gHyg/IDnbA3AssRLiLM/SUDyutagc8vrmoEDj4suAsqGuCa2SFwuWcQLAzIhJ6eMxCYVgi3LY4AVRuN6ACtHuALaxKgobUT8kUI0uRlMcAy5+fkfOjsktO5nr4pHrvmG75JUFzdDE1iGie9/s1uuHiaP7y4NgH4B8gtrYFJH8eAqo1GdIBWD5BTs6KqJmCZMW5RBLAgfmd9MvDxeeRhYNe7QhTPUqWYvkFdC2xK/A34fl9EHYZ80b2lmqZ2GPNuKDi3zRU6QKsHyC7F4PjB7vsoBi6eFgCBaQXQ0dkN2cWn4VJRJEvsgtuzSqFdPEd6ZlU8cKr31BfxwN/zDzdZlFKSqo1GdIBWD3D8+1HAQvhQUTWc+/J3BLj1QDHwyz+zwA4MhoH/euQUsJzhFO8SjwC4X4QscZks6Wg5vOKzE1RtNKIDtHqAb36bBOVieiXVN7cDB4crZ24Bt+9TgQXwmpgc4GDDQrm6oRUqxAAi+cTmwAg3f+Agwikfnz9mdjCo2mhEB2j1AN/6Lgn4gVhWjFtkg9EegbA8MgvYNW37ioFTNRbUHIRYmE8XJZLE5TD+u0EMWNLpxjbg8ao2GtEBWj3AmxeEAx9ZYgCR5vllAAeR2EMl0NDSDnweBxGWKzyxztObj6/YDix3uHzGQcS2twg42KjaaEQHaPUAH/9cfEChTgwcUm1zBzz82TZgF14hvvglLiYE7SkEdmEuzXM5jIW55w9pwFMHM8R/S/0Ld8t2YR2g4ocD4bYxBfYXVgG/3Lm5iEv67ptSgY8vt+UCt7dd+24osBzilo5l4QeBC7OrtmYDyxwue42ZEwKqNhrRAVo9QBbMreILXWIXfHtDCnAQCU4/DpzK7cmrgNHTRRcXuBiwJ68S+HrPrNoBl4ivAenplduBiwmJuWXAKZ6qjUZ0gIMlwOa2DiiqaoS31ydDX4BiwJAYYNqxCmB5wkEnI98OXJx4emU8jHKX2z/8UepIDHBXThnoAIdqgAyKm4h4ovxGr1DoG0S+TwE+1okBRLpFFOHSdXPDgEv6nBouDT0AfL/V0Yfhz4NIKDi3zRU6QKsH+NCnscBFBBbULLA5SKyMzgYu6funFsBVs4Lh5gU2KBGhSXy9KRuSgYsJM3/cAyyX8srrYaxXOKjaaEQHaPUAOYXqFhN/iSfMFwdmAhcLth8uBXbxgyeqgL/nhTbx4jkSNylxcOAmo4dEqSNxEAkRpZH0wtoEULXRiA7Q6gG+9nUiFFY2Aif549+LAJYpq7bmABdUt4iSRrp6dghwaZ8bJ9mFueWDS/qzf0qHxtZOsNe3ADdmqtpoRAdo9QB5OrFYfGiJZcWED6OAWzs8f0wHnlRaHpEFXJBlucM/AKeEH4UdAC4mrI3NBS46cAsIl8VUbTSiA7R6gFyOYnBHy+pgmiiaJW5L25F9ErhIkHy0HPj7J1bEAZfFuPD66PI44GDz8Kdiyie0d3ZBgpjGSc+K6Z2kaqMRHaDVA3xMfDiJW3W5NfeRz7YBP3h45nHoEKWJtK/QDiy0n1udAPx5S3sX3Lt0KzDo59fsAAbIQnri0mhQtdGIDtDqAbJ8mLIhBbi5nFs6eKE0p2B8LAnaCzfNDwdukOQF2OzK3MrB91sXmwMn7A3ARQXLDiI6QMUPzwfLDE76+XMW0ryEn4PDT0l5wNOeDJqDREh6IfAPwdOaz68WXVjglJCD1kTRzSXnNrlCBzhYAvwrnIIliBJG4pI+bzLBJX8+n4MO/yA8ngFy0OKUMPVYBXDp3/m9XaEDHOwBcirHDZWcyn0spmcSp3CqY50xUF4yxsHjVE0z8JYDqmON6AAHe4C8gIYX1jBAn225wPJFdawzBsibVHARgUFyEFIda0QHONgDpK/jcoHlB28e4WoBfKmY7kncUtzVLW/S091XHvHiRtWxRnSAgz7A3ptBcNmLS/a8+VjU/iLg7U5YtvB4bioatzAceHkrb27Bk0osf/7w3i7QAQ76AHtxAyVPlPNWTly6z8ivhDd8d8NLPjvBY1Mq8CZlvClZQXkd8OJDHaAO0DWTvG3gtTkRePqSgwJPmPMSLm5zO3PmDBRW1IPHehGucNuicFC9lyt0gEMtQLr7gyjg1g0uCrCrcoq2t8AOyb9VABcTbl9sA9VrD4QOUPHaA2HZAIk3Fxsx1Q/u8Y4GBsugeVKJ2+FUr3U+dIAmWT7A/5sO0CQdoEk6QJN0gCbpAE0yHSBfYKgaMcMG/YMjHeDfMB2g6iDtHB2gSTpAk3SAJukATdIBmvSvBcj/UUnfGwxWitCcKcNxhQ7QQRmOK1iIql50KFGG4wodoIMyHFfoAB2U4bhCB+igDMcVOkAHZTiu0AFK/md/Bw8XevIIyEqZAAAAAElFTkSuQmCC\"/>\n </a>\n <span class=\"tooltiptext doc-tooltip\">{{getSignificantItemDesc(event)}}</span>\n </div>\n </td>\n <td tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforColumn(event)}}\" (keydown.enter)=\"select(event)\"><div class=\"tooltip text-16\">{{event.timestamp | ccdDate : 'local'}}\n <span class=\"tooltiptext\">{{'Local:' | rpxTranslate}} {{event.timestamp | ccdDate : 'local'}}</span>\n </div></td>\n <td tabindex=\"0\"><span class=\"text-16\">{{event.user_first_name | titlecase}} {{event.user_last_name | uppercase}}</span></td>\n </tr>\n </tbody>\n</table>", styles: ["#case-timeline a{cursor:pointer;text-decoration:underline;color:#005ea5}#case-timeline a:hover{color:#2b8cc4}#case-timeline a:visited{color:#4c2c92}.EventLogTable tbody>tr td:first-child{padding-left:10px}.EventLogTable tbody>tr.EventLogTable-Selected{border-left:8px solid #005ea5;background-color:#f8f8f8}.EventLogTable tbody>tr.EventLogTable-Selected td:first-child{padding-left:6px}.EventLogTable tbody>tr:not(.EventLogTable-Selected):hover{border-left:8px solid #2b8cc4;background-color:#f8f8f8;cursor:pointer;cursor:hand}.EventLogTable tbody>tr:not(.EventLogTable-Selected):hover td:first-child{padding-left:6px}.EventLogTable tbody>tr .event-link{float:left;padding-right:8px}.EventLogTable tbody>tr .doc-img{width:16px;float:left}.EventLogTable tbody>tr .doc-tooltip{left:35%;bottom:7px}.EventLogTable tbody>tr .doc-tooltip:after{border-color:transparent}\n"] }]
|
|
27652
27824
|
}], null, { events: [{
|
|
27653
27825
|
type: Input
|
|
27654
27826
|
}], selected: [{
|
|
@@ -27662,7 +27834,7 @@ class EventLogTableComponent {
|
|
|
27662
27834
|
|
|
27663
27835
|
function EventLogComponent_ccd_event_log_table_3_Template(rf, ctx) { if (rf & 1) {
|
|
27664
27836
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
27665
|
-
i0.ɵɵelementStart(0, "ccd-event-log-table",
|
|
27837
|
+
i0.ɵɵelementStart(0, "ccd-event-log-table", 8);
|
|
27666
27838
|
i0.ɵɵlistener("onSelect", function EventLogComponent_ccd_event_log_table_3_Template_ccd_event_log_table_onSelect_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.select($event)); })("onCaseHistory", function EventLogComponent_ccd_event_log_table_3_Template_ccd_event_log_table_onCaseHistory_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.caseHistoryClicked($event)); });
|
|
27667
27839
|
i0.ɵɵelementEnd();
|
|
27668
27840
|
} if (rf & 2) {
|
|
@@ -27671,7 +27843,7 @@ function EventLogComponent_ccd_event_log_table_3_Template(rf, ctx) { if (rf & 1)
|
|
|
27671
27843
|
} }
|
|
27672
27844
|
function EventLogComponent_ccd_event_log_table_4_Template(rf, ctx) { if (rf & 1) {
|
|
27673
27845
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
27674
|
-
i0.ɵɵelementStart(0, "ccd-event-log-table",
|
|
27846
|
+
i0.ɵɵelementStart(0, "ccd-event-log-table", 9);
|
|
27675
27847
|
i0.ɵɵlistener("onSelect", function EventLogComponent_ccd_event_log_table_4_Template_ccd_event_log_table_onSelect_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.select($event)); });
|
|
27676
27848
|
i0.ɵɵelementEnd();
|
|
27677
27849
|
} if (rf & 2) {
|
|
@@ -27679,7 +27851,7 @@ function EventLogComponent_ccd_event_log_table_4_Template(rf, ctx) { if (rf & 1)
|
|
|
27679
27851
|
i0.ɵɵproperty("events", ctx_r1.events)("selected", ctx_r1.selected);
|
|
27680
27852
|
} }
|
|
27681
27853
|
function EventLogComponent_ccd_event_log_details_7_Template(rf, ctx) { if (rf & 1) {
|
|
27682
|
-
i0.ɵɵelement(0, "ccd-event-log-details",
|
|
27854
|
+
i0.ɵɵelement(0, "ccd-event-log-details", 10);
|
|
27683
27855
|
} if (rf & 2) {
|
|
27684
27856
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
27685
27857
|
i0.ɵɵproperty("event", ctx_r1.selected);
|
|
@@ -27700,14 +27872,14 @@ class EventLogComponent {
|
|
|
27700
27872
|
this.onCaseHistory.emit(eventId);
|
|
27701
27873
|
}
|
|
27702
27874
|
static ɵfac = function EventLogComponent_Factory(t) { return new (t || EventLogComponent)(); };
|
|
27703
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventLogComponent, selectors: [["ccd-event-log"]], inputs: { events: "events" }, outputs: { onCaseHistory: "onCaseHistory" }, decls: 8, vars: 4, consts: [[1, "grid-row"], [1, "column-one-half"], [3, "ngSwitch"], [3, "events", "selected", "onSelect", "onCaseHistory", 4, "ngSwitchCase"], [3, "events", "selected", "onSelect", 4, "ngSwitchCase"], [1, "EventLog-DetailsPanel"], [3, "event", 4, "ngIf"], [3, "onSelect", "onCaseHistory", "events", "selected"], [3, "onSelect", "events", "selected"], [3, "event"]], template: function EventLogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
27875
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventLogComponent, selectors: [["ccd-event-log"]], inputs: { events: "events" }, outputs: { onCaseHistory: "onCaseHistory" }, decls: 8, vars: 4, consts: [[1, "grid-row"], [1, "column-one-half", "scrollbar"], [3, "ngSwitch"], [3, "events", "selected", "onSelect", "onCaseHistory", 4, "ngSwitchCase"], [3, "events", "selected", "onSelect", 4, "ngSwitchCase"], [1, "column-one-half"], [1, "EventLog-DetailsPanel"], [3, "event", 4, "ngIf"], [3, "onSelect", "onCaseHistory", "events", "selected"], [3, "onSelect", "events", "selected"], [3, "event"]], template: function EventLogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
27704
27876
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
27705
27877
|
i0.ɵɵelementContainerStart(2, 2);
|
|
27706
27878
|
i0.ɵɵtemplate(3, EventLogComponent_ccd_event_log_table_3_Template, 1, 2, "ccd-event-log-table", 3)(4, EventLogComponent_ccd_event_log_table_4_Template, 1, 2, "ccd-event-log-table", 4);
|
|
27707
27879
|
i0.ɵɵelementContainerEnd();
|
|
27708
27880
|
i0.ɵɵelementEnd();
|
|
27709
|
-
i0.ɵɵelementStart(5, "div",
|
|
27710
|
-
i0.ɵɵtemplate(7, EventLogComponent_ccd_event_log_details_7_Template, 1, 1, "ccd-event-log-details",
|
|
27881
|
+
i0.ɵɵelementStart(5, "div", 5)(6, "div", 6);
|
|
27882
|
+
i0.ɵɵtemplate(7, EventLogComponent_ccd_event_log_details_7_Template, 1, 1, "ccd-event-log-details", 7);
|
|
27711
27883
|
i0.ɵɵelementEnd()()();
|
|
27712
27884
|
} if (rf & 2) {
|
|
27713
27885
|
i0.ɵɵadvance(2);
|
|
@@ -27718,11 +27890,11 @@ class EventLogComponent {
|
|
|
27718
27890
|
i0.ɵɵproperty("ngSwitchCase", false);
|
|
27719
27891
|
i0.ɵɵadvance(3);
|
|
27720
27892
|
i0.ɵɵproperty("ngIf", ctx.selected);
|
|
27721
|
-
} }, styles: ["@media (max-width: 991px){[class*=col-md][_ngcontent-%COMP%]{margin-bottom:30px}}.EventLog-DetailsPanel[_ngcontent-%COMP%]{border:1px solid #bfc1c3;padding:0 10px 10px;margin-top:20px}"] });
|
|
27893
|
+
} }, styles: ["@media (max-width: 991px){[class*=col-md][_ngcontent-%COMP%]{margin-bottom:30px}}.column-half[_ngcontent-%COMP%], .column-one-half[_ngcontent-%COMP%]{float:left;width:50%}@media (min-width: 641px){.scrollbar[_ngcontent-%COMP%]{height:70vh;overflow-y:auto}}.EventLog-DetailsPanel[_ngcontent-%COMP%]{border:1px solid #bfc1c3;padding:0 10px 10px;margin-top:20px}"] });
|
|
27722
27894
|
}
|
|
27723
27895
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogComponent, [{
|
|
27724
27896
|
type: Component,
|
|
27725
|
-
args: [{ selector: 'ccd-event-log', template: "<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ng-container [ngSwitch]=\"isPartOfCaseTimeline\">\n <ccd-event-log-table
|
|
27897
|
+
args: [{ selector: 'ccd-event-log', template: "<div class=\"grid-row\">\n <div class=\"column-one-half scrollbar\">\n <ng-container [ngSwitch]=\"isPartOfCaseTimeline\">\n <ccd-event-log-table\n *ngSwitchCase=\"true\"\n [events]=\"events\"\n [selected]=\"selected\"\n (onSelect)=\"select($event)\"\n (onCaseHistory)=\"caseHistoryClicked($event)\"\n ></ccd-event-log-table>\n <ccd-event-log-table\n *ngSwitchCase=\"false\"\n [events]=\"events\"\n [selected]=\"selected\"\n (onSelect)=\"select($event)\"\n ></ccd-event-log-table>\n </ng-container>\n </div>\n <div class=\"column-one-half\">\n <div class=\"EventLog-DetailsPanel\">\n <ccd-event-log-details\n *ngIf=\"selected\"\n [event]=\"selected\"\n ></ccd-event-log-details>\n </div>\n </div>\n</div>\n", styles: ["@media (max-width: 991px){[class*=col-md]{margin-bottom:30px}}.column-half,.column-one-half{float:left;width:50%}@media (min-width: 641px){.scrollbar{height:70vh;overflow-y:auto}}.EventLog-DetailsPanel{border:1px solid #bfc1c3;padding:0 10px 10px;margin-top:20px}\n"] }]
|
|
27726
27898
|
}], null, { events: [{
|
|
27727
27899
|
type: Input
|
|
27728
27900
|
}], onCaseHistory: [{
|
|
@@ -29269,7 +29441,7 @@ i0.ɵɵsetComponentScope(
|
|
|
29269
29441
|
// Components for Query Management
|
|
29270
29442
|
ReadQueryManagementFieldComponent, function () { return [i5.NgForOf, i5.NgIf, i1$1.RouterLink, QueryDetailsComponent,
|
|
29271
29443
|
QueryListComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
29272
|
-
i0.ɵɵsetComponentScope(QueryDetailsComponent, function () { return [i5.NgForOf, i5.NgIf, QueryAttachmentsReadComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
|
|
29444
|
+
i0.ɵɵsetComponentScope(QueryDetailsComponent, function () { return [i5.NgForOf, i5.NgIf, AlertComponent, QueryAttachmentsReadComponent]; }, function () { return [i5.DatePipe, i1.RpxTranslatePipe]; });
|
|
29273
29445
|
i0.ɵɵsetComponentScope(QueryWriteRespondToQueryComponent, function () { return [i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryDetailsComponent,
|
|
29274
29446
|
QueryCaseDetailsHeaderComponent]; }, function () { return [i1.RpxTranslatePipe]; });
|
|
29275
29447
|
i0.ɵɵsetComponentScope(QueryWriteRaiseQueryComponent, function () { return [i5.NgClass, i5.NgIf, i4.DefaultValueAccessor, i4.RadioControlValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, QueryCaseDetailsHeaderComponent,
|
|
@@ -30569,7 +30741,7 @@ class PaginationComponent {
|
|
|
30569
30741
|
this.pResponsive = coerceToBoolean(value);
|
|
30570
30742
|
}
|
|
30571
30743
|
static ɵfac = function PaginationComponent_Factory(t) { return new (t || PaginationComponent)(); };
|
|
30572
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["ccd-pagination"]], inputs: { visibilityLabel: "visibilityLabel", id: "id", maxSize: "maxSize", previousLabel: "previousLabel", nextLabel: "nextLabel", screenReaderPaginationLabel: "screenReaderPaginationLabel", screenReaderPageLabel: "screenReaderPageLabel", screenReaderCurrentLabel: "screenReaderCurrentLabel", directionLinks: "directionLinks", autoHide: "autoHide", responsive: "responsive" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection" }, decls: 5, vars: 6, consts: [["p", "paginationApi"], [3, "pageChange", "pageBoundsCorrection", "id", "maxSize"], ["role", "navigation"], ["class", "ngx-pagination",
|
|
30744
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["ccd-pagination"]], inputs: { visibilityLabel: "visibilityLabel", id: "id", maxSize: "maxSize", previousLabel: "previousLabel", nextLabel: "nextLabel", screenReaderPaginationLabel: "screenReaderPaginationLabel", screenReaderPageLabel: "screenReaderPageLabel", screenReaderCurrentLabel: "screenReaderCurrentLabel", directionLinks: "directionLinks", autoHide: "autoHide", responsive: "responsive" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection" }, decls: 5, vars: 6, consts: [["p", "paginationApi"], [3, "pageChange", "pageBoundsCorrection", "id", "maxSize"], ["role", "navigation"], ["class", "ngx-pagination", 3, "responsive", 4, "ngIf"], [1, "ngx-pagination"], ["class", "pagination-previous", 3, "disabled", 4, "ngIf"], [1, "small-screen"], [3, "current", "ellipsis", 4, "ngFor", "ngForOf"], ["class", "pagination-next", 3, "disabled", 4, "ngIf"], [1, "pagination-previous"], ["tabindex", "0", 3, "keyup.enter", "click", 4, "ngIf"], [4, "ngIf"], ["tabindex", "0", 3, "keyup.enter", "click"], [1, "show-for-sr"], [1, "pagination-next"]], template: function PaginationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
30573
30745
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30574
30746
|
i0.ɵɵelementStart(0, "pagination-template", 1, 0);
|
|
30575
30747
|
i0.ɵɵlistener("pageChange", function PaginationComponent_Template_pagination_template_pageChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.pageChange.emit($event)); })("pageBoundsCorrection", function PaginationComponent_Template_pagination_template_pageBoundsCorrection_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.pageBoundsCorrection.emit($event)); });
|
|
@@ -30588,7 +30760,7 @@ class PaginationComponent {
|
|
|
30588
30760
|
}
|
|
30589
30761
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationComponent, [{
|
|
30590
30762
|
type: Component,
|
|
30591
|
-
args: [{ selector: 'ccd-pagination', template: "<pagination-template #p=\"paginationApi\" [id]=\"id\" [maxSize]=\"maxSize\" (pageChange)=\"pageChange.emit($event)\"\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\">\n <nav role=\"navigation\" [attr.aria-label]=\"'Pagination' | rpxTranslate\">\n <ul class=\"ngx-pagination\"
|
|
30763
|
+
args: [{ selector: 'ccd-pagination', template: "<pagination-template #p=\"paginationApi\" [id]=\"id\" [maxSize]=\"maxSize\" (pageChange)=\"pageChange.emit($event)\"\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\">\n <nav role=\"navigation\" [attr.aria-label]=\"'Pagination' | rpxTranslate\">\n <ul class=\"ngx-pagination\" [attr.aria-label]=\"screenReaderPaginationLabel | rpxTranslate\"\n [class.responsive]=\"responsive\" *ngIf=\"!(autoHide && p.pages.length <= 1)\">\n <li class=\"pagination-previous\" [class.disabled]=\"p.isFirstPage()\" *ngIf=\"directionLinks\">\n <a tabindex=\"0\" *ngIf=\"1 < p.getCurrent()\" (keyup.enter)=\"p.previous()\" (click)=\"p.previous()\"\n [attr.aria-label]=\"previousLabel + ' ' + screenReaderPageLabel | rpxTranslate\">\n {{ previousLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </a>\n <span *ngIf=\"p.isFirstPage()\">\n {{ previousLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </span>\n </li>\n <li class=\"small-screen\">\n {{ p.getCurrent() }} / {{ p.getLastPage() }}\n </li>\n <li [class.current]=\"p.getCurrent() === page.value\" [class.ellipsis]=\"page.label === '...'\"\n *ngFor=\"let page of p.pages\">\n <a tabindex=\"0\" (keyup.enter)=\"p.setCurrent(page.value)\" (click)=\"p.setCurrent(page.value)\"\n *ngIf=\"p.getCurrent() !== page.value\">\n <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }} </span>\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\n </a>\n <ng-container *ngIf=\"p.getCurrent() === page.value\">\n <span class=\"show-for-sr\">{{ screenReaderCurrentLabel | rpxTranslate }} </span>\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\n </ng-container>\n </li>\n <li class=\"pagination-next\" [class.disabled]=\"p.isLastPage()\" *ngIf=\"directionLinks\">\n <a tabindex=\"0\" *ngIf=\"!p.isLastPage()\" (keyup.enter)=\"p.next()\" (click)=\"p.next()\"\n [attr.aria-label]=\"nextLabel + ' ' + screenReaderPageLabel | rpxTranslate\">\n {{ nextLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </a>\n <span *ngIf=\"p.isLastPage()\">\n {{ nextLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </span>\n </li>\n </ul>\n </nav>\n</pagination-template>\n", styles: [".ngx-pagination{margin-left:0;margin-bottom:1rem;padding-top:25px;text-decoration:none;text-align:left;font-size:16px}.ngx-pagination:before,.ngx-pagination:after{content:\" \";display:table}.ngx-pagination:after{clear:both}.ngx-pagination li{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;margin-right:.0625rem;border-radius:0}.ngx-pagination li{display:inline-block}.ngx-pagination a,.ngx-pagination button{display:block;padding:.1875rem .625rem;border-radius:0;color:#005da6}.ngx-pagination a:hover,.ngx-pagination button:hover{background:#e6e6e6}.ngx-pagination .current{padding:.1875rem .625rem;background:#fff;color:#4c2c92;cursor:default;font-weight:900}.ngx-pagination .disabled{display:none}.ngx-pagination .disabled:hover{background:transparent}.ngx-pagination a,.ngx-pagination button{cursor:pointer}.ngx-pagination .pagination-previous a:before,.ngx-pagination .pagination-previous.disabled:before{margin-right:.5rem;display:inline-block;height:10px;width:10px;border-style:solid;color:#0a0a0a;background:transparent;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);content:\"\";border-width:3px 0 0 3px}.ngx-pagination .pagination-next a:after,.ngx-pagination .pagination-next.disabled:after{margin-left:.5rem;display:inline-block;height:10px;width:10px;border-style:solid;color:#0a0a0a;background:transparent;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);content:\"\";border-width:0 3px 3px 0}.ngx-pagination .show-for-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.ngx-pagination .small-screen{display:none}@media screen and (max-width: 601px){.ngx-pagination.responsive .small-screen{display:inline-block}.ngx-pagination.responsive li:not(.small-screen):not(.pagination-previous):not(.pagination-next){display:none}}\n"] }]
|
|
30592
30764
|
}], null, { visibilityLabel: [{
|
|
30593
30765
|
type: Input
|
|
30594
30766
|
}], id: [{
|
|
@@ -32294,13 +32466,14 @@ class EventTriggerResolver {
|
|
|
32294
32466
|
router;
|
|
32295
32467
|
appConfig;
|
|
32296
32468
|
errorNotifier;
|
|
32469
|
+
loadingService;
|
|
32297
32470
|
static PARAM_CASE_ID = 'cid';
|
|
32298
32471
|
static PARAM_EVENT_ID = 'eid';
|
|
32299
32472
|
static IGNORE_WARNING = 'ignoreWarning';
|
|
32300
32473
|
static IGNORE_WARNING_VALUES = ['true', 'false'];
|
|
32301
32474
|
cachedEventTrigger;
|
|
32302
32475
|
cachedProfile;
|
|
32303
|
-
constructor(casesService, alertService, profileService, profileNotifier, router, appConfig, errorNotifier) {
|
|
32476
|
+
constructor(casesService, alertService, profileService, profileNotifier, router, appConfig, errorNotifier, loadingService) {
|
|
32304
32477
|
this.casesService = casesService;
|
|
32305
32478
|
this.alertService = alertService;
|
|
32306
32479
|
this.profileService = profileService;
|
|
@@ -32308,6 +32481,7 @@ class EventTriggerResolver {
|
|
|
32308
32481
|
this.router = router;
|
|
32309
32482
|
this.appConfig = appConfig;
|
|
32310
32483
|
this.errorNotifier = errorNotifier;
|
|
32484
|
+
this.loadingService = loadingService;
|
|
32311
32485
|
}
|
|
32312
32486
|
resolve(route) {
|
|
32313
32487
|
return this.isRootTriggerEventRoute(route) ? this.getAndCacheEventTrigger(route)
|
|
@@ -32338,7 +32512,7 @@ class EventTriggerResolver {
|
|
|
32338
32512
|
}
|
|
32339
32513
|
return this.casesService
|
|
32340
32514
|
.getEventTrigger(caseTypeId, eventTriggerId, cid, ignoreWarning)
|
|
32341
|
-
.pipe(map(eventTrigger => this.cachedEventTrigger = eventTrigger), catchError(error => {
|
|
32515
|
+
.pipe(map((eventTrigger) => this.cachedEventTrigger = eventTrigger), catchError((error) => {
|
|
32342
32516
|
error.details = { eventId: eventTriggerId, ...error.details };
|
|
32343
32517
|
this.alertService.setPreserveAlerts(true);
|
|
32344
32518
|
this.alertService.error(error.message);
|
|
@@ -32347,12 +32521,12 @@ class EventTriggerResolver {
|
|
|
32347
32521
|
return throwError(error);
|
|
32348
32522
|
})).toPromise();
|
|
32349
32523
|
}
|
|
32350
|
-
static ɵfac = function EventTriggerResolver_Factory(t) { return new (t || EventTriggerResolver)(i0.ɵɵinject(CasesService), i0.ɵɵinject(AlertService), i0.ɵɵinject(ProfileService), i0.ɵɵinject(ProfileNotifier), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(ErrorNotifierService)); };
|
|
32524
|
+
static ɵfac = function EventTriggerResolver_Factory(t) { return new (t || EventTriggerResolver)(i0.ɵɵinject(CasesService), i0.ɵɵinject(AlertService), i0.ɵɵinject(ProfileService), i0.ɵɵinject(ProfileNotifier), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(ErrorNotifierService), i0.ɵɵinject(LoadingService)); };
|
|
32351
32525
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTriggerResolver, factory: EventTriggerResolver.ɵfac });
|
|
32352
32526
|
}
|
|
32353
32527
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerResolver, [{
|
|
32354
32528
|
type: Injectable
|
|
32355
|
-
}], () => [{ type: CasesService }, { type: AlertService }, { type: ProfileService }, { type: ProfileNotifier }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: ErrorNotifierService }], null); })();
|
|
32529
|
+
}], () => [{ type: CasesService }, { type: AlertService }, { type: ProfileService }, { type: ProfileNotifier }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: ErrorNotifierService }, { type: LoadingService }], null); })();
|
|
32356
32530
|
|
|
32357
32531
|
function CaseEventTriggerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
32358
32532
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -32378,6 +32552,7 @@ class CaseEventTriggerComponent {
|
|
|
32378
32552
|
caseReferencePipe;
|
|
32379
32553
|
activityPollingService;
|
|
32380
32554
|
sessionStorageService;
|
|
32555
|
+
loadingService;
|
|
32381
32556
|
static EVENT_COMPLETION_MESSAGE = `Case #%CASEREFERENCE% has been updated with event: %NAME%`;
|
|
32382
32557
|
static CALLBACK_FAILED_MESSAGE = ' but the callback service cannot be completed';
|
|
32383
32558
|
BANNER = DisplayMode.BANNER;
|
|
@@ -32386,7 +32561,7 @@ class CaseEventTriggerComponent {
|
|
|
32386
32561
|
activitySubscription;
|
|
32387
32562
|
caseSubscription;
|
|
32388
32563
|
parentUrl;
|
|
32389
|
-
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService, sessionStorageService) {
|
|
32564
|
+
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService, sessionStorageService, loadingService) {
|
|
32390
32565
|
this.ngZone = ngZone;
|
|
32391
32566
|
this.casesService = casesService;
|
|
32392
32567
|
this.caseNotifier = caseNotifier;
|
|
@@ -32396,8 +32571,12 @@ class CaseEventTriggerComponent {
|
|
|
32396
32571
|
this.caseReferencePipe = caseReferencePipe;
|
|
32397
32572
|
this.activityPollingService = activityPollingService;
|
|
32398
32573
|
this.sessionStorageService = sessionStorageService;
|
|
32574
|
+
this.loadingService = loadingService;
|
|
32399
32575
|
}
|
|
32400
32576
|
ngOnInit() {
|
|
32577
|
+
if (this.loadingService.hasSharedSpinner()) {
|
|
32578
|
+
this.loadingService.unregisterSharedSpinner();
|
|
32579
|
+
}
|
|
32401
32580
|
if (this.route.snapshot.data.case) {
|
|
32402
32581
|
this.caseDetails = this.route.snapshot.data.case;
|
|
32403
32582
|
}
|
|
@@ -32484,7 +32663,7 @@ class CaseEventTriggerComponent {
|
|
|
32484
32663
|
isDataLoaded() {
|
|
32485
32664
|
return !!(this.eventTrigger && this.caseDetails);
|
|
32486
32665
|
}
|
|
32487
|
-
static ɵfac = function CaseEventTriggerComponent_Factory(t) { return new (t || CaseEventTriggerComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(SessionStorageService)); };
|
|
32666
|
+
static ɵfac = function CaseEventTriggerComponent_Factory(t) { return new (t || CaseEventTriggerComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(LoadingService)); };
|
|
32488
32667
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEventTriggerComponent, selectors: [["ccd-case-event-trigger"]], decls: 1, vars: 1, consts: [["class", "screen-990", 4, "ngIf"], [1, "screen-990"], [3, "caseId", "displayMode"], [3, "cancelled", "submitted", "caseDetails", "submit", "validate", "eventTrigger"]], template: function CaseEventTriggerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
32489
32668
|
i0.ɵɵtemplate(0, CaseEventTriggerComponent_div_0_Template, 3, 6, "div", 0);
|
|
32490
32669
|
} if (rf & 2) {
|
|
@@ -32494,7 +32673,7 @@ class CaseEventTriggerComponent {
|
|
|
32494
32673
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventTriggerComponent, [{
|
|
32495
32674
|
type: Component,
|
|
32496
32675
|
args: [{ selector: 'ccd-case-event-trigger', template: "<div *ngIf=\"isDataLoaded()\" class=\"screen-990\">\n <ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n <ccd-case-edit [caseDetails]=\"caseDetails\"\n [submit]=\"submit()\"\n [validate]=\"validate()\"\n [eventTrigger]=\"eventTrigger\"\n (cancelled)=\"cancel()\"\n (submitted)=\"submitted($event)\"></ccd-case-edit>\n</div>\n" }]
|
|
32497
|
-
}], () => [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$1.Router }, { type: AlertService }, { type: i1$1.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }, { type: SessionStorageService }], null); })();
|
|
32676
|
+
}], () => [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$1.Router }, { type: AlertService }, { type: i1$1.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }, { type: SessionStorageService }, { type: LoadingService }], null); })();
|
|
32498
32677
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventTriggerComponent, { className: "CaseEventTriggerComponent", filePath: "lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.ts", lineNumber: 14 }); })();
|
|
32499
32678
|
|
|
32500
32679
|
function CaseViewComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -33158,6 +33337,7 @@ class CaseFullAccessViewComponent {
|
|
|
33158
33337
|
crf;
|
|
33159
33338
|
sessionStorageService;
|
|
33160
33339
|
rpxTranslationPipe;
|
|
33340
|
+
loadingService;
|
|
33161
33341
|
static ORIGIN_QUERY_PARAM = 'origin';
|
|
33162
33342
|
static TRIGGER_TEXT_START = 'Go';
|
|
33163
33343
|
static TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Go';
|
|
@@ -33192,9 +33372,10 @@ class CaseFullAccessViewComponent {
|
|
|
33192
33372
|
caseFlagsReadExternalMode = '#ARGUMENT(READ,EXTERNAL)';
|
|
33193
33373
|
subs = [];
|
|
33194
33374
|
eventId;
|
|
33375
|
+
isEventButtonClicked = false;
|
|
33195
33376
|
callbackErrorsSubject;
|
|
33196
33377
|
tabGroup;
|
|
33197
|
-
constructor(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location, crf, sessionStorageService, rpxTranslationPipe) {
|
|
33378
|
+
constructor(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location, crf, sessionStorageService, rpxTranslationPipe, loadingService) {
|
|
33198
33379
|
this.ngZone = ngZone;
|
|
33199
33380
|
this.route = route;
|
|
33200
33381
|
this.router = router;
|
|
@@ -33210,6 +33391,7 @@ class CaseFullAccessViewComponent {
|
|
|
33210
33391
|
this.crf = crf;
|
|
33211
33392
|
this.sessionStorageService = sessionStorageService;
|
|
33212
33393
|
this.rpxTranslationPipe = rpxTranslationPipe;
|
|
33394
|
+
this.loadingService = loadingService;
|
|
33213
33395
|
}
|
|
33214
33396
|
ngOnInit() {
|
|
33215
33397
|
this.callbackErrorsSubject = this.errorNotifierService.errorSource.pipe(filter((x) => {
|
|
@@ -33289,8 +33471,15 @@ class CaseFullAccessViewComponent {
|
|
|
33289
33471
|
this.resetErrors();
|
|
33290
33472
|
this.ignoreWarning = false;
|
|
33291
33473
|
this.triggerText = CaseFullAccessViewComponent.TRIGGER_TEXT_START;
|
|
33474
|
+
this.isEventButtonClicked = false;
|
|
33292
33475
|
}
|
|
33293
33476
|
async applyTrigger(trigger) {
|
|
33477
|
+
if (this.isEventButtonClicked) {
|
|
33478
|
+
return;
|
|
33479
|
+
}
|
|
33480
|
+
this.isEventButtonClicked = true;
|
|
33481
|
+
const spinner = this.loadingService.register();
|
|
33482
|
+
this.loadingService.addSharedSpinner(spinner);
|
|
33294
33483
|
this.errorNotifierService.announceError(null);
|
|
33295
33484
|
const theQueryParams = {};
|
|
33296
33485
|
if (this.ignoreWarning) {
|
|
@@ -33541,7 +33730,7 @@ class CaseFullAccessViewComponent {
|
|
|
33541
33730
|
this.errorNotifierService.announceError(null);
|
|
33542
33731
|
this.alertService.clear();
|
|
33543
33732
|
}
|
|
33544
|
-
static ɵfac = function CaseFullAccessViewComponent_Factory(t) { return new (t || CaseFullAccessViewComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(NavigationNotifierService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(ConvertHrefToRouterService), i0.ɵɵdirectiveInject(i5.Location), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1.RpxTranslatePipe)); };
|
|
33733
|
+
static ɵfac = function CaseFullAccessViewComponent_Factory(t) { return new (t || CaseFullAccessViewComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(NavigationNotifierService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(ConvertHrefToRouterService), i0.ɵɵdirectiveInject(i5.Location), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(i1.RpxTranslatePipe), i0.ɵɵdirectiveInject(LoadingService)); };
|
|
33545
33734
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFullAccessViewComponent, selectors: [["ccd-case-full-access-view"]], viewQuery: function CaseFullAccessViewComponent_Query(rf, ctx) { if (rf & 1) {
|
|
33546
33735
|
i0.ɵɵviewQuery(_c0$b, 5);
|
|
33547
33736
|
} if (rf & 2) {
|
|
@@ -33586,7 +33775,7 @@ class CaseFullAccessViewComponent {
|
|
|
33586
33775
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
|
|
33587
33776
|
type: Component,
|
|
33588
33777
|
args: [{ selector: 'ccd-case-full-access-view', template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\"\n [eventId]=\"eventId\"\n (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-label]=\"'case viewer table' | rpxTranslate\">\n <tbody>\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true : formGroup?.controls['data']\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"caseFields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-field-label\" *ngIf=\"!isFieldToHaveNoLabel(field)\">\n <div class=\"case-viewer-label text-16\">\n {{field.label | rpxTranslate}}</div>\n </th>\n <td [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup?.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <th [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\"\n [markdownUseHrefAsRouterLink]=\"markdownUseHrefAsRouterLink\">\n </ccd-field-read>\n </span>\n </th>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </tbody>\n </table>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of appendedTabs\" [id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n </mat-tab>\n </mat-tab-group>\n <router-outlet *ngIf=\"(prependedTabs && prependedTabs.length) || (appendedTabs && appendedTabs.length)\"></router-outlet>\n </ng-container>\n </div>\n</div>\n", styles: ["th{width:1%;white-space:nowrap;vertical-align:top}.compound-field th{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}.markdown h3{margin-bottom:0}.hide-table-capion{position:absolute;visibility:hidden}\n"] }]
|
|
33589
|
-
}], () => [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$3.MatLegacyDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i5.Location }, { type: i0.ChangeDetectorRef }, { type: SessionStorageService }, { type: i1.RpxTranslatePipe }], { hasPrint: [{
|
|
33778
|
+
}], () => [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$3.MatLegacyDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i5.Location }, { type: i0.ChangeDetectorRef }, { type: SessionStorageService }, { type: i1.RpxTranslatePipe }, { type: LoadingService }], { hasPrint: [{
|
|
33590
33779
|
type: Input
|
|
33591
33780
|
}], hasEventSelector: [{
|
|
33592
33781
|
type: Input
|
|
@@ -33600,7 +33789,7 @@ class CaseFullAccessViewComponent {
|
|
|
33600
33789
|
type: ViewChild,
|
|
33601
33790
|
args: ['tabGroup', { static: false }]
|
|
33602
33791
|
}] }); })();
|
|
33603
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFullAccessViewComponent, { className: "CaseFullAccessViewComponent", filePath: "lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.ts", lineNumber:
|
|
33792
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFullAccessViewComponent, { className: "CaseFullAccessViewComponent", filePath: "lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.ts", lineNumber: 44 }); })();
|
|
33604
33793
|
|
|
33605
33794
|
class PrintUrlPipe {
|
|
33606
33795
|
appConfig;
|
|
@@ -34350,7 +34539,6 @@ class EventStartGuard {
|
|
|
34350
34539
|
sessionStorageService;
|
|
34351
34540
|
abstractConfig;
|
|
34352
34541
|
cookieService;
|
|
34353
|
-
static CLIENT_CONTEXT = 'clientContext';
|
|
34354
34542
|
constructor(workAllocationService, router, sessionStorageService, abstractConfig, cookieService) {
|
|
34355
34543
|
this.workAllocationService = workAllocationService;
|
|
34356
34544
|
this.router = router;
|
|
@@ -34371,7 +34559,7 @@ class EventStartGuard {
|
|
|
34371
34559
|
const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
|
|
34372
34560
|
const languageCookie = this.cookieService.getCookie('exui-preferred-language');
|
|
34373
34561
|
const currentLanguage = !!languageCookie && languageCookie !== '' ? languageCookie : 'en';
|
|
34374
|
-
const preClientContext = this.sessionStorageService.getItem(
|
|
34562
|
+
const preClientContext = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
34375
34563
|
if (!preClientContext) {
|
|
34376
34564
|
// creates client context for language if not already existing
|
|
34377
34565
|
const storeClientContext = {
|
|
@@ -34381,7 +34569,7 @@ class EventStartGuard {
|
|
|
34381
34569
|
}
|
|
34382
34570
|
}
|
|
34383
34571
|
};
|
|
34384
|
-
this.sessionStorageService.setItem(
|
|
34572
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34385
34573
|
}
|
|
34386
34574
|
else {
|
|
34387
34575
|
const clientContextObj = JSON.parse(preClientContext);
|
|
@@ -34395,7 +34583,7 @@ class EventStartGuard {
|
|
|
34395
34583
|
}
|
|
34396
34584
|
}
|
|
34397
34585
|
};
|
|
34398
|
-
this.sessionStorageService.setItem(
|
|
34586
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContextAddLanguage));
|
|
34399
34587
|
}
|
|
34400
34588
|
}
|
|
34401
34589
|
if (caseInfoStr) {
|
|
@@ -34413,7 +34601,7 @@ class EventStartGuard {
|
|
|
34413
34601
|
}
|
|
34414
34602
|
return of(false);
|
|
34415
34603
|
}
|
|
34416
|
-
checkTaskInEventNotRequired(payload, caseId, taskId) {
|
|
34604
|
+
checkTaskInEventNotRequired(payload, caseId, taskId, eventId, userId) {
|
|
34417
34605
|
if (!payload || !payload.tasks) {
|
|
34418
34606
|
return true;
|
|
34419
34607
|
}
|
|
@@ -34443,55 +34631,18 @@ class EventStartGuard {
|
|
|
34443
34631
|
else {
|
|
34444
34632
|
task = tasksAssignedToUser[0];
|
|
34445
34633
|
}
|
|
34446
|
-
|
|
34447
|
-
// if one task assigned to user, allow user to complete event
|
|
34448
|
-
const storeClientContext = {
|
|
34449
|
-
client_context: {
|
|
34450
|
-
user_task: {
|
|
34451
|
-
task_data: task,
|
|
34452
|
-
complete_task: true
|
|
34453
|
-
},
|
|
34454
|
-
user_language: {
|
|
34455
|
-
language: currentLanguage
|
|
34456
|
-
}
|
|
34457
|
-
}
|
|
34458
|
-
};
|
|
34459
|
-
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34634
|
+
this.setClientContextStorage(task, caseId, eventId, userId);
|
|
34460
34635
|
return true;
|
|
34461
34636
|
}
|
|
34462
34637
|
}
|
|
34463
|
-
removeTaskFromSessionStorage() {
|
|
34464
|
-
this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
|
|
34465
|
-
}
|
|
34466
34638
|
checkForTasks(payload, caseId, eventId, taskId, userId) {
|
|
34467
34639
|
if (taskId && payload?.tasks?.length > 0) {
|
|
34468
34640
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
34469
34641
|
if (task) {
|
|
34470
|
-
|
|
34471
|
-
const taskEventCompletionInfo = {
|
|
34472
|
-
caseId: caseId,
|
|
34473
|
-
eventId: eventId,
|
|
34474
|
-
userId: userId,
|
|
34475
|
-
taskId: task.id,
|
|
34476
|
-
createdTimestamp: Date.now()
|
|
34477
|
-
};
|
|
34478
|
-
const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
|
|
34479
|
-
const storeClientContext = {
|
|
34480
|
-
client_context: {
|
|
34481
|
-
user_task: {
|
|
34482
|
-
task_data: task,
|
|
34483
|
-
complete_task: true
|
|
34484
|
-
},
|
|
34485
|
-
user_language: {
|
|
34486
|
-
language: currentLanguage
|
|
34487
|
-
}
|
|
34488
|
-
}
|
|
34489
|
-
};
|
|
34490
|
-
this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
|
|
34491
|
-
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34642
|
+
this.setClientContextStorage(task, caseId, eventId, userId);
|
|
34492
34643
|
}
|
|
34493
34644
|
else {
|
|
34494
|
-
this.
|
|
34645
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
34495
34646
|
}
|
|
34496
34647
|
}
|
|
34497
34648
|
if (payload.task_required_for_event) {
|
|
@@ -34506,9 +34657,34 @@ class EventStartGuard {
|
|
|
34506
34657
|
return of(false);
|
|
34507
34658
|
}
|
|
34508
34659
|
else {
|
|
34509
|
-
return of(this.checkTaskInEventNotRequired(payload, caseId, taskId));
|
|
34660
|
+
return of(this.checkTaskInEventNotRequired(payload, caseId, taskId, eventId, userId));
|
|
34510
34661
|
}
|
|
34511
34662
|
}
|
|
34663
|
+
// EXUI-2743 - Make taskEventCompletionInfo always available in session storage with client context
|
|
34664
|
+
setClientContextStorage(task, caseId, eventId, userId) {
|
|
34665
|
+
// Store task to session
|
|
34666
|
+
const taskEventCompletionInfo = {
|
|
34667
|
+
caseId: caseId,
|
|
34668
|
+
eventId: eventId,
|
|
34669
|
+
userId: userId,
|
|
34670
|
+
taskId: task.id,
|
|
34671
|
+
createdTimestamp: Date.now()
|
|
34672
|
+
};
|
|
34673
|
+
const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
|
|
34674
|
+
const storeClientContext = {
|
|
34675
|
+
client_context: {
|
|
34676
|
+
user_task: {
|
|
34677
|
+
task_data: task,
|
|
34678
|
+
complete_task: true
|
|
34679
|
+
},
|
|
34680
|
+
user_language: {
|
|
34681
|
+
language: currentLanguage
|
|
34682
|
+
}
|
|
34683
|
+
}
|
|
34684
|
+
};
|
|
34685
|
+
this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
|
|
34686
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34687
|
+
}
|
|
34512
34688
|
static ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(ReadCookieService)); };
|
|
34513
34689
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
|
|
34514
34690
|
}
|
|
@@ -34670,7 +34846,6 @@ class EventStartStateMachineService {
|
|
|
34670
34846
|
}
|
|
34671
34847
|
}
|
|
34672
34848
|
};
|
|
34673
|
-
context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
|
|
34674
34849
|
let userInfo;
|
|
34675
34850
|
const userInfoStr = context.sessionStorageService.getItem('userDetails');
|
|
34676
34851
|
if (userInfoStr) {
|
|
@@ -34684,7 +34859,9 @@ class EventStartStateMachineService {
|
|
|
34684
34859
|
taskId: task.id,
|
|
34685
34860
|
createdTimestamp: Date.now()
|
|
34686
34861
|
};
|
|
34687
|
-
context.sessionStorageService.setItem(
|
|
34862
|
+
context.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
|
|
34863
|
+
// EXUI-2668 - Only add client context when taskEventCompletionInfo is set - stops auto completing incorrect tasks
|
|
34864
|
+
context.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
|
|
34688
34865
|
// Allow user to perform the event
|
|
34689
34866
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
34690
34867
|
}
|