Make saving incomplete value possible

This commit is contained in:
Julia Friesel
2019-05-11 14:30:27 +02:00
parent ca68186351
commit 9fd17d769e
3 changed files with 7 additions and 31 deletions
+1 -4
View File
@@ -10,7 +10,6 @@ import { cervix as labels } from '../../../i18n/en/cycle-day'
import ActionButtonFooter from './action-button-footer'
import SelectTabGroup from '../select-tab-group'
import SymptomSection from './symptom-section'
import { ActionHint } from '../../app-text'
export default class Cervix extends Component {
constructor(props) {
@@ -36,7 +35,7 @@ export default class Cervix extends Component {
{ label: labels.position.categories[1], value: 1 },
{ label: labels.position.categories[2], value: 2 }
]
const mandatoryNotCompletedYet = typeof this.state.opening != 'number' || typeof this.state.firmness != 'number'
const mandatoryNotCompleted = typeof this.state.opening != 'number' || typeof this.state.firmness != 'number'
return (
<View style={{ flex: 1 }}>
<ScrollView style={styles.page}>
@@ -83,7 +82,6 @@ export default class Cervix extends Component {
/>
</SymptomSection>
</ScrollView>
<ActionHint isVisible={mandatoryNotCompletedYet}>{labels.actionHint}</ActionHint>
<ActionButtonFooter
symptom='cervix'
date={this.props.date}
@@ -96,7 +94,6 @@ export default class Cervix extends Component {
exclude: Boolean(this.state.exclude)
})
}}
saveDisabled={mandatoryNotCompletedYet}
navigate={this.props.navigate}
/>
</View>