@hmcts/ccd-case-ui-toolkit 7.3.49-exui-4150-rc-1 → 7.3.49-user-by-idam

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.
@@ -8849,10 +8849,10 @@ class CaseworkerService {
8849
8849
  this.appConfig = appConfig;
8850
8850
  this.errorService = errorService;
8851
8851
  }
8852
- getCaseworkers(serviceId) {
8853
- const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUsersByServiceName`;
8852
+ getUserByIdamId(idamId) {
8853
+ const url = `${this.appConfig.getWorkAllocationApiUrl()}/caseworker/getUserByIdamId`;
8854
8854
  return this.http
8855
- .post(url, { services: [serviceId] })
8855
+ .post(url, idamId)
8856
8856
  .pipe(catchError(error => {
8857
8857
  this.errorService.setError(error);
8858
8858
  return throwError(error);
@@ -12351,12 +12351,9 @@ class CaseEventCompletionTaskReassignedComponent {
12351
12351
  this.jurisdiction = task.jurisdiction;
12352
12352
  this.caseType = task.case_type_id;
12353
12353
  // Current user is a caseworker?
12354
- this.caseworkerSubscription = this.caseworkerService.getCaseworkers(task.jurisdiction).subscribe(result => {
12355
- if (result && result[0].service === task.jurisdiction && result[0].caseworkers) {
12356
- const caseworker = result[0].caseworkers.find(x => x.idamId === task.assignee);
12357
- if (caseworker) {
12358
- this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
12359
- }
12354
+ this.caseworkerSubscription = this.caseworkerService.getUserByIdamId(task.assignee).subscribe(caseworker => {
12355
+ if (caseworker) {
12356
+ this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
12360
12357
  }
12361
12358
  if (!this.assignedUserName) {
12362
12359
  // Current user is a judicial user?
@@ -16290,13 +16287,11 @@ class MarkdownComponent {
16290
16287
  }
16291
16288
  renderUrlToText() {
16292
16289
  const renderer = new marked.Renderer();
16293
- renderer.link = ({ href, tokens }) => {
16294
- const linkHref = href || '';
16295
- const text = tokens?.map((token) => token.raw).join('') || linkHref;
16296
- if (!text || text === linkHref) {
16297
- return this.isAllowedUrl(linkHref) ? `<a href="${linkHref}">${linkHref}</a>` : linkHref;
16290
+ renderer.link = (href, title, text) => {
16291
+ if (!text || text === href) {
16292
+ return this.isAllowedUrl(href) ? `<a href="${href}">${href}</a>` : href;
16298
16293
  }
16299
- return this.detectMarkdownLinks(this.content) ? `<a href="${linkHref}">${text}</a>` : text;
16294
+ return this.detectMarkdownLinks(this.content) ? `<a href="${href}">${text}</a>` : text;
16300
16295
  };
16301
16296
  marked.setOptions({
16302
16297
  renderer: renderer
@@ -16331,7 +16326,7 @@ class MarkdownComponent {
16331
16326
  }], renderUrlToTextFeature: [{
16332
16327
  type: Input
16333
16328
  }] }); })();
16334
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MarkdownComponent, { className: "MarkdownComponent", filePath: "lib/shared/components/palette/markdown/markdown.component.ts", lineNumber: 12 }); })();
16329
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MarkdownComponent, { className: "MarkdownComponent", filePath: "lib/shared/components/palette/markdown/markdown.component.ts", lineNumber: 11 }); })();
16335
16330
 
16336
16331
  class FixedListPipe {
16337
16332
  static EMPTY = '';
@@ -37381,12 +37376,9 @@ class TaskAssignedComponent {
37381
37376
  // Current user is a caseworker?
37382
37377
  this.jurisdiction = this.task.jurisdiction;
37383
37378
  this.caseType = this.task.case_type_id;
37384
- this.caseworkerSubscription = this.caseworkerService.getCaseworkers(this.task.jurisdiction).subscribe(result => {
37385
- if (result && result[0].service === this.task.jurisdiction && result[0].caseworkers) {
37386
- const caseworker = result[0].caseworkers.find(x => x.idamId === this.task.assignee);
37387
- if (caseworker) {
37388
- this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
37389
- }
37379
+ this.caseworkerSubscription = this.caseworkerService.getUserByIdamId(this.task.assignee).subscribe(caseworker => {
37380
+ if (caseworker) {
37381
+ this.assignedUserName = `${caseworker.firstName} ${caseworker.lastName}`;
37390
37382
  }
37391
37383
  if (!this.assignedUserName) {
37392
37384
  // Current user is a judicial user?