Set cycleStart to false when bleeding deleted
This commit is contained in:
@@ -65,6 +65,7 @@ export function saveSymptom(symptom, cycleDay, val) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO this also needs a test
|
||||||
export function saveBleeding(cycleDay, bleeding) {
|
export function saveBleeding(cycleDay, bleeding) {
|
||||||
if (!bleeding) {
|
if (!bleeding) {
|
||||||
updateCycleDayAndMaybeSetNewCycleStart(cycleDay, bleeding)
|
updateCycleDayAndMaybeSetNewCycleStart(cycleDay, bleeding)
|
||||||
@@ -84,6 +85,7 @@ export function saveBleeding(cycleDay, bleeding) {
|
|||||||
// then update the cycle day
|
// then update the cycle day
|
||||||
const mensesDaysAfter = getMensesDaysAfter(oldCycleDay)
|
const mensesDaysAfter = getMensesDaysAfter(oldCycleDay)
|
||||||
oldCycleDay.bleeding = newValue
|
oldCycleDay.bleeding = newValue
|
||||||
|
oldCycleDay.isCycleStart = false
|
||||||
|
|
||||||
if (!mensesDaysAfter.length) return
|
if (!mensesDaysAfter.length) return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user