From 3bd5770c335b4e9c414bffd74021e661107a2466 Mon Sep 17 00:00:00 2001 From: tina Date: Fri, 31 Aug 2018 14:01:48 +0200 Subject: [PATCH 1/2] adds note to temperature --- components/cycle-day/symptoms/temperature.js | 20 ++++++++++++++++++-- db/index.js | 4 ++++ styles/index.js | 3 ++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/components/cycle-day/symptoms/temperature.js b/components/cycle-day/symptoms/temperature.js index 11ee7da..1326d2f 100644 --- a/components/cycle-day/symptoms/temperature.js +++ b/components/cycle-day/symptoms/temperature.js @@ -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,20 @@ export default class Temp extends Component { }} onCancel={() => this.setState({ isTimePickerVisible: false })} /> + + Note (anomaly) + { + this.setState({ note: val }) + }} + /> + Exclude Date: Fri, 31 Aug 2018 17:05:55 +0200 Subject: [PATCH 2/2] changes text input parameters for temperature note --- components/cycle-day/symptoms/temperature.js | 9 +++++---- styles/index.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/cycle-day/symptoms/temperature.js b/components/cycle-day/symptoms/temperature.js index 1326d2f..ae7d74e 100644 --- a/components/cycle-day/symptoms/temperature.js +++ b/components/cycle-day/symptoms/temperature.js @@ -129,13 +129,14 @@ export default class Temp extends Component { onCancel={() => this.setState({ isTimePickerVisible: false })} /> - Note (anomaly) + Note + + { this.setState({ note: val }) diff --git a/styles/index.js b/styles/index.js index 997ee1c..43aac16 100644 --- a/styles/index.js +++ b/styles/index.js @@ -133,7 +133,7 @@ export default StyleSheet.create({ temperatureTextInput: { fontSize: 20, color: 'black', - textAlign: 'right' + textAlign: 'center' }, temperatureTextInputSuggestion: { color: '#939393'