-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added completedOnly to all vis types (#736)
Adds the completedOnly option to the option modal, api requests and data download
- Loading branch information
1 parent
8d4b280
commit 7eb324d
Showing
5 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/app/src/components/VisualizationOptions/Options/CompletedOnly.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import i18n from '@dhis2/d2-i18n'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import CheckboxBaseOption from './CheckboxBaseOption'; | ||
import styles from '../styles/VisualizationOptions.style'; | ||
|
||
const CompletedOnly = ({ classes }) => ( | ||
<CheckboxBaseOption | ||
className={classes.dataTabCheckbox} | ||
option={{ | ||
name: 'completedOnly', | ||
label: i18n.t('Only include completed events'), | ||
}} | ||
/> | ||
); | ||
|
||
CompletedOnly.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(CompletedOnly); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters