19 İşlemeler

Yazar SHA1 Mesaj Tarih
  ErnestoOrtiz2 dca856a60d Quite el boton de prueba, probe muchas veces confirm y funciona. voy a hacer push. 3 yıl önce
  ErnestoOrtiz2 a98cca2adf Quite el boton de prueba en home_page 3 yıl önce
  ErnestoOrtiz2 abcae8f21e Merging el pull 3 yıl önce
  ErnestoOrtiz2 64ebe7b730 Bug ortografico 3 yıl önce
  ErnestoOrtiz2 4f47895e77 Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 73b6bf59ee Arreglo de bug en Confirm (finalmente) 3 yıl önce
  ErnestoOrtiz2 fa2ed6e0ae Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 a2b14efe32 Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 857f084c6e Tratando todavia de resolver bug en Confirm. Ahora mismo funciona. Por alguna razon, a veces el arreglo appointments llega vacio al listener de respuesta a la notificacion, en cuyo caso no pasa nada a Confirm y se rompe en confirm porque no tiene ningun valor para usar en el query. 3 yıl önce
  ErnestoOrtiz2 a08ad74e9a 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. 3 yıl önce
  ErnestoOrtiz2 c482f99609 Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 f651d86983 Fix al bug de confirm 'new', funciona ...a veces. A veces inexplicablemente, el mismo codigo tira errores. 3 yıl önce
  ErnestoOrtiz2 33a7953cf4 Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 a08bfaea43 Correccion error ortagrafico 3 yıl önce
  ErnestoOrtiz2 ee8c0b419f Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 3b023b46bd Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 16e148faac Debugging home 3 yıl önce
  ErnestoOrtiz2 c20c4d842a Merge branch 'Freehand' of https://git.ccom.uprrp.edu/ccorrada/ErEduGilMor 3 yıl önce
  ErnestoOrtiz2 150b837072 punto y como en dia 3 yıl önce

+ 1
- 1
screens/main/Cita.js Dosyayı Görüntüle

