Implements 2 improvements from MR comments:
- Moves title of symptom in the header - Deletes additional comma out of cycle day overview
This commit is contained in:
@@ -98,6 +98,7 @@ export default class CycleDayOverView extends Component {
|
||||
<SymptomBox
|
||||
title='Pain'
|
||||
onPress={() => this.navigate('PainEditView')}
|
||||
data={getLabel('pain', cycleDay.pain)}
|
||||
/>
|
||||
{/* this is just to make the last row adhere to the grid
|
||||
(and) because there are no pseudo properties in RN */}
|
||||
@@ -178,7 +179,7 @@ function getLabel(symptomName, symptom) {
|
||||
if(pain[key] && key !== 'note') {
|
||||
painLabel.push(painLabels[key])
|
||||
}
|
||||
if(key === 'note'){
|
||||
if(key === "note" && pain.note) {
|
||||
painLabel.push(pain.note)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -9,7 +9,7 @@ import styles from '../../../styles'
|
||||
import { saveSymptom } from '../../../db'
|
||||
import ActionButtonFooter from './action-button-footer'
|
||||
|
||||
export default class Temp extends Component {
|
||||
export default class Note extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.cycleDay = props.cycleDay
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { Component } from 'react'
|
||||
import {
|
||||
CheckBox,
|
||||
ScrollView,
|
||||
Text,
|
||||
TextInput,
|
||||
View,
|
||||
ScrollView
|
||||
View
|
||||
} from 'react-native'
|
||||
import styles from '../../../styles'
|
||||
import { saveSymptom } from '../../../db'
|
||||
@@ -27,13 +27,11 @@ export default class Pain extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<ScrollView>
|
||||
<View>
|
||||
<View style={styles.symptomViewRowInline}>
|
||||
<Text style={styles.symptomDayView}>PAIN</Text>
|
||||
<Text style={styles.symptomDayView}>{painLabels.cramps}</Text>
|
||||
<CheckBox
|
||||
value={this.state.cramps}
|
||||
|
||||
@@ -57,7 +57,8 @@ export const headerTitles = {
|
||||
CervixEditView: 'Cervix',
|
||||
NoteEditView: 'Note',
|
||||
DesireEditView: 'Desire',
|
||||
SexEditView: 'Sex'
|
||||
SexEditView: 'Sex',
|
||||
PainEditView: 'Pain'
|
||||
}
|
||||
|
||||
export const stats = {
|
||||
|
||||
Reference in New Issue
Block a user