Skip to content

Commit

Permalink
feat: [DHIS2-17956] Display name for org unit in changelog (#3826)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
henrikmv authored Oct 15, 2024
1 parent 6ff40b2 commit 5299f37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core_modules/capture-core/converters/clientToList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 (
<TooltipOrgUnit orgUnitId={clientValue.id} />
<TooltipOrgUnit orgUnitId={orgUnitId} />
);
}

Expand Down

0 comments on commit 5299f37

Please sign in to comment.