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,
|
exclude: temp ? temp.exclude : false,
|
||||||
time: temp ? temp.time : LocalTime.now().truncatedTo(minutes).toString(),
|
time: temp ? temp.time : LocalTime.now().truncatedTo(minutes).toString(),
|
||||||
isTimePickerVisible: false,
|
isTimePickerVisible: false,
|
||||||
outOfRange: null
|
outOfRange: null,
|
||||||
|
note: temp ? temp.note : null
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp) {
|
if (temp) {
|
||||||
@@ -54,7 +55,8 @@ export default class Temp extends Component {
|
|||||||
const dataToSave = {
|
const dataToSave = {
|
||||||
value: Number(this.state.temperature),
|
value: Number(this.state.temperature),
|
||||||
exclude: this.state.exclude,
|
exclude: this.state.exclude,
|
||||||
time: this.state.time
|
time: this.state.time,
|
||||||
|
note: this.state.note
|
||||||
}
|
}
|
||||||
saveSymptom('temperature', this.cycleDay, dataToSave)
|
saveSymptom('temperature', this.cycleDay, dataToSave)
|
||||||
this.props.navigate('CycleDay', {cycleDay: this.cycleDay})
|
this.props.navigate('CycleDay', {cycleDay: this.cycleDay})
|
||||||
@@ -126,6 +128,21 @@ export default class Temp extends Component {
|
|||||||
}}
|
}}
|
||||||
onCancel={() => this.setState({ isTimePickerVisible: false })}
|
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}>
|
<View style={styles.symptomViewRowInline}>
|
||||||
<Text style={styles.symptomDayView}>Exclude</Text>
|
<Text style={styles.symptomDayView}>Exclude</Text>
|
||||||
<Switch
|
<Switch
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ const TemperatureSchema = {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
optional: true
|
optional: true
|
||||||
},
|
},
|
||||||
|
note: {
|
||||||
|
type: 'string',
|
||||||
|
optional: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -136,7 +136,8 @@ export default StyleSheet.create({
|
|||||||
},
|
},
|
||||||
temperatureTextInput: {
|
temperatureTextInput: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: 'black'
|
color: 'black',
|
||||||
|
textAlign: 'center'
|
||||||
},
|
},
|
||||||
temperatureTextInputSuggestion: {
|
temperatureTextInputSuggestion: {
|
||||||
color: '#939393'
|
color: '#939393'
|
||||||
|
|||||||
Reference in New Issue
Block a user