[WIP] first draft implementing mucus
This commit is contained in:
@@ -5,7 +5,10 @@ import {
|
||||
Text
|
||||
} from 'react-native'
|
||||
import styles from '../../styles'
|
||||
import { bleeding as labels} from './labels/labels'
|
||||
import {
|
||||
bleedingLabels as bleedingLabels,
|
||||
mucusFeeling as feelingLabels
|
||||
} from './labels/labels'
|
||||
import cycleDayModule from '../../lib/get-cycle-day-number'
|
||||
import { bleedingDaysSortedByDate } from '../../db'
|
||||
|
||||
@@ -39,7 +42,7 @@ export default class DayView extends Component {
|
||||
const bleedingValue = this.cycleDay.bleeding && this.cycleDay.bleeding.value
|
||||
let bleedingLabel
|
||||
if (typeof bleedingValue === 'number') {
|
||||
bleedingLabel = `${labels[bleedingValue]}`
|
||||
bleedingLabel = `${bleedingLabels[bleedingValue]}`
|
||||
if (this.cycleDay.bleeding.exclude) bleedingLabel = "( " + bleedingLabel + " )"
|
||||
} else {
|
||||
bleedingLabel = 'edit'
|
||||
@@ -55,6 +58,15 @@ export default class DayView extends Component {
|
||||
temperatureLabel = 'edit'
|
||||
}
|
||||
|
||||
const mucusFeelingValue = this.cycleDay.mucus && this.cycleDay.mucus.value
|
||||
let mucusFeelingLabel
|
||||
if (typeof mucusFeelingValue === 'number') {
|
||||
mucusFeelingLabel = `${feelingLabels[mucusFeelingValue]}`
|
||||
if (this.cycleDay.mucus.exclude) mucusFeelingLabel = "( " + mucusFeelingLabel + " )"
|
||||
} else {
|
||||
mucusFeelingLabel = 'edit'
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={styles.symptomEditView}>
|
||||
<View style={styles.symptomViewRowInline}>
|
||||
@@ -75,7 +87,18 @@ export default class DayView extends Component {
|
||||
</Button>
|
||||
</View>
|
||||
</View>
|
||||
<View style={ styles.itemsInRowSeparatedView }>
|
||||
<View style={{flex: 1}}>
|
||||
<Text style={styles.symptomDayView}>Mucus</Text>
|
||||
</View>
|
||||
<View style={ styles.singleButtonView }>
|
||||
<Button
|
||||
onPress={() => this.showView('mucusEditView')}
|
||||
title={mucusFeelingLabel}>
|
||||
</Button>
|
||||
</View>
|
||||
</View>
|
||||
</View >
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user