Adds subcategory names to the selected options
This commit is contained in:
@@ -70,10 +70,10 @@ export default class CycleDayOverView extends Component {
|
|||||||
mucus: mucus => {
|
mucus: mucus => {
|
||||||
const filledCategories = ['feeling', 'texture'].filter(c => isNumber(mucus[c]))
|
const filledCategories = ['feeling', 'texture'].filter(c => isNumber(mucus[c]))
|
||||||
let label = filledCategories.map(category => {
|
let label = filledCategories.map(category => {
|
||||||
return labels.mucus[category].categories[mucus[category]]
|
return category + ': ' + labels.mucus[category].categories[mucus[category]]
|
||||||
}).join(', ')
|
}).join(', ')
|
||||||
|
|
||||||
if (isNumber(mucus.value)) label += `\n${labels.mucusNFP[mucus.value]}`
|
if (isNumber(mucus.value)) label += `\n => ${labels.mucusNFP[mucus.value]}`
|
||||||
if (mucus.exclude) label = `(${label})`
|
if (mucus.exclude) label = `(${label})`
|
||||||
|
|
||||||
return label
|
return label
|
||||||
@@ -81,7 +81,7 @@ export default class CycleDayOverView extends Component {
|
|||||||
cervix: cervix => {
|
cervix: cervix => {
|
||||||
const filledCategories = ['opening', 'firmness', 'position'].filter(c => isNumber(cervix[c]))
|
const filledCategories = ['opening', 'firmness', 'position'].filter(c => isNumber(cervix[c]))
|
||||||
let label = filledCategories.map(category => {
|
let label = filledCategories.map(category => {
|
||||||
return labels.cervix[category].categories[cervix[category]]
|
return category + ': ' + labels.cervix[category].categories[cervix[category]]
|
||||||
}).join(', ')
|
}).join(', ')
|
||||||
|
|
||||||
if (cervix.exclude) label = `(${label})`
|
if (cervix.exclude) label = `(${label})`
|
||||||
|
|||||||
Reference in New Issue
Block a user