@hmcts/ccd-case-ui-toolkit 4.9.10-state-machine → 4.9.14-state-machine
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 +5 -2
- package/dist/index.umd.js +129 -129
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.LICENSE.txt +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.d.ts +1 -3
- package/dist/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.js +4 -7
- package/dist/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.js.map +1 -1
- package/dist/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.metadata.json +1 -1
- package/dist/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +20 -15
- package/dist/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js.map +1 -1
- package/dist/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.metadata.json +1 -1
- package/dist/shared/components/case-editor/services/case-worker.service.d.ts +2 -1
- package/dist/shared/components/case-editor/services/case-worker.service.js +3 -3
- package/dist/shared/components/case-editor/services/case-worker.service.js.map +1 -1
- package/dist/shared/components/case-editor/services/case-worker.service.metadata.json +1 -1
- package/dist/shared/components/case-editor/services/event-completion-state-machine.service.js +26 -32
- package/dist/shared/components/case-editor/services/event-completion-state-machine.service.js.map +1 -1
- package/dist/shared/components/case-editor/services/judicial-worker.service.d.ts +1 -1
- package/dist/shared/components/case-editor/services/judicial-worker.service.js +3 -3
- package/dist/shared/components/case-editor/services/judicial-worker.service.js.map +1 -1
- package/dist/shared/components/case-editor/services/work-allocation.service.d.ts +7 -0
- package/dist/shared/components/case-editor/services/work-allocation.service.js +8 -0
- package/dist/shared/components/case-editor/services/work-allocation.service.js.map +1 -1
- package/dist/shared/components/case-editor/services/work-allocation.service.metadata.json +1 -1
- package/dist/shared/components/case-header/case-header.component.d.ts +0 -1
- package/dist/shared/components/case-header/case-header.component.js +1 -2
- package/dist/shared/components/case-header/case-header.component.js.map +1 -1
- package/dist/shared/components/case-header/case-header.component.metadata.json +1 -1
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +1 -1
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +9 -28
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js.map +1 -1
- package/dist/shared/components/event-start/components/task-assigned/task-assigned.component.js +24 -17
- package/dist/shared/components/event-start/components/task-assigned/task-assigned.component.js.map +1 -1
- package/dist/shared/components/event-start/components/task-assigned/task-assigned.component.metadata.json +1 -1
- package/dist/shared/components/event-start/event-guard/event-start.guard.d.ts +3 -1
- package/dist/shared/components/event-start/event-guard/event-start.guard.js +20 -9
- package/dist/shared/components/event-start/event-guard/event-start.guard.js.map +1 -1
- package/dist/shared/components/event-start/event-guard/event-start.guard.metadata.json +1 -1
- package/dist/shared/components/workbasket-filters/workbasket-filters.component.js +10 -12
- package/dist/shared/components/workbasket-filters/workbasket-filters.component.js.map +1 -1
- package/dist/shared/domain/work-allocation/case-worker.model.d.ts +5 -0
- package/dist/shared/domain/work-allocation/case-worker.model.metadata.json +1 -1
- package/dist/shared/domain/work-allocation/judicial-worker.model.d.ts +5 -5
- package/dist/shared/domain/work-allocation/task-response.model.d.ts +4 -0
- package/dist/shared/domain/work-allocation/task-response.model.js +3 -0
- package/dist/shared/domain/work-allocation/task-response.model.js.map +1 -0
- package/dist/shared/domain/work-allocation/task-response.model.metadata.json +1 -0
- package/package.json +2 -2
package/RELEASE-NOTES.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
## RELEASE NOTES
|
|
2
2
|
|
|
3
|
-
### Version 4.9.
|
|
4
|
-
**Task event completion and state machine**
|
|
3
|
+
### Version 4.9.14-state-machine"
|
|
4
|
+
**Task event completion and state machine** Task event completion and state machine
|
|
5
5
|
|
|
6
6
|
### Version 4.7.6-tab-not-defined-error"
|
|
7
7
|
**EUI-4562** Case details Active tasks tab on success not returning to active tasks page
|
|
8
8
|
|
|
9
|
+
### Version 4.3.6-hotfix-EUI-4404
|
|
10
|
+
**EUI-4404** Fix rendering of read-only Collection field within editable Complex field
|
|
11
|
+
|
|
9
12
|
### Version 4.7.6-hearings-tab
|
|
10
13
|
**EUI-4441** Add hearings tab in case details
|
|
11
14
|
**EUI-4627** Can't access /hearings tab from URL
|
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.9.
|
|
3
|
+
* @version v4.9.14-state-machine
|
|
4
4
|
* @link undefined
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -15364,13 +15364,11 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
15364
15364
|
};
|
|
15365
15365
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
15366
15366
|
var core_1 = __webpack_require__(57208);
|
|
15367
|
-
var router_1 = __webpack_require__(92302);
|
|
15368
15367
|
var case_event_completion_component_1 = __webpack_require__(9349);
|
|
15369
15368
|
var CaseEventCompletionTaskCancelledComponent = /** @class */ (function () {
|
|
15370
|
-
function CaseEventCompletionTaskCancelledComponent(parentComponent
|
|
15369
|
+
function CaseEventCompletionTaskCancelledComponent(parentComponent) {
|
|
15371
15370
|
this.parentComponent = parentComponent;
|
|
15372
|
-
this.
|
|
15373
|
-
this.caseId = this.route.snapshot.params['cid'];
|
|
15371
|
+
this.caseId = this.parentComponent.context.caseId;
|
|
15374
15372
|
}
|
|
15375
15373
|
CaseEventCompletionTaskCancelledComponent.prototype.onContinue = function () {
|
|
15376
15374
|
// Emit event can be completed event
|
|
@@ -15382,8 +15380,7 @@ var CaseEventCompletionTaskCancelledComponent = /** @class */ (function () {
|
|
|
15382
15380
|
template: __webpack_require__(69675)
|
|
15383
15381
|
}),
|
|
15384
15382
|
__param(0, core_1.Inject(case_event_completion_component_1.COMPONENT_PORTAL_INJECTION_TOKEN)),
|
|
15385
|
-
__metadata("design:paramtypes", [case_event_completion_component_1.CaseEventCompletionComponent
|
|
15386
|
-
router_1.ActivatedRoute])
|
|
15383
|
+
__metadata("design:paramtypes", [case_event_completion_component_1.CaseEventCompletionComponent])
|
|
15387
15384
|
], CaseEventCompletionTaskCancelledComponent);
|
|
15388
15385
|
return CaseEventCompletionTaskCancelledComponent;
|
|
15389
15386
|
}());
|
|
@@ -15429,23 +15426,28 @@ var CaseEventCompletionTaskReassignedComponent = /** @class */ (function () {
|
|
|
15429
15426
|
}
|
|
15430
15427
|
CaseEventCompletionTaskReassignedComponent.prototype.ngOnInit = function () {
|
|
15431
15428
|
var _this = this;
|
|
15432
|
-
// Get
|
|
15433
|
-
this.
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
this.caseworkerSubscription =
|
|
15437
|
-
if (
|
|
15438
|
-
|
|
15429
|
+
// Get case id and task from the parent component
|
|
15430
|
+
this.caseId = this.parentComponent.context.caseId;
|
|
15431
|
+
var task = this.parentComponent.context.task;
|
|
15432
|
+
// Current user is a caseworker?
|
|
15433
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(function (result) {
|
|
15434
|
+
if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
|
|
15435
|
+
var caseworker = result[0].caseworkers.find(function (x) { return x.idamId === task.assignee; });
|
|
15436
|
+
if (caseworker) {
|
|
15437
|
+
_this.assignedUserName = caseworker.firstName + " " + caseworker.lastName;
|
|
15438
|
+
}
|
|
15439
15439
|
}
|
|
15440
|
-
|
|
15441
|
-
//
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
if (judicialworkers
|
|
15445
|
-
|
|
15440
|
+
if (!_this.assignedUserName) {
|
|
15441
|
+
// Current user is a judicial user?
|
|
15442
|
+
_this.judicialworkerSubscription = _this.judicialworkerService.getJudicialworkers([task.assignee], task.jurisdiction)
|
|
15443
|
+
.subscribe(function (judicialworkers) {
|
|
15444
|
+
if (judicialworkers) {
|
|
15445
|
+
var judicialworker = judicialworkers.find(function (x) { return x.sidam_id === task.assignee; });
|
|
15446
|
+
if (judicialworker) {
|
|
15447
|
+
_this.assignedUserName = judicialworker.full_name;
|
|
15448
|
+
}
|
|
15446
15449
|
}
|
|
15447
|
-
|
|
15448
|
-
// As a fail safe display assigned user name as 'another user'
|
|
15450
|
+
if (!_this.assignedUserName) {
|
|
15449
15451
|
_this.assignedUserName = 'another user';
|
|
15450
15452
|
}
|
|
15451
15453
|
});
|
|
@@ -16082,11 +16084,11 @@ var CaseworkerService = /** @class */ (function () {
|
|
|
16082
16084
|
this.appConfig = appConfig;
|
|
16083
16085
|
this.errorService = errorService;
|
|
16084
16086
|
}
|
|
16085
|
-
CaseworkerService.prototype.getCaseworkers = function (
|
|
16087
|
+
CaseworkerService.prototype.getCaseworkers = function (serviceId) {
|
|
16086
16088
|
var _this = this;
|
|
16087
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/
|
|
16089
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/retrieveCaseWorkersForServices";
|
|
16088
16090
|
return this.http
|
|
16089
|
-
.post(url, {
|
|
16091
|
+
.post(url, { serviceIds: [serviceId] })
|
|
16090
16092
|
.pipe(operators_1.catchError(function (error) {
|
|
16091
16093
|
_this.errorService.setError(error);
|
|
16092
16094
|
return rxjs_1.throwError(error);
|
|
@@ -16469,40 +16471,34 @@ var EventCompletionStateMachineService = /** @class */ (function () {
|
|
|
16469
16471
|
this.addTransitionsForStateTaskUnassigned();
|
|
16470
16472
|
};
|
|
16471
16473
|
EventCompletionStateMachineService.prototype.entryActionForStateCheckTasksCanBeCompleted = function (state, context) {
|
|
16472
|
-
context.workAllocationService.
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
|
|
16476
|
-
|
|
16477
|
-
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16481
|
-
|
|
16482
|
-
|
|
16483
|
-
|
|
16484
|
-
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16491
|
-
|
|
16492
|
-
|
|
16493
|
-
|
|
16494
|
-
|
|
16495
|
-
state.trigger(domain_1.EventCompletionStates.TaskAssignedToAnotherUser);
|
|
16496
|
-
break;
|
|
16497
|
-
}
|
|
16474
|
+
context.workAllocationService.getTask(context.task.id).subscribe(function (taskResponse) {
|
|
16475
|
+
if (taskResponse && taskResponse.task && taskResponse.task.task_state) {
|
|
16476
|
+
switch (taskResponse.task.task_state.toUpperCase()) {
|
|
16477
|
+
case Task_1.TaskState.Unassigned:
|
|
16478
|
+
// Task unassigned
|
|
16479
|
+
state.trigger(domain_1.EventCompletionStates.TaskUnassigned);
|
|
16480
|
+
break;
|
|
16481
|
+
case Task_1.TaskState.Completed:
|
|
16482
|
+
case Task_1.TaskState.Cancelled:
|
|
16483
|
+
case Task_1.TaskState.Terminated:
|
|
16484
|
+
// Task completed or cancelled
|
|
16485
|
+
state.trigger(domain_1.EventCompletionStates.TaskCompetedOrCancelled);
|
|
16486
|
+
break;
|
|
16487
|
+
case Task_1.TaskState.Assigned:
|
|
16488
|
+
// Task is in assigned state
|
|
16489
|
+
taskResponse.task.assignee === context.task.assignee
|
|
16490
|
+
? state.trigger(domain_1.EventCompletionStates.CompleteEventAndTask)
|
|
16491
|
+
: state.trigger(domain_1.EventCompletionStates.TaskAssignedToAnotherUser);
|
|
16492
|
+
break;
|
|
16493
|
+
default:
|
|
16494
|
+
// Allow user to complete the event
|
|
16495
|
+
state.trigger(domain_1.EventCompletionStates.CompleteEventAndTask);
|
|
16496
|
+
break;
|
|
16498
16497
|
}
|
|
16499
16498
|
}
|
|
16500
|
-
|
|
16501
|
-
|
|
16502
|
-
|
|
16503
|
-
// Event completion checks not required, inform parent to complete the event
|
|
16504
|
-
state.trigger(domain_1.EventCompletionStates.CompleteEventAndTask);
|
|
16505
|
-
}
|
|
16499
|
+
}, function (error) {
|
|
16500
|
+
context.alertService.error(error.message);
|
|
16501
|
+
return rxjs_1.throwError(error);
|
|
16506
16502
|
});
|
|
16507
16503
|
};
|
|
16508
16504
|
EventCompletionStateMachineService.prototype.entryActionForStateTaskCompletedOrCancelled = function (state, context) {
|
|
@@ -16663,11 +16659,11 @@ var JudicialworkerService = /** @class */ (function () {
|
|
|
16663
16659
|
this.appConfig = appConfig;
|
|
16664
16660
|
this.errorService = errorService;
|
|
16665
16661
|
}
|
|
16666
|
-
JudicialworkerService.prototype.getJudicialworkers = function (userIds) {
|
|
16662
|
+
JudicialworkerService.prototype.getJudicialworkers = function (userIds, serviceId) {
|
|
16667
16663
|
var _this = this;
|
|
16668
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/
|
|
16664
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/getJudicialUsers";
|
|
16669
16665
|
return this.http
|
|
16670
|
-
.post(url, { userIds: userIds })
|
|
16666
|
+
.post(url, { userIds: userIds, services: [serviceId] })
|
|
16671
16667
|
.pipe(operators_1.catchError(function (error) {
|
|
16672
16668
|
_this.errorService.setError(error);
|
|
16673
16669
|
return rxjs_1.throwError(error);
|
|
@@ -17077,6 +17073,14 @@ var WorkAllocationService = /** @class */ (function () {
|
|
|
17077
17073
|
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId) {
|
|
17078
17074
|
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId);
|
|
17079
17075
|
};
|
|
17076
|
+
/**
|
|
17077
|
+
* Call the API to get a task
|
|
17078
|
+
*
|
|
17079
|
+
* @param {string} taskId
|
|
17080
|
+
*/
|
|
17081
|
+
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
17082
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
17083
|
+
};
|
|
17080
17084
|
var WorkAllocationService_1;
|
|
17081
17085
|
WorkAllocationService.IACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
17082
17086
|
WorkAllocationService.IACAdmOfficer = 'caseworker-ia-admofficer';
|
|
@@ -17118,7 +17122,6 @@ var CaseHeaderComponent = /** @class */ (function () {
|
|
|
17118
17122
|
this.caseTitle = new domain_1.CaseField();
|
|
17119
17123
|
if (!this.isDraft() && this.caseDetails.state.title_display) {
|
|
17120
17124
|
this.caseTitle.label = this.caseDetails.state.title_display;
|
|
17121
|
-
this.label = this.caseTitle.label;
|
|
17122
17125
|
this.caseFields = this.getCaseFields();
|
|
17123
17126
|
}
|
|
17124
17127
|
};
|
|
@@ -18661,35 +18664,16 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
18661
18664
|
var matTab;
|
|
18662
18665
|
var url = this.location.path(true);
|
|
18663
18666
|
var hashValue = url.substring(url.indexOf('#') + 1);
|
|
18664
|
-
if
|
|
18667
|
+
// if we have prepended tabs route to one of the prepended tabs
|
|
18668
|
+
if (!url.includes('#') && this.prependedTabs && this.prependedTabs.length) {
|
|
18665
18669
|
var paths = url.split('/');
|
|
18666
|
-
|
|
18667
|
-
var
|
|
18668
|
-
var
|
|
18669
|
-
|
|
18670
|
-
|
|
18671
|
-
|
|
18672
|
-
}
|
|
18673
|
-
// found tasks or hearing tab
|
|
18674
|
-
if (foundTab_1) {
|
|
18675
|
-
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id, foundTab_1.id]).then(function () {
|
|
18676
|
-
matTab = _this.tabGroup._tabs.find(function (x) { return x.textLabel === foundTab_1.label; });
|
|
18677
|
-
if (matTab && matTab.position) {
|
|
18678
|
-
_this.tabGroup.selectedIndex = matTab.position;
|
|
18679
|
-
}
|
|
18680
|
-
});
|
|
18681
|
-
// last path is caseId
|
|
18682
|
-
}
|
|
18683
|
-
else {
|
|
18684
|
-
// sort with the order of CCD predefined tabs
|
|
18685
|
-
this.caseDetails.tabs.sort(function (aTab, bTab) { return aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0); });
|
|
18686
|
-
// preselect the 1st order of CCD predefined tabs
|
|
18687
|
-
var preSelectTab_1 = this.caseDetails.tabs[0];
|
|
18688
|
-
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
|
|
18689
|
-
matTab = _this.tabGroup._tabs.find(function (x) { return x.textLabel === preSelectTab_1.label; });
|
|
18690
|
-
_this.tabGroup.selectedIndex = matTab.position;
|
|
18691
|
-
});
|
|
18692
|
-
}
|
|
18670
|
+
var tabName_1 = decodeURIComponent(paths[paths.length - 1]);
|
|
18671
|
+
var selectedTab_1 = this.prependedTabs.find(function (caseTab) { return caseTab.id.toLowerCase() === tabName_1.toLowerCase(); });
|
|
18672
|
+
var tab = selectedTab_1 ? selectedTab_1.id : 'tasks';
|
|
18673
|
+
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id, tab]).then(function () {
|
|
18674
|
+
matTab = _this.tabGroup._tabs.find(function (x) { return x.textLabel === selectedTab_1.label; });
|
|
18675
|
+
_this.tabGroup.selectedIndex = matTab.position;
|
|
18676
|
+
});
|
|
18693
18677
|
}
|
|
18694
18678
|
else {
|
|
18695
18679
|
var regExp = new RegExp(CaseFullAccessViewComponent_1.UNICODE_SPACE, 'g');
|
|
@@ -21050,24 +21034,31 @@ var TaskAssignedComponent = /** @class */ (function () {
|
|
|
21050
21034
|
}
|
|
21051
21035
|
TaskAssignedComponent.prototype.ngOnInit = function () {
|
|
21052
21036
|
var _this = this;
|
|
21053
|
-
//
|
|
21054
|
-
|
|
21055
|
-
|
|
21056
|
-
if (
|
|
21057
|
-
|
|
21037
|
+
// Current user is a caseworker?
|
|
21038
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(this.task.jurisdiction).subscribe(function (result) {
|
|
21039
|
+
console.log('CASE WORKERS', result);
|
|
21040
|
+
if (result && result[0].service === _this.task.jurisdiction && result[0].caseworkers) {
|
|
21041
|
+
var caseworker = result[0].caseworkers.find(function (x) { return x.idamId === _this.task.assignee; });
|
|
21042
|
+
if (caseworker) {
|
|
21043
|
+
_this.assignedUserName = caseworker.firstName + " " + caseworker.lastName;
|
|
21044
|
+
}
|
|
21058
21045
|
}
|
|
21059
|
-
|
|
21060
|
-
//
|
|
21061
|
-
|
|
21062
|
-
|
|
21063
|
-
|
|
21064
|
-
|
|
21065
|
-
|
|
21066
|
-
|
|
21067
|
-
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21046
|
+
if (!_this.assignedUserName) {
|
|
21047
|
+
// Current user is a judicial user?
|
|
21048
|
+
_this.judicialworkerSubscription =
|
|
21049
|
+
_this.judicialworkerService.getJudicialworkers([_this.task.assignee], _this.task.jurisdiction)
|
|
21050
|
+
.subscribe(function (judicialworkers) {
|
|
21051
|
+
console.log('JUDICIAL WORKERS', result);
|
|
21052
|
+
if (judicialworkers) {
|
|
21053
|
+
var judicialworker = judicialworkers.find(function (x) { return x.sidam_id === _this.task.assignee; });
|
|
21054
|
+
if (judicialworker) {
|
|
21055
|
+
_this.assignedUserName = judicialworker.full_name;
|
|
21056
|
+
}
|
|
21057
|
+
}
|
|
21058
|
+
if (!_this.assignedUserName) {
|
|
21059
|
+
_this.assignedUserName = 'another user';
|
|
21060
|
+
}
|
|
21061
|
+
});
|
|
21071
21062
|
}
|
|
21072
21063
|
});
|
|
21073
21064
|
};
|
|
@@ -21227,22 +21218,31 @@ var router_1 = __webpack_require__(92302);
|
|
|
21227
21218
|
var rxjs_1 = __webpack_require__(87318);
|
|
21228
21219
|
var operators_1 = __webpack_require__(19443);
|
|
21229
21220
|
var case_editor_1 = __webpack_require__(27070);
|
|
21221
|
+
var app_config_1 = __webpack_require__(35185);
|
|
21230
21222
|
var EventStartGuard = /** @class */ (function () {
|
|
21231
|
-
function EventStartGuard(workAllocationService, router) {
|
|
21223
|
+
function EventStartGuard(workAllocationService, router, appConfig) {
|
|
21232
21224
|
this.workAllocationService = workAllocationService;
|
|
21233
21225
|
this.router = router;
|
|
21226
|
+
this.appConfig = appConfig;
|
|
21234
21227
|
}
|
|
21235
21228
|
EventStartGuard.prototype.canActivate = function (route) {
|
|
21236
21229
|
var _this = this;
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21242
|
-
|
|
21230
|
+
// Checks must be performed only for Work Allocation 2
|
|
21231
|
+
if (this.appConfig.getWorkAllocationApiUrl().toLowerCase() === 'workallocation2') {
|
|
21232
|
+
var caseId_1 = route.params['cid'];
|
|
21233
|
+
var eventId_1 = route.params['eid'];
|
|
21234
|
+
var taskId_1 = route.queryParams['tid'];
|
|
21235
|
+
// TODO: NavigationExtras should be used once Angular upgrade changes have been incorporated
|
|
21236
|
+
var isComplete = route.queryParams['isComplete'];
|
|
21237
|
+
if (isComplete) {
|
|
21238
|
+
return rxjs_1.of(true);
|
|
21239
|
+
}
|
|
21240
|
+
return this.workAllocationService.getTasksByCaseIdAndEventId(eventId_1, caseId_1).pipe(operators_1.switchMap(function (payload) { return _this.checkForTasks(payload, caseId_1, eventId_1, taskId_1); }));
|
|
21241
|
+
}
|
|
21242
|
+
else {
|
|
21243
|
+
// Checks not required, return true by default for Work Allocation 1
|
|
21243
21244
|
return rxjs_1.of(true);
|
|
21244
21245
|
}
|
|
21245
|
-
return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId).pipe(operators_1.switchMap(function (payload) { return _this.checkForTasks(payload, caseId, eventId, taskId); }));
|
|
21246
21246
|
};
|
|
21247
21247
|
EventStartGuard.prototype.checkForTasks = function (payload, caseId, eventId, taskId) {
|
|
21248
21248
|
if (payload.task_required_for_event) {
|
|
@@ -21253,7 +21253,9 @@ var EventStartGuard = /** @class */ (function () {
|
|
|
21253
21253
|
};
|
|
21254
21254
|
EventStartGuard = __decorate([
|
|
21255
21255
|
core_1.Injectable(),
|
|
21256
|
-
__metadata("design:paramtypes", [case_editor_1.WorkAllocationService,
|
|
21256
|
+
__metadata("design:paramtypes", [case_editor_1.WorkAllocationService,
|
|
21257
|
+
router_1.Router,
|
|
21258
|
+
app_config_1.AbstractAppConfig])
|
|
21257
21259
|
], EventStartGuard);
|
|
21258
21260
|
return EventStartGuard;
|
|
21259
21261
|
}());
|
|
@@ -31674,18 +31676,16 @@ var WorkbasketFiltersComponent = /** @class */ (function () {
|
|
|
31674
31676
|
var formGroupLS = JSON.parse(this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE));
|
|
31675
31677
|
// Form group local storage is available and contains regionList property
|
|
31676
31678
|
if (util_1.isDefined(formGroupLS) && formGroupLS.hasOwnProperty(REGION_LIST_AND_FRC_FILTER)) {
|
|
31677
|
-
|
|
31678
|
-
|
|
31679
|
-
|
|
31680
|
-
|
|
31681
|
-
|
|
31682
|
-
|
|
31683
|
-
|
|
31684
|
-
|
|
31685
|
-
|
|
31686
|
-
|
|
31687
|
-
this.formGroup.get(key).setValue(null);
|
|
31688
|
-
}
|
|
31679
|
+
// If regionList value does not match between local storage and form group
|
|
31680
|
+
// then the filter value has been changed and we need to clear the old filter values
|
|
31681
|
+
if (formGroupLS[REGION_LIST_AND_FRC_FILTER] !== this.formGroup.get(REGION_LIST_AND_FRC_FILTER).value) {
|
|
31682
|
+
for (var key in formGroupLS) {
|
|
31683
|
+
if (formGroupLS.hasOwnProperty(key)) {
|
|
31684
|
+
var value = formGroupLS[key];
|
|
31685
|
+
// Clear the filter form group control values if it has a value in local storage
|
|
31686
|
+
// The regionList form group control value should be ignored as it always contain the latest value
|
|
31687
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
|
|
31688
|
+
this.formGroup.get(key).setValue(null);
|
|
31689
31689
|
}
|
|
31690
31690
|
}
|
|
31691
31691
|
}
|
|
@@ -84199,7 +84199,7 @@ module.exports = "<ng-template [cdkPortalOutlet]=\"selectedComponentPortal\"></n
|
|
|
84199
84199
|
/***/ 69675:
|
|
84200
84200
|
/***/ ((module) => {
|
|
84201
84201
|
|
|
84202
|
-
module.exports = "<div class=\"govuk-!-margin-9\">\n <div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a href=\"#\">Task cancelled/marked as done</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"govuk-form-group govuk-form-group--error\">\n <h2 class=\"govuk-heading-m\">Task cancelled/marked as done</h2>\n\n <p>This task has been cancelled or marked as done.</p>\n\n <p>Click Continue to complete the
|
|
84202
|
+
module.exports = "<div class=\"govuk-!-margin-9\">\n <div class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a href=\"#\">Task cancelled/marked as done</a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"govuk-form-group govuk-form-group--error\">\n <h2 class=\"govuk-heading-m\">Task cancelled/marked as done</h2>\n\n <p>This task has been cancelled or marked as done.</p>\n\n <p>Click Continue to complete the event and save your progress.</p>\n\n <p>Alternatively, click Cancel to return to the tasks tab without saving your progress.</p>\n\n <div class=\"form-group form-group-related\">\n <button class=\"govuk-button govuk-!-margin-right-2\" data-module=\"govuk-button\" (click)=\"onContinue()\">Continue</button>\n <a [routerLink]=\"['/', 'cases', 'case-details', caseId, 'tasks']\"\n class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">Cancel</a>\n </div>\n </div>\n</div>\n"
|
|
84203
84203
|
|
|
84204
84204
|
/***/ }),
|
|
84205
84205
|
|
|
@@ -84220,7 +84220,7 @@ module.exports = "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-edit [submit]=\"
|
|
|
84220
84220
|
/***/ 59541:
|
|
84221
84221
|
/***/ ((module) => {
|
|
84222
84222
|
|
|
84223
|
-
module.exports = "<h1 *ngIf=\"!label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n\n<div *ngIf=\"label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n"
|
|
84223
|
+
module.exports = "<h1 *ngIf=\"!caseTitle.label\" class=\"heading-h1\">#{{ caseDetails.case_id | ccdCaseReference}}</h1>\n\n<div *ngIf=\"caseTitle.label\" class=\"case-title\">\n <ccd-label-field [caseField]=\"caseTitle\" [caseFields]=\"caseFields\"></ccd-label-field>\n</div>\n"
|
|
84224
84224
|
|
|
84225
84225
|
/***/ }),
|
|
84226
84226
|
|