diff --git a/src/components/DataDimension/Info/CalculationInfo.js b/src/components/DataDimension/Info/CalculationInfo.js index 3b228016f..3bcad2ff8 100644 --- a/src/components/DataDimension/Info/CalculationInfo.js +++ b/src/components/DataDimension/Info/CalculationInfo.js @@ -20,7 +20,7 @@ const calculationQuery = { }, } -export const CalculationInfo = ({ id, displayNameProp }) => { +export const CalculationInfo = ({ id, displayNameProp, type }) => { const [data, setData] = useState() const [error, setError] = useState() const [expressionError, setExpressionError] = useState() @@ -71,7 +71,12 @@ export const CalculationInfo = ({ id, displayNameProp }) => { return ( <> - + {i18n.t('Expression description')} @@ -97,4 +102,5 @@ export const CalculationInfo = ({ id, displayNameProp }) => { CalculationInfo.propTypes = { displayNameProp: PropTypes.string, id: PropTypes.string, + type: PropTypes.string, } diff --git a/src/components/DataDimension/Info/DataElementInfo.js b/src/components/DataDimension/Info/DataElementInfo.js index 4a1754bdd..52be91b7e 100644 --- a/src/components/DataDimension/Info/DataElementInfo.js +++ b/src/components/DataDimension/Info/DataElementInfo.js @@ -24,14 +24,19 @@ const dataElementQuery = { }, } -export const DataElementInfo = ({ id, displayNameProp }) => { +export const DataElementInfo = ({ id, displayNameProp, type }) => { const { loading, error, data } = useDataQuery(dataElementQuery, { variables: { id, displayNameProp }, }) return ( <> - + {i18n.t('Data set(s)')} @@ -116,4 +121,5 @@ export const DataElementInfo = ({ id, displayNameProp }) => { DataElementInfo.propTypes = { displayNameProp: PropTypes.string, id: PropTypes.string, + type: PropTypes.string, } diff --git a/src/components/DataDimension/Info/DataElementOperandInfo.js b/src/components/DataDimension/Info/DataElementOperandInfo.js index 56d273a1c..3451d6f50 100644 --- a/src/components/DataDimension/Info/DataElementOperandInfo.js +++ b/src/components/DataDimension/Info/DataElementOperandInfo.js @@ -29,7 +29,7 @@ const dataElementOperandsQuery = { }, } -export const DataElementOperandInfo = ({ id, displayNameProp }) => { +export const DataElementOperandInfo = ({ id, displayNameProp, type }) => { const [data, setData] = useState() const [error, setError] = useState() const [loading, setLoading] = useState(true) @@ -85,6 +85,7 @@ export const DataElementOperandInfo = ({ id, displayNameProp }) => { return ( <> { DataElementOperandInfo.propTypes = { displayNameProp: PropTypes.string, id: PropTypes.string, + type: PropTypes.string, } diff --git a/src/components/DataDimension/Info/DataSetInfo.js b/src/components/DataDimension/Info/DataSetInfo.js index ebcf7bcc6..a94d468ff 100644 --- a/src/components/DataDimension/Info/DataSetInfo.js +++ b/src/components/DataDimension/Info/DataSetInfo.js @@ -17,14 +17,19 @@ const dataSetQuery = { }, } -export const DataSetInfo = ({ id, displayNameProp }) => { +export const DataSetInfo = ({ id, displayNameProp, type }) => { const { loading, error, data } = useDataQuery(dataSetQuery, { variables: { id, displayNameProp }, }) return ( <> - + {i18n.t('Period type')} {data?.dataSet.periodType} @@ -83,4 +88,5 @@ export const DataSetInfo = ({ id, displayNameProp }) => { DataSetInfo.propTypes = { displayNameProp: PropTypes.string, id: PropTypes.string, + type: PropTypes.string, } diff --git a/src/components/DataDimension/Info/EventDataItemInfo.js b/src/components/DataDimension/Info/EventDataItemInfo.js index 3937a2586..cb521fe4b 100644 --- a/src/components/DataDimension/Info/EventDataItemInfo.js +++ b/src/components/DataDimension/Info/EventDataItemInfo.js @@ -44,7 +44,7 @@ export const EventDataItemInfo = ({ type, id, displayNameProp }) => { const renderInfoTable = (data) => ( <> - + {i18n.t('Type')} diff --git a/src/components/DataDimension/Info/IndicatorInfo.js b/src/components/DataDimension/Info/IndicatorInfo.js index 9af68cd20..4a1466749 100644 --- a/src/components/DataDimension/Info/IndicatorInfo.js +++ b/src/components/DataDimension/Info/IndicatorInfo.js @@ -24,7 +24,7 @@ const indicatorQuery = { }, } -export const IndicatorInfo = ({ id, displayNameProp }) => { +export const IndicatorInfo = ({ id, displayNameProp, type }) => { const [data, setData] = useState() const [error, setError] = useState() const [loading, setLoading] = useState(true) @@ -71,7 +71,12 @@ export const IndicatorInfo = ({ id, displayNameProp }) => { return ( <> - + {i18n.t('Numerator description')} @@ -179,4 +184,5 @@ export const IndicatorInfo = ({ id, displayNameProp }) => { IndicatorInfo.propTypes = { displayNameProp: PropTypes.string, id: PropTypes.string, + type: PropTypes.string, } diff --git a/src/components/DataDimension/Info/ProgramIndicatorInfo.js b/src/components/DataDimension/Info/ProgramIndicatorInfo.js index 8d45c13ad..98f4a0900 100644 --- a/src/components/DataDimension/Info/ProgramIndicatorInfo.js +++ b/src/components/DataDimension/Info/ProgramIndicatorInfo.js @@ -24,7 +24,7 @@ const programIndicatorQuery = { }, } -export const ProgramIndicatorInfo = ({ id, displayNameProp }) => { +export const ProgramIndicatorInfo = ({ id, displayNameProp, type }) => { const [data, setData] = useState() const [error, setError] = useState() const [loading, setLoading] = useState(true) @@ -88,6 +88,7 @@ export const ProgramIndicatorInfo = ({ id, displayNameProp }) => { return ( <> { ProgramIndicatorInfo.propTypes = { displayNameProp: PropTypes.string, id: PropTypes.string, + type: PropTypes.string, }