Adds back computed mucus value to be saved
This commit is contained in:
@@ -7,6 +7,8 @@ import * as labels from '../../i18n/en/cycle-day'
|
|||||||
import { getLabelsList } from './labels'
|
import { getLabelsList } from './labels'
|
||||||
import { TEMP_MAX, TEMP_MIN } from '../../config'
|
import { TEMP_MAX, TEMP_MIN } from '../../config'
|
||||||
|
|
||||||
|
import computeNfpValue from '../../lib/nfp-mucus'
|
||||||
|
|
||||||
const bleedingLabels = labels.bleeding.labels
|
const bleedingLabels = labels.bleeding.labels
|
||||||
const cervixLabels = labels.cervix
|
const cervixLabels = labels.cervix
|
||||||
const contraceptiveLabels = labels.contraceptives.categories
|
const contraceptiveLabels = labels.contraceptives.categories
|
||||||
@@ -263,7 +265,7 @@ export const save = {
|
|||||||
const isDataEntered = ['feeling', 'texture'].some(
|
const isDataEntered = ['feeling', 'texture'].some(
|
||||||
value => isNumber(data[value]))
|
value => isNumber(data[value]))
|
||||||
const valuesToSave = shouldDeleteData || !isDataEntered
|
const valuesToSave = shouldDeleteData || !isDataEntered
|
||||||
? null : { feeling, texture, exclude }
|
? null : { feeling, texture, value: computeNfpValue(feeling, texture), exclude }
|
||||||
|
|
||||||
saveSymptom('mucus', date, valuesToSave)
|
saveSymptom('mucus', date, valuesToSave)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user