소스 검색

Merging el pull

ErnestoOrtiz2 3 년 전
부모
커밋
abcae8f21e
3개의 변경된 파일156개의 추가작업 그리고 141개의 파일을 삭제
  1. 8
    2
      screens/main/Calendar.js
  2. 131
    129
      screens/main/Map.js
  3. 17
    10
      screens/main/StateTime.js

+ 8
- 2
screens/main/Calendar.js 파일 보기

@@ -27,16 +27,17 @@ export default class Calendario extends Component {
27 27
     this.setState({
28 28
       selectedStartDate: date,
29 29
     });
30
+    console.log(date)
30 31
     
31 32
     if(this.state.markedDates[date.dateString] != undefined){
32 33
       if(this.state.markedDates[date.dateString].selected == true){
33 34
         if(this.state.mapflag == false){
34
-          this.props.navigation.navigate('StateTime', {Appointment: date._d, int_id : this.state.interpreter_id, 
35
+          this.props.navigation.navigate('StateTime', {Day: date.day, Month: date.month, int_id : this.state.interpreter_id, 
35 36
             Flag: this.state.mapflag, I_Token: this.state.i_token, U_Token: this.state.u_token
36 37
             ,Username: this.state.username, I_Username: this.state.I_username});
37 38
         }
38 39
         else{
39
-          this.props.navigation.navigate('Map', {Appointment: date._d, int_id : this.state.interpreter_id, 
40
+          this.props.navigation.navigate('Map', {Day: date.day, Month: date.month, int_id : this.state.interpreter_id, 
40 41
             Flag: this.state.mapflag, I_Token: this.state.i_token, U_Token: this.state.u_token
41 42
             ,Username: this.state.username, I_Username: this.state.I_username});
42 43
         }
@@ -75,3 +76,8 @@ const styles = StyleSheet.create({
75 76
 
76 77
   
77 78
 
79
+
80
+
81
+
82
+  
83
+

+ 131
- 129
screens/main/Map.js 파일 보기

@@ -1,143 +1,145 @@
1
-import * as React from 'react';
2
-import { useState } from 'react';
3
-import MapView, { Marker } from 'react-native-maps';
4
-import { Button, StyleSheet, Text, View, Dimensions, Pressable } from 'react-native';
5
-import { Confirm } from './Confirm';
1
+    import * as React from 'react';
2
+    import { useState } from 'react';
3
+    import MapView, { Marker } from 'react-native-maps';
4
+    import { Button, StyleSheet, Text, View, Dimensions, Pressable } from 'react-native';
5
+    import { Confirm } from './Confirm';
6 6
 
7 7
 
8
-export default function Map({route, navigation} ) {
9
-    
10
-  console.log('In map params')
11
-  console.log(route.params)
12
-  
8
+    export default function Map({route, navigation} ) {
9
+        
10
+      console.log('In map params')
11
+      console.log(route.params)
12
+      
13 13
 
14
-    
15
-    const {
16
-    Appointment = route.params.Appointment_Date ,
17
-    int_id = route.params.int_id,
18
-    mapflag = route.params.Flag, 
19
-    i_token = route.params.I_Token,
20
-    u_token =  route.params.U_Token,
21
-    username = route.params.Username,
22
-    I_username = route.params.I_Username,
23
-    Confirm_Flag = route.params.Confirm_Flag,
24
-    View_Only = route.params.View_Only
25
-    } = route.params
26
-    
14
+        
15
+        const {
16
+        Day = route.params.Day ,
17
+        Month = route.params.Month,
18
+        int_id = route.params.int_id,
19
+        mapflag = route.params.Flag, 
20
+        i_token = route.params.I_Token,
21
+        u_token =  route.params.U_Token,
22
+        username = route.params.Username,
23
+        I_username = route.params.I_Username,
24
+        Confirm_Flag = route.params.Confirm_Flag,
25
+        View_Only = route.params.View_Only
26
+        } = route.params
27
+        
27 28
 
28
-    
29
+        
29 30
 
30
-  
31
+      
31 32
 
32
-  if(View_Only == true){
33
+      if(View_Only == true){
33 34
 
34
-    const Retrive_pin = route.params.Pin;
35
-    console.log("Retrieve lat", Retrive_pin)
35
+        const Retrive_pin = route.params.Pin;
36
+        console.log("Retrieve lat", Retrive_pin)
36 37
 
37
-    if(Confirm_Flag == true){
38
-      const [pin2, setPin2] = React.useState({
39
-        latitude: Retrive_pin[0].Pin[0],
40
-        longitude: Retrive_pin[0].Pin[1],
41
-      })
38
+        if(Confirm_Flag == true){
39
+          const [pin2, setPin2] = React.useState({
40
+            latitude: Retrive_pin[0].Pin[0],
41
+            longitude: Retrive_pin[0].Pin[1],
42
+          })
42 43
 
43
-      console.log("Pin2", pin2)
44
-  
45
-      return (
46
-        <View style={styles.container}>
47
-          <MapView style={styles.map}
48
-            initialRegion={{
49
-              latitude: pin2.latitude,
50
-              longitude: pin2.longitude,
51
-              latitudeDelta: 0.0922,
52
-              longitudeDelta: 0.0421,
53
-            }}
54
-            provider="google"
55
-          >
56
-            <Marker coordinate={pin2} />
57
-          </MapView>
58
-        </View>
59
-      );
60
-    }
44
+          console.log("Pin2", pin2)
45
+      
46
+          return (
47
+            <View style={styles.container}>
48
+              <MapView style={styles.map}
49
+                initialRegion={{
50
+                  latitude: pin2.latitude,
51
+                  longitude: pin2.longitude,
52
+                  latitudeDelta: 0.0922,
53
+                  longitudeDelta: 0.0421,
54
+                }}
55
+                provider="google"
56
+              >
57
+                <Marker coordinate={pin2} />
58
+              </MapView>
59
+            </View>
60
+          );
61
+        }
61 62
 
62
-    else{
63
-      const [pin2, setPin2] = React.useState({
64
-      latitude: Retrive_pin.Pin[0],
65
-      longitude: Retrive_pin.Pin[1],
66
-      })
67
-    console.log("Pin2", pin2)
68
-  
69
-    return (
70
-      <View style={styles.container}>
71
-        <MapView style={styles.map}
72
-          initialRegion={{
73
-            latitude: pin2.latitude,
74
-            longitude: pin2.longitude,
75
-            latitudeDelta: 0.0922,
76
-            longitudeDelta: 0.0421,
77
-          }}
78
-          provider="google"
79
-        >
80
-          <Marker coordinate={pin2} />
81
-        </MapView>
82
-      </View>
83
-    );
84
-  }
85
-}
86
-  else{
63
+        else{
64
+          const [pin2, setPin2] = React.useState({
65
+          latitude: Retrive_pin.Pin[0],
66
+          longitude: Retrive_pin.Pin[1],
67
+          })
68
+        console.log("Pin2", pin2)
69
+      
70
+        return (
71
+          <View style={styles.container}>
72
+            <MapView style={styles.map}
73
+              initialRegion={{
74
+                latitude: pin2.latitude,
75
+                longitude: pin2.longitude,
76
+                latitudeDelta: 0.0922,
77
+                longitudeDelta: 0.0421,
78
+              }}
79
+              provider="google"
80
+            >
81
+              <Marker coordinate={pin2} />
82
+            </MapView>
83
+          </View>
84
+        );
85
+      }
86
+    }
87
+      else{
87 88
 
88
-    const [pin1, setPin1] = React.useState({
89
-      latitude: 18.4655,
90
-      longitude: -66.1057,
91
-    })
89
+        const [pin1, setPin1] = React.useState({
90
+          latitude: 18.4655,
91
+          longitude: -66.1057,
92
+        })
92 93
 
93
-    return (
94
-      <View style={styles.container}>
95
-        <MapView style={styles.map}
96
-          initialRegion={{
97
-            latitude: 18.4655,
98
-            longitude: -66.1057,
99
-            latitudeDelta: 0.0922,
100
-            longitudeDelta: 0.0421,
101
-          }}
102
-          onPress={(e) => {
103
-            setPin1({
104
-              latitude: e.nativeEvent.coordinate.latitude,
105
-              longitude: e.nativeEvent.coordinate.longitude
106
-            })
107
-          }}
108
-          
109
-          provider="google"
110
-        >
111
-          <Marker coordinate={pin1} />
112
-        </MapView>
113
-          <View style = {{position: 'absolute', bottom: '5%'}}>
114
-              <Button title= 'Confirm Location' color = "#000000" onPress = {() => navigation.navigate('StateTime' , {Pin : pin1 , Appointment : Appointment, int_id : int_id, 
115
-                mapflag : mapflag, I_Token: i_token, U_Token: u_token
116
-                ,Username: username, I_Username: I_username})}/>
94
+        return (
95
+          <View style={styles.container}>
96
+            <MapView style={styles.map}
97
+              initialRegion={{
98
+                latitude: 18.4655,
99
+                longitude: -66.1057,
100
+                latitudeDelta: 0.0922,
101
+                longitudeDelta: 0.0421,
102
+              }}
103
+              onPress={(e) => {
104
+                setPin1({
105
+                  latitude: e.nativeEvent.coordinate.latitude,
106
+                  longitude: e.nativeEvent.coordinate.longitude
107
+                })
108
+              }}
109
+              
110
+              provider="google"
111
+            >
112
+              <Marker coordinate={pin1} />
113
+            </MapView>
114
+              <View style = {{position: 'absolute', bottom: '5%'}}>
115
+                  <Button title= 'Confirm Location' color = "#000000" onPress = {() => navigation.navigate('StateTime' , {Pin : pin1 , 
116
+                    Day : Day, Month: Month, int_id : int_id, 
117
+                    mapflag : mapflag, I_Token: i_token, U_Token: u_token
118
+                    ,Username: username, I_Username: I_username})}/>
119
+              </View>
117 120
           </View>
118
-      </View>
119
-      
120
-    );
121
-  }
121
+          
122
+        );
123
+      }
122 124
 
123
-    
124
-}
125
-const styles = StyleSheet.create({
126
-  container: {
127
-    flex: 1,
128
-    backgroundColor: '#fff',
129
-    alignItems: 'center',
130
-    justifyContent: 'center',
131
-  },
132
-  map: {
133
-    width: Dimensions.get('window').width,
134
-    height: Dimensions.get('window').height,
135
-  },
136
-  container2: {
137
-    flex: 1,
138
-    alignItems: 'center',
139
-    justifyContent: 'center',
140
-    backgroundColor: '#307ecc',
141
-    padding: 16,
142
-  },
143
-});
125
+        
126
+    }
127
+    const styles = StyleSheet.create({
128
+      container: {
129
+        flex: 1,
130
+        backgroundColor: '#fff',
131
+        alignItems: 'center',
132
+        justifyContent: 'center',
133
+      },
134
+      map: {
135
+        width: Dimensions.get('window').width,
136
+        height: Dimensions.get('window').height,
137
+      },
138
+      container2: {
139
+        flex: 1,
140
+        alignItems: 'center',
141
+        justifyContent: 'center',
142
+        backgroundColor: '#307ecc',
143
+        padding: 16,
144
+      },
145
+    });

+ 17
- 10
screens/main/StateTime.js 파일 보기

@@ -13,7 +13,8 @@ export default class Time extends Component{
13 13
       this.endtime = 0,
14 14
       this.timesetter = 0,
15 15
     this.state = {
16
-      Appointment : this.props.route.params.Appointment,
16
+      Day : this.props.route.params.Day,
17
+      Month: this.props.route.params.Month,
17 18
       int2_id : this.props.route.params.int_id,
18 19
       mapflag: this.props.route.params.mapflag,
19 20
       i_token: this.props.route.params.I_Token,
@@ -131,10 +132,8 @@ export default class Time extends Component{
131 132
     const I_username = this.state.I_username;
132 133
     const u_token = this.state.u_token;
133 134
     const i_token = this.state.i_token;
134
-    const date = this.state.Appointment
135
-    const month = date.getMonth() + 1;
136
-    console.log("Month: ", month)
137
-    const day = date.getDate();
135
+    const month = this.state.Month;
136
+    const day = this.state.Day;
138 137
     const _time_ = selectedTime;
139 138
     const i_id = this.state.int2_id;
140 139
     const lat = this.state.pin.latitude; 
@@ -169,10 +168,8 @@ export default class Time extends Component{
169 168
     const I_username = this.state.I_username;
170 169
     const u_token = this.state.u_token;
171 170
     const i_token = this.state.i_token;
172
-    const date = this.state.Appointment
173
-    const month = date.getMonth() + 1;
174
-    console.log("Month: ", month)
175
-    const day = date.getDate();
171
+    const month = this.state.Month;
172
+    const day = this.state.Day;
176 173
     const _time_ = selectedTime;
177 174
     const i_id = this.state.int2_id;
178 175
     console.log('Params: ')
@@ -205,7 +202,7 @@ export default class Time extends Component{
205 202
     return(
206 203
       <TouchableWithoutFeedback style={styles.stdcontainer}>
207 204
         <ImageBackground style={styles.regcontainer} source={require('../../assets/yellow-white.jpg')}>
208
-          <Text style={styles.time_text}> Select the Start and End Time for the Appointment </Text>
205
+          <Text style={styles.qsttxt}> Select the Start and End Time for the Appointment </Text>
209 206
         <Button style={styles.cenregbutton} title="8:00am" onPress={() => this.time_set(1,)}/>
210 207
         <Button style={styles.cenregbutton} title="9:00am" onPress={() => this.time_set(2,)}/>
211 208
         <Button style={styles.cenregbutton} title="10:00am" onPress={() => this.time_set(3,)}/>
@@ -217,5 +214,15 @@ export default class Time extends Component{
217 214
         </ImageBackground>
218 215
       </TouchableWithoutFeedback>
219 216
     );
217
+<<<<<<< HEAD
220 218
     }
221 219
   }
220
+=======
221
+  }
222
+}
223
+
224
+
225
+
226
+
227
+
228
+>>>>>>> 41f4e392c1d11b10c3650da5122494623f10e2d6