Adds desire as a tracking category to our app;

no exclude, no fancy nothing else, only pure desire tracking.
This commit is contained in:
emelko
2018-08-02 17:19:21 +02:00
parent f7efadb08a
commit 30839b5589
4 changed files with 91 additions and 3 deletions
+16 -1
View File
@@ -93,6 +93,15 @@ export default class DayView extends Component {
</Button>
</View>
</View>
<View style={ styles.symptomViewRowInline }>
<Text style={styles.symptomDayView}>Desire</Text>
<View style={styles.symptomEditButton}>
<Button
onPress={() => this.showView('desireEditView')}
title={getLabel('desire', cycleDay.desire)}>
</Button>
</View>
</View>
</View >
)
}
@@ -137,9 +146,15 @@ function getLabel(symptomName, symptom) {
},
note: note => {
return note.value.slice(0, 12) + '...'
},
desire: desire => {
if (typeof desire.value === 'number') {
const desireLabel = `${positionLabels[desire.value]}`
return desireLabel
}
}
}
if (!symptom) return 'edit'
return labels[symptomName](symptom) || 'edit'
}
}