@hmcts/ccd-case-ui-toolkit 4.12.10-task-event-completion → 4.12.14-task-event-completion

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/RELEASE-NOTES.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ### Version 4.12.0
4
4
  Add refunds functionality
5
5
 
6
- ### Version 4.12.10-task-event-completion"
6
+ ### Version 4.12.14-task-event-completion"
7
7
  **Task event completion and state machine** Task event completion and state machine
8
8
 
9
9
  ### Version 4.7.6-tab-not-defined-error"
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @hmcts/ccd-case-ui-toolkit - Case UI Toolkit
3
- * @version v4.12.10-task-event-completion
3
+ * @version v4.12.14-task-event-completion
4
4
  * @link undefined
5
5
  * @license MIT
6
6
  */
@@ -19489,16 +19489,18 @@ var CaseEditSubmitComponent = /** @class */ (function () {
19489
19489
  CaseEditSubmitComponent.prototype.submit = function () {
19490
19490
  this.isSubmitting = true;
19491
19491
  // We have to run the event completion checks if task in session storage
19492
+ // and if the task is in session storage, then is it associated to the case
19493
+ var taskInSessionStorage;
19492
19494
  var taskStr = this.sessionStorageService.getItem('taskToComplete');
19493
19495
  if (taskStr) {
19494
- // Task is in session storage
19495
- var task = JSON.parse(taskStr);
19496
- this.task = task;
19496
+ taskInSessionStorage = JSON.parse(taskStr);
19497
+ }
19498
+ if (taskInSessionStorage && taskInSessionStorage.case_id === this.getCaseId()) {
19497
19499
  // Show event completion component to perform event completion checks
19498
19500
  this.eventCompletionParams = {
19499
19501
  caseId: this.getCaseId(),
19500
19502
  eventId: this.getEventId(),
19501
- task: task
19503
+ task: taskInSessionStorage
19502
19504
  };
19503
19505
  this.eventCompletionChecksRequired = true;
19504
19506
  }
@@ -26216,6 +26218,13 @@ var EventStartGuard = /** @class */ (function () {
26216
26218
  };
26217
26219
  EventStartGuard.prototype.checkForTasks = function (payload, caseId, eventId, taskId) {
26218
26220
  if (payload.task_required_for_event) {
26221
+ // There are some issues in EventTriggerResolver/CaseService and/or CCD for some events
26222
+ // which triggers the CanActivate guard again.
26223
+ // If event start is initiated again, then we do not need to perform state machine processing again.
26224
+ // https://tools.hmcts.net/jira/browse/EUI-5489
26225
+ if (this.router && this.router.url && this.router.url.includes('event-start')) {
26226
+ return rxjs_1.of(true);
26227
+ }
26219
26228
  this.router.navigate(["/cases/case-details/" + caseId + "/event-start"], { queryParams: { caseId: caseId, eventId: eventId, taskId: taskId } });
26220
26229
  return rxjs_1.of(false);
26221
26230
  }