Skip to content

Commit

Permalink
fix: prevent details panel crashing for catOptCombos
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Aug 28, 2024
1 parent a5898ba commit e73f12c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ const DetailsContent = ({ data }: { data: DetailsResponse }) => {
)}
<DetailItem label={i18n.t('Code')}>{data.code}</DetailItem>
<DetailItem label={i18n.t('Created by')}>
{data.createdBy.displayName}
{data.createdBy?.displayName}
</DetailItem>
<DetailItem label={i18n.t('Created')}>
<ClientDateTime value={data.created} />
<ClientDateTime value={data?.created} />
</DetailItem>
<DetailItem label={i18n.t('Last updated by')}>
{data.lastUpdatedBy
? data.lastUpdatedBy.displayName
: data.createdBy.displayName}
? data.lastUpdatedBy?.displayName
: data.createdBy?.displayName}
</DetailItem>
<DetailItem label={i18n.t('Last updated')}>
<ClientDateTime value={data.lastUpdated} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import i18n from '@dhis2/d2-i18n'
import { InputFieldFF } from '@dhis2/ui'
import React from 'react'
import { Field } from 'react-final-form'
import {
StandardFormField,
StandardFormSection,
Expand All @@ -9,8 +11,6 @@ import {
CustomAttributesSection,
} from '../../../components'
import { SECTIONS_MAP } from '../../../lib'
import { Field } from 'react-final-form'
import { InputFieldFF } from '@dhis2/ui'

const section = SECTIONS_MAP.categoryCombo

Expand Down

0 comments on commit e73f12c

Please sign in to comment.