From 5299f37d33448616c0074ec6568a82c9c96f65cb Mon Sep 17 00:00:00 2001 From: henrikmv <110386561+henrikmv@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:08:50 +0200 Subject: [PATCH] feat: [DHIS2-17956] Display name for org unit in changelog (#3826) * feat: update client to list converter * feat: changes in tooltip component * feat: add orgunit context stages and events widget * feat: use cache for subvalues * feat: orgunit context event workspace * fix: renaming of return statement * feat: display name for orgunit * fix: merge conflict * fix: improve flow type --- src/core_modules/capture-core/converters/clientToList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_modules/capture-core/converters/clientToList.js b/src/core_modules/capture-core/converters/clientToList.js index 870d0d7981..e72b837179 100644 --- a/src/core_modules/capture-core/converters/clientToList.js +++ b/src/core_modules/capture-core/converters/clientToList.js @@ -38,7 +38,6 @@ type ImageClientValue = { previewUrl: string, }; - function convertFileForDisplay(clientValue: FileClientValue) { // Fallback until https://dhis2.atlassian.net/browse/DHIS2-16994 is implemented if (typeof clientValue === 'string' || clientValue instanceof String) { @@ -88,9 +87,10 @@ function convertStatusForDisplay(clientValue: Object) { ); } -function convertOrgUnitForDisplay(clientValue: { id: string }) { +function convertOrgUnitForDisplay(clientValue: string | {id: string}) { + const orgUnitId = typeof clientValue === 'string' ? clientValue : clientValue.id; return ( - + ); }