@hmcts/ccd-case-ui-toolkit 4.9.13-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 +1 -1
- package/dist/index.umd.js +71 -49
- 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.js +1 -1
- 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 +19 -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/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/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/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/package.json +1 -1
package/RELEASE-NOTES.md
CHANGED
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
|
*/
|
|
@@ -15426,24 +15426,28 @@ var CaseEventCompletionTaskReassignedComponent = /** @class */ (function () {
|
|
|
15426
15426
|
}
|
|
15427
15427
|
CaseEventCompletionTaskReassignedComponent.prototype.ngOnInit = function () {
|
|
15428
15428
|
var _this = this;
|
|
15429
|
-
// Get case id and
|
|
15430
|
-
this.assignedUserId = this.parentComponent.context.task.assignee;
|
|
15429
|
+
// Get case id and task from the parent component
|
|
15431
15430
|
this.caseId = this.parentComponent.context.caseId;
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
this.caseworkerSubscription =
|
|
15435
|
-
if (
|
|
15436
|
-
|
|
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
|
+
}
|
|
15437
15439
|
}
|
|
15438
|
-
|
|
15439
|
-
//
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
if (judicialworkers
|
|
15443
|
-
|
|
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
|
+
}
|
|
15444
15449
|
}
|
|
15445
|
-
|
|
15446
|
-
// As a fail safe display assigned user name as 'another user'
|
|
15450
|
+
if (!_this.assignedUserName) {
|
|
15447
15451
|
_this.assignedUserName = 'another user';
|
|
15448
15452
|
}
|
|
15449
15453
|
});
|
|
@@ -16080,11 +16084,11 @@ var CaseworkerService = /** @class */ (function () {
|
|
|
16080
16084
|
this.appConfig = appConfig;
|
|
16081
16085
|
this.errorService = errorService;
|
|
16082
16086
|
}
|
|
16083
|
-
CaseworkerService.prototype.getCaseworkers = function (
|
|
16087
|
+
CaseworkerService.prototype.getCaseworkers = function (serviceId) {
|
|
16084
16088
|
var _this = this;
|
|
16085
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/
|
|
16089
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/retrieveCaseWorkersForServices";
|
|
16086
16090
|
return this.http
|
|
16087
|
-
.post(url, {
|
|
16091
|
+
.post(url, { serviceIds: [serviceId] })
|
|
16088
16092
|
.pipe(operators_1.catchError(function (error) {
|
|
16089
16093
|
_this.errorService.setError(error);
|
|
16090
16094
|
return rxjs_1.throwError(error);
|
|
@@ -16655,11 +16659,11 @@ var JudicialworkerService = /** @class */ (function () {
|
|
|
16655
16659
|
this.appConfig = appConfig;
|
|
16656
16660
|
this.errorService = errorService;
|
|
16657
16661
|
}
|
|
16658
|
-
JudicialworkerService.prototype.getJudicialworkers = function (userIds) {
|
|
16662
|
+
JudicialworkerService.prototype.getJudicialworkers = function (userIds, serviceId) {
|
|
16659
16663
|
var _this = this;
|
|
16660
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/
|
|
16664
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/getJudicialUsers";
|
|
16661
16665
|
return this.http
|
|
16662
|
-
.post(url, { userIds: userIds })
|
|
16666
|
+
.post(url, { userIds: userIds, services: [serviceId] })
|
|
16663
16667
|
.pipe(operators_1.catchError(function (error) {
|
|
16664
16668
|
_this.errorService.setError(error);
|
|
16665
16669
|
return rxjs_1.throwError(error);
|
|
@@ -21030,24 +21034,31 @@ var TaskAssignedComponent = /** @class */ (function () {
|
|
|
21030
21034
|
}
|
|
21031
21035
|
TaskAssignedComponent.prototype.ngOnInit = function () {
|
|
21032
21036
|
var _this = this;
|
|
21033
|
-
//
|
|
21034
|
-
|
|
21035
|
-
|
|
21036
|
-
if (
|
|
21037
|
-
|
|
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
|
+
}
|
|
21038
21045
|
}
|
|
21039
|
-
|
|
21040
|
-
//
|
|
21041
|
-
|
|
21042
|
-
|
|
21043
|
-
|
|
21044
|
-
|
|
21045
|
-
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
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
|
+
});
|
|
21051
21062
|
}
|
|
21052
21063
|
});
|
|
21053
21064
|
};
|
|
@@ -21207,22 +21218,31 @@ var router_1 = __webpack_require__(92302);
|
|
|
21207
21218
|
var rxjs_1 = __webpack_require__(87318);
|
|
21208
21219
|
var operators_1 = __webpack_require__(19443);
|
|
21209
21220
|
var case_editor_1 = __webpack_require__(27070);
|
|
21221
|
+
var app_config_1 = __webpack_require__(35185);
|
|
21210
21222
|
var EventStartGuard = /** @class */ (function () {
|
|
21211
|
-
function EventStartGuard(workAllocationService, router) {
|
|
21223
|
+
function EventStartGuard(workAllocationService, router, appConfig) {
|
|
21212
21224
|
this.workAllocationService = workAllocationService;
|
|
21213
21225
|
this.router = router;
|
|
21226
|
+
this.appConfig = appConfig;
|
|
21214
21227
|
}
|
|
21215
21228
|
EventStartGuard.prototype.canActivate = function (route) {
|
|
21216
21229
|
var _this = this;
|
|
21217
|
-
|
|
21218
|
-
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
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
|
|
21223
21244
|
return rxjs_1.of(true);
|
|
21224
21245
|
}
|
|
21225
|
-
return this.workAllocationService.getTasksByCaseIdAndEventId(eventId, caseId).pipe(operators_1.switchMap(function (payload) { return _this.checkForTasks(payload, caseId, eventId, taskId); }));
|
|
21226
21246
|
};
|
|
21227
21247
|
EventStartGuard.prototype.checkForTasks = function (payload, caseId, eventId, taskId) {
|
|
21228
21248
|
if (payload.task_required_for_event) {
|
|
@@ -21233,7 +21253,9 @@ var EventStartGuard = /** @class */ (function () {
|
|
|
21233
21253
|
};
|
|
21234
21254
|
EventStartGuard = __decorate([
|
|
21235
21255
|
core_1.Injectable(),
|
|
21236
|
-
__metadata("design:paramtypes", [case_editor_1.WorkAllocationService,
|
|
21256
|
+
__metadata("design:paramtypes", [case_editor_1.WorkAllocationService,
|
|
21257
|
+
router_1.Router,
|
|
21258
|
+
app_config_1.AbstractAppConfig])
|
|
21237
21259
|
], EventStartGuard);
|
|
21238
21260
|
return EventStartGuard;
|
|
21239
21261
|
}());
|
|
@@ -84177,7 +84199,7 @@ module.exports = "<ng-template [cdkPortalOutlet]=\"selectedComponentPortal\"></n
|
|
|
84177
84199
|
/***/ 69675:
|
|
84178
84200
|
/***/ ((module) => {
|
|
84179
84201
|
|
|
84180
|
-
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"
|
|
84181
84203
|
|
|
84182
84204
|
/***/ }),
|
|
84183
84205
|
|