Merge branch 'Add-back-computed-mucus-value' into 'rebased-redesign'

Adds back computed mucus value to be saved

See merge request bloodyhealth/drip!328
This commit is contained in:
Sofiya Tepikin
2021-01-03 14:13:51 +00:00
+3 -1
View File
@@ -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)
}, },