Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _renderTraumaData = () => {
  2.         console.log("[FINISHED] => ",this.props.questionnaire.finishedQ)
  3.         if(this.props.questionnaire.finishedQ != undefined){
  4.             this._onAnserCompleted("FINISHED_TRIGGER")
  5.         }
  6.  
  7.         if (this.props.questionnaire.trauma) {
  8.             return (
  9.                 <TraumaData
  10.                     onAnswerCompleted={() => {this._onAnserCompleted("TRAUMA_ELEMENT")}}
  11.                 />
  12.             )
  13.         }
  14.  
  15.         return (
  16.             <View
  17.                 style={{ flex: 1 }}>
  18.  
  19.                 <ScrollView
  20.                     style={styles.innerContainer}
  21.                     contentContainerStyle={{
  22.                         paddingTop: 16,
  23.                         paddingHorizontal: 16
  24.                     }}>
  25.  
  26.                     <Text style={[styles.label, { textAlign: 'center' ,marginBottom:2, marginTop:2}]}>
  27.                         Aponte o local do trauma
  28.                     </Text>
  29.  
  30.                     <View style={styles.bodyContainer}>
  31.  
  32.                         <TouchableOpacity
  33.                             onPress={() => this.handleBodyPress("1")}
  34.                             style={[
  35.                                 styles.bodyTouchable,
  36.                                 styles.head,
  37.                                  this.state.traumaObj["1"] && styles.bodyTouchableActive
  38.                             ]}
  39.                         />
  40.  
  41.                         <TouchableOpacity
  42.                             onPress={() => this.handleBodyPress("2")}
  43.                             style={[
  44.                                 styles.bodyTouchable,
  45.                                 styles.spine,
  46.                                 this.state.traumaObj["2"] && styles.bodyTouchableActive
  47.                             ]}
  48.                         />
  49.  
  50.                         <TouchableOpacity
  51.                             onPress={() =>this.handleBodyPress("5")}
  52.                             style={[
  53.                                 styles.bodyTouchable,
  54.                                 styles.pelvis,
  55.                                 this.state.traumaObj["5"] && styles.bodyTouchableActive
  56.                             ]}
  57.                         />
  58.  
  59.                         <TouchableOpacity
  60.                             onPress={() => this.handleBodyPress("3")}
  61.                             style={[
  62.                                 styles.bodyTouchable,
  63.                                 styles.upper,
  64.                                 this.state.traumaObj["3"] && styles.bodyTouchableActive
  65.                             ]}
  66.                         />
  67.  
  68.                         <TouchableOpacity
  69.                             onPress={() => this.handleBodyPress("4")}
  70.                             style={[
  71.                                 styles.bodyTouchable,
  72.                                 styles.bottom,
  73.                                 this.state.traumaObj["4"]  && styles.bodyTouchableActive
  74.                             ]}
  75.                         />
  76.                        
  77.                         <Image
  78.                             source={IMAGES.BODY}
  79.                             style={{
  80.                                 alignSelf: 'center',
  81.                                 width: 250,
  82.                                 height: 600
  83.                             }}
  84.                         />
  85.  
  86.                     </View>
  87.  
  88.                 </ScrollView>
  89.  
  90.                 <TouchableOpacity
  91.                     style={styles.buttonContainer}
  92.                     onPress={this.setTraumaLocation}
  93.                     activeOpacity={0.8}>
  94.                     <Icon
  95.                         type='material'
  96.                         name='keyboard-arrow-right'
  97.                         color='white'
  98.                         size={32}
  99.                     />
  100.                 </TouchableOpacity>
  101.  
  102.             </View>
  103.         )
  104.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement