Browse Source

A veces el transferir el appointment en la navegacion de home_page a confirm se rompe. No se la explicacion. Como esta ahora esta funcionando la mayoria de las veces.

ErnestoOrtiz2 2 years ago
parent
commit
a08ad74e9a
2 changed files with 8 additions and 8 deletions
  1. 1
    1
      screens/main/Confirm.js
  2. 7
    7
      screens/main/Home_page.js

+ 1
- 1
screens/main/Confirm.js View File

62
         };
62
         };
63
       });
63
       });
64
       setAppointments(appointments);
64
       setAppointments(appointments);
65
-      console.log("appointment", appointments);
65
+      console.log("appointment query de confirm", appointments);
66
     });
66
     });
67
       
67
       
68
     return () => {
68
     return () => {

+ 7
- 7
screens/main/Home_page.js View File

51
     responseListener.current = Notifications.addNotificationResponseReceivedListener(response => {
51
     responseListener.current = Notifications.addNotificationResponseReceivedListener(response => {
52
       //console.log("response", response);
52
       //console.log("response", response);
53
       if (response.notification.request.content.body == 'Le solicitan una cita'){
53
       if (response.notification.request.content.body == 'Le solicitan una cita'){
54
-        //console.log("en pedir response", {appointments});
55
-        //console.log("el id", appointments[0]._id);
54
+        console.log("en pedir response", {appointments});
55
+        console.log("el id", appointments[0]._id);
56
         navigation.navigate('Confirm',{tag: appointments[0]})
56
         navigation.navigate('Confirm',{tag: appointments[0]})
57
       } 
57
       } 
58
     });
58
     });
115
         };
115
         };
116
       });
116
       });
117
       setAppointments(appointments);
117
       setAppointments(appointments);
118
-      console.log("appointment", appointments);
118
+      //console.log("appointment", appointments);
119
     });
119
     });
120
 
120
 
121
       
121
       
169
   
169
   
170
 
170
 
171
   check_user_type_INT();
171
   check_user_type_INT();
172
-  console.log("interpreter", interpreter);
172
+  //console.log("interpreter", interpreter);
173
 
173
 
174
   
174
   
175
   if(interpreter == false){
175
   if(interpreter == false){
186
         renderItem = {({item}) => (
186
         renderItem = {({item}) => (
187
         <TouchableOpacity
187
         <TouchableOpacity
188
         onPress={async () => {
188
         onPress={async () => {
189
-          console.log("item._id, home, client", item.Pin)
189
+          //console.log("item._id, home, client", item.Pin)
190
           navigation.navigate('Cita',{tag: item, Pin: item})
190
           navigation.navigate('Cita',{tag: item, Pin: item})
191
         }}
191
         }}
192
         >
192
         >
328
               onPress={ async () => {
328
               onPress={ async () => {
329
                 await sendPushNotification(item.i_token);
329
                 await sendPushNotification(item.i_token);
330
                 citaId(item._id);
330
                 citaId(item._id);
331
-                console.log("appointment", appointments);
332
-                double = appointments.map((number) => number);
331
+                //double = appointments.map((number) => number);
332
+                //console.log("double", double);
333
                 }
333
                 }
334
               }
334
               }
335
             /> 
335
             />