@hmcts/ccd-case-ui-toolkit 7.3.98 → 7.3.99-cot-1286

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.
@@ -42619,9 +42619,12 @@ class EventStartStateMachineService {
42619
42619
  }
42620
42620
  entryActionForStateNoTask(state, context) {
42621
42621
  // Trigger final state to complete processing of state machine
42622
+ const task = context.tasks[0];
42623
+ const jurisdiction = task?.jurisdiction ?? context.caseDetails?.case_type?.jurisdiction?.id;
42624
+ const caseTypeId = task?.case_type_id ?? context.caseDetails?.case_type?.id;
42622
42625
  state.trigger(EventStartStates.FINAL);
42623
42626
  // Navigate to no tasks available error page
42624
- context.router.navigate([`/cases/case-details/${context.tasks[0]?.jurisdiction}/${context.tasks[0]?.case_type_id}/${context.caseId}/no-tasks-available`], { relativeTo: context.route });
42627
+ context.router.navigate([`/cases/case-details/${jurisdiction}/${caseTypeId}/${context.caseId}/no-tasks-available`], { relativeTo: context.route });
42625
42628
  }
42626
42629
  entryActionForStateOneOrMoreTasks(state, context) {
42627
42630
  state.trigger(EventStartStates.TASK_ASSIGNED_TO_USER);
@@ -42779,8 +42782,9 @@ class EventStartComponent {
42779
42782
  }
42780
42783
  ngOnInit() {
42781
42784
  // Get task and case id payload from route data
42785
+ const caseDetails = this.route.snapshot.data.case;
42782
42786
  const tasks = this.route.snapshot.data.tasks;
42783
- const caseId = this.route.snapshot.data.case.case_id;
42787
+ const caseId = caseDetails.case_id;
42784
42788
  const eventId = this.route.snapshot.queryParams['eventId'];
42785
42789
  const taskId = this.route.snapshot.queryParams['taskId'];
42786
42790
  // Setup the context
@@ -42789,6 +42793,7 @@ class EventStartComponent {
42789
42793
  caseId,
42790
42794
  eventId,
42791
42795
  taskId,
42796
+ caseDetails,
42792
42797
  router: this.router,
42793
42798
  route: this.route,
42794
42799
  sessionStorageService: this.sessionStorageService,