|
@@ -1,5 +1,5 @@
|
1
|
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
|
3
|
import {FlatList, ListViewBase } from 'react-native'
|
4
|
4
|
import {TouchableOpacity} from 'react-native-gesture-handler'
|
5
|
5
|
import {List, Divider} from 'react-native-paper'
|
|
@@ -99,6 +99,26 @@ export function Cita({route, navigation}) {
|
99
|
99
|
|
100
|
100
|
const Pin = route.params.Pin;
|
101
|
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
|
122
|
return (
|
103
|
123
|
<ImageBackground style={styles.stdcontainer} source={require('../../assets/yellow-white.jpg')}>
|
104
|
124
|
<FlatList style={{
|
|
@@ -170,6 +190,11 @@ export function Cita({route, navigation}) {
|
170
|
190
|
</TouchableOpacity>
|
171
|
191
|
)}
|
172
|
192
|
/>
|
|
193
|
+
|
|
194
|
+ <Button
|
|
195
|
+ title ='Crear cita virtual'
|
|
196
|
+ onPress= {() => {create_meet()}}
|
|
197
|
+ />
|
173
|
198
|
<Button
|
174
|
199
|
title ='Ver mapa'
|
175
|
200
|
onPress= {() => navigation.navigate('Map', {View_Only: true, Pin: Pin})}
|