@hmcts/ccd-case-ui-toolkit 7.0.38-client-context-2 → 7.0.38-default-tab-fix
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +11 -11
- package/esm2020/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +14 -16
- package/esm2020/lib/shared/components/case-editor/services/cases.service.mjs +27 -53
- package/esm2020/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +6 -14
- package/esm2020/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.mjs +8 -3
- package/esm2020/lib/shared/components/event-start/event-guard/event-start.guard.mjs +5 -13
- package/esm2020/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +3 -11
- package/esm2020/lib/shared/domain/work-allocation/Task.mjs +1 -1
- package/esm2020/lib/shared/services/fields/fields.utils.mjs +1 -8
- package/esm2020/lib/shared/services/profile/profile.service.mjs +1 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +56 -112
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +56 -112
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -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 +1 -2
- 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 +0 -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-full-access-view/case-full-access-view.component.d.ts +1 -0
- package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
- package/lib/shared/domain/work-allocation/Task.d.ts +0 -4
- package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +0 -2
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3909,13 +3909,6 @@ class FieldsUtils {
|
|
|
3909
3909
|
return '';
|
|
3910
3910
|
}
|
|
3911
3911
|
}
|
|
3912
|
-
static getUserTaskFromClientContext(clientContextStr) {
|
|
3913
|
-
if (clientContextStr) {
|
|
3914
|
-
let clientContext = JSON.parse(clientContextStr);
|
|
3915
|
-
return clientContext.client_context.user_task;
|
|
3916
|
-
}
|
|
3917
|
-
return null;
|
|
3918
|
-
}
|
|
3919
3912
|
buildCanShowPredicate(eventTrigger, form) {
|
|
3920
3913
|
const currentState = this.getCurrentEventState(eventTrigger, form);
|
|
3921
3914
|
return (page) => {
|
|
@@ -6808,7 +6801,6 @@ class ProfileService {
|
|
|
6808
6801
|
.set('experimental', 'true')
|
|
6809
6802
|
.set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
|
|
6810
6803
|
.set('Content-Type', 'application/json');
|
|
6811
|
-
// Not adding client context header because header is added to call immediately afterwards
|
|
6812
6804
|
return this.httpService
|
|
6813
6805
|
.get(url, { headers, observe: 'body' })
|
|
6814
6806
|
.pipe(map((p) => plainToClass(Profile, p)));
|
|
@@ -7675,7 +7667,6 @@ class CasesService {
|
|
|
7675
7667
|
let headers = new HttpHeaders();
|
|
7676
7668
|
headers = headers.set('experimental', 'true');
|
|
7677
7669
|
headers = headers.set('Content-Type', 'application/json');
|
|
7678
|
-
headers = this.addClientContextHeader(headers);
|
|
7679
7670
|
if (Draft.isDraft(caseId)) {
|
|
7680
7671
|
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
|
|
7681
7672
|
}
|
|
@@ -7686,10 +7677,9 @@ class CasesService {
|
|
|
7686
7677
|
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
|
|
7687
7678
|
}
|
|
7688
7679
|
return this.http
|
|
7689
|
-
.get(url, { headers, observe: '
|
|
7690
|
-
.pipe(map(
|
|
7691
|
-
|
|
7692
|
-
return FieldsUtils.handleNestedDynamicLists(response.body);
|
|
7680
|
+
.get(url, { headers, observe: 'body' })
|
|
7681
|
+
.pipe(map(body => {
|
|
7682
|
+
return FieldsUtils.handleNestedDynamicLists(body);
|
|
7693
7683
|
}), catchError(error => {
|
|
7694
7684
|
this.errorService.setError(error);
|
|
7695
7685
|
return throwError(error);
|
|
@@ -7698,17 +7688,13 @@ class CasesService {
|
|
|
7698
7688
|
createEvent(caseDetails, eventData) {
|
|
7699
7689
|
const caseId = caseDetails.case_id;
|
|
7700
7690
|
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
|
|
7701
|
-
|
|
7691
|
+
const headers = new HttpHeaders()
|
|
7702
7692
|
.set('experimental', 'true')
|
|
7703
7693
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
7704
7694
|
.set('Content-Type', 'application/json');
|
|
7705
|
-
headers = this.addClientContextHeader(headers);
|
|
7706
7695
|
return this.http
|
|
7707
|
-
.post(url, eventData, { headers, observe: '
|
|
7708
|
-
.pipe(
|
|
7709
|
-
this.updateClientContextStorage(response.headers);
|
|
7710
|
-
return response.body;
|
|
7711
|
-
}), catchError(error => {
|
|
7696
|
+
.post(url, eventData, { headers, observe: 'body' })
|
|
7697
|
+
.pipe(catchError(error => {
|
|
7712
7698
|
this.errorService.setError(error);
|
|
7713
7699
|
return throwError(error);
|
|
7714
7700
|
}));
|
|
@@ -7716,17 +7702,13 @@ class CasesService {
|
|
|
7716
7702
|
validateCase(ctid, eventData, pageId) {
|
|
7717
7703
|
const pageIdString = pageId ? `?pageId=${pageId}` : '';
|
|
7718
7704
|
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
|
|
7719
|
-
|
|
7705
|
+
const headers = new HttpHeaders()
|
|
7720
7706
|
.set('experimental', 'true')
|
|
7721
7707
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
7722
7708
|
.set('Content-Type', 'application/json');
|
|
7723
|
-
headers = this.addClientContextHeader(headers);
|
|
7724
7709
|
return this.http
|
|
7725
|
-
.post(url, eventData, { headers, observe: '
|
|
7726
|
-
.pipe(
|
|
7727
|
-
this.updateClientContextStorage(response.headers);
|
|
7728
|
-
return response.body;
|
|
7729
|
-
}), catchError(error => {
|
|
7710
|
+
.post(url, eventData, { headers, observe: 'body' })
|
|
7711
|
+
.pipe(catchError(error => {
|
|
7730
7712
|
this.errorService.setError(error);
|
|
7731
7713
|
return throwError(error);
|
|
7732
7714
|
}));
|
|
@@ -7737,34 +7719,26 @@ class CasesService {
|
|
|
7737
7719
|
ignoreWarning = 'true';
|
|
7738
7720
|
}
|
|
7739
7721
|
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
7740
|
-
|
|
7722
|
+
const headers = new HttpHeaders()
|
|
7741
7723
|
.set('experimental', 'true')
|
|
7742
7724
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
7743
7725
|
.set('Content-Type', 'application/json');
|
|
7744
|
-
headers = this.addClientContextHeader(headers);
|
|
7745
7726
|
return this.http
|
|
7746
|
-
.post(url, eventData, { headers, observe: '
|
|
7747
|
-
.pipe(
|
|
7748
|
-
this.updateClientContextStorage(response.headers);
|
|
7749
|
-
return response.body;
|
|
7750
|
-
}), catchError(error => {
|
|
7727
|
+
.post(url, eventData, { headers, observe: 'body' })
|
|
7728
|
+
.pipe(catchError(error => {
|
|
7751
7729
|
this.errorService.setError(error);
|
|
7752
7730
|
return throwError(error);
|
|
7753
7731
|
}));
|
|
7754
7732
|
}
|
|
7755
7733
|
getPrintDocuments(caseId) {
|
|
7756
7734
|
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
|
|
7757
|
-
|
|
7735
|
+
const headers = new HttpHeaders()
|
|
7758
7736
|
.set('experimental', 'true')
|
|
7759
7737
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
7760
7738
|
.set('Content-Type', 'application/json');
|
|
7761
|
-
headers = this.addClientContextHeader(headers);
|
|
7762
7739
|
return this.http
|
|
7763
|
-
.get(url, { headers, observe: '
|
|
7764
|
-
.pipe(map(
|
|
7765
|
-
this.updateClientContextStorage(response.headers);
|
|
7766
|
-
return response.body.documentResources;
|
|
7767
|
-
}), catchError(error => {
|
|
7740
|
+
.get(url, { headers, observe: 'body' })
|
|
7741
|
+
.pipe(map(body => body.documentResources), catchError(error => {
|
|
7768
7742
|
this.errorService.setError(error);
|
|
7769
7743
|
return throwError(error);
|
|
7770
7744
|
}));
|
|
@@ -7797,6 +7771,17 @@ class CasesService {
|
|
|
7797
7771
|
wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
|
|
7798
7772
|
});
|
|
7799
7773
|
}
|
|
7774
|
+
/*
|
|
7775
|
+
Checks if the user has role of pui-case-manager and returns true or false
|
|
7776
|
+
*/
|
|
7777
|
+
isPuiCaseManager() {
|
|
7778
|
+
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
7779
|
+
if (userInfoStr) {
|
|
7780
|
+
const userInfo = JSON.parse(userInfoStr);
|
|
7781
|
+
return userInfo && userInfo.roles && (userInfo.roles.indexOf(CasesService.PUI_CASE_MANAGER) !== -1);
|
|
7782
|
+
}
|
|
7783
|
+
return false;
|
|
7784
|
+
}
|
|
7800
7785
|
getCourtOrHearingCentreName(locationId) {
|
|
7801
7786
|
return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
|
|
7802
7787
|
}
|
|
@@ -7863,25 +7848,6 @@ class CasesService {
|
|
|
7863
7848
|
.get(url)
|
|
7864
7849
|
.pipe(catchError(error => throwError(error)));
|
|
7865
7850
|
}
|
|
7866
|
-
addClientContextHeader(headers) {
|
|
7867
|
-
const clientContextDetails = this.sessionStorageService.getItem('clientContext');
|
|
7868
|
-
if (clientContextDetails) {
|
|
7869
|
-
// may require URI encoding in certain circumstances
|
|
7870
|
-
const clientContext = window.btoa(clientContextDetails);
|
|
7871
|
-
if (clientContext) {
|
|
7872
|
-
headers = headers.set('Client-Context', clientContext);
|
|
7873
|
-
}
|
|
7874
|
-
}
|
|
7875
|
-
return headers;
|
|
7876
|
-
}
|
|
7877
|
-
updateClientContextStorage(headers) {
|
|
7878
|
-
// for mocking - TODO: Kasi Remove/Uncomment for testing
|
|
7879
|
-
// headers = this.setMockClientContextHeader(headers);
|
|
7880
|
-
if (headers && headers.get('Client-Context')) {
|
|
7881
|
-
const clientContextString = window.atob(headers.get('Client-Context'));
|
|
7882
|
-
this.sessionStorageService.setItem('clientContext', clientContextString);
|
|
7883
|
-
}
|
|
7884
|
-
}
|
|
7885
7851
|
}
|
|
7886
7852
|
// Internal (UI) API
|
|
7887
7853
|
CasesService.V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
|
|
@@ -8372,9 +8338,8 @@ class EventCompletionStateMachineService {
|
|
|
8372
8338
|
entryActionForStateCompleteEventAndTask(state, context) {
|
|
8373
8339
|
// Trigger final state to complete processing of state machine
|
|
8374
8340
|
state.trigger(EventCompletionStates.Final);
|
|
8375
|
-
const
|
|
8376
|
-
|
|
8377
|
-
if (userTask?.task_data) {
|
|
8341
|
+
const taskStr = context.sessionStorageService.getItem('taskToComplete');
|
|
8342
|
+
if (taskStr) {
|
|
8378
8343
|
context.sessionStorageService.setItem('assignNeeded', 'false');
|
|
8379
8344
|
// just set event can be completed
|
|
8380
8345
|
context.component.eventCanBeCompleted.emit(true);
|
|
@@ -8393,9 +8358,9 @@ class EventCompletionStateMachineService {
|
|
|
8393
8358
|
entryActionForStateTaskUnassigned(state, context) {
|
|
8394
8359
|
// Trigger final state to complete processing of state machine
|
|
8395
8360
|
state.trigger(EventCompletionStates.Final);
|
|
8396
|
-
|
|
8397
|
-
const
|
|
8398
|
-
if (
|
|
8361
|
+
// Get task details
|
|
8362
|
+
const taskStr = context.sessionStorageService.getItem('taskToComplete');
|
|
8363
|
+
if (taskStr) {
|
|
8399
8364
|
context.sessionStorageService.setItem('assignNeeded', 'true');
|
|
8400
8365
|
context.component.eventCanBeCompleted.emit(true);
|
|
8401
8366
|
}
|
|
@@ -8430,12 +8395,6 @@ class EventCompletionStateMachineService {
|
|
|
8430
8395
|
addTransitionsForStateTaskUnassigned() {
|
|
8431
8396
|
this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
|
|
8432
8397
|
}
|
|
8433
|
-
taskPresentInSessionStorage(context) {
|
|
8434
|
-
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8435
|
-
console.log('clienht cintedt ', clientContextStr);
|
|
8436
|
-
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8437
|
-
return !!userTask.task_data;
|
|
8438
|
-
}
|
|
8439
8398
|
}
|
|
8440
8399
|
EventCompletionStateMachineService.ɵfac = function EventCompletionStateMachineService_Factory(t) { return new (t || EventCompletionStateMachineService)(); };
|
|
8441
8400
|
EventCompletionStateMachineService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
|
|
@@ -8894,9 +8853,11 @@ class CaseEditComponent {
|
|
|
8894
8853
|
this.isSubmitting = true;
|
|
8895
8854
|
// We have to run the event completion checks if task in session storage
|
|
8896
8855
|
// and if the task is in session storage, then is it associated to the case
|
|
8897
|
-
|
|
8898
|
-
const
|
|
8899
|
-
|
|
8856
|
+
let taskInSessionStorage;
|
|
8857
|
+
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
8858
|
+
if (taskStr) {
|
|
8859
|
+
taskInSessionStorage = JSON.parse(taskStr);
|
|
8860
|
+
}
|
|
8900
8861
|
if (taskInSessionStorage && taskInSessionStorage.case_id === this.getCaseId(caseDetails)) {
|
|
8901
8862
|
// Show event completion component to perform event completion checks
|
|
8902
8863
|
this.eventCompletionParams = ({
|
|
@@ -9095,16 +9056,14 @@ class CaseEditComponent {
|
|
|
9095
9056
|
});
|
|
9096
9057
|
}
|
|
9097
9058
|
postCompleteTaskIfRequired() {
|
|
9098
|
-
const
|
|
9099
|
-
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9100
|
-
const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
|
|
9059
|
+
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
9101
9060
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
|
|
9102
|
-
if (
|
|
9103
|
-
|
|
9061
|
+
if (taskStr && assignNeeded) {
|
|
9062
|
+
const task = JSON.parse(taskStr);
|
|
9104
9063
|
return this.workAllocationService.assignAndCompleteTask(task.id);
|
|
9105
9064
|
}
|
|
9106
|
-
else if (
|
|
9107
|
-
|
|
9065
|
+
else if (taskStr) {
|
|
9066
|
+
const task = JSON.parse(taskStr);
|
|
9108
9067
|
return this.workAllocationService.completeTask(task.id);
|
|
9109
9068
|
}
|
|
9110
9069
|
return of(true);
|
|
@@ -10628,12 +10587,8 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
10628
10587
|
}
|
|
10629
10588
|
onContinue() {
|
|
10630
10589
|
// Get task details
|
|
10631
|
-
const
|
|
10632
|
-
|
|
10633
|
-
const task = userTask ? userTask.task_data : null;
|
|
10634
|
-
// not complete_task not utilised here as related to event completion
|
|
10635
|
-
// service wanting task associated with event to not be completed not directly relevant
|
|
10636
|
-
if (task) {
|
|
10590
|
+
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
10591
|
+
if (taskStr) {
|
|
10637
10592
|
this.sessionStorageService.setItem('assignNeeded', 'true');
|
|
10638
10593
|
// set event can be completed to true
|
|
10639
10594
|
this.parentComponent.eventCanBeCompleted.emit(true);
|
|
@@ -31378,8 +31333,8 @@ class CaseFullAccessViewComponent {
|
|
|
31378
31333
|
else {
|
|
31379
31334
|
// sort with the order of CCD predefined tabs
|
|
31380
31335
|
this.caseDetails.tabs.sort((aTab, bTab) => aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0));
|
|
31381
|
-
//
|
|
31382
|
-
const preSelectTab = this.
|
|
31336
|
+
// select the first tab checking if the tab is visible
|
|
31337
|
+
const preSelectTab = this.findPreSelectedActiveTab();
|
|
31383
31338
|
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: preSelectTab.label }).then(() => {
|
|
31384
31339
|
matTab = this.tabGroup._tabs.find((x) => x.textLabel === preSelectTab.label);
|
|
31385
31340
|
// Update selectedIndex only if matTab.position is a non-zero number (positive or negative); this means the
|
|
@@ -31410,6 +31365,11 @@ class CaseFullAccessViewComponent {
|
|
|
31410
31365
|
}
|
|
31411
31366
|
}
|
|
31412
31367
|
}
|
|
31368
|
+
findPreSelectedActiveTab() {
|
|
31369
|
+
const unOrderedTabsInSortedTabs = this.caseDetails.tabs
|
|
31370
|
+
.filter((tab) => !tab.order && this.sortedTabs.some((sortedTab) => sortedTab.id === tab.id));
|
|
31371
|
+
return unOrderedTabsInSortedTabs.length ? unOrderedTabsInSortedTabs[0] : this.sortedTabs[0];
|
|
31372
|
+
}
|
|
31413
31373
|
// Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
|
|
31414
31374
|
tabChanged(tabIndexChanged) {
|
|
31415
31375
|
const matTab = this.tabGroup._tabs.find(tab => tab.isActive);
|
|
@@ -32357,26 +32317,18 @@ class EventStartGuard {
|
|
|
32357
32317
|
task = tasksAssignedToUser[0];
|
|
32358
32318
|
}
|
|
32359
32319
|
// if one task assigned to user, allow user to complete event
|
|
32360
|
-
|
|
32361
|
-
client_context: {
|
|
32362
|
-
user_task: {
|
|
32363
|
-
task_data: task,
|
|
32364
|
-
complete_task: true
|
|
32365
|
-
}
|
|
32366
|
-
}
|
|
32367
|
-
};
|
|
32368
|
-
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
32320
|
+
this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
|
|
32369
32321
|
return true;
|
|
32370
32322
|
}
|
|
32371
32323
|
}
|
|
32372
32324
|
removeTaskFromSessionStorage() {
|
|
32373
|
-
this.sessionStorageService.removeItem(EventStartGuard.
|
|
32325
|
+
this.sessionStorageService.removeItem(EventStartGuard.TASK_TO_COMPLETE);
|
|
32374
32326
|
}
|
|
32375
32327
|
checkForTasks(payload, caseId, eventId, taskId) {
|
|
32376
32328
|
if (taskId && payload?.tasks?.length > 0) {
|
|
32377
32329
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
32378
32330
|
if (task) {
|
|
32379
|
-
this.sessionStorageService.setItem(EventStartGuard.
|
|
32331
|
+
this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
|
|
32380
32332
|
}
|
|
32381
32333
|
else {
|
|
32382
32334
|
this.removeTaskFromSessionStorage();
|
|
@@ -32398,7 +32350,7 @@ class EventStartGuard {
|
|
|
32398
32350
|
}
|
|
32399
32351
|
}
|
|
32400
32352
|
}
|
|
32401
|
-
EventStartGuard.
|
|
32353
|
+
EventStartGuard.TASK_TO_COMPLETE = 'taskToComplete';
|
|
32402
32354
|
EventStartGuard.ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
32403
32355
|
EventStartGuard.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
|
|
32404
32356
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartGuard, [{
|
|
@@ -32536,17 +32488,9 @@ class EventStartStateMachineService {
|
|
|
32536
32488
|
task = context.tasks[0];
|
|
32537
32489
|
}
|
|
32538
32490
|
const taskStr = JSON.stringify(task);
|
|
32539
|
-
console.log('entryActionForStateOneTaskAssignedToUser: setting
|
|
32491
|
+
console.log('entryActionForStateOneTaskAssignedToUser: setting taskToComplete to ' + taskStr);
|
|
32540
32492
|
// Store task to session
|
|
32541
|
-
|
|
32542
|
-
client_context: {
|
|
32543
|
-
user_task: {
|
|
32544
|
-
task_data: task,
|
|
32545
|
-
complete_task: true
|
|
32546
|
-
}
|
|
32547
|
-
}
|
|
32548
|
-
};
|
|
32549
|
-
context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
|
|
32493
|
+
context.sessionStorageService.setItem('taskToComplete', taskStr);
|
|
32550
32494
|
// Allow user to perform the event
|
|
32551
32495
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
32552
32496
|
}
|