Skip to content
Snippets Groups Projects
Commit 3b576e81 authored by Sofiya Tepikin's avatar Sofiya Tepikin
Browse files

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

Adds back computed mucus value to be saved

See merge request bloodyhealth/drip!328
parents a35d757f 68ef06b9
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,8 @@ import * as labels from '../../i18n/en/cycle-day' ...@@ -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 = { ...@@ -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)
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment