Browse Source

added create meet button for interpreters

Eduardo Santin 3 years ago
parent
commit
0113dbc007
2 changed files with 27 additions and 2 deletions
  1. 1
    1
      package-lock.json
  2. 26
    1
      screens/main/Cita.js

+ 1
- 1
package-lock.json View File

1
 {
1
 {
2
-  "name": "freehand",
2
+  "name": "Freehand",
3
   "lockfileVersion": 2,
3
   "lockfileVersion": 2,
4
   "requires": true,
4
   "requires": true,
5
   "packages": {
5
   "packages": {

+ 26
- 1
screens/main/Cita.js View File

1
 import React, {useState, useEffect, useRef} from 'react'
1
 import React, {useState, useEffect, useRef} from 'react'
2
-import { Button, Text, View, StyleSheet, Dimensions} from 'react-native'
2
+import { Button, Text, View, StyleSheet, Dimensions, Linking, Alert} from 'react-native'
3
 import {FlatList, ListViewBase } from 'react-native'
3
 import {FlatList, ListViewBase } from 'react-native'
4
 import {TouchableOpacity} from 'react-native-gesture-handler'
4
 import {TouchableOpacity} from 'react-native-gesture-handler'
5
 import {List, Divider} from 'react-native-paper'
5
 import {List, Divider} from 'react-native-paper'
99
 
99
 
100
   const Pin = route.params.Pin;
100
   const Pin = route.params.Pin;
101
   if(interpreter == true){
101
   if(interpreter == true){
102
+
103
+  const create_meet = () => {
104
+    Alert.alert(
105
+
106
+      "IMPORTANT!",
107
+      "You are about to be redirected to the Meet app. After creating a meeting, you must share the meet link with the client. Do you want to continue?",
108
+      [
109
+        {
110
+          text: "Cancel",
111
+          // onPress: () => console.log("Cancel Pressed"),
112
+          style: "cancel"
113
+        },
114
+        { text: "OK", onPress: () => Linking.openURL(`https://meet.google.com/new`) }
115
+      ]
116
+    
117
+    );
118
+    //after pressing the button, redirect to the meet app
119
+    
120
+  }
121
+
102
   return (
122
   return (
103
       <ImageBackground style={styles.stdcontainer} source={require('../../assets/yellow-white.jpg')}>
123
       <ImageBackground style={styles.stdcontainer} source={require('../../assets/yellow-white.jpg')}>
104
         <FlatList style={{
124
         <FlatList style={{
170
         </TouchableOpacity>
190
         </TouchableOpacity>
171
       )}
191
       )}
172
           />
192
           />
193
+
194
+      <Button
195
+        title ='Crear cita virtual'
196
+        onPress= {() => {create_meet()}}
197
+      />
173
       <Button
198
       <Button
174
         title ='Ver mapa'
199
         title ='Ver mapa'
175
         onPress= {() => navigation.navigate('Map', {View_Only: true, Pin: Pin})}
200
         onPress= {() => navigation.navigate('Map', {View_Only: true, Pin: Pin})}