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
+16
View File
@@ -44,6 +44,10 @@ export default class DayColumn extends Component {
// is any pain documented?
acc.pain = cycleDay.pain &&
Object.values(cycleDay.pain).some(x => x === true)
} else if (symptom === 'mood') {
// is mood documented?
acc.mood = cycleDay.mood &&
Object.values(cycleDay.mood).some(x => x === true)
}
acc[`${symptom}Exclude`] = cycleDay[symptom] && cycleDay[symptom].exclude
return acc
@@ -214,6 +218,18 @@ export default class DayColumn extends Component {
/>
</SymptomIconView>
),
mood: (
<SymptomIconView
value={this.data.mood}
symptomHeight={symptomHeight}
key='mood'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.mood}
/>
</SymptomIconView>
),
note: (
<SymptomIconView
value={this.data.note}