Merge branch '155-add-temperature-note' into 'master'
Resolve "add temperature note" Closes #155 See merge request bloodyhealth/drip!66
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -136,7 +136,8 @@ export default StyleSheet.create({
|
||||
},
|
||||
temperatureTextInput: {
|
||||
fontSize: 20,
|
||||
color: 'black'
|
||||
color: 'black',
|
||||
textAlign: 'center'
|
||||
},
|
||||
temperatureTextInputSuggestion: {
|
||||
color: '#939393'
|
||||
|
||||
Reference in New Issue
Block a user