浏览代码

Cambios para que se envien los usernames con la cita

gilberto.cancel 3 年前
父节点
当前提交
a10025797e
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6
    5
      screens/main/Search.js

+ 6
- 5
screens/main/Search.js 查看文件

84
 function Search({route, navigation }) {
84
 function Search({route, navigation }) {
85
 
85
 
86
   const u_token = route.params.U_Token;
86
   const u_token = route.params.U_Token;
87
+  const username = route.params.Username;
87
   console.log("U__token: ", u_token)
88
   console.log("U__token: ", u_token)
88
   
89
   
89
   const [users, setUsers] = useState([])
90
   const [users, setUsers] = useState([])
115
       //check which tags where called in the search 
116
       //check which tags where called in the search 
116
       if (tags[i].id === 'PL') {
117
       if (tags[i].id === 'PL') {
117
         console.log('Presencial')
118
         console.log('Presencial')
118
-        query = query.where('face_to_face', '==', true)
119
+        query = query.where('Modalidad.Presencial', '==', true)
119
         mapflag = true
120
         mapflag = true
120
       }
121
       }
121
       if (tags[i].id == 'ON') {
122
       if (tags[i].id == 'ON') {
250
           return (
251
           return (
251
           <View>
252
           <View>
252
             <View style={{ flexDirection: "row", paddingBottom: 20, paddingTop: 20,  justifyContent: "space-between" }}>
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
               <Text>{item.data.Precio}</Text>
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
             </View>
257
             </View>
257
             <View style={{ borderBottomColor: 'black', borderBottomWidth: 1 }} />
258
             <View style={{ borderBottomColor: 'black', borderBottomWidth: 1 }} />
258
           </View>
259
           </View>
268
     return (item) => setSelectedTags(xorBy(selectedTags, [item], 'id'))
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
     console.log('This is the item id: ', item, "With i_token: ", i_token, " u_token : ", u_token)
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
 }