Browse Source

Cambios para que se envien los usernames con la cita

gilberto.cancel 2 years ago
parent
commit
a10025797e
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      screens/main/Search.js

+ 6
- 5
screens/main/Search.js View File

@@ -84,6 +84,7 @@ const Days = [
84 84
 function Search({route, navigation }) {
85 85
 
86 86
   const u_token = route.params.U_Token;
87
+  const username = route.params.Username;
87 88
   console.log("U__token: ", u_token)
88 89
   
89 90
   const [users, setUsers] = useState([])
@@ -115,7 +116,7 @@ function Search({route, navigation }) {
115 116
       //check which tags where called in the search 
116 117
       if (tags[i].id === 'PL') {
117 118
         console.log('Presencial')
118
-        query = query.where('face_to_face', '==', true)
119
+        query = query.where('Modalidad.Presencial', '==', true)
119 120
         mapflag = true
120 121
       }
121 122
       if (tags[i].id == 'ON') {
@@ -250,9 +251,9 @@ function Search({route, navigation }) {
250 251
           return (
251 252
           <View>
252 253
             <View style={{ flexDirection: "row", paddingBottom: 20, paddingTop: 20,  justifyContent: "space-between" }}>
253
-              <Text>{item.data.name}</Text>
254
+              <Text>{item.data.username}</Text>
254 255
               <Text>{item.data.Precio}</Text>
255
-              <Button title='Buscar' onPress={() => { dothing(item.id, item.data.push_token, u_token) }}/>
256
+              <Button title='Buscar' onPress={() => { dothing(item.id, item.data.push_token, u_token, item.data.username) }}/>
256 257
             </View>
257 258
             <View style={{ borderBottomColor: 'black', borderBottomWidth: 1 }} />
258 259
           </View>
@@ -268,9 +269,9 @@ function Search({route, navigation }) {
268 269
     return (item) => setSelectedTags(xorBy(selectedTags, [item], 'id'))
269 270
   }
270 271
   
271
-  function dothing(item, i_token, u_token) {
272
+  function dothing(item, i_token, u_token, I_username) {
272 273
     console.log('This is the item id: ', item, "With i_token: ", i_token, " u_token : ", u_token)
273
-    navigation.navigate('Calendar', {Intereprete_id: item, Flag: mapflag, I_Token: i_token, U_Token: u_token})
274
+    navigation.navigate('Calendar', {Intereprete_id: item, Flag: mapflag, I_Token: i_token, U_Token: u_token, Username: username, I_Username: I_username})
274 275
   } 
275 276
 
276 277
 }