Label last day of post-ovu phase differently
This commit is contained in:
@@ -3,5 +3,6 @@ export const bleeding = ['spotting', 'light', 'medium', 'heavy']
|
||||
export const fertilityStatus = {
|
||||
fertile: 'fertile',
|
||||
infertile: 'infertile',
|
||||
fertileUntilEvening: 'Fertile phase ends in the evening',
|
||||
unknown: 'We cannot show any cycle information because no menses has been entered'
|
||||
}
|
||||
@@ -15,10 +15,13 @@ export default function (dateString) {
|
||||
previousCycles: previousCycles.map(formatCycleForSympto)
|
||||
})
|
||||
|
||||
return formatStatusForApp(status)
|
||||
if (status.phases.postOvulatory) {
|
||||
const phase = status.phases.postOvulatory
|
||||
if (phase.start.date === dateString) {
|
||||
return fertilityStatus.fertileUntilEvening
|
||||
}
|
||||
}
|
||||
|
||||
function formatStatusForApp(status) {
|
||||
if (status.assumeFertility) {
|
||||
return fertilityStatus.fertile
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -21,7 +21,6 @@ export default StyleSheet.create({
|
||||
},
|
||||
cycleDayNumber: {
|
||||
fontSize: 18,
|
||||
margin: 15,
|
||||
textAlign: 'center',
|
||||
textAlignVertical: 'center'
|
||||
},
|
||||
@@ -57,7 +56,8 @@ export default StyleSheet.create({
|
||||
cycleDayNumberView: {
|
||||
justifyContent: 'center',
|
||||
backgroundColor: 'skyblue',
|
||||
marginBottom: 15
|
||||
marginBottom: 15,
|
||||
paddingVertical: 15
|
||||
},
|
||||
homeButtons: {
|
||||
marginHorizontal: 15
|
||||
|
||||
Reference in New Issue
Block a user