Add mood category to chart

This commit is contained in:
mashazyu
2019-01-16 08:48:36 +01:00
committed by Sofiya Tepikin
parent 56f5c92f87
commit 570d0dc608
5 changed files with 27 additions and 4 deletions
+6 -2
View File
@@ -13,6 +13,7 @@ import styles from '../../styles'
import * as labels from '../../i18n/en/cycle-day'
import AppText from '../app-text'
import DripIcon from '../../assets/drip-icons'
import DripHomeIcon from '../../assets/drip-home-icons'
const bleedingLabels = labels.bleeding.labels
const feelingLabels = labels.mucus.feeling.categories
@@ -251,7 +252,7 @@ export default class CycleDayOverView extends Component {
onPress={() => this.navigate('MoodEditView')}
data={this.getLabel('mood')}
disabled={dateInFuture}
iconName='drip-icon-pain'
iconName='circle'
>
</SymptomBox>
<SymptomBox
@@ -287,7 +288,10 @@ class SymptomBox extends Component {
disabled={this.props.disabled}
>
<View style={[styles.symptomBox, boxActive, disabledStyle]}>
<DripIcon name={this.props.iconName} size={50} color={d ? 'white' : 'black'}/>
{this.props.iconName == 'circle'
? <DripHomeIcon name='circle' size={50} color={d ? 'white' : 'black'}/>
: <DripIcon name={this.props.iconName} size={50} color={d ? 'white' : 'black'}/>
}
<AppText style={[textActive, disabledStyle]}>
{this.props.title.toLowerCase()}
</AppText>
+2 -2
View File
@@ -15,8 +15,8 @@ export default class Mood extends Component {
constructor(props) {
super(props)
const cycleDay = props.cycleDay
if (cycleDay && cycleDay.pain) {
this.state = Object.assign({}, cycleDay.pain)
if (cycleDay && cycleDay.mood) {
this.state = Object.assign({}, cycleDay.mood)
} else {
this.state = {}
}