Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _renderTraumaData = () => {
- console.log("[FINISHED] => ",this.props.questionnaire.finishedQ)
- if(this.props.questionnaire.finishedQ != undefined){
- this._onAnserCompleted("FINISHED_TRIGGER")
- }
- if (this.props.questionnaire.trauma) {
- return (
- <TraumaData
- onAnswerCompleted={() => {this._onAnserCompleted("TRAUMA_ELEMENT")}}
- />
- )
- }
- return (
- <View
- style={{ flex: 1 }}>
- <ScrollView
- style={styles.innerContainer}
- contentContainerStyle={{
- paddingTop: 16,
- paddingHorizontal: 16
- }}>
- <Text style={[styles.label, { textAlign: 'center' ,marginBottom:2, marginTop:2}]}>
- Aponte o local do trauma
- </Text>
- <View style={styles.bodyContainer}>
- <TouchableOpacity
- onPress={() => this.handleBodyPress("1")}
- style={[
- styles.bodyTouchable,
- styles.head,
- this.state.traumaObj["1"] && styles.bodyTouchableActive
- ]}
- />
- <TouchableOpacity
- onPress={() => this.handleBodyPress("2")}
- style={[
- styles.bodyTouchable,
- styles.spine,
- this.state.traumaObj["2"] && styles.bodyTouchableActive
- ]}
- />
- <TouchableOpacity
- onPress={() =>this.handleBodyPress("5")}
- style={[
- styles.bodyTouchable,
- styles.pelvis,
- this.state.traumaObj["5"] && styles.bodyTouchableActive
- ]}
- />
- <TouchableOpacity
- onPress={() => this.handleBodyPress("3")}
- style={[
- styles.bodyTouchable,
- styles.upper,
- this.state.traumaObj["3"] && styles.bodyTouchableActive
- ]}
- />
- <TouchableOpacity
- onPress={() => this.handleBodyPress("4")}
- style={[
- styles.bodyTouchable,
- styles.bottom,
- this.state.traumaObj["4"] && styles.bodyTouchableActive
- ]}
- />
- <Image
- source={IMAGES.BODY}
- style={{
- alignSelf: 'center',
- width: 250,
- height: 600
- }}
- />
- </View>
- </ScrollView>
- <TouchableOpacity
- style={styles.buttonContainer}
- onPress={this.setTraumaLocation}
- activeOpacity={0.8}>
- <Icon
- type='material'
- name='keyboard-arrow-right'
- color='white'
- size={32}
- />
- </TouchableOpacity>
- </View>
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement