Skip to content
Snippets Groups Projects
Commit f19a51d4 authored by tina's avatar tina
Browse files

Merge branch '155-add-temperature-note' into 'master'

Resolve "add temperature note"

Closes #155

See merge request bloodyhealth/drip!66
parents 6b547abe ed5d7e54
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,8 @@ export default class Temp extends Component {
exclude: temp ? temp.exclude : false,
time: temp ? temp.time : LocalTime.now().truncatedTo(minutes).toString(),
isTimePickerVisible: false,
outOfRange: null
outOfRange: null,
note: temp ? temp.note : null
}
if (temp) {
......@@ -54,7 +55,8 @@ export default class Temp extends Component {
const dataToSave = {
value: Number(this.state.temperature),
exclude: this.state.exclude,
time: this.state.time
time: this.state.time,
note: this.state.note
}
saveSymptom('temperature', this.cycleDay, dataToSave)
this.props.navigate('CycleDay', {cycleDay: this.cycleDay})
......@@ -126,6 +128,21 @@ export default class Temp extends Component {
}}
onCancel={() => this.setState({ isTimePickerVisible: false })}
/>
<View style={styles.symptomViewRowInline}>
<Text style={styles.symptomDayView}>Note</Text>
</View>
<View>
<TextInput
style={styles.temperatureTextInput}
multiline={true}
autoFocus={this.state.focusTextArea}
placeholder="enter"
value={this.state.note}
onChangeText={(val) => {
this.setState({ note: val })
}}
/>
</View>
<View style={styles.symptomViewRowInline}>
<Text style={styles.symptomDayView}>Exclude</Text>
<Switch
......
......@@ -15,6 +15,10 @@ const TemperatureSchema = {
type: 'string',
optional: true
},
note: {
type: 'string',
optional: true
}
}
}
......
......@@ -136,7 +136,8 @@ export default StyleSheet.create({
},
temperatureTextInput: {
fontSize: 20,
color: 'black'
color: 'black',
textAlign: 'center'
},
temperatureTextInputSuggestion: {
color: '#939393'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment