-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #425 from rvpanoz/develop
Feat/doctor-flow (#424)
- Loading branch information
Showing
14 changed files
with
213 additions
and
168 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react' | ||
import { string, arrayOf, objectOf } from 'prop-types' | ||
import { withStyles } from '@material-ui/core/styles' | ||
import Avatar from '@material-ui/core/Avatar'; | ||
import List from '@material-ui/core/List'; | ||
import ListItem from '@material-ui/core/ListItem'; | ||
import ListItemAvatar from '@material-ui/core/ListItemAvatar'; | ||
import ListItemText from '@material-ui/core/ListItemText'; | ||
import Paper from '@material-ui/core/Paper'; | ||
import Divider from '@material-ui/core/Divider'; | ||
import CheckIcon from '@material-ui/icons/CheckOutlined'; | ||
import { iMessage } from 'commons/utils'; | ||
|
||
import ToolbarView from './Toolbar'; | ||
import styles from '../styles/doctorList' | ||
|
||
const DoctorList = ({ classes, data }) => <Paper elevation={2}> | ||
<div className={classes.toolbar}> | ||
<ToolbarView | ||
title={iMessage('title', 'doctorReport')} | ||
/> | ||
</div> | ||
<Divider /> | ||
<List disablePadding> | ||
{data && data.filter(value => value.length && value.indexOf('Recommendation') === -1).map(dataValue => ( | ||
<ListItem key={dataValue}> | ||
<ListItemAvatar> | ||
<Avatar style={{ backgroundColor: '#fff' }}> | ||
<CheckIcon color="primary" /> | ||
</Avatar> | ||
</ListItemAvatar> | ||
<ListItemText primary={dataValue} /> | ||
</ListItem> | ||
))} | ||
</List> | ||
</Paper> | ||
|
||
DoctorList.propTypes = { | ||
classes: objectOf(string).isRequired, | ||
data: arrayOf(string) | ||
} | ||
|
||
export default withStyles(styles)(DoctorList); |
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,27 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import Toolbar from '@material-ui/core/Toolbar'; | ||
import Typography from '@material-ui/core/Typography'; | ||
|
||
import styles from '../styles/toolbar'; | ||
|
||
const ToolbarView = ({ classes, title }) => <div className={classes.root}> | ||
<Toolbar | ||
disableGutters | ||
> | ||
<div className={classes.header}> | ||
<Typography variant="h4" className={classes.title}> | ||
{title} | ||
</Typography> | ||
</div> | ||
<div className={classes.spacer} /> | ||
</Toolbar> | ||
</div> | ||
|
||
ToolbarView.propTypes = { | ||
classes: PropTypes.objectOf(PropTypes.string).isRequired, | ||
title: PropTypes.string.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(ToolbarView); |
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,5 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
|
||
import DoctorList from './DoctorList' | ||
|
||
export { DoctorList } |
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,7 @@ | ||
const styles = () => ({ | ||
root: { | ||
width: '100%' | ||
}, | ||
}); | ||
|
||
export default styles; |
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,39 @@ | ||
import { darken, lighten } from '@material-ui/core/styles/colorManipulator'; | ||
import { defaultFont, flexContainer, grayColor } from 'styles/variables'; | ||
|
||
const styles = theme => ({ | ||
root: { | ||
width: '100%' | ||
}, | ||
tableListToolbar: { | ||
paddingRight: 8 | ||
}, | ||
spacer: { | ||
flex: '1 1 100%' | ||
}, | ||
header: { | ||
flex: '0 0 auto', | ||
padding: theme.spacing(2) + 4 | ||
}, | ||
title: { | ||
display: 'flex', | ||
color: darken(grayColor, 0.2), | ||
flexDirection: 'column', | ||
justifyContent: 'flex-start' | ||
}, | ||
directory: { | ||
...defaultFont, | ||
fontSize: 12 | ||
}, | ||
highlight: { | ||
color: theme.palette.common.white, | ||
backgroundColor: lighten(theme.palette.secondary.light, 0.9) | ||
}, | ||
actions: { | ||
...flexContainer, | ||
flex: '0 0 auto', | ||
padding: theme.spacing(1) | ||
} | ||
}); | ||
|
||
export default styles; |
94 changes: 0 additions & 94 deletions
94
app/components/views/notifications/NotificationsList.js~master
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.