@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.
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +13 -19
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +14 -20
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +13 -19
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -23862,28 +23862,22 @@
|
|
|
23862
23862
|
}
|
|
23863
23863
|
EventStartGuard.prototype.canActivate = function (route) {
|
|
23864
23864
|
var _this = this;
|
|
23865
|
-
|
|
23866
|
-
|
|
23867
|
-
|
|
23868
|
-
|
|
23869
|
-
|
|
23870
|
-
|
|
23871
|
-
|
|
23872
|
-
var
|
|
23873
|
-
if (
|
|
23874
|
-
|
|
23875
|
-
|
|
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
|
-
|
|
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) {
|