@hmcts/ccd-case-ui-toolkit 7.3.54-body-parser-update → 7.3.54
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.
|
@@ -8918,10 +8918,10 @@ class CaseworkerService {
|
|
|
8918
8918
|
this.appConfig = appConfig;
|
|
8919
8919
|
this.errorService = errorService;
|
|
8920
8920
|
}
|
|
8921
|
-
|
|
8922
|
-
const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/
|
|
8921
|
+
getCaseworkers(serviceId) {
|
|
8922
|
+
const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
|
|
8923
8923
|
return this.http
|
|
8924
|
-
.post(url,
|
|
8924
|
+
.post(url, { services: [serviceId] })
|
|
8925
8925
|
.pipe(catchError(error => {
|
|
8926
8926
|
this.errorService.setError(error);
|
|
8927
8927
|
return throwError(error);
|
|
@@ -12461,9 +12461,12 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
12461
12461
|
this.jurisdiction = task.jurisdiction;
|
|
12462
12462
|
this.caseType = task.case_type_id;
|
|
12463
12463
|
// Current user is a caseworker?
|
|
12464
|
-
this.caseworkerSubscription = this.caseworkerService.
|
|
12465
|
-
if (
|
|
12466
|
-
|
|
12464
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(result => {
|
|
12465
|
+
if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
|
|
12466
|
+
const caseworker = result[0].caseworkers.find(x => x.idamId === task.assignee);
|
|
12467
|
+
if (caseworker) {
|
|
12468
|
+
this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
|
|
12469
|
+
}
|
|
12467
12470
|
}
|
|
12468
12471
|
if (!this.assignedUserName) {
|
|
12469
12472
|
// Current user is a judicial user?
|
|
@@ -37572,9 +37575,12 @@ class TaskAssignedComponent {
|
|
|
37572
37575
|
// Current user is a caseworker?
|
|
37573
37576
|
this.jurisdiction = this.task.jurisdiction;
|
|
37574
37577
|
this.caseType = this.task.case_type_id;
|
|
37575
|
-
this.caseworkerSubscription = this.caseworkerService.
|
|
37576
|
-
if (
|
|
37577
|
-
|
|
37578
|
+
this.caseworkerSubscription = this.caseworkerService.getCaseworkers(this.task.jurisdiction).subscribe(result => {
|
|
37579
|
+
if (result && result[0].service === this.task.jurisdiction && result[0].caseworkers) {
|
|
37580
|
+
const caseworker = result[0].caseworkers.find(x => x.idamId === this.task.assignee);
|
|
37581
|
+
if (caseworker) {
|
|
37582
|
+
this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
|
|
37583
|
+
}
|
|
37578
37584
|
}
|
|
37579
37585
|
if (!this.assignedUserName) {
|
|
37580
37586
|
// Current user is a judicial user?
|