Skip to content

Commit

Permalink
fix: add AO TYPE for event chart and event report
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Aug 27, 2024
1 parent 59f717e commit 6a3ec9a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/AboutAOUnit/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import i18n from '@dhis2/d2-i18n'
export const AO_TYPE_VISUALIZATION = 'visualization'
export const AO_TYPE_MAP = 'map'
export const AO_TYPE_EVENT_VISUALIZATION = 'eventVisualization'
export const AO_TYPE_EVENT_CHART = 'eventChart'
export const AO_TYPE_EVENT_REPORT = 'eventReport'

export const AOTypeMap = {
[AO_TYPE_VISUALIZATION]: {
Expand All @@ -14,6 +16,12 @@ export const AOTypeMap = {
[AO_TYPE_EVENT_VISUALIZATION]: {
apiEndpoint: 'eventVisualizations',
},
[AO_TYPE_EVENT_CHART]: {
apiEndpoint: 'eventCharts',
},
[AO_TYPE_EVENT_REPORT]: {
apiEndpoint: 'eventReports',
},
}

const NO_TYPE = 'NO_TYPE'
Expand All @@ -28,6 +36,12 @@ const texts = {
[AO_TYPE_VISUALIZATION]: {
unitTitle: i18n.t('About this visualization'),
},
[AO_TYPE_EVENT_CHART]: {
unitTitle: i18n.t('About this event chart'),
},
[AO_TYPE_EVENT_REPORT]: {
unitTitle: i18n.t('About this event report'),
},
[NO_TYPE]: {
unitTitle: i18n.t('About this visualization'),
},
Expand Down

0 comments on commit 6a3ec9a

Please sign in to comment.