@@ -236,7 +236,7 @@ export function Cita({route, navigation}) {
236 236
             descriptionNumberOfLines={1}
237 237
           />
238 238
           <List.Item
239
-            title='Día'
239
+            title='Día:'
240 240
             description={item.Day}
241 241
             titleNumberOfLines={1}
242 242
             titleStyle={styles.listTitle}

+ 7
- 5
screens/main/Confirm.js Dosyayı Görüntüle

@@ -24,7 +24,7 @@ Notifications.setNotificationHandler({
24 24
 });
25 25
 
26 26
 
27
-export function Confirm({navigation}) {
27
+export function Confirm({route, navigation}) {
28 28
   const [threads, setThreads] = useState([]);  
29 29
   const [loading, setLoading] = useState(true);
30 30
   const [appointments, setAppointments] = useState([]); 
@@ -45,7 +45,9 @@ export function Confirm({navigation}) {
45 45
       navigation.navigate('Search');
46 46
     });
47 47
 
48
-    const cita = firebase.firestore().collection('APPOINTMENTS').where("new", "==", 'true').onSnapshot(snapShot => {
48
+    //console.log("en confirm", route.params.tag.citaID);
49
+    //const cita = firebase.firestore().collection('APPOINTMENTS').where("new", "==", "true").onSnapshot(snapShot => {
50
+    const cita = firebase.firestore().collection('APPOINTMENTS').where("citaID", "==", route.params.x).onSnapshot(snapShot => {
49 51
       const appointments = snapShot.docs.map(docSnap => {
50 52
         return{
51 53
           _id:docSnap.id,
@@ -60,7 +62,7 @@ export function Confirm({navigation}) {
60 62
         };
61 63
       });
62 64
       setAppointments(appointments);
63
-      console.log("appointment", appointments);
65
+      console.log("appointment query de confirm", appointments);
64 66
     });
65 67
       
66 68
     return () => {
@@ -125,7 +127,7 @@ export function Confirm({navigation}) {
125 127
             console.log("date");
126 128
           }}
127 129
           >
128
-            <List.Item
130
+          <List.Item
129 131
             title='Usuario:'
130 132
             description={item.User}
131 133
             titleNumberOfLines={1}
@@ -142,7 +144,7 @@ export function Confirm({navigation}) {
142 144
             descriptionNumberOfLines={1}
143 145
           />
144 146
           <List.Item
145
-            title='Día'
147
+            title='Día:'
146 148
             description={item.Day}
147 149
             titleNumberOfLines={1}
148 150
             titleStyle={styles.listTitle}

+ 15
- 54
screens/main/Home_page.js Dosyayı Görüntüle

@@ -24,6 +24,10 @@ Notifications.setNotificationHandler({
24 24
 });
25 25
 
26 26
 
27
+let x = "x";
28
+console.log(x);
29
+
30
+
27 31
 export function Home_page({navigation}) {
28 32
 
29 33
   const [threads, setThreads] = useState([]);  
@@ -47,9 +51,9 @@ export function Home_page({navigation}) {
47 51
     });
48 52
 
49 53
     responseListener.current = Notifications.addNotificationResponseReceivedListener(response => {
50
-      console.log("response", response);
51 54
       if (response.notification.request.content.body == 'Le solicitan una cita'){
52
-        navigation.navigate('Confirm');
55
+        console.log("response appointments ", appointments[0])
56
+        navigation.navigate('Confirm',{x})
53 57
       } 
54 58
     });
55 59
 
@@ -94,25 +98,6 @@ export function Home_page({navigation}) {
94 98
   });
95 99
 
96 100
 
97
-    const fire = firebase.firestore()
98
-    .collection('THREADS')
99
-    .where("members", "array-contains", firebase.auth().currentUser.uid)
100
-    .onSnapshot(querySnapshot => {
101
-      const threads = querySnapshot.docs.map(documentSnapshot => {
102
-        return{
103
-          _id:documentSnapshot.id,
104
-          name:'',
105
-          ...documentSnapshot.data()
106
-        };
107
-      });
108
-
109
-      setThreads(threads);
110
-
111
-      if(loading){
112
-        setLoading(false);
113
-      }
114
-    });
115
-
116 101
     const cita = firebase.firestore().collection('APPOINTMENTS').where("participantes", "array-contains", firebase.auth().currentUser.uid).onSnapshot(snapShot => {
117 102
       const appointments = snapShot.docs.map(docSnap => {
118 103
         return{
@@ -130,14 +115,13 @@ export function Home_page({navigation}) {
130 115
         };
131 116
       });
132 117
       setAppointments(appointments);
133
-      console.log("appointment", appointments);
118
+      //console.log("appointment", appointments);
134 119
     });
135 120
 
136 121
       
137 122
     return () => {
138 123
       Notifications.removeNotificationSubscription(notificationListener.current);
139 124
       Notifications.removeNotificationSubscription(responseListener.current);
140
-      fire();
141 125
       cita();
142 126
       Iuser_data();
143 127
       user_data();
@@ -185,7 +169,7 @@ export function Home_page({navigation}) {
185 169
   
186 170
 
187 171
   check_user_type_INT();
188
-  console.log("interpreter", interpreter);
172
+  //console.log("interpreter", interpreter);
189 173
 
190 174
   
191 175
   if(interpreter == false){
@@ -202,7 +186,7 @@ export function Home_page({navigation}) {
202 186
         renderItem = {({item}) => (
203 187
         <TouchableOpacity
204 188
         onPress={async () => {
205
-          console.log("item._id, home, client", item.Pin)
189
+          //console.log("item._id, home, client", item.Pin)
206 190
           navigation.navigate('Cita',{tag: item, Pin: item})
207 191
         }}
208 192
         >
@@ -223,7 +207,7 @@ export function Home_page({navigation}) {
223 207
             descriptionNumberOfLines={1}
224 208
           />
225 209
           <List.Item
226
-            title='Día'
210
+            title='Día:'
227 211
             description={item.Day}
228 212
             titleNumberOfLines={1}
229 213
             titleStyle={styles.listTitle}
@@ -256,6 +240,7 @@ export function Home_page({navigation}) {
256 240
               onPress={ async () => {
257 241
                 await sendPushNotification(item.i_token);
258 242
                 citaId(item._id);
243
+                x = item._id;
259 244
                 }
260 245
               }
261 246
             /> 
@@ -288,7 +273,7 @@ export function Home_page({navigation}) {
288 273
           renderItem = {({item}) => (
289 274
           <TouchableOpacity
290 275
           onPress={async () => {
291
-            console.log("item._id, home, interpreter", item)
276
+            //console.log("item._id, home, interpreter", item)
292 277
             navigation.navigate('Cita',{tag: item, Pin: item})
293 278
           }}
294 279
           >
@@ -309,7 +294,7 @@ export function Home_page({navigation}) {
309 294
             descriptionNumberOfLines={1}
310 295
           />
311 296
           <List.Item
312
-            title='Día'
297
+            title='Día:'
313 298
             description={item.Day}
314 299
             titleNumberOfLines={1}
315 300
             titleStyle={styles.listTitle}
@@ -326,31 +311,7 @@ export function Home_page({navigation}) {
326 311
           />
327 312
           </TouchableOpacity>
328 313
         )}
329
-            />
330
-
331
-
332
-            <FlatList style={{
333
-             flex: 1,
334
-             width: screenWidth,
335
-            }}
336
-            data={appointments}
337
-            keyExtractor = {item => item._id}
338
-            renderItem={({ item }) => {
339
-            if(item.new == 'true'){
340
-            return (
341
-              <Button
342
-                title ='Pedir Cita'
343
-                onPress={ async () => {
344
-                  await sendPushNotification(item.i_token);
345
-                  citaId(item._id);
346
-                  }
347
-                }
348
-              /> 
349
-            )
350
-            }}}
351
-            />
352
-
353
-
314
+        />
354 315
           <Button
355 316
           title ='Availability'
356 317
           onPress= {() => navigation.navigate('Availability')}
@@ -398,7 +359,7 @@ async function registerForPushNotificationsAsync() {
398 359
       return;
399 360
     }
400 361
     token = (await Notifications.getExpoPushTokenAsync()).data;
401
-    console.log('Token:', token)
362
+    //console.log('Token:', token)
402 363
   } else {
403 364
     alert('Must use physical device for Push Notifications');
404 365
   }

+ 0
- 5
screens/main/StateTime.js Dosyayı Görüntüle

@@ -216,8 +216,3 @@ export default class Time extends Component{
216 216
     );
217 217
   }
218 218
 }
219
-
220
-
221
-
222
-
223
-