@hmcts/ccd-case-ui-toolkit 7.0.38-client-context → 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 -54
- package/esm2020/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +6 -9
- 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 -108
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +56 -108
- 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,11 +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
|
-
this.updateClientContextStorage(response.headers);
|
|
7693
|
-
return FieldsUtils.handleNestedDynamicLists(response.body);
|
|
7680
|
+
.get(url, { headers, observe: 'body' })
|
|
7681
|
+
.pipe(map(body => {
|
|
7682
|
+
return FieldsUtils.handleNestedDynamicLists(body);
|
|
7694
7683
|
}), catchError(error => {
|
|
7695
7684
|
this.errorService.setError(error);
|
|
7696
7685
|
return throwError(error);
|
|
@@ -7699,17 +7688,13 @@ class CasesService {
|
|
|
7699
7688
|
createEvent(caseDetails, eventData) {
|
|
7700
7689
|
const caseId = caseDetails.case_id;
|
|
7701
7690
|
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
|
|
7702
|
-
|
|
7691
|
+
const headers = new HttpHeaders()
|
|
7703
7692
|
.set('experimental', 'true')
|
|
7704
7693
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
7705
7694
|
.set('Content-Type', 'application/json');
|
|
7706
|
-
headers = this.addClientContextHeader(headers);
|
|
7707
7695
|
return this.http
|
|
7708
|
-
.post(url, eventData, { headers, observe: '
|
|
7709
|
-
.pipe(
|
|
7710
|
-
this.updateClientContextStorage(response.headers);
|
|
7711
|
-
return response.body;
|
|
7712
|
-
}), catchError(error => {
|
|
7696
|
+
.post(url, eventData, { headers, observe: 'body' })
|
|
7697
|
+
.pipe(catchError(error => {
|
|
7713
7698
|
this.errorService.setError(error);
|
|
7714
7699
|
return throwError(error);
|
|
7715
7700
|
}));
|
|
@@ -7717,17 +7702,13 @@ class CasesService {
|
|
|
7717
7702
|
validateCase(ctid, eventData, pageId) {
|
|
7718
7703
|
const pageIdString = pageId ? `?pageId=${pageId}` : '';
|
|
7719
7704
|
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
|
|
7720
|
-
|
|
7705
|
+
const headers = new HttpHeaders()
|
|
7721
7706
|
.set('experimental', 'true')
|
|
7722
7707
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
7723
7708
|
.set('Content-Type', 'application/json');
|
|
7724
|
-
headers = this.addClientContextHeader(headers);
|
|
7725
7709
|
return this.http
|
|
7726
|
-
.post(url, eventData, { headers, observe: '
|
|
7727
|
-
.pipe(
|
|
7728
|
-
this.updateClientContextStorage(response.headers);
|
|
7729
|
-
return response.body;
|
|
7730
|
-
}), catchError(error => {
|
|
7710
|
+
.post(url, eventData, { headers, observe: 'body' })
|
|
7711
|
+
.pipe(catchError(error => {
|
|
7731
7712
|
this.errorService.setError(error);
|
|
7732
7713
|
return throwError(error);
|
|
7733
7714
|
}));
|
|
@@ -7738,34 +7719,26 @@ class CasesService {
|
|
|
7738
7719
|
ignoreWarning = 'true';
|
|
7739
7720
|
}
|
|
7740
7721
|
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
7741
|
-
|
|
7722
|
+
const headers = new HttpHeaders()
|
|
7742
7723
|
.set('experimental', 'true')
|
|
7743
7724
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
7744
7725
|
.set('Content-Type', 'application/json');
|
|
7745
|
-
headers = this.addClientContextHeader(headers);
|
|
7746
7726
|
return this.http
|
|
7747
|
-
.post(url, eventData, { headers, observe: '
|
|
7748
|
-
.pipe(
|
|
7749
|
-
this.updateClientContextStorage(response.headers);
|
|
7750
|
-
return response.body;
|
|
7751
|
-
}), catchError(error => {
|
|
7727
|
+
.post(url, eventData, { headers, observe: 'body' })
|
|
7728
|
+
.pipe(catchError(error => {
|
|
7752
7729
|
this.errorService.setError(error);
|
|
7753
7730
|
return throwError(error);
|
|
7754
7731
|
}));
|
|
7755
7732
|
}
|
|
7756
7733
|
getPrintDocuments(caseId) {
|
|
7757
7734
|
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
|
|
7758
|
-
|
|
7735
|
+
const headers = new HttpHeaders()
|
|
7759
7736
|
.set('experimental', 'true')
|
|
7760
7737
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
7761
7738
|
.set('Content-Type', 'application/json');
|
|
7762
|
-
headers = this.addClientContextHeader(headers);
|
|
7763
7739
|
return this.http
|
|
7764
|
-
.get(url, { headers, observe: '
|
|
7765
|
-
.pipe(map(
|
|
7766
|
-
this.updateClientContextStorage(response.headers);
|
|
7767
|
-
return response.body.documentResources;
|
|
7768
|
-
}), catchError(error => {
|
|
7740
|
+
.get(url, { headers, observe: 'body' })
|
|
7741
|
+
.pipe(map(body => body.documentResources), catchError(error => {
|
|
7769
7742
|
this.errorService.setError(error);
|
|
7770
7743
|
return throwError(error);
|
|
7771
7744
|
}));
|
|
@@ -7798,6 +7771,17 @@ class CasesService {
|
|
|
7798
7771
|
wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
|
|
7799
7772
|
});
|
|
7800
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
|
+
}
|
|
7801
7785
|
getCourtOrHearingCentreName(locationId) {
|
|
7802
7786
|
return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
|
|
7803
7787
|
}
|
|
@@ -7864,25 +7848,6 @@ class CasesService {
|
|
|
7864
7848
|
.get(url)
|
|
7865
7849
|
.pipe(catchError(error => throwError(error)));
|
|
7866
7850
|
}
|
|
7867
|
-
addClientContextHeader(headers) {
|
|
7868
|
-
const clientContextDetails = this.sessionStorageService.getItem('clientContext');
|
|
7869
|
-
if (clientContextDetails) {
|
|
7870
|
-
// may require URI encoding in certain circumstances
|
|
7871
|
-
const clientContext = window.btoa(clientContextDetails);
|
|
7872
|
-
if (clientContext) {
|
|
7873
|
-
headers = headers.set('Client-Context', clientContext);
|
|
7874
|
-
}
|
|
7875
|
-
}
|
|
7876
|
-
return headers;
|
|
7877
|
-
}
|
|
7878
|
-
updateClientContextStorage(headers) {
|
|
7879
|
-
// for mocking - TODO: Kasi Remove/Uncomment for testing
|
|
7880
|
-
// headers = this.setMockClientContextHeader(headers);
|
|
7881
|
-
if (headers && headers.get('Client-Context')) {
|
|
7882
|
-
const clientContextString = window.atob(headers.get('Client-Context'));
|
|
7883
|
-
this.sessionStorageService.setItem('clientContext', clientContextString);
|
|
7884
|
-
}
|
|
7885
|
-
}
|
|
7886
7851
|
}
|
|
7887
7852
|
// Internal (UI) API
|
|
7888
7853
|
CasesService.V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
|
|
@@ -8373,7 +8338,8 @@ class EventCompletionStateMachineService {
|
|
|
8373
8338
|
entryActionForStateCompleteEventAndTask(state, context) {
|
|
8374
8339
|
// Trigger final state to complete processing of state machine
|
|
8375
8340
|
state.trigger(EventCompletionStates.Final);
|
|
8376
|
-
|
|
8341
|
+
const taskStr = context.sessionStorageService.getItem('taskToComplete');
|
|
8342
|
+
if (taskStr) {
|
|
8377
8343
|
context.sessionStorageService.setItem('assignNeeded', 'false');
|
|
8378
8344
|
// just set event can be completed
|
|
8379
8345
|
context.component.eventCanBeCompleted.emit(true);
|
|
@@ -8392,7 +8358,9 @@ class EventCompletionStateMachineService {
|
|
|
8392
8358
|
entryActionForStateTaskUnassigned(state, context) {
|
|
8393
8359
|
// Trigger final state to complete processing of state machine
|
|
8394
8360
|
state.trigger(EventCompletionStates.Final);
|
|
8395
|
-
|
|
8361
|
+
// Get task details
|
|
8362
|
+
const taskStr = context.sessionStorageService.getItem('taskToComplete');
|
|
8363
|
+
if (taskStr) {
|
|
8396
8364
|
context.sessionStorageService.setItem('assignNeeded', 'true');
|
|
8397
8365
|
context.component.eventCanBeCompleted.emit(true);
|
|
8398
8366
|
}
|
|
@@ -8427,11 +8395,6 @@ class EventCompletionStateMachineService {
|
|
|
8427
8395
|
addTransitionsForStateTaskUnassigned() {
|
|
8428
8396
|
this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
|
|
8429
8397
|
}
|
|
8430
|
-
getTaskFromClientContext(context) {
|
|
8431
|
-
const clientContextStr = context.sessionStorageService.getItem('clientContext');
|
|
8432
|
-
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8433
|
-
return userTask ? userTask.task_data : null;
|
|
8434
|
-
}
|
|
8435
8398
|
}
|
|
8436
8399
|
EventCompletionStateMachineService.ɵfac = function EventCompletionStateMachineService_Factory(t) { return new (t || EventCompletionStateMachineService)(); };
|
|
8437
8400
|
EventCompletionStateMachineService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventCompletionStateMachineService, factory: EventCompletionStateMachineService.ɵfac });
|
|
@@ -8890,9 +8853,11 @@ class CaseEditComponent {
|
|
|
8890
8853
|
this.isSubmitting = true;
|
|
8891
8854
|
// We have to run the event completion checks if task in session storage
|
|
8892
8855
|
// and if the task is in session storage, then is it associated to the case
|
|
8893
|
-
|
|
8894
|
-
const
|
|
8895
|
-
|
|
8856
|
+
let taskInSessionStorage;
|
|
8857
|
+
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
8858
|
+
if (taskStr) {
|
|
8859
|
+
taskInSessionStorage = JSON.parse(taskStr);
|
|
8860
|
+
}
|
|
8896
8861
|
if (taskInSessionStorage && taskInSessionStorage.case_id === this.getCaseId(caseDetails)) {
|
|
8897
8862
|
// Show event completion component to perform event completion checks
|
|
8898
8863
|
this.eventCompletionParams = ({
|
|
@@ -9091,16 +9056,14 @@ class CaseEditComponent {
|
|
|
9091
9056
|
});
|
|
9092
9057
|
}
|
|
9093
9058
|
postCompleteTaskIfRequired() {
|
|
9094
|
-
const
|
|
9095
|
-
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9096
|
-
const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
|
|
9059
|
+
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
9097
9060
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
|
|
9098
|
-
if (
|
|
9099
|
-
|
|
9061
|
+
if (taskStr && assignNeeded) {
|
|
9062
|
+
const task = JSON.parse(taskStr);
|
|
9100
9063
|
return this.workAllocationService.assignAndCompleteTask(task.id);
|
|
9101
9064
|
}
|
|
9102
|
-
else if (
|
|
9103
|
-
|
|
9065
|
+
else if (taskStr) {
|
|
9066
|
+
const task = JSON.parse(taskStr);
|
|
9104
9067
|
return this.workAllocationService.completeTask(task.id);
|
|
9105
9068
|
}
|
|
9106
9069
|
return of(true);
|
|
@@ -10624,12 +10587,8 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
10624
10587
|
}
|
|
10625
10588
|
onContinue() {
|
|
10626
10589
|
// Get task details
|
|
10627
|
-
const
|
|
10628
|
-
|
|
10629
|
-
const task = userTask ? userTask.task_data : null;
|
|
10630
|
-
// not complete_task not utilised here as related to event completion
|
|
10631
|
-
// service wanting task associated with event to not be completed not directly relevant
|
|
10632
|
-
if (task) {
|
|
10590
|
+
const taskStr = this.sessionStorageService.getItem('taskToComplete');
|
|
10591
|
+
if (taskStr) {
|
|
10633
10592
|
this.sessionStorageService.setItem('assignNeeded', 'true');
|
|
10634
10593
|
// set event can be completed to true
|
|
10635
10594
|
this.parentComponent.eventCanBeCompleted.emit(true);
|
|
@@ -31374,8 +31333,8 @@ class CaseFullAccessViewComponent {
|
|
|
31374
31333
|
else {
|
|
31375
31334
|
// sort with the order of CCD predefined tabs
|
|
31376
31335
|
this.caseDetails.tabs.sort((aTab, bTab) => aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0));
|
|
31377
|
-
//
|
|
31378
|
-
const preSelectTab = this.
|
|
31336
|
+
// select the first tab checking if the tab is visible
|
|
31337
|
+
const preSelectTab = this.findPreSelectedActiveTab();
|
|
31379
31338
|
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: preSelectTab.label }).then(() => {
|
|
31380
31339
|
matTab = this.tabGroup._tabs.find((x) => x.textLabel === preSelectTab.label);
|
|
31381
31340
|
// Update selectedIndex only if matTab.position is a non-zero number (positive or negative); this means the
|
|
@@ -31406,6 +31365,11 @@ class CaseFullAccessViewComponent {
|
|
|
31406
31365
|
}
|
|
31407
31366
|
}
|
|
31408
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
|
+
}
|
|
31409
31373
|
// Refactored under EXUI-110 to address infinite tab loop to use tabIndexChanged instead
|
|
31410
31374
|
tabChanged(tabIndexChanged) {
|
|
31411
31375
|
const matTab = this.tabGroup._tabs.find(tab => tab.isActive);
|
|
@@ -32353,26 +32317,18 @@ class EventStartGuard {
|
|
|
32353
32317
|
task = tasksAssignedToUser[0];
|
|
32354
32318
|
}
|
|
32355
32319
|
// if one task assigned to user, allow user to complete event
|
|
32356
|
-
|
|
32357
|
-
client_context: {
|
|
32358
|
-
user_task: {
|
|
32359
|
-
task_data: task,
|
|
32360
|
-
complete_task: true
|
|
32361
|
-
}
|
|
32362
|
-
}
|
|
32363
|
-
};
|
|
32364
|
-
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
32320
|
+
this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
|
|
32365
32321
|
return true;
|
|
32366
32322
|
}
|
|
32367
32323
|
}
|
|
32368
32324
|
removeTaskFromSessionStorage() {
|
|
32369
|
-
this.sessionStorageService.removeItem(EventStartGuard.
|
|
32325
|
+
this.sessionStorageService.removeItem(EventStartGuard.TASK_TO_COMPLETE);
|
|
32370
32326
|
}
|
|
32371
32327
|
checkForTasks(payload, caseId, eventId, taskId) {
|
|
32372
32328
|
if (taskId && payload?.tasks?.length > 0) {
|
|
32373
32329
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
32374
32330
|
if (task) {
|
|
32375
|
-
this.sessionStorageService.setItem(EventStartGuard.
|
|
32331
|
+
this.sessionStorageService.setItem(EventStartGuard.TASK_TO_COMPLETE, JSON.stringify(task));
|
|
32376
32332
|
}
|
|
32377
32333
|
else {
|
|
32378
32334
|
this.removeTaskFromSessionStorage();
|
|
@@ -32394,7 +32350,7 @@ class EventStartGuard {
|
|
|
32394
32350
|
}
|
|
32395
32351
|
}
|
|
32396
32352
|
}
|
|
32397
|
-
EventStartGuard.
|
|
32353
|
+
EventStartGuard.TASK_TO_COMPLETE = 'taskToComplete';
|
|
32398
32354
|
EventStartGuard.ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
32399
32355
|
EventStartGuard.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
|
|
32400
32356
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStartGuard, [{
|
|
@@ -32532,17 +32488,9 @@ class EventStartStateMachineService {
|
|
|
32532
32488
|
task = context.tasks[0];
|
|
32533
32489
|
}
|
|
32534
32490
|
const taskStr = JSON.stringify(task);
|
|
32535
|
-
console.log('entryActionForStateOneTaskAssignedToUser: setting
|
|
32491
|
+
console.log('entryActionForStateOneTaskAssignedToUser: setting taskToComplete to ' + taskStr);
|
|
32536
32492
|
// Store task to session
|
|
32537
|
-
|
|
32538
|
-
client_context: {
|
|
32539
|
-
user_task: {
|
|
32540
|
-
task_data: task,
|
|
32541
|
-
complete_task: true
|
|
32542
|
-
}
|
|
32543
|
-
}
|
|
32544
|
-
};
|
|
32545
|
-
context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
|
|
32493
|
+
context.sessionStorageService.setItem('taskToComplete', taskStr);
|
|
32546
32494
|
// Allow user to perform the event
|
|
32547
32495
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
32548
32496
|
}
|