Adding pain with 7 boolean values to track

This commit is contained in:
Bl00dyMarie
2018-08-17 14:14:51 +02:00
parent b09137772c
commit 30752a05c2
7 changed files with 1261 additions and 353 deletions
+15 -1
View File
@@ -94,6 +94,10 @@ export default class CycleDayOverView extends Component {
onPress={() => this.navigate('SexEditView')}
data={getLabel('sex', cycleDay.sex)}
/>
<SymptomBox
title='Pain'
onPress={() => this.navigate('PainEditView')}
/>
{/* this is just to make the last row adhere to the grid
(and) because there are no pseudo properties in RN */}
<FillerBoxes />
@@ -162,6 +166,16 @@ function getLabel(symptomName, symptom) {
sexLabel.push('contraceptive')
}
return sexLabel.join(', ')
},
pain: pain => {
let painLabel = ''
if (pain.cramps || pain.ovulationPain || pain.headache ||
pain.backache || pain.nausea || pain.tenderBreasts ||
pain.migraine
) {
painLabel += 'Pain'
}
return painLabel ? painLabel : 'edit'
}
}
@@ -213,4 +227,4 @@ class FillerBoxes extends Component {
}
return fillerBoxes
}
}
}