@hmcts/ccd-case-ui-toolkit 7.3.45-user-by-idam → 7.3.46
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.
|
@@ -8790,10 +8790,10 @@ class CaseworkerService {
|
|
|
8790
8790
|
this.appConfig = appConfig;
|
|
8791
8791
|
this.errorService = errorService;
|
|
8792
8792
|
}
|
|
8793
|
-
|
|
8794
|
-
const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/
|
|
8793
|
+
getCaseworkers(serviceId) {
|
|
8794
|
+
const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
|
|
8795
8795
|
return this.http
|
|
8796
|
-
.post(url,
|
|
8796
|
+
.post(url, { services: [serviceId] })
|
|
8797
8797
|
.pipe(catchError(error => {
|
|
8798
8798
|
this.errorService.setError(error);
|
|
8799
8799
|
return throwError(error);
|
|
@@ -12292,9 +12292,12 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
12292
12292
|
this.jurisdiction = task.jurisdiction;
|
|
12293
12293
|
this.caseType = task.case_type_id;
|
|
12294
12294
|
// Current user is a caseworker?
|
|
12295
|
-
this.caseworkerSubscription = this.caseworkerService.
|
|
12296
|
-
if (
|
|
12297
|
-
|
|
12295
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(result => {
|
|
12296
|
+
if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
|
|
12297
|
+
const caseworker = result[0].caseworkers.find(x => x.idamId === task.assignee);
|
|
12298
|
+
if (caseworker) {
|
|
12299
|
+
this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
|
|
12300
|
+
}
|
|
12298
12301
|
}
|
|
12299
12302
|
if (!this.assignedUserName) {
|
|
12300
12303
|
// Current user is a judicial user?
|
|
@@ -37308,9 +37311,12 @@ class TaskAssignedComponent {
|
|
|
37308
37311
|
// Current user is a caseworker?
|
|
37309
37312
|
this.jurisdiction = this.task.jurisdiction;
|
|
37310
37313
|
this.caseType = this.task.case_type_id;
|
|
37311
|
-
this.caseworkerSubscription = this.caseworkerService.
|
|
37312
|
-
if (
|
|
37313
|
-
|
|
37314
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(this.task.jurisdiction).subscribe(result => {
|
|
37315
|
+
if (result && result[0].service === this.task.jurisdiction && result[0].caseworkers) {
|
|
37316
|
+
const caseworker = result[0].caseworkers.find(x => x.idamId === this.task.assignee);
|
|
37317
|
+
if (caseworker) {
|
|
37318
|
+
this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
|
|
37319
|
+
}
|
|
37314
37320
|
}
|
|
37315
37321
|
if (!this.assignedUserName) {
|
|
37316
37322
|
// Current user is a judicial user?
|