Only show the hints if minimum not selected
This commit is contained in:
@@ -36,6 +36,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'
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<ScrollView style={styles.page}>
|
||||
@@ -82,7 +83,7 @@ export default class Cervix extends Component {
|
||||
/>
|
||||
</SymptomSection>
|
||||
</ScrollView>
|
||||
<ActionHint>{labels.actionHint}</ActionHint>
|
||||
<ActionHint isVisible={mandatoryNotCompletedYet}>{labels.actionHint}</ActionHint>
|
||||
<ActionButtonFooter
|
||||
symptom='cervix'
|
||||
date={this.props.date}
|
||||
@@ -95,7 +96,7 @@ export default class Cervix extends Component {
|
||||
exclude: Boolean(this.state.exclude)
|
||||
})
|
||||
}}
|
||||
saveDisabled={typeof this.state.opening != 'number' || typeof this.state.firmness != 'number'}
|
||||
saveDisabled={mandatoryNotCompletedYet}
|
||||
navigate={this.props.navigate}
|
||||
/>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user