@hmcts/ccd-case-ui-toolkit 7.0.38-fix-service-code-api → 7.0.38-media-viewer-314
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/esm2020/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.mjs +7 -7
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +6 -6
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +6 -6
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -17016,20 +17016,20 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17016
17016
|
getLinkedCaseReasons(serviceId) {
|
|
17017
17017
|
const reasonCodeAPIurl = `${this.appConfig.getRDCommonDataApiUrl()}/lov/categories/CaseLinkingReasonCode?serviceId=${serviceId}`;
|
|
17018
17018
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17019
|
-
next:
|
|
17019
|
+
next: reasons => {
|
|
17020
17020
|
// Sort in ascending order
|
|
17021
17021
|
const linkCaseReasons = reasons.list_of_values.sort((a, b) => (a.value_en > b.value_en) ? 1 : -1);
|
|
17022
|
-
this.linkedCasesService.linkCaseReasons = linkCaseReasons?.filter(
|
|
17022
|
+
this.linkedCasesService.linkCaseReasons = linkCaseReasons?.filter(reason => reason.value_en !== 'Other');
|
|
17023
17023
|
// Move Other option to the end of the list
|
|
17024
|
-
this.linkedCasesService.linkCaseReasons.push(linkCaseReasons?.find(
|
|
17024
|
+
this.linkedCasesService.linkCaseReasons.push(linkCaseReasons?.find(reason => reason.value_en === 'Other'));
|
|
17025
17025
|
}
|
|
17026
17026
|
});
|
|
17027
17027
|
}
|
|
17028
17028
|
getOrgService() {
|
|
17029
17029
|
const servicesApiUrl = `refdata/location/orgServices?ccdCaseType=${this.caseDetails?.case_type?.id}`;
|
|
17030
|
-
this.commonDataService.getServiceOrgData(servicesApiUrl).subscribe(
|
|
17031
|
-
result.forEach(
|
|
17032
|
-
this.getLinkedCaseReasons(ids.
|
|
17030
|
+
this.commonDataService.getServiceOrgData(servicesApiUrl).subscribe(result => {
|
|
17031
|
+
result.forEach(ids => {
|
|
17032
|
+
this.getLinkedCaseReasons(ids.service_id);
|
|
17033
17033
|
});
|
|
17034
17034
|
});
|
|
17035
17035
|
}
|