Added disk as option and moved toggle
This commit is contained in:
@@ -116,6 +116,15 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
|
||||
style: styles.input,
|
||||
textAlignVertical: 'top',
|
||||
}
|
||||
const excludeToggle = shouldShow(symptomConfig.excludeText) && (
|
||||
<Segment style={styles.segmentBorder}>
|
||||
<AppSwitch
|
||||
onToggle={onExcludeToggle}
|
||||
text={symptomPage[symptom].excludeText}
|
||||
value={data.exclude}
|
||||
/>
|
||||
</Segment>
|
||||
)
|
||||
|
||||
return (
|
||||
<AppModal onClose={onSave}>
|
||||
@@ -143,6 +152,10 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
|
||||
</Segment>
|
||||
)
|
||||
})}
|
||||
|
||||
{/*for bleeding, we want to move the "exclude" toggle up between the tab and box groups, all other symptoms should still have it at the bottom*/}
|
||||
{symptom === 'bleeding' && excludeToggle}
|
||||
|
||||
{shouldShow(symptomConfig.selectBoxGroups) &&
|
||||
symptomPage[symptom].selectBoxGroups.map((group) => {
|
||||
const isOtherSelected =
|
||||
@@ -181,6 +194,9 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
|
||||
/>
|
||||
</Segment>
|
||||
)}
|
||||
|
||||
{symptom !== 'bleeding' && excludeToggle}
|
||||
|
||||
{shouldShow(symptomConfig.note) && (
|
||||
<Segment style={styles.segmentBorder}>
|
||||
<AppText>{symptomPage[symptom].note}</AppText>
|
||||
|
||||
@@ -66,6 +66,7 @@ export const blank = {
|
||||
underwear: null,
|
||||
cup: null,
|
||||
softTampon: null,
|
||||
disk: null,
|
||||
none: null,
|
||||
other: null,
|
||||
note: null,
|
||||
|
||||
@@ -24,6 +24,7 @@ const BleedingSchema = {
|
||||
underwear: { type: 'bool', optional: true },
|
||||
cup: { type: 'bool', optional: true },
|
||||
softTampon: { type: 'bool', optional: true },
|
||||
disk: { type: 'bool', optional: true },
|
||||
none: { type: 'bool', optional: true },
|
||||
other: { type: 'bool', optional: true },
|
||||
note: { type: 'string', optional: true },
|
||||
@@ -184,6 +185,7 @@ export default {
|
||||
newObjects[i].underwear = false
|
||||
newObjects[i].cup = false
|
||||
newObjects[i].softTampon = false
|
||||
newObjects[i].disk = false
|
||||
newObjects[i].none = false
|
||||
newObjects[i].other = false
|
||||
newObjects[i].note = null
|
||||
|
||||
@@ -20,6 +20,7 @@ export const products = {
|
||||
underwear: 'underwear',
|
||||
cup: 'cup',
|
||||
softTampon: 'soft tampon',
|
||||
disk: 'disk',
|
||||
none: 'none',
|
||||
other: 'other',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user