Fix linter problems
This commit is contained in:
@@ -49,7 +49,8 @@ export default class Cervix extends SymptomView {
|
|||||||
{ label: labels.position.categories[1], value: 1 },
|
{ label: labels.position.categories[1], value: 1 },
|
||||||
{ label: labels.position.categories[2], value: 2 }
|
{ label: labels.position.categories[2], value: 2 }
|
||||||
]
|
]
|
||||||
const mandatoryNotCompleted = typeof this.state.opening != 'number' || typeof this.state.firmness != 'number'
|
// TODO saving this info for notice when leaving incomplete data
|
||||||
|
// const mandatoryNotCompleted = typeof this.state.opening != 'number' || typeof this.state.firmness != 'number'
|
||||||
return (
|
return (
|
||||||
<ScrollView style={styles.page}>
|
<ScrollView style={styles.page}>
|
||||||
<SymptomSection
|
<SymptomSection
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {
|
import {
|
||||||
View,
|
|
||||||
ScrollView
|
ScrollView
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import styles from '../../../styles'
|
import styles from '../../../styles'
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {
|
import {
|
||||||
ScrollView,
|
ScrollView,
|
||||||
TextInput,
|
TextInput} from 'react-native'
|
||||||
View
|
|
||||||
} from 'react-native'
|
|
||||||
import { mood as labels } from '../../../i18n/en/cycle-day'
|
import { mood as labels } from '../../../i18n/en/cycle-day'
|
||||||
import SelectBoxGroup from '../select-box-group'
|
import SelectBoxGroup from '../select-box-group'
|
||||||
import SymptomSection from './symptom-section'
|
import SymptomSection from './symptom-section'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {
|
import {
|
||||||
View,
|
|
||||||
Switch,
|
Switch,
|
||||||
ScrollView
|
ScrollView
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
@@ -50,7 +49,8 @@ export default class Mucus extends SymptomView {
|
|||||||
{ label: labels.texture.categories[1], value: 1 },
|
{ label: labels.texture.categories[1], value: 1 },
|
||||||
{ label: labels.texture.categories[2], value: 2 }
|
{ label: labels.texture.categories[2], value: 2 }
|
||||||
]
|
]
|
||||||
const mandatoryNotCompletedYet = typeof this.state.feeling != 'number' || typeof this.state.texture != 'number'
|
// TODO leaving this info for notice when leaving incomplete data
|
||||||
|
// const mandatoryNotCompletedYet = typeof this.state.feeling != 'number' || typeof this.state.texture != 'number'
|
||||||
return (
|
return (
|
||||||
<ScrollView style={styles.page}>
|
<ScrollView style={styles.page}>
|
||||||
<SymptomSection
|
<SymptomSection
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {
|
import {
|
||||||
View,
|
|
||||||
ScrollView,
|
ScrollView,
|
||||||
TextInput,
|
TextInput,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ export default class SymptomView extends Component {
|
|||||||
this.onBackButtonPress()
|
this.onBackButtonPress()
|
||||||
this.globalBackhandler()
|
this.globalBackhandler()
|
||||||
}}
|
}}
|
||||||
|
deleteEntry={() => {
|
||||||
|
this.deleteSymptomEntry()
|
||||||
|
this.globalBackhandler()
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
{this.renderContent()}
|
{this.renderContent()}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -122,72 +122,72 @@ export default class Temp extends SymptomView {
|
|||||||
inputStyle.push(styles.temperatureTextInputSuggestion)
|
inputStyle.push(styles.temperatureTextInputSuggestion)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<ScrollView style={styles.page}>
|
<ScrollView style={styles.page}>
|
||||||
<SymptomSection
|
<SymptomSection
|
||||||
header={labels.temperature.header}
|
header={labels.temperature.header}
|
||||||
explainer={labels.temperature.explainer}
|
explainer={labels.temperature.explainer}
|
||||||
>
|
>
|
||||||
<View style={styles.framedSegmentInlineChildren}>
|
<View style={styles.framedSegmentInlineChildren}>
|
||||||
<AppTextInput
|
|
||||||
style={[inputStyle]}
|
|
||||||
autoFocus={true}
|
|
||||||
placeholder={this.state.temperature}
|
|
||||||
value={this.state.temperature}
|
|
||||||
onChangeText={this.setTemperature}
|
|
||||||
keyboardType='numeric'
|
|
||||||
maxLength={5}
|
|
||||||
onBlur={this.checkRange}
|
|
||||||
/>
|
|
||||||
<AppText style={{ marginLeft: 5 }}>°C</AppText>
|
|
||||||
</View>
|
|
||||||
</SymptomSection>
|
|
||||||
<SymptomSection
|
|
||||||
header={labels.time}
|
|
||||||
>
|
|
||||||
<View style={styles.framedSegmentInlineChildren}>
|
|
||||||
<AppTextInput
|
|
||||||
style={[styles.temperatureTextInput]}
|
|
||||||
onFocus={this.showTimePicker}
|
|
||||||
value={this.state.time}
|
|
||||||
/>
|
|
||||||
<DateTimePicker
|
|
||||||
mode="time"
|
|
||||||
isVisible={this.state.isTimePickerVisible}
|
|
||||||
onConfirm={jsDate => {
|
|
||||||
this.setState({
|
|
||||||
time: padWithZeros(jsDate),
|
|
||||||
isTimePickerVisible: false
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
onCancel={() => this.setState({ isTimePickerVisible: false })}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</SymptomSection>
|
|
||||||
<SymptomSection
|
|
||||||
header={labels.note.header}
|
|
||||||
explainer={labels.note.explainer}
|
|
||||||
>
|
|
||||||
<AppTextInput
|
<AppTextInput
|
||||||
multiline={true}
|
style={[inputStyle]}
|
||||||
autoFocus={this.state.focusTextArea}
|
autoFocus={true}
|
||||||
placeholder={sharedLabels.enter}
|
placeholder={this.state.temperature}
|
||||||
value={this.state.note}
|
value={this.state.temperature}
|
||||||
onChangeText={this.setNote}
|
onChangeText={this.setTemperature}
|
||||||
|
keyboardType='numeric'
|
||||||
|
maxLength={5}
|
||||||
|
onBlur={this.checkRange}
|
||||||
/>
|
/>
|
||||||
</SymptomSection>
|
<AppText style={{ marginLeft: 5 }}>°C</AppText>
|
||||||
<SymptomSection
|
</View>
|
||||||
header={labels.exclude.header}
|
</SymptomSection>
|
||||||
explainer={labels.exclude.explainer}
|
<SymptomSection
|
||||||
inline={true}
|
header={labels.time}
|
||||||
>
|
>
|
||||||
<Switch
|
<View style={styles.framedSegmentInlineChildren}>
|
||||||
onValueChange={(val) => {
|
<AppTextInput
|
||||||
this.setState({ exclude: val })
|
style={[styles.temperatureTextInput]}
|
||||||
|
onFocus={this.showTimePicker}
|
||||||
|
value={this.state.time}
|
||||||
|
/>
|
||||||
|
<DateTimePicker
|
||||||
|
mode="time"
|
||||||
|
isVisible={this.state.isTimePickerVisible}
|
||||||
|
onConfirm={jsDate => {
|
||||||
|
this.setState({
|
||||||
|
time: padWithZeros(jsDate),
|
||||||
|
isTimePickerVisible: false
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
value={this.state.exclude}
|
onCancel={() => this.setState({ isTimePickerVisible: false })}
|
||||||
/>
|
/>
|
||||||
</SymptomSection>
|
</View>
|
||||||
</ScrollView>
|
</SymptomSection>
|
||||||
|
<SymptomSection
|
||||||
|
header={labels.note.header}
|
||||||
|
explainer={labels.note.explainer}
|
||||||
|
>
|
||||||
|
<AppTextInput
|
||||||
|
multiline={true}
|
||||||
|
autoFocus={this.state.focusTextArea}
|
||||||
|
placeholder={sharedLabels.enter}
|
||||||
|
value={this.state.note}
|
||||||
|
onChangeText={this.setNote}
|
||||||
|
/>
|
||||||
|
</SymptomSection>
|
||||||
|
<SymptomSection
|
||||||
|
header={labels.exclude.header}
|
||||||
|
explainer={labels.exclude.explainer}
|
||||||
|
inline={true}
|
||||||
|
>
|
||||||
|
<Switch
|
||||||
|
onValueChange={(val) => {
|
||||||
|
this.setState({ exclude: val })
|
||||||
|
}}
|
||||||
|
value={this.state.exclude}
|
||||||
|
/>
|
||||||
|
</SymptomSection>
|
||||||
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default function SymptomViewHeader(props) {
|
|||||||
</Text>
|
</Text>
|
||||||
</View >
|
</View >
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => props.goToSymptomInfo()}
|
onPress={props.deleteEntry}
|
||||||
style={styles.infoButton}
|
style={styles.infoButton}
|
||||||
>
|
>
|
||||||
<FeatherIcon
|
<FeatherIcon
|
||||||
|
|||||||
Reference in New Issue
Block a user