Skip to content

Commit

Permalink
chore: no need for programId to get time dimension name
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Jan 12, 2024
1 parent 7447c02 commit 705f7fe
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/modules/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,14 @@ export const getDynamicTimeDimensionsMetadata = (
inputType
) => ({
...Object.values(getTimeDimensions()).reduce((acc, dimension) => {
const dimensionIdPrefix =
inputType === OUTPUT_TYPE_TRACKED_ENTITY ? program?.id : null
const dimId = getTimeDimensionMetadataId(
const dimensionId = getTimeDimensionMetadataId(
dimension.id,
dimensionIdPrefix
inputType === OUTPUT_TYPE_TRACKED_ENTITY ? program?.id : null
)
acc[dimId] = {
id: dimId,
acc[dimensionId] = {
id: dimensionId,
dimensionType: dimension.dimensionType,
name: getTimeDimensionName(
dimension,
program,
stage,
dimensionIdPrefix
),
name: getTimeDimensionName(dimension, program, stage),
}
return acc
}, {}),
Expand Down

0 comments on commit 705f7fe

Please sign in to comment.