@hmcts/ccd-case-ui-toolkit 7.1.36-rc2 → 7.1.36-skip-content-link
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +15 -37
- package/esm2022/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.mjs +1 -13
- package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.mjs +2 -3
- package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +3 -4
- package/esm2022/lib/shared/components/case-editor/services/cases.service.mjs +3 -4
- package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +4 -5
- package/esm2022/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.mjs +5 -10
- package/esm2022/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.mjs +6 -10
- package/esm2022/lib/shared/components/case-viewer/case-viewer.component.mjs +3 -3
- package/esm2022/lib/shared/components/case-viewer/services/event-trigger.resolver.mjs +5 -9
- package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +48 -36
- package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +3 -5
- package/esm2022/lib/shared/components/pagination/pagination.component.mjs +3 -3
- package/esm2022/lib/shared/components/palette/history/event-log/event-log-table.component.mjs +18 -41
- package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
- package/esm2022/lib/shared/services/http/http-error.service.mjs +4 -11
- package/esm2022/lib/shared/services/loading/loading.service.mjs +1 -13
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +594 -663
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +2 -6
- 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 +0 -2
- 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 +2 -3
- 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 +2 -3
- 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 +1 -3
- 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 +3 -2
- 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 +0 -4
- package/lib/shared/components/palette/history/event-log/event-log-table.component.d.ts.map +1 -1
- package/lib/shared/domain/work-allocation/Task.d.ts +0 -1
- package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
- package/lib/shared/services/http/http-error.service.d.ts +1 -3
- package/lib/shared/services/http/http-error.service.d.ts.map +1 -1
- package/lib/shared/services/loading/loading.service.d.ts +0 -4
- 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 {
|
|
11
|
+
import { throwError, Subject, EMPTY, Observable, BehaviorSubject, 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 {
|
|
14
|
+
import { catchError, map, publish, refCount, switchMap, debounceTime, delay, distinctUntilChanged, 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';
|
|
@@ -1400,70 +1400,10 @@ 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
|
-
|
|
1461
1403
|
class HttpErrorService {
|
|
1462
1404
|
authService;
|
|
1463
|
-
|
|
1464
|
-
constructor(authService, loadingService) {
|
|
1405
|
+
constructor(authService) {
|
|
1465
1406
|
this.authService = authService;
|
|
1466
|
-
this.loadingService = loadingService;
|
|
1467
1407
|
}
|
|
1468
1408
|
static CONTENT_TYPE = 'Content-Type';
|
|
1469
1409
|
static JSON = 'json';
|
|
@@ -1507,21 +1447,18 @@ class HttpErrorService {
|
|
|
1507
1447
|
handle(error, redirectIfNotAuthorised = true) {
|
|
1508
1448
|
console.error('Handling error in http error service.');
|
|
1509
1449
|
console.error(error);
|
|
1510
|
-
if (this.loadingService.hasSharedSpinner()) {
|
|
1511
|
-
this.loadingService.unregisterSharedSpinner();
|
|
1512
|
-
}
|
|
1513
1450
|
const httpError = HttpErrorService.convertToHttpError(error);
|
|
1514
1451
|
if (redirectIfNotAuthorised && httpError.status === 401) {
|
|
1515
1452
|
this.authService.signIn();
|
|
1516
1453
|
}
|
|
1517
1454
|
return throwError(httpError);
|
|
1518
1455
|
}
|
|
1519
|
-
static ɵfac = function HttpErrorService_Factory(t) { return new (t || HttpErrorService)(i0.ɵɵinject(AuthService)
|
|
1456
|
+
static ɵfac = function HttpErrorService_Factory(t) { return new (t || HttpErrorService)(i0.ɵɵinject(AuthService)); };
|
|
1520
1457
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: HttpErrorService, factory: HttpErrorService.ɵfac });
|
|
1521
1458
|
}
|
|
1522
1459
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HttpErrorService, [{
|
|
1523
1460
|
type: Injectable
|
|
1524
|
-
}], () => [{ type: AuthService }
|
|
1461
|
+
}], () => [{ type: AuthService }], null); })();
|
|
1525
1462
|
|
|
1526
1463
|
class HttpService {
|
|
1527
1464
|
httpclient;
|
|
@@ -7382,6 +7319,33 @@ class RequestOptionsBuilder {
|
|
|
7382
7319
|
type: Injectable
|
|
7383
7320
|
}], null, null); })();
|
|
7384
7321
|
|
|
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
|
+
|
|
7385
7349
|
class SearchService {
|
|
7386
7350
|
appConfig;
|
|
7387
7351
|
httpService;
|
|
@@ -7834,6 +7798,25 @@ class BrowserService {
|
|
|
7834
7798
|
type: Injectable
|
|
7835
7799
|
}], null, null); })();
|
|
7836
7800
|
|
|
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
|
+
|
|
7837
7820
|
class CaseAccessUtils {
|
|
7838
7821
|
// User role mapping
|
|
7839
7822
|
static JUDGE_ROLE = 'judge';
|
|
@@ -8053,6 +8036,455 @@ class WizardPageFieldToCaseFieldMapper {
|
|
|
8053
8036
|
}]
|
|
8054
8037
|
}], null, null); })();
|
|
8055
8038
|
|
|
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
|
+
|
|
8056
8488
|
class Confirmation {
|
|
8057
8489
|
caseId;
|
|
8058
8490
|
status;
|
|
@@ -8190,21 +8622,6 @@ class ConvertHrefToRouterService {
|
|
|
8190
8622
|
type: Injectable
|
|
8191
8623
|
}], () => [{ type: i1$1.Router }], null); })();
|
|
8192
8624
|
|
|
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
|
-
|
|
8208
8625
|
class WizardFactoryService {
|
|
8209
8626
|
create(eventTrigger) {
|
|
8210
8627
|
return new Wizard(eventTrigger.wizard_pages);
|
|
@@ -8487,7 +8904,7 @@ class EventCompletionStateMachineService {
|
|
|
8487
8904
|
entryActionForStateCompleteEventAndTask(state, context) {
|
|
8488
8905
|
// Trigger final state to complete processing of state machine
|
|
8489
8906
|
state.trigger(EventCompletionStates.Final);
|
|
8490
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8907
|
+
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8491
8908
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8492
8909
|
if (userTask?.task_data) {
|
|
8493
8910
|
context.sessionStorageService.setItem('assignNeeded', 'false');
|
|
@@ -8510,7 +8927,7 @@ class EventCompletionStateMachineService {
|
|
|
8510
8927
|
entryActionForStateTaskUnassigned(state, context) {
|
|
8511
8928
|
// Trigger final state to complete processing of state machine
|
|
8512
8929
|
state.trigger(EventCompletionStates.Final);
|
|
8513
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8930
|
+
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8514
8931
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8515
8932
|
if (userTask?.task_data) {
|
|
8516
8933
|
context.sessionStorageService.setItem('assignNeeded', 'true');
|
|
@@ -8550,7 +8967,7 @@ class EventCompletionStateMachineService {
|
|
|
8550
8967
|
this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
|
|
8551
8968
|
}
|
|
8552
8969
|
taskPresentInSessionStorage(context) {
|
|
8553
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8970
|
+
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8554
8971
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8555
8972
|
return !!userTask.task_data;
|
|
8556
8973
|
}
|
|
@@ -8917,11 +9334,8 @@ class CaseEditComponent {
|
|
|
8917
9334
|
workAllocationService;
|
|
8918
9335
|
alertService;
|
|
8919
9336
|
abstractConfig;
|
|
8920
|
-
cookieService;
|
|
8921
9337
|
static ORIGIN_QUERY_PARAM = 'origin';
|
|
8922
9338
|
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';
|
|
8925
9339
|
eventTrigger;
|
|
8926
9340
|
submit;
|
|
8927
9341
|
validate;
|
|
@@ -8945,7 +9359,7 @@ class CaseEditComponent {
|
|
|
8945
9359
|
error;
|
|
8946
9360
|
callbackErrorsSubject = new Subject();
|
|
8947
9361
|
validPageList = [];
|
|
8948
|
-
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig
|
|
9362
|
+
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig) {
|
|
8949
9363
|
this.fb = fb;
|
|
8950
9364
|
this.caseNotifier = caseNotifier;
|
|
8951
9365
|
this.router = router;
|
|
@@ -8963,7 +9377,6 @@ class CaseEditComponent {
|
|
|
8963
9377
|
this.workAllocationService = workAllocationService;
|
|
8964
9378
|
this.alertService = alertService;
|
|
8965
9379
|
this.abstractConfig = abstractConfig;
|
|
8966
|
-
this.cookieService = cookieService;
|
|
8967
9380
|
}
|
|
8968
9381
|
ngOnInit() {
|
|
8969
9382
|
this.wizard = this.wizardFactory.create(this.eventTrigger);
|
|
@@ -9070,12 +9483,12 @@ class CaseEditComponent {
|
|
|
9070
9483
|
this.isSubmitting = true;
|
|
9071
9484
|
// We have to run the event completion checks if task in session storage
|
|
9072
9485
|
// and if the task is in session storage, then is it associated to the case
|
|
9073
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
9486
|
+
const clientContextStr = this.sessionStorageService.getItem('clientContext');
|
|
9074
9487
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9075
9488
|
const taskInSessionStorage = userTask ? userTask.task_data : null;
|
|
9076
9489
|
let taskEventCompletionInfo;
|
|
9077
9490
|
let userInfo;
|
|
9078
|
-
const taskEventCompletionStr = this.sessionStorageService.getItem(
|
|
9491
|
+
const taskEventCompletionStr = this.sessionStorageService.getItem('taskEventCompletionInfo');
|
|
9079
9492
|
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
9080
9493
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded');
|
|
9081
9494
|
if (taskEventCompletionStr) {
|
|
@@ -9105,7 +9518,7 @@ class CaseEditComponent {
|
|
|
9105
9518
|
taskId: taskInSessionStorage.id,
|
|
9106
9519
|
createdTimestamp: Date.now()
|
|
9107
9520
|
};
|
|
9108
|
-
this.sessionStorageService.setItem(
|
|
9521
|
+
this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
|
|
9109
9522
|
this.isEventCompletionChecksRequired = true;
|
|
9110
9523
|
}
|
|
9111
9524
|
else {
|
|
@@ -9277,9 +9690,8 @@ class CaseEditComponent {
|
|
|
9277
9690
|
}), finalize(() => {
|
|
9278
9691
|
this.loadingService.unregister(loadingSpinnerToken);
|
|
9279
9692
|
// on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
|
|
9280
|
-
|
|
9281
|
-
this.sessionStorageService.removeItem(
|
|
9282
|
-
this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
9693
|
+
this.sessionStorageService.removeItem('clientContext');
|
|
9694
|
+
this.sessionStorageService.removeItem('taskEventCompletionInfo');
|
|
9283
9695
|
this.isSubmitting = false;
|
|
9284
9696
|
}))
|
|
9285
9697
|
.subscribe(() => {
|
|
@@ -9307,7 +9719,7 @@ class CaseEditComponent {
|
|
|
9307
9719
|
});
|
|
9308
9720
|
}
|
|
9309
9721
|
postCompleteTaskIfRequired() {
|
|
9310
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
9722
|
+
const clientContextStr = this.sessionStorageService.getItem('clientContext');
|
|
9311
9723
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9312
9724
|
const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
|
|
9313
9725
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
|
|
@@ -9347,15 +9759,7 @@ class CaseEditComponent {
|
|
|
9347
9759
|
}
|
|
9348
9760
|
if (!taskEventCompletionInfo) {
|
|
9349
9761
|
// if no task event present then there is no task to complete from previous event present
|
|
9350
|
-
|
|
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
|
-
}
|
|
9762
|
+
return true;
|
|
9359
9763
|
}
|
|
9360
9764
|
else {
|
|
9361
9765
|
if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
|
|
@@ -9365,8 +9769,8 @@ class CaseEditComponent {
|
|
|
9365
9769
|
this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
|
|
9366
9770
|
|| this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
|
|
9367
9771
|
// if the session storage not related to event, ignore it and remove
|
|
9368
|
-
|
|
9369
|
-
this.sessionStorageService.removeItem(
|
|
9772
|
+
this.sessionStorageService.removeItem('clientContext');
|
|
9773
|
+
this.sessionStorageService.removeItem('taskEventCompletionInfo');
|
|
9370
9774
|
return false;
|
|
9371
9775
|
}
|
|
9372
9776
|
if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
|
|
@@ -9408,15 +9812,7 @@ class CaseEditComponent {
|
|
|
9408
9812
|
}
|
|
9409
9813
|
return false;
|
|
9410
9814
|
}
|
|
9411
|
-
|
|
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)); };
|
|
9815
|
+
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)); };
|
|
9420
9816
|
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
9817
|
i0.ɵɵelement(0, "router-outlet");
|
|
9422
9818
|
} }, 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%}"] });
|
|
@@ -9424,7 +9820,7 @@ class CaseEditComponent {
|
|
|
9424
9820
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
|
|
9425
9821
|
type: Component,
|
|
9426
9822
|
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 }
|
|
9823
|
+
}], () => [{ 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 }], { eventTrigger: [{
|
|
9428
9824
|
type: Input
|
|
9429
9825
|
}], submit: [{
|
|
9430
9826
|
type: Input
|
|
@@ -9439,452 +9835,7 @@ class CaseEditComponent {
|
|
|
9439
9835
|
}], submitted: [{
|
|
9440
9836
|
type: Output
|
|
9441
9837
|
}] }); })();
|
|
9442
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber:
|
|
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
|
-
}));
|
|
9663
|
-
}
|
|
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}`;
|
|
9692
|
-
}
|
|
9693
|
-
else {
|
|
9694
|
-
url += `/case-types/${caseTypeId}`
|
|
9695
|
-
+ `/event-triggers/${eventTriggerId}`
|
|
9696
|
-
+ `?ignore-warning=${ignoreWarning}`;
|
|
9697
|
-
}
|
|
9698
|
-
return url;
|
|
9699
|
-
}
|
|
9700
|
-
initialiseEventTrigger(eventTrigger) {
|
|
9701
|
-
if (!eventTrigger.wizard_pages) {
|
|
9702
|
-
eventTrigger.wizard_pages = [];
|
|
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
|
-
});
|
|
9708
|
-
}
|
|
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);
|
|
9719
|
-
}
|
|
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);
|
|
9736
|
-
}
|
|
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);
|
|
9784
|
-
}
|
|
9785
|
-
}
|
|
9786
|
-
return headers;
|
|
9787
|
-
}
|
|
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);
|
|
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;
|
|
9830
|
-
}
|
|
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
|
-
});
|
|
9841
|
-
}
|
|
9842
|
-
submit() {
|
|
9843
|
-
return (sanitizedEditForm) => {
|
|
9844
|
-
sanitizedEditForm.draft_id = this.eventTrigger.case_id;
|
|
9845
|
-
return this.casesService.createCase(this.caseType, sanitizedEditForm);
|
|
9846
|
-
};
|
|
9847
|
-
}
|
|
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);
|
|
9855
|
-
}
|
|
9856
|
-
}
|
|
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 });
|
|
9872
|
-
}
|
|
9873
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseCreateComponent, [{
|
|
9874
|
-
type: Component,
|
|
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: [{
|
|
9877
|
-
type: Input
|
|
9878
|
-
}], caseType: [{
|
|
9879
|
-
type: Input
|
|
9880
|
-
}], event: [{
|
|
9881
|
-
type: Input
|
|
9882
|
-
}], cancelled: [{
|
|
9883
|
-
type: Output
|
|
9884
|
-
}], submitted: [{
|
|
9885
|
-
type: Output
|
|
9886
|
-
}] }); })();
|
|
9887
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseCreateComponent, { className: "CaseCreateComponent", filePath: "lib/shared/components/case-editor/case-create/case-create.component.ts", lineNumber: 17 }); })();
|
|
9838
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 35 }); })();
|
|
9888
9839
|
|
|
9889
9840
|
function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
9890
9841
|
i0.ɵɵelement(0, "div");
|
|
@@ -11309,7 +11260,7 @@ class CaseEventCompletionTaskCancelledComponent {
|
|
|
11309
11260
|
}
|
|
11310
11261
|
onContinue() {
|
|
11311
11262
|
// Removes task to complete so event completes without task
|
|
11312
|
-
this.context.sessionStorageService.removeItem(
|
|
11263
|
+
this.context.sessionStorageService.removeItem('clientContext');
|
|
11313
11264
|
// may be able to remove this call below since it is now unneccesary
|
|
11314
11265
|
this.notifyEventCompletionCancelled.emit(true);
|
|
11315
11266
|
}
|
|
@@ -11495,7 +11446,7 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
11495
11446
|
}
|
|
11496
11447
|
onContinue() {
|
|
11497
11448
|
// Get task details
|
|
11498
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
11449
|
+
const clientContextStr = this.sessionStorageService.getItem('clientContext');
|
|
11499
11450
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
11500
11451
|
const task = userTask ? userTask.task_data : null;
|
|
11501
11452
|
// not complete_task not utilised here as related to event completion
|
|
@@ -11525,7 +11476,7 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
11525
11476
|
}], notifyEventCompletionReassigned: [{
|
|
11526
11477
|
type: Output
|
|
11527
11478
|
}] }); })();
|
|
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:
|
|
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: 15 }); })();
|
|
11529
11480
|
|
|
11530
11481
|
class AddressOption {
|
|
11531
11482
|
description;
|
|
@@ -27642,7 +27593,7 @@ function EventLogTableComponent_tr_20_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
27642
27593
|
i0.ɵɵproperty("ngIf", event_r2.state_id !== "Draft");
|
|
27643
27594
|
} }
|
|
27644
27595
|
function EventLogTableComponent_tr_20_div_4_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
27645
|
-
i0.ɵɵelementStart(0, "a",
|
|
27596
|
+
i0.ɵɵelementStart(0, "a", 18);
|
|
27646
27597
|
i0.ɵɵtext(1);
|
|
27647
27598
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
27648
27599
|
i0.ɵɵelementEnd();
|
|
@@ -27654,29 +27605,14 @@ function EventLogTableComponent_tr_20_div_4_a_1_Template(rf, ctx) { if (rf & 1)
|
|
|
27654
27605
|
i0.ɵɵadvance();
|
|
27655
27606
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 4, event_r2.event_name));
|
|
27656
27607
|
} }
|
|
27657
|
-
function EventLogTableComponent_tr_20_div_4_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
27658
|
-
i0.ɵɵelementStart(0, "span", 20);
|
|
27659
|
-
i0.ɵɵtext(1);
|
|
27660
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
27661
|
-
i0.ɵɵelementEnd();
|
|
27662
|
-
} if (rf & 2) {
|
|
27663
|
-
const event_r2 = i0.ɵɵnextContext(2).$implicit;
|
|
27664
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
27665
|
-
i0.ɵɵattribute("aria-label", ctx_r2.getAriaLabelforLink(event_r2));
|
|
27666
|
-
i0.ɵɵadvance();
|
|
27667
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, event_r2.event_name));
|
|
27668
|
-
} }
|
|
27669
27608
|
function EventLogTableComponent_tr_20_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
27670
27609
|
i0.ɵɵelementStart(0, "div");
|
|
27671
|
-
i0.ɵɵtemplate(1, EventLogTableComponent_tr_20_div_4_a_1_Template, 3, 8, "a", 17)
|
|
27610
|
+
i0.ɵɵtemplate(1, EventLogTableComponent_tr_20_div_4_a_1_Template, 3, 8, "a", 17);
|
|
27672
27611
|
i0.ɵɵelementEnd();
|
|
27673
27612
|
} if (rf & 2) {
|
|
27674
27613
|
const event_r2 = i0.ɵɵnextContext().$implicit;
|
|
27675
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
27676
|
-
i0.ɵɵadvance();
|
|
27677
|
-
i0.ɵɵproperty("ngIf", event_r2.state_id !== "Draft" && !ctx_r2.isUserExternal);
|
|
27678
27614
|
i0.ɵɵadvance();
|
|
27679
|
-
i0.ɵɵproperty("ngIf",
|
|
27615
|
+
i0.ɵɵproperty("ngIf", event_r2.state_id !== "Draft");
|
|
27680
27616
|
} }
|
|
27681
27617
|
function EventLogTableComponent_tr_20_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
27682
27618
|
i0.ɵɵelementStart(0, "span");
|
|
@@ -27688,10 +27624,10 @@ function EventLogTableComponent_tr_20_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
27688
27624
|
i0.ɵɵtextInterpolate(event_r2.event_name);
|
|
27689
27625
|
} }
|
|
27690
27626
|
function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
27691
|
-
i0.ɵɵelementStart(0, "div",
|
|
27692
|
-
i0.ɵɵelement(2, "img",
|
|
27627
|
+
i0.ɵɵelementStart(0, "div", 19)(1, "a", 20);
|
|
27628
|
+
i0.ɵɵelement(2, "img", 21);
|
|
27693
27629
|
i0.ɵɵelementEnd();
|
|
27694
|
-
i0.ɵɵelementStart(3, "span",
|
|
27630
|
+
i0.ɵɵelementStart(3, "span", 22);
|
|
27695
27631
|
i0.ɵɵtext(4);
|
|
27696
27632
|
i0.ɵɵelementEnd()();
|
|
27697
27633
|
} if (rf & 2) {
|
|
@@ -27709,7 +27645,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
|
|
|
27709
27645
|
i0.ɵɵlistener("click", function EventLogTableComponent_tr_20_Template_tr_click_0_listener() { const event_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.select(event_r2)); })("keyup", function EventLogTableComponent_tr_20_Template_tr_keyup_0_listener() { const event_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.select(event_r2)); });
|
|
27710
27646
|
i0.ɵɵelementStart(1, "td");
|
|
27711
27647
|
i0.ɵɵelementContainerStart(2, 5);
|
|
27712
|
-
i0.ɵɵtemplate(3, EventLogTableComponent_tr_20_div_3_Template, 2, 1, "div", 6)(4, EventLogTableComponent_tr_20_div_4_Template,
|
|
27648
|
+
i0.ɵɵtemplate(3, EventLogTableComponent_tr_20_div_3_Template, 2, 1, "div", 6)(4, EventLogTableComponent_tr_20_div_4_Template, 2, 1, "div", 7);
|
|
27713
27649
|
i0.ɵɵelementContainerEnd();
|
|
27714
27650
|
i0.ɵɵtemplate(5, EventLogTableComponent_tr_20_span_5_Template, 2, 1, "span", 8)(6, EventLogTableComponent_tr_20_div_6_Template, 5, 3, "div", 9);
|
|
27715
27651
|
i0.ɵɵelementEnd();
|
|
@@ -27753,19 +27689,13 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
|
|
|
27753
27689
|
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(18, 21, event_r2.user_first_name), " ", i0.ɵɵpipeBind1(19, 23, event_r2.user_last_name), "");
|
|
27754
27690
|
} }
|
|
27755
27691
|
class EventLogTableComponent {
|
|
27756
|
-
sessionStorage;
|
|
27757
27692
|
events;
|
|
27758
27693
|
selected;
|
|
27759
27694
|
onSelect = new EventEmitter();
|
|
27760
27695
|
onCaseHistory = new EventEmitter();
|
|
27761
27696
|
isPartOfCaseTimeline = false;
|
|
27762
|
-
isUserExternal;
|
|
27763
|
-
constructor(sessionStorage) {
|
|
27764
|
-
this.sessionStorage = sessionStorage;
|
|
27765
|
-
}
|
|
27766
27697
|
ngOnInit() {
|
|
27767
27698
|
this.isPartOfCaseTimeline = this.onCaseHistory.observers.length > 0;
|
|
27768
|
-
this.isUserExternal = JSON.parse(this.sessionStorage.getItem('userDetails')).roles.includes('pui-case-manager');
|
|
27769
27699
|
}
|
|
27770
27700
|
select(event) {
|
|
27771
27701
|
this.selected = event;
|
|
@@ -27805,8 +27735,8 @@ class EventLogTableComponent {
|
|
|
27805
27735
|
getAriaLabelforLink(event) {
|
|
27806
27736
|
return `press enter key to open event ${event.event_name} link in separate window`;
|
|
27807
27737
|
}
|
|
27808
|
-
static ɵfac = function EventLogTableComponent_Factory(t) { return new (t || EventLogTableComponent)(
|
|
27809
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventLogTableComponent, selectors: [["ccd-event-log-table"]], inputs: { events: "events", selected: "selected" }, outputs: { onSelect: "onSelect", onCaseHistory: "onCaseHistory" }, decls: 21, vars: 13, consts: [[1, "EventLogTable"], [1, "heading-h2"], [1, "text-16"], ["tabindex", "0", 3, "ngClass", "click", "keyup", 4, "ngFor", "ngForOf"], ["tabindex", "0", 3, "click", "keyup", "ngClass"], [3, "ngSwitch"], ["id", "case-timeline", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [4, "ngIf"], ["class", "tooltip", 4, "ngIf"], ["tabindex", "0", 3, "keydown.enter"], [1, "tooltip", "text-16"], [1, "tooltiptext"], ["tabindex", "0"], ["id", "case-timeline"], ["class", "text-16 event-link", 3, "click", 4, "ngIf"], [1, "text-16", "event-link", 3, "click"], ["class", "text-16 event-link", 3, "routerLink", "target", 4, "ngIf"], [
|
|
27738
|
+
static ɵfac = function EventLogTableComponent_Factory(t) { return new (t || EventLogTableComponent)(); };
|
|
27739
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventLogTableComponent, selectors: [["ccd-event-log-table"]], inputs: { events: "events", selected: "selected" }, outputs: { onSelect: "onSelect", onCaseHistory: "onCaseHistory" }, decls: 21, vars: 13, consts: [[1, "EventLogTable"], [1, "heading-h2"], [1, "text-16"], ["tabindex", "0", 3, "ngClass", "click", "keyup", 4, "ngFor", "ngForOf"], ["tabindex", "0", 3, "click", "keyup", "ngClass"], [3, "ngSwitch"], ["id", "case-timeline", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [4, "ngIf"], ["class", "tooltip", 4, "ngIf"], ["tabindex", "0", 3, "keydown.enter"], [1, "tooltip", "text-16"], [1, "tooltiptext"], ["tabindex", "0"], ["id", "case-timeline"], ["class", "text-16 event-link", 3, "click", 4, "ngIf"], [1, "text-16", "event-link", 3, "click"], ["class", "text-16 event-link", 3, "routerLink", "target", 4, "ngIf"], [1, "text-16", "event-link", 3, "routerLink", "target"], [1, "tooltip"], ["target", "_blank", "rel", "noopener", 3, "href"], ["alt", "document image", "src", "data:image/png;base64,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", 1, "doc-img"], [1, "tooltiptext", "doc-tooltip"]], template: function EventLogTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
27810
27740
|
i0.ɵɵelementStart(0, "table", 0)(1, "caption")(2, "h2", 1);
|
|
27811
27741
|
i0.ɵɵtext(3);
|
|
27812
27742
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
@@ -27841,8 +27771,8 @@ class EventLogTableComponent {
|
|
|
27841
27771
|
}
|
|
27842
27772
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogTableComponent, [{
|
|
27843
27773
|
type: Component,
|
|
27844
|
-
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'
|
|
27845
|
-
}],
|
|
27774
|
+
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,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\"/>\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>\n", 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"] }]
|
|
27775
|
+
}], null, { events: [{
|
|
27846
27776
|
type: Input
|
|
27847
27777
|
}], selected: [{
|
|
27848
27778
|
type: Input
|
|
@@ -27851,7 +27781,7 @@ class EventLogTableComponent {
|
|
|
27851
27781
|
}], onCaseHistory: [{
|
|
27852
27782
|
type: Output
|
|
27853
27783
|
}] }); })();
|
|
27854
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventLogTableComponent, { className: "EventLogTableComponent", filePath: "lib/shared/components/palette/history/event-log/event-log-table.component.ts", lineNumber:
|
|
27784
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventLogTableComponent, { className: "EventLogTableComponent", filePath: "lib/shared/components/palette/history/event-log/event-log-table.component.ts", lineNumber: 10 }); })();
|
|
27855
27785
|
|
|
27856
27786
|
function EventLogComponent_ccd_event_log_table_3_Template(rf, ctx) { if (rf & 1) {
|
|
27857
27787
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -30762,7 +30692,7 @@ class PaginationComponent {
|
|
|
30762
30692
|
this.pResponsive = coerceToBoolean(value);
|
|
30763
30693
|
}
|
|
30764
30694
|
static ɵfac = function PaginationComponent_Factory(t) { return new (t || PaginationComponent)(); };
|
|
30765
|
-
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) {
|
|
30695
|
+
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", "role", "navigation", 3, "responsive", 4, "ngIf"], ["role", "navigation", 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) {
|
|
30766
30696
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30767
30697
|
i0.ɵɵelementStart(0, "pagination-template", 1, 0);
|
|
30768
30698
|
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)); });
|
|
@@ -30781,7 +30711,7 @@ class PaginationComponent {
|
|
|
30781
30711
|
}
|
|
30782
30712
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationComponent, [{
|
|
30783
30713
|
type: Component,
|
|
30784
|
-
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"] }]
|
|
30714
|
+
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\" role=\"navigation\" [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"] }]
|
|
30785
30715
|
}], null, { visibilityLabel: [{
|
|
30786
30716
|
type: Input
|
|
30787
30717
|
}], id: [{
|
|
@@ -32487,14 +32417,13 @@ class EventTriggerResolver {
|
|
|
32487
32417
|
router;
|
|
32488
32418
|
appConfig;
|
|
32489
32419
|
errorNotifier;
|
|
32490
|
-
loadingService;
|
|
32491
32420
|
static PARAM_CASE_ID = 'cid';
|
|
32492
32421
|
static PARAM_EVENT_ID = 'eid';
|
|
32493
32422
|
static IGNORE_WARNING = 'ignoreWarning';
|
|
32494
32423
|
static IGNORE_WARNING_VALUES = ['true', 'false'];
|
|
32495
32424
|
cachedEventTrigger;
|
|
32496
32425
|
cachedProfile;
|
|
32497
|
-
constructor(casesService, alertService, profileService, profileNotifier, router, appConfig, errorNotifier
|
|
32426
|
+
constructor(casesService, alertService, profileService, profileNotifier, router, appConfig, errorNotifier) {
|
|
32498
32427
|
this.casesService = casesService;
|
|
32499
32428
|
this.alertService = alertService;
|
|
32500
32429
|
this.profileService = profileService;
|
|
@@ -32502,7 +32431,6 @@ class EventTriggerResolver {
|
|
|
32502
32431
|
this.router = router;
|
|
32503
32432
|
this.appConfig = appConfig;
|
|
32504
32433
|
this.errorNotifier = errorNotifier;
|
|
32505
|
-
this.loadingService = loadingService;
|
|
32506
32434
|
}
|
|
32507
32435
|
resolve(route) {
|
|
32508
32436
|
return this.isRootTriggerEventRoute(route) ? this.getAndCacheEventTrigger(route)
|
|
@@ -32533,7 +32461,7 @@ class EventTriggerResolver {
|
|
|
32533
32461
|
}
|
|
32534
32462
|
return this.casesService
|
|
32535
32463
|
.getEventTrigger(caseTypeId, eventTriggerId, cid, ignoreWarning)
|
|
32536
|
-
.pipe(map(
|
|
32464
|
+
.pipe(map(eventTrigger => this.cachedEventTrigger = eventTrigger), catchError(error => {
|
|
32537
32465
|
error.details = { eventId: eventTriggerId, ...error.details };
|
|
32538
32466
|
this.alertService.setPreserveAlerts(true);
|
|
32539
32467
|
this.alertService.error(error.message);
|
|
@@ -32542,12 +32470,12 @@ class EventTriggerResolver {
|
|
|
32542
32470
|
return throwError(error);
|
|
32543
32471
|
})).toPromise();
|
|
32544
32472
|
}
|
|
32545
|
-
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)
|
|
32473
|
+
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)); };
|
|
32546
32474
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTriggerResolver, factory: EventTriggerResolver.ɵfac });
|
|
32547
32475
|
}
|
|
32548
32476
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerResolver, [{
|
|
32549
32477
|
type: Injectable
|
|
32550
|
-
}], () => [{ type: CasesService }, { type: AlertService }, { type: ProfileService }, { type: ProfileNotifier }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: ErrorNotifierService }
|
|
32478
|
+
}], () => [{ type: CasesService }, { type: AlertService }, { type: ProfileService }, { type: ProfileNotifier }, { type: i1$1.Router }, { type: AbstractAppConfig }, { type: ErrorNotifierService }], null); })();
|
|
32551
32479
|
|
|
32552
32480
|
function CaseEventTriggerComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
32553
32481
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -32573,7 +32501,6 @@ class CaseEventTriggerComponent {
|
|
|
32573
32501
|
caseReferencePipe;
|
|
32574
32502
|
activityPollingService;
|
|
32575
32503
|
sessionStorageService;
|
|
32576
|
-
loadingService;
|
|
32577
32504
|
static EVENT_COMPLETION_MESSAGE = `Case #%CASEREFERENCE% has been updated with event: %NAME%`;
|
|
32578
32505
|
static CALLBACK_FAILED_MESSAGE = ' but the callback service cannot be completed';
|
|
32579
32506
|
BANNER = DisplayMode.BANNER;
|
|
@@ -32582,7 +32509,7 @@ class CaseEventTriggerComponent {
|
|
|
32582
32509
|
activitySubscription;
|
|
32583
32510
|
caseSubscription;
|
|
32584
32511
|
parentUrl;
|
|
32585
|
-
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService, sessionStorageService
|
|
32512
|
+
constructor(ngZone, casesService, caseNotifier, router, alertService, route, caseReferencePipe, activityPollingService, sessionStorageService) {
|
|
32586
32513
|
this.ngZone = ngZone;
|
|
32587
32514
|
this.casesService = casesService;
|
|
32588
32515
|
this.caseNotifier = caseNotifier;
|
|
@@ -32592,12 +32519,8 @@ class CaseEventTriggerComponent {
|
|
|
32592
32519
|
this.caseReferencePipe = caseReferencePipe;
|
|
32593
32520
|
this.activityPollingService = activityPollingService;
|
|
32594
32521
|
this.sessionStorageService = sessionStorageService;
|
|
32595
|
-
this.loadingService = loadingService;
|
|
32596
32522
|
}
|
|
32597
32523
|
ngOnInit() {
|
|
32598
|
-
if (this.loadingService.hasSharedSpinner()) {
|
|
32599
|
-
this.loadingService.unregisterSharedSpinner();
|
|
32600
|
-
}
|
|
32601
32524
|
if (this.route.snapshot.data.case) {
|
|
32602
32525
|
this.caseDetails = this.route.snapshot.data.case;
|
|
32603
32526
|
}
|
|
@@ -32684,7 +32607,7 @@ class CaseEventTriggerComponent {
|
|
|
32684
32607
|
isDataLoaded() {
|
|
32685
32608
|
return !!(this.eventTrigger && this.caseDetails);
|
|
32686
32609
|
}
|
|
32687
|
-
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)
|
|
32610
|
+
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)); };
|
|
32688
32611
|
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) {
|
|
32689
32612
|
i0.ɵɵtemplate(0, CaseEventTriggerComponent_div_0_Template, 3, 6, "div", 0);
|
|
32690
32613
|
} if (rf & 2) {
|
|
@@ -32694,7 +32617,7 @@ class CaseEventTriggerComponent {
|
|
|
32694
32617
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEventTriggerComponent, [{
|
|
32695
32618
|
type: Component,
|
|
32696
32619
|
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" }]
|
|
32697
|
-
}], () => [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$1.Router }, { type: AlertService }, { type: i1$1.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }, { type: SessionStorageService }
|
|
32620
|
+
}], () => [{ type: i0.NgZone }, { type: CasesService }, { type: CaseNotifier }, { type: i1$1.Router }, { type: AlertService }, { type: i1$1.ActivatedRoute }, { type: CaseReferencePipe }, { type: ActivityPollingService }, { type: SessionStorageService }], null); })();
|
|
32698
32621
|
(() => { (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 }); })();
|
|
32699
32622
|
|
|
32700
32623
|
function CaseViewComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -33358,7 +33281,6 @@ class CaseFullAccessViewComponent {
|
|
|
33358
33281
|
crf;
|
|
33359
33282
|
sessionStorageService;
|
|
33360
33283
|
rpxTranslationPipe;
|
|
33361
|
-
loadingService;
|
|
33362
33284
|
static ORIGIN_QUERY_PARAM = 'origin';
|
|
33363
33285
|
static TRIGGER_TEXT_START = 'Go';
|
|
33364
33286
|
static TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Go';
|
|
@@ -33395,7 +33317,7 @@ class CaseFullAccessViewComponent {
|
|
|
33395
33317
|
eventId;
|
|
33396
33318
|
callbackErrorsSubject;
|
|
33397
33319
|
tabGroup;
|
|
33398
|
-
constructor(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location, crf, sessionStorageService, rpxTranslationPipe
|
|
33320
|
+
constructor(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location, crf, sessionStorageService, rpxTranslationPipe) {
|
|
33399
33321
|
this.ngZone = ngZone;
|
|
33400
33322
|
this.route = route;
|
|
33401
33323
|
this.router = router;
|
|
@@ -33411,7 +33333,6 @@ class CaseFullAccessViewComponent {
|
|
|
33411
33333
|
this.crf = crf;
|
|
33412
33334
|
this.sessionStorageService = sessionStorageService;
|
|
33413
33335
|
this.rpxTranslationPipe = rpxTranslationPipe;
|
|
33414
|
-
this.loadingService = loadingService;
|
|
33415
33336
|
}
|
|
33416
33337
|
ngOnInit() {
|
|
33417
33338
|
this.callbackErrorsSubject = this.errorNotifierService.errorSource.pipe(filter((x) => {
|
|
@@ -33493,8 +33414,6 @@ class CaseFullAccessViewComponent {
|
|
|
33493
33414
|
this.triggerText = CaseFullAccessViewComponent.TRIGGER_TEXT_START;
|
|
33494
33415
|
}
|
|
33495
33416
|
async applyTrigger(trigger) {
|
|
33496
|
-
const spinner = this.loadingService.register();
|
|
33497
|
-
this.loadingService.addSharedSpinner(spinner);
|
|
33498
33417
|
this.errorNotifierService.announceError(null);
|
|
33499
33418
|
const theQueryParams = {};
|
|
33500
33419
|
if (this.ignoreWarning) {
|
|
@@ -33745,7 +33664,7 @@ class CaseFullAccessViewComponent {
|
|
|
33745
33664
|
this.errorNotifierService.announceError(null);
|
|
33746
33665
|
this.alertService.clear();
|
|
33747
33666
|
}
|
|
33748
|
-
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)
|
|
33667
|
+
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)); };
|
|
33749
33668
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFullAccessViewComponent, selectors: [["ccd-case-full-access-view"]], viewQuery: function CaseFullAccessViewComponent_Query(rf, ctx) { if (rf & 1) {
|
|
33750
33669
|
i0.ɵɵviewQuery(_c0$b, 5);
|
|
33751
33670
|
} if (rf & 2) {
|
|
@@ -33790,7 +33709,7 @@ class CaseFullAccessViewComponent {
|
|
|
33790
33709
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
|
|
33791
33710
|
type: Component,
|
|
33792
33711
|
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"] }]
|
|
33793
|
-
}], () => [{ 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 }
|
|
33712
|
+
}], () => [{ 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: [{
|
|
33794
33713
|
type: Input
|
|
33795
33714
|
}], hasEventSelector: [{
|
|
33796
33715
|
type: Input
|
|
@@ -33804,7 +33723,7 @@ class CaseFullAccessViewComponent {
|
|
|
33804
33723
|
type: ViewChild,
|
|
33805
33724
|
args: ['tabGroup', { static: false }]
|
|
33806
33725
|
}] }); })();
|
|
33807
|
-
(() => { (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:
|
|
33726
|
+
(() => { (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: 43 }); })();
|
|
33808
33727
|
|
|
33809
33728
|
class PrintUrlPipe {
|
|
33810
33729
|
appConfig;
|
|
@@ -34072,7 +33991,7 @@ class CaseViewerComponent {
|
|
|
34072
33991
|
return tabs;
|
|
34073
33992
|
}
|
|
34074
33993
|
static ɵfac = function CaseViewerComponent_Factory(t) { return new (t || CaseViewerComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(OrderService)); };
|
|
34075
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseViewerComponent, selectors: [["ccd-case-viewer"]], inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "accessType", "caseDetails", 4, "ngIf"], [3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs", 4, "ngIf"], [3, "accessType", "caseDetails"], [3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs"]], template: function CaseViewerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
33994
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseViewerComponent, selectors: [["ccd-case-viewer"]], inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, decls: 1, vars: 1, consts: [[4, "ngIf"], ["id", "content", 3, "accessType", "caseDetails", 4, "ngIf"], ["id", "content", 3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs", 4, "ngIf"], ["id", "content", 3, "accessType", "caseDetails"], ["id", "content", 3, "caseDetails", "hasPrint", "hasEventSelector", "prependedTabs", "appendedTabs"]], template: function CaseViewerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
34076
33995
|
i0.ɵɵtemplate(0, CaseViewerComponent_div_0_Template, 3, 2, "div", 0);
|
|
34077
33996
|
} if (rf & 2) {
|
|
34078
33997
|
i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
|
|
@@ -34080,7 +33999,7 @@ class CaseViewerComponent {
|
|
|
34080
33999
|
}
|
|
34081
34000
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseViewerComponent, [{
|
|
34082
34001
|
type: Component,
|
|
34083
|
-
args: [{ selector: 'ccd-case-viewer', template: "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-basic-access-view *ngIf=\"!hasStandardAccess()\"\n [accessType]=\"userAccessType\"\n [caseDetails]=\"caseDetails\">\n </ccd-case-basic-access-view>\n <ccd-case-full-access-view *ngIf=\"hasStandardAccess()\"\n [caseDetails]=\"caseDetails\"\n [hasPrint]=\"hasPrint\"\n [hasEventSelector]=\"hasEventSelector\"\n [prependedTabs]=\"prependedTabs\"\n [appendedTabs]=\"appendedTabs\">\n </ccd-case-full-access-view>\n</div>\n" }]
|
|
34002
|
+
args: [{ selector: 'ccd-case-viewer', template: "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-basic-access-view *ngIf=\"!hasStandardAccess()\"\n [accessType]=\"userAccessType\"\n [caseDetails]=\"caseDetails\"\n id=\"content\">\n </ccd-case-basic-access-view>\n <ccd-case-full-access-view *ngIf=\"hasStandardAccess()\"\n [caseDetails]=\"caseDetails\"\n [hasPrint]=\"hasPrint\"\n [hasEventSelector]=\"hasEventSelector\"\n [prependedTabs]=\"prependedTabs\"\n [appendedTabs]=\"appendedTabs\"\n id=\"content\">\n </ccd-case-full-access-view>\n</div>\n" }]
|
|
34084
34003
|
}], () => [{ type: i1$1.ActivatedRoute }, { type: CaseNotifier }, { type: AbstractAppConfig }, { type: OrderService }], { hasPrint: [{
|
|
34085
34004
|
type: Input
|
|
34086
34005
|
}], hasEventSelector: [{
|
|
@@ -34554,6 +34473,7 @@ class EventStartGuard {
|
|
|
34554
34473
|
sessionStorageService;
|
|
34555
34474
|
abstractConfig;
|
|
34556
34475
|
cookieService;
|
|
34476
|
+
static CLIENT_CONTEXT = 'clientContext';
|
|
34557
34477
|
constructor(workAllocationService, router, sessionStorageService, abstractConfig, cookieService) {
|
|
34558
34478
|
this.workAllocationService = workAllocationService;
|
|
34559
34479
|
this.router = router;
|
|
@@ -34574,7 +34494,7 @@ class EventStartGuard {
|
|
|
34574
34494
|
const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
|
|
34575
34495
|
const languageCookie = this.cookieService.getCookie('exui-preferred-language');
|
|
34576
34496
|
const currentLanguage = !!languageCookie && languageCookie !== '' ? languageCookie : 'en';
|
|
34577
|
-
const preClientContext = this.sessionStorageService.getItem(
|
|
34497
|
+
const preClientContext = this.sessionStorageService.getItem(EventStartGuard.CLIENT_CONTEXT);
|
|
34578
34498
|
if (!preClientContext) {
|
|
34579
34499
|
// creates client context for language if not already existing
|
|
34580
34500
|
const storeClientContext = {
|
|
@@ -34584,7 +34504,7 @@ class EventStartGuard {
|
|
|
34584
34504
|
}
|
|
34585
34505
|
}
|
|
34586
34506
|
};
|
|
34587
|
-
this.sessionStorageService.setItem(
|
|
34507
|
+
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34588
34508
|
}
|
|
34589
34509
|
else {
|
|
34590
34510
|
const clientContextObj = JSON.parse(preClientContext);
|
|
@@ -34598,7 +34518,7 @@ class EventStartGuard {
|
|
|
34598
34518
|
}
|
|
34599
34519
|
}
|
|
34600
34520
|
};
|
|
34601
|
-
this.sessionStorageService.setItem(
|
|
34521
|
+
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(clientContextAddLanguage));
|
|
34602
34522
|
}
|
|
34603
34523
|
}
|
|
34604
34524
|
if (caseInfoStr) {
|
|
@@ -34616,7 +34536,7 @@ class EventStartGuard {
|
|
|
34616
34536
|
}
|
|
34617
34537
|
return of(false);
|
|
34618
34538
|
}
|
|
34619
|
-
checkTaskInEventNotRequired(payload, caseId, taskId
|
|
34539
|
+
checkTaskInEventNotRequired(payload, caseId, taskId) {
|
|
34620
34540
|
if (!payload || !payload.tasks) {
|
|
34621
34541
|
return true;
|
|
34622
34542
|
}
|
|
@@ -34646,18 +34566,55 @@ class EventStartGuard {
|
|
|
34646
34566
|
else {
|
|
34647
34567
|
task = tasksAssignedToUser[0];
|
|
34648
34568
|
}
|
|
34649
|
-
this.
|
|
34569
|
+
const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
|
|
34570
|
+
// if one task assigned to user, allow user to complete event
|
|
34571
|
+
const storeClientContext = {
|
|
34572
|
+
client_context: {
|
|
34573
|
+
user_task: {
|
|
34574
|
+
task_data: task,
|
|
34575
|
+
complete_task: true
|
|
34576
|
+
},
|
|
34577
|
+
user_language: {
|
|
34578
|
+
language: currentLanguage
|
|
34579
|
+
}
|
|
34580
|
+
}
|
|
34581
|
+
};
|
|
34582
|
+
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34650
34583
|
return true;
|
|
34651
34584
|
}
|
|
34652
34585
|
}
|
|
34586
|
+
removeTaskFromSessionStorage() {
|
|
34587
|
+
this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
|
|
34588
|
+
}
|
|
34653
34589
|
checkForTasks(payload, caseId, eventId, taskId, userId) {
|
|
34654
34590
|
if (taskId && payload?.tasks?.length > 0) {
|
|
34655
34591
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
34656
34592
|
if (task) {
|
|
34657
|
-
|
|
34593
|
+
// Store task to session
|
|
34594
|
+
const taskEventCompletionInfo = {
|
|
34595
|
+
caseId: caseId,
|
|
34596
|
+
eventId: eventId,
|
|
34597
|
+
userId: userId,
|
|
34598
|
+
taskId: task.id,
|
|
34599
|
+
createdTimestamp: Date.now()
|
|
34600
|
+
};
|
|
34601
|
+
const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
|
|
34602
|
+
const storeClientContext = {
|
|
34603
|
+
client_context: {
|
|
34604
|
+
user_task: {
|
|
34605
|
+
task_data: task,
|
|
34606
|
+
complete_task: true
|
|
34607
|
+
},
|
|
34608
|
+
user_language: {
|
|
34609
|
+
language: currentLanguage
|
|
34610
|
+
}
|
|
34611
|
+
}
|
|
34612
|
+
};
|
|
34613
|
+
this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
|
|
34614
|
+
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34658
34615
|
}
|
|
34659
34616
|
else {
|
|
34660
|
-
|
|
34617
|
+
this.removeTaskFromSessionStorage();
|
|
34661
34618
|
}
|
|
34662
34619
|
}
|
|
34663
34620
|
if (payload.task_required_for_event) {
|
|
@@ -34672,34 +34629,9 @@ class EventStartGuard {
|
|
|
34672
34629
|
return of(false);
|
|
34673
34630
|
}
|
|
34674
34631
|
else {
|
|
34675
|
-
return of(this.checkTaskInEventNotRequired(payload, caseId, taskId
|
|
34632
|
+
return of(this.checkTaskInEventNotRequired(payload, caseId, taskId));
|
|
34676
34633
|
}
|
|
34677
34634
|
}
|
|
34678
|
-
// EXUI-2743 - Make taskEventCompletionInfo always available in session storage with client context
|
|
34679
|
-
setClientContextStorage(task, caseId, eventId, userId) {
|
|
34680
|
-
// Store task to session
|
|
34681
|
-
const taskEventCompletionInfo = {
|
|
34682
|
-
caseId: caseId,
|
|
34683
|
-
eventId: eventId,
|
|
34684
|
-
userId: userId,
|
|
34685
|
-
taskId: task.id,
|
|
34686
|
-
createdTimestamp: Date.now()
|
|
34687
|
-
};
|
|
34688
|
-
const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
|
|
34689
|
-
const storeClientContext = {
|
|
34690
|
-
client_context: {
|
|
34691
|
-
user_task: {
|
|
34692
|
-
task_data: task,
|
|
34693
|
-
complete_task: true
|
|
34694
|
-
},
|
|
34695
|
-
user_language: {
|
|
34696
|
-
language: currentLanguage
|
|
34697
|
-
}
|
|
34698
|
-
}
|
|
34699
|
-
};
|
|
34700
|
-
this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
|
|
34701
|
-
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34702
|
-
}
|
|
34703
34635
|
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)); };
|
|
34704
34636
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
|
|
34705
34637
|
}
|
|
@@ -34861,6 +34793,7 @@ class EventStartStateMachineService {
|
|
|
34861
34793
|
}
|
|
34862
34794
|
}
|
|
34863
34795
|
};
|
|
34796
|
+
context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
|
|
34864
34797
|
let userInfo;
|
|
34865
34798
|
const userInfoStr = context.sessionStorageService.getItem('userDetails');
|
|
34866
34799
|
if (userInfoStr) {
|
|
@@ -34874,9 +34807,7 @@ class EventStartStateMachineService {
|
|
|
34874
34807
|
taskId: task.id,
|
|
34875
34808
|
createdTimestamp: Date.now()
|
|
34876
34809
|
};
|
|
34877
|
-
context.sessionStorageService.setItem(
|
|
34878
|
-
// EXUI-2668 - Only add client context when taskEventCompletionInfo is set - stops auto completing incorrect tasks
|
|
34879
|
-
context.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
|
|
34810
|
+
context.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
|
|
34880
34811
|
// Allow user to perform the event
|
|
34881
34812
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
34882
34813
|
}
|