@hmcts/ccd-case-ui-toolkit 5.0.14-angular11-upgrade → 5.0.15-angular11-upgrade

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.
@@ -23862,28 +23862,22 @@
23862
23862
  }
23863
23863
  EventStartGuard.prototype.canActivate = function (route) {
23864
23864
  var _this = this;
23865
- // Checks must be performed only for Work Allocation 2
23866
- if (this.appConfig.getWorkAllocationApiUrl().toLowerCase() === 'workallocation2') {
23867
- var caseId_1 = route.params['cid'];
23868
- var eventId_1 = route.params['eid'];
23869
- var taskId_1 = route.queryParams['tid'];
23870
- // TODO: NavigationExtras should be used once Angular upgrade changes have been incorporated
23871
- var isComplete = route.queryParams['isComplete'];
23872
- var caseInfoStr = this.sessionStorageService.getItem('caseInfo');
23873
- if (caseInfoStr) {
23874
- var caseInfo = JSON.parse(caseInfoStr);
23875
- if (caseInfo && caseInfo.cid === caseId_1) {
23876
- if (isComplete) {
23877
- return rxjs.of(true);
23878
- }
23879
- return this.workAllocationService.getTasksByCaseIdAndEventId(eventId_1, caseId_1, caseInfo.caseType, caseInfo.jurisdiction).pipe(operators.switchMap(function (payload) { return _this.checkForTasks(payload, caseId_1, eventId_1, taskId_1); }));
23865
+ var caseId = route.params['cid'];
23866
+ var eventId = route.params['eid'];
23867
+ var taskId = route.queryParams['tid'];
23868
+ // TODO: NavigationExtras should be used once Angular upgrade changes have been incorporated
23869
+ var isComplete = route.queryParams['isComplete'];
23870
+ var caseInfoStr = this.sessionStorageService.getItem('caseInfo');
23871
+ if (caseInfoStr) {
23872
+ var caseInfo = JSON.parse(caseInfoStr);
23873
+ if (caseInfo && caseInfo.cid === caseId) {
23874
+ if (isComplete) {
23875
+ return rxjs.of(true);
23880
23876
  }
23877
+ return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId, caseInfo.caseType, caseInfo.jurisdiction).pipe(operators.switchMap(function (payload) { return _this.checkForTasks(payload, caseId, eventId, taskId); }));
23881
23878
  }
23882
23879
  }
23883
- else {
23884
- // Checks not required, return true by default for Work Allocation 1
23885
- return rxjs.of(true);
23886
- }
23880
+ return rxjs.of(false);
23887
23881
  };
23888
23882
  EventStartGuard.prototype.checkTaskInEventNotRequired = function (payload, caseId, taskId) {
23889
23883
  if (!payload || !payload.tasks) {