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 = {
|
export const fertilityStatus = {
|
||||||
fertile: 'fertile',
|
fertile: 'fertile',
|
||||||
infertile: 'infertile',
|
infertile: 'infertile',
|
||||||
|
fertileUntilEvening: 'Fertile phase ends in the evening',
|
||||||
unknown: 'We cannot show any cycle information because no menses has been entered'
|
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)
|
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) {
|
if (status.assumeFertility) {
|
||||||
return fertilityStatus.fertile
|
return fertilityStatus.fertile
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-2
@@ -21,7 +21,6 @@ export default StyleSheet.create({
|
|||||||
},
|
},
|
||||||
cycleDayNumber: {
|
cycleDayNumber: {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
margin: 15,
|
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
textAlignVertical: 'center'
|
textAlignVertical: 'center'
|
||||||
},
|
},
|
||||||
@@ -57,7 +56,8 @@ export default StyleSheet.create({
|
|||||||
cycleDayNumberView: {
|
cycleDayNumberView: {
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
backgroundColor: 'skyblue',
|
backgroundColor: 'skyblue',
|
||||||
marginBottom: 15
|
marginBottom: 15,
|
||||||
|
paddingVertical: 15
|
||||||
},
|
},
|
||||||
homeButtons: {
|
homeButtons: {
|
||||||
marginHorizontal: 15
|
marginHorizontal: 15
|
||||||
|
|||||||
Reference in New Issue
Block a user