@hmcts/ccd-case-ui-toolkit 7.0.32 → 7.0.33-fix-service-code-api

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.
@@ -16950,20 +16950,20 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
16950
16950
  getLinkedCaseReasons(serviceId) {
16951
16951
  const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode?serviceId=${serviceId}`;
16952
16952
  this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
16953
- next: reasons => {
16953
+ next: (reasons) => {
16954
16954
  // Sort in ascending order
16955
16955
  const linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
16956
- this.linkedCasesService.linkCaseReasons = linkCaseReasons?.filter(reason => reason.value_en !== 'Other');
16956
+ this.linkedCasesService.linkCaseReasons = linkCaseReasons?.filter((reason) => reason.value_en !== 'Other');
16957
16957
  // Move Other option to the end of the list
16958
- this.linkedCasesService.linkCaseReasons.push(linkCaseReasons?.find(reason => reason.value_en === 'Other'));
16958
+ this.linkedCasesService.linkCaseReasons.push(linkCaseReasons?.find((reason) => reason.value_en === 'Other'));
16959
16959
  }
16960
16960
  });
16961
16961
  }
16962
16962
  getOrgService() {
16963
16963
  const servicesApiUrl = `refdata/location/orgServices?ccdCaseType=${this.caseDetails?.case_type?.id}`;
16964
- this.commonDataService.getServiceOrgData(servicesApiUrl).subscribe(result => {
16965
- result.forEach(ids => {
16966
- this.getLinkedCaseReasons(ids.service_id);
16964
+ this.commonDataService.getServiceOrgData(servicesApiUrl).subscribe((result) => {
16965
+ result.forEach((ids) => {
16966
+ this.getLinkedCaseReasons(ids.service_code);
16967
16967
  });
16968
16968
  });
16969
16969
  }
@@ -20439,13 +20439,13 @@ ReadYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Rea
20439
20439
  i0.ɵɵelementEnd();
20440
20440
  } if (rf & 2) {
20441
20441
  i0.ɵɵadvance(1);
20442
- i0.ɵɵtextInterpolate(ctx.formattedValue ? i0.ɵɵpipeBind3(2, 1, ctx.caseField.label, null, ctx.formattedValue) : null);
20442
+ i0.ɵɵtextInterpolate(ctx.formattedValue ? i0.ɵɵpipeBind3(2, 1, ctx.formattedValue, null, ctx.formattedValue) : null);
20443
20443
  } }, dependencies: [i1.RpxTranslatePipe], encapsulation: 2 });
20444
20444
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadYesNoFieldComponent, [{
20445
20445
  type: Component,
20446
20446
  args: [{
20447
20447
  selector: 'ccd-read-yes-no-field',
20448
- template: `<span class="text-16">{{formattedValue ? (caseField.label | rpxTranslate : null : formattedValue) : null}}</span>`
20448
+ template: `<span class="text-16">{{formattedValue ? (formattedValue | rpxTranslate : null : formattedValue) : null}}</span>`
20449
20449
  }]
20450
20450
  }], function () { return [{ type: YesNoService }]; }, null); })();
20451
20451