diff --git a/App/android/app/build.gradle b/App/android/app/build.gradle
index 2b2f7adc..ec49a2d4 100755
--- a/App/android/app/build.gradle
+++ b/App/android/app/build.gradle
@@ -149,6 +149,7 @@ android {
}
dependencies {
+ compile project(':react-native-maps')
compile project(':react-native-device-info')
compile project(':react-native-material-shadows')
compile project(':react-native-linear-gradient')
diff --git a/App/android/app/src/main/AndroidManifest.xml b/App/android/app/src/main/AndroidManifest.xml
index 94c48efd..46057b3b 100755
--- a/App/android/app/src/main/AndroidManifest.xml
+++ b/App/android/app/src/main/AndroidManifest.xml
@@ -1,27 +1,30 @@
+ package="com.app">
-
+
-
-
-
-
-
-
-
+ android:name=".MainApplication"
+ android:label="@string/app_name"
+ android:icon="@mipmap/ic_launcher"
+ android:allowBackup="false"
+ android:theme="@style/AppTheme">
+
+
+
+
+
+
+
+
diff --git a/App/android/app/src/main/java/com/app/MainApplication.java b/App/android/app/src/main/java/com/app/MainApplication.java
index 8b11f16a..23ca3771 100755
--- a/App/android/app/src/main/java/com/app/MainApplication.java
+++ b/App/android/app/src/main/java/com/app/MainApplication.java
@@ -3,6 +3,7 @@ package com.app;
import android.app.Application;
import com.facebook.react.ReactApplication;
+import com.airbnb.android.react.maps.MapsPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import ui.materialshadows.RNMaterialShadowsPackage;
import com.BV.LinearGradient.LinearGradientPackage;
@@ -29,6 +30,7 @@ public class MainApplication extends Application implements ReactApplication {
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
+ new MapsPackage(),
new RNDeviceInfo(),
new RNMaterialShadowsPackage(),
new LinearGradientPackage(),
diff --git a/App/android/settings.gradle b/App/android/settings.gradle
index 7c9cafb3..8dc9c679 100755
--- a/App/android/settings.gradle
+++ b/App/android/settings.gradle
@@ -1,4 +1,6 @@
rootProject.name = 'app'
+include ':react-native-maps'
+project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':react-native-material-shadows'
@@ -11,5 +13,7 @@ include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
+include ':react-native-maps'
+project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
include ':app'
diff --git a/App/app/App.js b/App/app/App.js
index b4f401ee..a2be73cc 100755
--- a/App/app/App.js
+++ b/App/app/App.js
@@ -1,14 +1,14 @@
import React, {Component} from 'react';
import {
- Platform,
- StyleSheet,
- Text,
- View,
- StatusBar,
- Dimensions,
- Image,
- ActivityIndicator,
- Button,
+ Platform,
+ StyleSheet,
+ Text,
+ View,
+ StatusBar,
+ Dimensions,
+ Image,
+ ActivityIndicator,
+ Button,
TouchableHighlight,
Keyboard,
ImageBackground,
@@ -26,7 +26,7 @@ import {connect} from 'react-redux';
import QRCodeScanner from 'react-native-qrcode-scanner';
import {UtilStyles} from './assets/styles'
-import * as Actions from './store/actions';
+import * as Actions from './store/actions';
import {RkButton, RkTheme, RkText, RkTextInput} from 'react-native-ui-kitten';
@@ -40,43 +40,43 @@ const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
import Swiper from 'react-native-swiper';
+
var TimerMixin = require('react-timer-mixin');
function handleConnectivityChange() {
- console.log("asdasd");
- }
-
-class App extends Component {
- handleConnectivityChange = isConnected => {
- this.setState({ isConnected });
- }
- _activate=()=>{
+ console.log("asdasd");
+}
- this.setState({ isModalVisible: !this.state.isModalVisible});
+class App extends Component {
+ handleConnectivityChange = isConnected => {
+ this.setState({isConnected});
+ }
+ _activate = () => {
+
+ this.setState({isModalVisible: !this.state.isModalVisible});
this.scanner.reactivate();
}
- _scanQr=()=>{
+ _scanQr = () => {
this.props.openScannerLogin()
console.log(this.props.UI_loginScannerActive)
}
- _tryLogin=()=>{
-
+ _tryLogin = () => {
+
//console.log(this.state.text)
//this.scanner.reactivate();
this.props.login(this.state.username, this.state.text);
-
-
-
- }
+
+
+ }
_toggleModal = () =>
- this.setState({ isModalVisible: !this.state.isModalVisible });
+ this.setState({isModalVisible: !this.state.isModalVisible});
constructor(props) {
super(props);
-
+
this.state = {
token: {valid: false},
@@ -84,95 +84,98 @@ class App extends Component {
onHold: true,
logged: false,
isModalVisible: false,
- state : {text: ''},
- username:'QR code',
+ state: {text: ''},
+ username: 'QR code',
failedAttempt: false,
- push:4,
- UI_loginScannerActive:false,
- userDetails:{username:'', password:''},
- isConnected: true
+ push: 4,
+ UI_loginScannerActive: false,
+ userDetails: {username: '', password: ''},
+ isConnected: true
};
}
- _print=()=>{
- console.log("hello")
- this.setState({push:0})
- }
- checkValue=(e)=>{
- console.log("check"+e)
- }
- _handleConnectionChange = (isConnected) => {
- this.props.connectionState(true);
- };
-
+ _print = () => {
+ console.log("hello")
+ this.setState({push: 0})
+ };
+
+ checkValue = (e) => {
+ console.log("check" + e)
+ };
+
+ _handleConnectionChange = (isConnected) => {
+ this.props.connectionState(true);
+ };
+
+
componentDidMount() {
- this.props.hold();
- NetInfo.isConnected.addEventListener('connectionChange', this.handleConnectivityChange);
+ this.props.hold();
+ NetInfo.isConnected.addEventListener('connectionChange', this.handleConnectivityChange);
this.setState({isModalVisible: false})
//verifica se o utilizador tem token guardado
this.props.checkUser(this.props.userDetails);
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
-
+
}
- componentWillUnmount() {
- NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange);
- }
-
- _keyboardDidShow () {
- //alert('Keyboard Shown');
- // this.setState({push:0})
- }
-
- _keyboardDidHide () {
+ componentWillUnmount() {
+ NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange);
+ }
+
+ _keyboardDidShow() {
+ //alert('Keyboard Shown');
+ // this.setState({push:0})
+
+ }
+
+ _keyboardDidHide() {
//this.setState({push:4})
- }
+ }
+
onSuccess = (e) => {
// this.setState({ isModalVisible: !this.state.isModalVisible });
// this.props.login(e.data, 'f8908cc0');
this.props.closeLoginQRScan();
- this.setState({username:e.data})
+ this.setState({username: e.data})
console.log("QR code lido");
-
};
render() {
- if (!this.state.isConnected) {
- return (
-
- cenas da vida
-
- );
- }
- if (!this.props.logged && this.props.onHold) {
+ if (!this.state.isConnected) {
+ return (
+
+ cenas da vida
+
+ );
+ }
+ if (!this.props.logged && this.props.onHold) {
return (
-
+
)
}
- else
- {
+ else {
- // console.log('token... '+ this.props.logged)
+ // console.log('token... '+ this.props.logged)
//se existir token
- if (this.props.logged ) {
+ if (this.props.logged) {
return (
@@ -180,116 +183,111 @@ class App extends Component {
)
}
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
- {this.setState({searchString})}}
- maxLength={15}
- underlineColorAndroid="transparent"
- />
-
-
-
-
-
- Scan QR
-
-
-
-
-
-
- this.setState({text})}
- clearButtonMode='always'
- value={this.state.text}
- clearTextOnFocus={true}
- onSubmitEditing={Keyboard.dismiss}
- placeholder='Password' />
-
- Entrar
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Não sabes a password?
-
-
-
- Recuperar Password
-
-
-
-
-
-
-
-
-
- );
-
+
+
+
+
+
+ {
+ this.setState({searchString})
+ }}
+ maxLength={15}
+ underlineColorAndroid="transparent"
+ />
+
+
+
+
+
+ Scan QR
+
+
+
+
+
+
+ this.setState({text})}
+ clearButtonMode='always'
+ value={this.state.text}
+ clearTextOnFocus={true}
+ onSubmitEditing={Keyboard.dismiss}
+ placeholder='Password'/>
+
+ Entrar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Não sabes a password?
+
+
+
+ Recuperar Password
+
+
+
+
+
+
+
+
+
+ );
+
}
}
}
@@ -310,161 +308,159 @@ const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a
const overlayColor = 'rgba(0,0,0,0.30)';
const styles = {
- cameraContainer:{
- // height: Dimensions.get('window').height ,
+ cameraContainer: {
+ // height: Dimensions.get('window').height ,
},
- passwordInput:{
+ passwordInput: {
borderRadius: 90,
-
- borderColor:'#bfbdbd',
+
+ borderColor: '#bfbdbd',
borderWidth: 1,
- marginTop:20,
- marginBottom:20,
- width:SCREEN_WIDTH*0.8,
-
+ marginTop: 20,
+ marginBottom: 20,
+ width: SCREEN_WIDTH * 0.8,
+
backgroundColor: 'white',
borderRadius: 90,
- height: SCREEN_HEIGHT*0.08,
- borderColor:'#bfbdbd',
+ height: SCREEN_HEIGHT * 0.08,
+ borderColor: '#bfbdbd',
borderWidth: 1,
- paddingLeft:SCREEN_WIDTH*0.05,
-
- },
- scanQRText:{
-
- paddingTop:50
- // paddingTop:20,
-
+ paddingLeft: SCREEN_WIDTH * 0.05,
},
- scanQR:{
-
+ scanQRText: {
+
+ paddingTop: 50
+ // paddingTop:20,
+
+
+ },
+ scanQR: {
+
//flexDirection: 'row',
- paddingTop:5,
- backgroundColor:10,
-
- width:80,
- paddingLeft:10,
- backgroundColor:'#f24b4b',
- borderBottomRightRadius:90,
- borderTopRightRadius:90,
- height:'100%',
-
+ paddingTop: 5,
+ backgroundColor: 10,
+
+ width: 80,
+ paddingLeft: 10,
+ backgroundColor: '#f24b4b',
+ borderBottomRightRadius: 90,
+ borderTopRightRadius: 90,
+ height: '100%',
+
},
inputSection: {
-
+
flexDirection: 'row',
backgroundColor: '#fff',
-
+
backgroundColor: 'white',
borderRadius: 90,
- height: SCREEN_HEIGHT*0.08,
- borderColor:'#bfbdbd',
+ height: SCREEN_HEIGHT * 0.08,
+ borderColor: '#bfbdbd',
borderWidth: 1,
-
+
},
searchIcon: {
- paddingLeft:10
+ paddingLeft: 10
},
input: {
-
-
-
+
+
flex: 1,
paddingRight: 10,
-
-
+
+
paddingLeft: 0,
- paddingLeft:SCREEN_WIDTH*0.05,
+ paddingLeft: SCREEN_WIDTH * 0.05,
color: '#424242',
-
+
},
- textRow:{
- marginBottom:40
+ textRow: {
+ marginBottom: 40
},
- loginContainer:{
+ loginContainer: {
width: '100%',
height: '30%',
justifyContent: 'center',
alignItems: 'center'
},
- loginBtn:{
- marginTop:10,
- marginBottom:20,
- marginLeft: '25%',
-
+ loginBtn: {
+ marginTop: 10,
+ marginBottom: 20,
+ marginLeft: '25%',
+
},
-
+
button: {
- borderWidth:1,
- borderColor:'rgba(0,0,0,0.2)',
- alignItems:'center',
- justifyContent:'center',
- width:60,
- height:60,
- backgroundColor:'#fff',
- borderRadius:100,
- marginRight: 10,
- marginLeft:10
- },
+ borderWidth: 1,
+ borderColor: 'rgba(0,0,0,0.2)',
+ alignItems: 'center',
+ justifyContent: 'center',
+ width: 60,
+ height: 60,
+ backgroundColor: '#fff',
+ borderRadius: 100,
+ marginRight: 10,
+ marginLeft: 10
+ },
footer: {},
buttons: {
flexDirection: 'row',
marginBottom: 24,
marginHorizontal: 24,
- marginTop:24,
+ marginTop: 24,
justifyContent: 'space-around',
-
-
- },
- logoContainer:{
-
- width:'100%',
-
- justifyContent: 'center',
- alignItems: 'center',
- marginTop:200
},
- logo2:{
-
- // flex: 1,
- // resizeMode: 'contain',
+ logoContainer: {
+
+ width: '100%',
+
+ justifyContent: 'center',
+ alignItems: 'center',
+ marginTop: 200
+
+ },
+
+ logo2: {
+
+ // flex: 1,
+ // resizeMode: 'contain',
width: 200, height: 200,
},
- wrapper: {
- },
+ wrapper: {},
slide1: {
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: 'white',
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ backgroundColor: 'white',
},
slide2: {
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: 'white',
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ backgroundColor: 'white',
},
slide3: {
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
- color:'black',
- backgroundColor: 'white',
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ color: 'black',
+ backgroundColor: 'white',
},
text: {
- color: '#fff',
- fontSize: 30,
- fontWeight: 'bold',
+ color: '#fff',
+ fontSize: 30,
+ fontWeight: 'bold',
},
recover: {
paddingTop: 10,
@@ -520,19 +516,19 @@ const styles = {
};
RkTheme.setType('RkTextInput', 'frame', {
input: {
- backgroundColor: 'white',
- marginLeft: 0,
- marginHorizontal: 0,
- borderRadius: 5
+ backgroundColor: 'white',
+ marginLeft: 0,
+ marginHorizontal: 0,
+ borderRadius: 5
},
color: 'gray',
backgroundColor: 'gray',
borderRadius: 10,
container: {
- paddingHorizontal: 20
+ paddingHorizontal: 20
}
- });
-
+});
+
mapStateToProps = (state, props) => {
return {
@@ -540,7 +536,7 @@ mapStateToProps = (state, props) => {
loggedIn: state.apiReducer.loggedIn,
onHold: state.apiReducer.onHold,
logged: state.apiReducer.logged,
- failedAttempt:state.apiReducer.failedAttempt,
+ failedAttempt: state.apiReducer.failedAttempt,
UI_loginScannerActive: state.uiReducer.UI_loginScannerActive,
userDetails: state.apiReducer.userDetails,
}
diff --git a/App/app/Router.js b/App/app/Router.js
index 74783cfe..cdd6d7c8 100755
--- a/App/app/Router.js
+++ b/App/app/Router.js
@@ -3,16 +3,23 @@ import {
TouchableOpacity,
Text,
View,
- Image
+ Image,
+
} from 'react-native';
import {
createStackNavigator,
createAppContainer,
createSwitchNavigator,
- createBottomTabNavigator
+ createBottomTabNavigator,
+ HeaderBackButton
} from 'react-navigation';
import * as Screens from './screens';
+/*Icons*/
+import Icon from "react-native-vector-icons/Ionicons"
+import IconF from "react-native-vector-icons/Foundation"
+import IconFA from "react-native-vector-icons/FontAwesome5"
+
import AuthLoadingScreen from './screens/AuthLoading'
@@ -25,17 +32,18 @@ import Calendar from './screens/Calendar'
import Home from './screens/Home'
-
-/*Icons*/
-import Icon from "react-native-vector-icons/Ionicons"
-import IconF from "react-native-vector-icons/Foundation"
-import IconFA from "react-native-vector-icons/FontAwesome5"
import Profile from "./screens/Profile";
import editCalendar from './screens/editCalendar';
import choosePath from './screens/choosePath';
import calendarDetail from './screens/calendarDetail';
+const navigationOptions = ({navigation}) => ({
+ headerLeft: navigation.goBack(null)}/>,
+ headerStyle: {backgroundColor: 'transparent', zIndex: 100 },
+
+});
+
const AppStack = createBottomTabNavigator(
{
Calendário: {
@@ -48,15 +56,15 @@ const AppStack = createBottomTabNavigator(
)
},
},
-
+
'Jogo do...': {
screen: Jogo,
navigationOptions: {
tabBarIcon: ({tintColor}) => (
-
-
+
+
)
},
},
@@ -71,8 +79,8 @@ const AppStack = createBottomTabNavigator(
},
},
-
- Eventos: {
+
+ Eventos: {
screen: Eventos,
navigationOptions: {
@@ -82,7 +90,7 @@ const AppStack = createBottomTabNavigator(
)
},
},
-
+
Home: {
screen: Home,
navigationOptions: {
@@ -94,7 +102,6 @@ const AppStack = createBottomTabNavigator(
},
-
},
{
initialRouteName: 'Home',
@@ -120,51 +127,56 @@ const Stack = createStackNavigator({
return {
headerTitle: `${navigation.state.routes[index].routeName}`,
headerRight: (
- navigation.navigate('Profile')}>
-
+ navigation.navigate('Profile')}>
+
editar
-
+
)
}
}
- else if(navigation.state.routes[index].routeName == 'Calendário'){
+ else if (navigation.state.routes[index].routeName == 'Calendário') {
return {
headerTitle: 'Calendário',
headerRight: (
-
- navigation.navigate('Edit')}>
- FAQ
-
-
+
+ navigation.navigate('Edit')}>
+ FAQ
+
+
+
+ navigation.navigate('choosePath')}>
+ Escolher
+
+
- navigation.navigate('choosePath')}>
- Escolher
-
-
-
)
}
- }
- else if(navigation.state.routes[index].routeName == 'choosePath'){
+ }
+ else if (navigation.state.routes[index].routeName == 'choosePath') {
return {
headerTitle: 'Calendário',
headerRight: (
-
- navigation.navigate('Edit')}>
- FAQ
-
-
+
+ navigation.navigate('Edit')}>
+ FAQ
+
+
+
+ navigation.navigate('choosePath')}>
+ Escolher
+
+
- navigation.navigate('choosePath')}>
- Escolher
-
-
-
)
}
- }
+ }
else {
return {
header: null
@@ -175,17 +187,15 @@ const Stack = createStackNavigator({
Profile: {
screen: Profile
},
- Edit:{
+ Edit: {
screen: editCalendar
},
- choosePath:{
+ choosePath: {
screen: choosePath
},
- calendarDetail:{
- screen:calendarDetail
- }
-
-
+ calendarDetail: {
+ screen: calendarDetail,
+ },
});
@@ -194,7 +204,7 @@ export default createAppContainer(createSwitchNavigator(
{
AuthLoading: AuthLoadingScreen,
App: Stack,
-
+
},
{
diff --git a/App/app/components/Nav.js b/App/app/components/Nav.js
new file mode 100644
index 00000000..eb06de50
--- /dev/null
+++ b/App/app/components/Nav.js
@@ -0,0 +1,99 @@
+import React, { Component } from 'react'
+import { StyleSheet, Text, View } from 'react-native'
+import { Icon } from 'react-native-elements'
+
+const styles = StyleSheet.create({
+ centerRow: {
+ alignItems: 'flex-start',
+ backgroundColor: 'transparent',
+ flex: 3,
+ flexDirection: 'column',
+ justifyContent: 'center',
+ },
+
+ container: {
+ backgroundColor: 'transparent',
+ borderBottomWidth: 0,
+ elevation: 0,
+ flexDirection: 'row',
+ height: 55,
+ justifyContent: 'center',
+ left: 0,
+ marginLeft: 10,
+ marginRight: 10,
+ //marginTop: 22,
+ position: 'absolute',
+ right: 0,
+ zIndex: 100,
+ },
+ icon: {
+ justifyContent: 'flex-start',
+ marginTop: 2.8,
+ },
+ iconContainer: {
+ alignSelf: 'center',
+ },
+ leftRow: {
+ backgroundColor: 'transparent',
+ flex: 1,
+ flexDirection: 'row',
+ justifyContent: 'flex-start',
+ },
+ rightRow: {
+ alignItems: 'flex-end',
+ backgroundColor: 'transparent',
+ flex: 2,
+ flexDirection: 'row',
+ justifyContent: 'flex-end',
+ marginRight: 4,
+ },
+ titleText: {
+ color: '#000',
+ fontSize: 24,
+ fontWeight: '600',
+ },
+ subTitleText: {
+ color: '#000',
+ fontSize: 14,
+ fontWeight: '400',
+ },
+});
+
+class Nav extends Component {
+
+
+ render() {
+ const { navigation, title} = this.props;
+
+ return (
+
+
+
+ navigation.goBack(null)}
+ color= '#000'
+ iconStyle={styles.icon}
+ underlayColor="transparent"
+ underlineColorAndroid="transparent"
+ containerStyle={styles.iconContainer}
+ hitSlop={{ top: 15, bottom: 15, left: 15, right: 15 }}
+ />
+
+
+
+ {title}
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default Nav
\ No newline at end of file
diff --git a/App/app/screens/Calendar.js b/App/app/screens/Calendar.js
index bb216504..02c8a0fe 100644
--- a/App/app/screens/Calendar.js
+++ b/App/app/screens/Calendar.js
@@ -21,7 +21,7 @@ const formatObj = (obj) => {
let a = {};
- a.push({})
+ a.push({});
return a
@@ -44,7 +44,7 @@ class Calendar extends React.Component {
index: 0,
routes: [
{key: 'first', weekDay: 'sex', day:12},
- {key: 'second', weekDay: 'sab',day:13},
+ {key: 'second', weekDay: 'sab', day:13},
{key: 'third', weekDay: 'dom', day:14},
{key: 'fourth', weekDay: 'seg', day:15},
@@ -137,7 +137,7 @@ class Calendar extends React.Component {
constructor() {
- super()
+ super();
const archeryImgSource = require('../assets/img/archery.png');
const badmintonImgSource = require('../assets/img/badminton.png');
@@ -209,7 +209,7 @@ class Calendar extends React.Component {
- )
+ );
const SecondRoute = () => (
diff --git a/App/app/screens/Jogo.js b/App/app/screens/Jogo.js
index 6f4666ac..3dc5702b 100644
--- a/App/app/screens/Jogo.js
+++ b/App/app/screens/Jogo.js
@@ -1,12 +1,12 @@
import React from 'react';
-import {
- StyleSheet,
- Text,
- View,
- ImageBackground,
- Dimensions,
- Button,
- TouchableOpacity
+import {
+ StyleSheet,
+ Text,
+ View,
+ ImageBackground,
+ Dimensions,
+ Button,
+ TouchableOpacity
} from 'react-native';
import ProgressBarAnimated from 'react-native-progress-bar-animated';
import Modal from "react-native-modal";
@@ -14,7 +14,7 @@ import Modal from "react-native-modal";
import IconF from "react-native-vector-icons/Foundation"
import IconFA from "react-native-vector-icons/FontAwesome5"
-import { ScrollView } from 'react-native-gesture-handler';
+import {ScrollView} from 'react-native-gesture-handler';
const SCREEN_HEIGHT = Dimensions.get("window").height;
@@ -22,646 +22,609 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
export default class Jogo extends React.Component {
-state = {
- progress: 20,
- progressWithOnComplete: 0,
- progressCustomized: 0,
- isModalVisible: false,
- } ;
+ state = {
+ progress: 20,
+ progressWithOnComplete: 0,
+ progressCustomized: 0,
+ isModalVisible: false,
+ };
increase = (key, value) => {
- this.setState({
- [key]: this.state[key] + value,
- });
- }
+ this.setState({
+ [key]: this.state[key] + value,
+ });
+ }
- _toggleModal = () =>{
- this.setState({ isModalVisible: !this.state.isModalVisible });
- console.log("assd")
- }
+ _toggleModal = () => {
+ this.setState({isModalVisible: !this.state.isModalVisible});
+ console.log("assd")
+ }
- render() {
-
- const { navigate } = this.props.navigation;
+ render() {
+
+ const {navigate} = this.props.navigation;
- const progressCustomStyles = {
- backgroundColor: 'red',
- borderRadius: 0,
- borderColor: 'orange',
- };
+ const progressCustomStyles = {
+ backgroundColor: 'red',
+ borderRadius: 0,
+ borderColor: 'orange',
+ };
- const barWidth = Dimensions.get('screen').width - 30;
+ const barWidth = Dimensions.get('screen').width - 30;
-
+ return (
- return (
+
+
+
+
+ Hello!
+
+ Hide me!
+
+
+
+
+
+
+ Jogo do ENEI'19
+
+
+
-
-
-
-
-
- Hello!
-
- Hide me!
-
-
+
+
+
+
+ 45
+ pontos
+
+
+
+
+
+
-
-
- Jogo do ENEI'19
-
-
-
-
-
-
-
-
-
-
- 45
- pontos
-
-
+
+
+
+
+
+
+
+ 1
+
+ 2
+
+
-
+
+
+
+
+
+
+
+ 15
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+ 15
+
+ 1
+
+
+
+
+
+
+
+ 15
+
+ 2
+
+
+
+
+
+
+
+
+
+ 15
+
+ 3
+
+
+
+
+
+
+
+ 15
+
+ 4
+
+
+
+
+
+
+
+ 15
+
+ 5
+
+
+
+
+
+
+
+
+
+
+
+ 15
+
+ 6
+
+
+
+
+
+
+
+
+
+ 15
+
+ 7
+
+
+
+
+
+
+
+ 15
+
+ 8
+
+
+
+
+
+
+
+
+ 15
+
+ 9
+
+
+
+
+
+
+
+
+ 15
+
+ 10
+
+
+
+
+
+
+
+
+ 15
+
+ 11
+
+
+
+
+
+
+
+
+
+
+
+
+ 15
+
+ 12
+
+
+
+
+
+
+
+
+
+ 15
+
+ 13
+
+
+
+
+
+
+
+ 15
+
+ 14
+
+
+
+
+
+
+
+
+ 15
+
+ 15
+
+
+
+
+
+
+
+
+ 15
+
+ 16
+
+
+
+
+
+
+
+
+ 15
+
+ 17
+
+
+
+
+
+
+
+
+
+
+
+
+ 15
+
+ 18
+
+
+
+
+
+
+
+
+ 15
+
+ 19
+
+
+
+
+
+
+
+ 15
+
+ 20
+
+
+
+
+
+
+
+
+ 15
+
+ 21
+
+
+
+
+
+
+
+
+ 15
+
+ 22
+
+
+
+
+
+
+
+
+ 15
+
+ 23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
- 1
-
- 2
-
-
-
-
-
-
-
-
+ );
-
-
-
-
- 15
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 15
-
- 1
-
-
-
-
-
-
-
-
- 15
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
- 15
-
- 3
-
-
-
-
-
-
-
-
- 15
-
- 4
-
-
-
-
-
-
-
-
- 15
-
- 5
-
-
-
-
-
-
-
-
-
-
-
-
- 15
-
- 6
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 15
-
- 7
-
-
-
-
-
-
-
-
- 15
-
- 8
-
-
-
-
-
-
-
-
-
- 15
-
- 9
-
-
-
-
-
-
-
-
-
- 15
-
- 10
-
-
-
-
-
-
-
-
-
- 15
-
- 11
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 15
-
- 12
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 15
-
- 13
-
-
-
-
-
-
-
-
- 15
-
- 14
-
-
-
-
-
-
-
-
-
- 15
-
- 15
-
-
-
-
-
-
-
-
-
- 15
-
- 16
-
-
-
-
-
-
-
-
-
- 15
-
- 17
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 15
-
- 18
-
-
-
-
-
-
-
-
- 15
-
- 19
-
-
-
-
-
-
-
-
- 15
-
- 20
-
-
-
-
-
-
-
-
-
- 15
-
- 21
-
-
-
-
-
-
-
-
-
- 15
-
- 22
-
-
-
-
-
-
-
-
-
- 15
-
- 23
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-
- }
+ }
}
const styles = StyleSheet.create({
- points:{
- marginTop:-25,
- marginLeft:10,
- fontWeight:'bold',
- color:'#CC1A17'
+ points: {
+ marginTop: -25,
+ marginLeft: 10,
+ fontWeight: 'bold',
+ color: '#CC1A17'
},
- cromosContainer:{
- flex:1,
- flexDirection:'row',
- flexWrap: 'wrap',
+ cromosContainer: {
+ flex: 1,
+ flexDirection: 'row',
+ flexWrap: 'wrap',
justifyContent: 'space-around',
- marginLeft:10,
- marginRight:10,
+ marginLeft: 10,
+ marginRight: 10,
},
cromo:
{
- backgroundColor:'white',
- margin:3,
- height:200,
- width:130,
- borderRadius:0}
+ backgroundColor: 'white',
+ margin: 3,
+ height: 200,
+ width: 130,
+ borderRadius: 0
+ }
,
- imageBg:{
-
- height:'97%',
- margin:5
- },
- label:{
- margin:10
- },
- progress:{
- backgroundColor:'#eeeeee',
- shadowColor:'#000',
- shadowOffset:{width:0, height:2},
- shadowRadius:1,
- elevation:1,
- },
- title:{
- fontWeight:'bold',
- fontSize:25,
- color:'white',
- textAlign:'center'
-
- },
- titleContainer:{
-
- margin:10,
- },
- header:{
- backgroundColor:'#CC2A17',
+ imageBg: {
- //alignItems:'center',
- shadowColor:'#000',
- shadowOffset:{width:0, height:2},
- shadowRadius:1,
- elevation:5,
-
- },
- container: {
- flex: 1,
- backgroundColor: '#eeeeee',
- // alignItems: 'center',
- //justifyContent: 'space-around',
- },
- triangle: {
- width: 0,
- height: 0,
- backgroundColor: 'transparent',
- borderStyle: 'solid',
- borderLeftWidth:67,
- borderRightWidth: 0,
- borderBottomWidth: 20,
- transform: [{ rotate: '180deg'}],
- borderLeftColor: 'transparent',
- borderRightColor: 'transparent',
- borderBottomColor: 'white'
- },
- triangleNumber: {
- width: 0,
- height: 0,
- backgroundColor: 'transparent',
- borderStyle: 'solid',
- borderLeftWidth:67,
- borderRightWidth: 0,
- borderBottomWidth: 20,
- transform: [{ rotate: '0deg'}],
- borderLeftColor: 'transparent',
- borderRightColor: 'transparent',
- borderBottomColor: 'white',
- marginLeft:54,
- marginTop:155
- },
- number:{
- marginTop:-18,
- marginLeft:103,
- textAlign: 'center'
- }
+ height: '97%',
+ margin: 5
+ },
+ label: {
+ margin: 10
+ },
+ progress: {
+ backgroundColor: '#eeeeee',
+ shadowColor: '#000',
+ shadowOffset: {width: 0, height: 2},
+ shadowRadius: 1,
+ elevation: 1,
+ },
+ title: {
+ fontWeight: 'bold',
+ fontSize: 25,
+ color: 'white',
+ textAlign: 'center'
+
+ },
+ titleContainer: {
+
+ margin: 10,
+ },
+ header: {
+ backgroundColor: '#CC2A17',
+
+ //alignItems:'center',
+ shadowColor: '#000',
+ shadowOffset: {width: 0, height: 2},
+ shadowRadius: 1,
+ elevation: 5,
+
+ },
+ container: {
+ flex: 1,
+ backgroundColor: '#eeeeee',
+ // alignItems: 'center',
+ //justifyContent: 'space-around',
+ },
+ triangle: {
+ width: 0,
+ height: 0,
+ backgroundColor: 'transparent',
+ borderStyle: 'solid',
+ borderLeftWidth: 67,
+ borderRightWidth: 0,
+ borderBottomWidth: 20,
+ transform: [{rotate: '180deg'}],
+ borderLeftColor: 'transparent',
+ borderRightColor: 'transparent',
+ borderBottomColor: 'white'
+ },
+ triangleNumber: {
+ width: 0,
+ height: 0,
+ backgroundColor: 'transparent',
+ borderStyle: 'solid',
+ borderLeftWidth: 67,
+ borderRightWidth: 0,
+ borderBottomWidth: 20,
+ transform: [{rotate: '0deg'}],
+ borderLeftColor: 'transparent',
+ borderRightColor: 'transparent',
+ borderBottomColor: 'white',
+ marginLeft: 54,
+ marginTop: 155
+ },
+ number: {
+ marginTop: -18,
+ marginLeft: 103,
+ textAlign: 'center'
+ }
});
\ No newline at end of file
diff --git a/App/app/screens/Scan.js b/App/app/screens/Scan.js
index 9eda08b8..fb0702ea 100644
--- a/App/app/screens/Scan.js
+++ b/App/app/screens/Scan.js
@@ -1,121 +1,174 @@
import React from 'react';
-import { View, Image, Vibration, Dimensions,Text ,Button ,TouchableOpacity } from 'react-native';
+import {View, Image, Vibration, Dimensions, Text, Button, TouchableOpacity, ActivityIndicator} from 'react-native';
import QRCodeScanner from 'react-native-qrcode-scanner';
import {UtilStyles} from '../assets/styles'
import CodeInput from 'react-native-confirmation-code-input';
import Modal from "react-native-modal";
+import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
+
+import {
+ RkButton,
+ RkTheme, RkText
+} from 'react-native-ui-kitten';
-import {RkButton,
- RkTheme , RkText} from 'react-native-ui-kitten';
+import IconMI from "react-native-vector-icons/MaterialIcons"
- const SCREEN_HEIGHT = Dimensions.get("window").height;
- const SCREEN_WIDTH = Dimensions.get("window").width;
+
+const SCREEN_HEIGHT = Dimensions.get("window").height;
+const SCREEN_WIDTH = Dimensions.get("window").width;
export default class Scan extends React.Component {
_toggleModal = () =>
- this.setState({ isModalVisible: !this.state.isModalVisible });
+ this.setState({isModalVisible: !this.state.isModalVisible});
- _activate=()=>{
+ _activate = () => {
- this.setState({ isModalVisible: !this.state.isModalVisible ,reactivate:true});
+ this.setState({isModalVisible: !this.state.isModalVisible, reactivate: true});
this.scanner.reactivate();
}
onSuccess = (e) => {
- this.setState({ isModalVisible: !this.state.isModalVisible ,isActive:false});
- this.setState({code:e.data});
- };
+ this.setState({isModalVisible: !this.state.isModalVisible, isActive: false});
+ this.setState({code: e.data});
+ };
- state = {
- isActive:true,
- isRender: true,
- reactivate:false,
- isModalVisible: false,
- code:''
-
- }
- componentDidMount() {
+
+ state = {
+ isActive: true,
+ isRender: true,
+ reactivate: false,
+ isModalVisible: false,
+ code: '',
+
+ index: 0,
+ routes: [
+ {key: 'scan', title: 'Scan', icon: ''},
+ {key: 'history', title: 'Histórico', icon: 'history'},
+ {key: 'fav', title: 'Favoritos', icon: 'favorite'},
+ ],
+
+ };
+
+ componentDidMount() {
this.props.navigation.addListener('willFocus', (route) => {
- this.setState({ isRender: true })
+ this.setState({isRender: true})
});
this.props.navigation.addListener('willBlur', (route) => {
- this.setState({ isRender: false })
+ this.setState({isRender: false})
});
- }
-
- render() {
-
- {
+ }
- return (
+ render() {
-
-
- { this.state.isRender &&
-
- (
+ { this.scanner = node }}
+ ref={(node) => {
+ this.scanner = node
+ }}
reactivate={false}
-
+ cameraProps={{captureAudio: false}}
onRead={this.onSuccess.bind(this)}
-
showMarker={true}
-
- cameraStyle={{ height: SCREEN_HEIGHT }}
-
+ cameraStyle={{height: SCREEN_HEIGHT}}
fadeIn={true}
-
customMarker={
-
-
-
-
-
-
- Qr code data: {this.state.code}
-
-
-
-
-
+
+
+
+
+ Qr code data: {this.state.code}
+
+
+
+
}
- />
- }
-
- )}
-
- return (
-
-
- Show Modal
-
-
-
- Hello!
-
- Hide me!
-
-
-
+ />
+ );
+
+ const historyScreen = () => (
+
- );
- }
+ );
+
+ const favScreen = () => (
+
+
+
+ );
+
+
+ _renderLazyPlaceholder = () => {
+ return (
+
+ );
+ };
+
+ {
+
+ return (
+
+
+
+ {this.state.isRender &&
+ this.setState({index})}
+ initialLayout={{width: SCREEN_WIDTH, height: SCREEN_HEIGHT}}
+ renderIcon={({route}) => (
+
+ )}
+ />
+ }
+
+ )
+ }
+
+ return (
+
+
+ Show Modal
+
+
+
+ Hello!
+
+ Hide me!
+
+
+
+
+ );
+ }
}
RkTheme.setType('RkButton', 'dark', {
container: {
- paddingTop:10,
- backgroundColor: 'gray',
-
- borderRadius: 90,
+ paddingTop: 10,
+ backgroundColor: 'gray',
+
+ borderRadius: 90,
}
- });
+});
const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a 393 device width
@@ -123,35 +176,31 @@ const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a
const overlayColor = 'rgba(0,0,0,0.30)';
const styles = {
-
- recover:{
- paddingTop:10,
+
+ recover: {
+ paddingTop: 10,
color: "red",
- paddingBottom:10
+ paddingBottom: 10
},
- manual:{
-
-
+ manual: {},
- },
-
- logo:{
+ logo: {
- height:SCREEN_HEIGHT*0.35,
- width:SCREEN_WIDTH,
+ height: SCREEN_HEIGHT * 0.35,
+ width: SCREEN_WIDTH,
backgroundColor: overlayColor,
},
rectangleContainer: {
-
+
flex: 1,
alignItems: "center",
justifyContent: "center",
backgroundColor: "transparent",
-
+
},
rectangle: {
-
+
height: rectDimensions,
width: rectDimensions,
alignItems: "center",
diff --git a/App/app/screens/calendarDetail.js b/App/app/screens/calendarDetail.js
index 3c97714c..171acf8c 100644
--- a/App/app/screens/calendarDetail.js
+++ b/App/app/screens/calendarDetail.js
@@ -1,15 +1,17 @@
import * as React from 'react';
import {
- View,
- StyleSheet,
- Dimensions,
- Image,
- ScrollView,
- Text,
- Button,
- TouchableOpacity
- } from 'react-native';
+ View,
+ StyleSheet,
+ Dimensions,
+ Image,
+ ScrollView,
+ Text,
+ Button,
+ TouchableOpacity,
+ ImageBackground
+} from 'react-native';
+import {Divider, Icon, Avatar} from 'react-native-elements'
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
import {
RkButton, RkCard, RkText,
@@ -19,6 +21,7 @@ import Timeline from 'react-native-timeline-feed'
import * as Progress from 'react-native-progress';
+import NavAbsolute from '../components/Nav';
import {connect} from 'react-redux';
@@ -30,7 +33,7 @@ import Swiper from 'react-native-swiper';
const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
import FitImage from 'react-native-fit-image';
-
+import MapView, {PROVIDER_GOOGLE} from 'react-native-maps';
const formatObj = (obj) => {
@@ -43,12 +46,19 @@ const formatObj = (obj) => {
};
-
class calendarDetail extends React.Component {
+
+ static navigationOptions = ({navigation}) => ({
+ header: (
+
+ ),
+ });
- state = {
-
- };
+
+ state = {};
componentDidMount() {
@@ -58,11 +68,10 @@ class calendarDetail extends React.Component {
}
-
_update = () => {
this.setState({user: this.props.user});
console.log(this.props.events);
- }
+ };
constructor(props) {
@@ -70,97 +79,319 @@ class calendarDetail extends React.Component {
super(props)
-
- this.data = [
-
-
-
- ]
+ this.data = []
}
- render() {
- const { navigation } = this.props;
- const info = navigation.getParam('info', 'error');
- console.log(info);
+ renderHeader = (info) => {
return (
-
- {info.name}, {info.description}
+
+
+
+
+
)
+ };
+
+ renderDescription = (info) => {
+ return (
+
+
+
+ Onde está o ramo? xD
+
+
+ {info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}
+
+
+
+
+
+ Attendee Name
+
+ {info.Enrolled} / {info.MaxAttendees}
+
+
+
+
+ Descrição
+
+
+
+ {info.description}
+
+
+
+
+
+ )
+ };
+
+
+ renderMap = () => {
+ return (
+ {
+
+ console.log(region);
+
+ }}
+
+ />
+ )
+ };
+
+ renderAttendee = () => {
+ return (
+
+
+
+
+
+
+
+ Nome do gajo
+
+
+
+ navigation.goBack(null)}
+ color='#000'
+ iconStyle={styles.icon}
+ underlayColor="transparent"
+ underlineColorAndroid="transparent"
+ containerStyle={styles.iconContainer}
+ hitSlop={{top: 15, bottom: 15, left: 15, right: 15}}
+ />
+
+
+
+ );
+ };
+
+
+ render() {
+ const {navigation} = this.props;
+ const info = navigation.getParam('info', 'error');
+ console.log(info);
+
+ return (
+
+
+
+
+
+ {this.renderHeader(info)}
+
+ {this.renderDescription(info)}
+
+
+ Localização
+
+ {this.renderMap()}
+
+
+
+ {this.renderAttendee()}
+
+
+ )
}
-
+
}
const styles = StyleSheet.create({
-
- carreerPathContainer:{
- backgroundColor:'#CC1A17',
- height:50,
- flex:1,
- alignItems:'center',
- justifyContent:'center',
- paddingTop:15,
+
+ AttendeeContainer: {
+ flexDirection: 'row',
+ height: 55,
+ justifyContent: 'center',
+ marginLeft: 10,
+ marginRight: 10,
},
- carreerPathText:{
-
- height:50,
- color:'white',
- fontWeight:'bold',
- fontSize:20,
+
+ centerRow: {
+ alignItems: 'flex-start',
+ backgroundColor: 'transparent',
+ flex: 3,
+ flexDirection: 'column',
+ justifyContent: 'center',
+ },
+
+ leftRow: {
+ backgroundColor: 'transparent',
+ flex: 1,
+ flexDirection: 'row',
+ justifyContent: 'flex-start',
+ alignSelf: 'center'
+ },
+ rightRow: {
+ alignItems: 'flex-end',
+ backgroundColor: 'transparent',
+ flex: 2,
+ flexDirection: 'row',
+ justifyContent: 'flex-end',
+ marginRight: 4,
+ alignSelf: 'center'
+ },
+
+ icon: {
+ justifyContent: 'flex-start',
+ marginTop: 2.8,
+ },
+
+ nameAttendee: {
+ alignSelf: 'center',
+ fontSize: 20,
+ fontWeight: '400',
+ color: '#000',
+ marginBottom: 10,
+ },
+
+ details: {
+ marginTop: 20,
+ flex: 1,
+ alignSelf: 'center',
+ },
+
+ infoRow: {
+ margin: 25,
+ },
+
+ ramoText: {
+ alignSelf: 'flex-start',
+ marginBottom: 5,
+ color: '#000',
+ fontSize: 20,
+ fontWeight: '400',
+ },
+
+ timeText: {
+ alignItems: 'flex-end',
+ flex: 2,
+ marginBottom: 5,
+ marginRight: 4,
+ },
+
+ mainViewStyle: {
+ flex: 1,
+ flexGrow: 1,
+ flexDirection: 'column',
+ },
+
+ scroll: {
+ backgroundColor: '#FFF',
+ flex: 1,
+ //marginBottom: 55,
+ },
+
+ cardContainer: {
+ flex: 1,
+ },
+ container: {
+ flex: 1,
+ flexDirection: 'column',
+ },
+ coverContainer: {
+ position: 'relative',
+ },
+ coverImage: {
+ height: Dimensions.get('window').width * (2 / 4),
+ width: Dimensions.get('window').width,
+ },
+ headerContainer: {
+ alignItems: 'center',
+ backgroundColor: '#FFF',
+ },
+
+
+ carreerPathContainer: {
+ backgroundColor: '#CC1A17',
+ height: 50,
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ paddingTop: 15,
+ },
+ carreerPathText: {
+
+ height: 50,
+ color: 'white',
+ fontWeight: 'bold',
+ fontSize: 20,
},
- companyHeader:{
- backgroundColor:'#dddddd',
- // height:150,
- borderRadius:5,
- margin:10,
- padding:10
-
-
+ companyHeader: {
+ backgroundColor: '#dddddd',
+ // height:150,
+ borderRadius: 5,
+ margin: 10,
+ padding: 10
+
+
},
- companyTitle:{
- paddingBottom:5,
- fontWeight:'bold',
- color:'#777777',
- fontSize:17,
-
- // padding:20
+ companyTitle: {
+ paddingBottom: 5,
+ fontWeight: 'bold',
+ color: '#777777',
+ fontSize: 17,
+
+ // padding:20
},
companyLogo: {
-
borderRadius: 20,
-
- },
-
- wrapper: {
-
- },
- company:{
- flex:1,
- flexDirection:'row',
- // backgroundColor:'red',
- color:'black'
+
},
- companyLogoContainer:{
- flex:1,
+ wrapper: {},
+ company: {
+ flex: 1,
+ flexDirection: 'row',
+ // backgroundColor:'red',
+ color: 'black'
+ },
+
+ companyLogoContainer: {
+ flex: 1,
justifyContent: 'center',
- width:'60%',
- // backgroundColor:'white',
- margin:20,
+ width: '60%',
+ // backgroundColor:'white',
+ margin: 20,
},
- aboutCompany:{
- width:SCREEN_WIDTH,
- flex:1,
+ aboutCompany: {
+ width: SCREEN_WIDTH,
+ flex: 1,
justifyContent: 'center',
alignItems: 'center',
}
-
-});
+});
function mapStateToProps(state, props) {
diff --git a/App/app/store/actions/api.js b/App/app/store/actions/api.js
index f1e1f7de..5cf2d326 100644
--- a/App/app/store/actions/api.js
+++ b/App/app/store/actions/api.js
@@ -1,71 +1,79 @@
-import { AsyncStorage } from 'react-native';
+import {AsyncStorage} from 'react-native';
-import { NetInfo } from 'react-native';
+import {NetInfo} from 'react-native';
-import { DATA_AVAILABLE, API_LOGIN, CHECK_USER, LOGOUT_USER, USER_INFO, HOLD, GET_EVENTS, GET_CAREERS, GET_SESSIONS, CHANGE_GUEST, WAIT_CHANGE } from "./actionTypes" //Import the actions types constant we defined in our actions
+import {
+ DATA_AVAILABLE,
+ API_LOGIN,
+ CHECK_USER,
+ LOGOUT_USER,
+ USER_INFO,
+ HOLD,
+ GET_EVENTS,
+ GET_CAREERS,
+ GET_SESSIONS,
+ CHANGE_GUEST,
+ WAIT_CHANGE
+} from "./actionTypes" //Import the actions types constant we defined in our actions
import moment from 'moment'
-import { compose } from 'redux';
-
+import {compose} from 'redux';
+
const axios = require('axios');
-export const waitChangeGuest= ()=>{
- return (dispatch)=>{
+export const waitChangeGuest = () => {
+ return (dispatch) => {
dispatch({
type: WAIT_CHANGE,
- });
+ });
}
}
export const connectionState = (status) => {
-
+
console.log(status);
- return { type: 'CHANGE_CONNECTION_STATUS', isConnected: status };
- };
-
-
+ return {type: 'CHANGE_CONNECTION_STATUS', isConnected: status};
+};
///Attendee/AvailableGuestlists
-axios.defaults.baseURL = 'http://enei2019.uingress.com/internal/api'
+axios.defaults.baseURL = 'http://enei2019.uingress.com/internal/api';
-export function getAvailableGuestlists(token){
+export function getAvailableGuestlists(token) {
-
-
- axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
-
- return (dispatch)=>{
+
+ axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`};
+
+ return (dispatch) => {
axios.get('/Attendee/AvailableGuestlists')
- .then(function (response) {
-
- // handle success
- console.log(response);
- dispatch({
- type: GET_CAREERS,
- guests: response.data
-
+ .then(function (response) {
+
+ // handle success
+ console.log(response);
+ dispatch({
+ type: GET_CAREERS,
+ guests: response.data
+
});
- })
- .catch(function (error) {
- // handle error
- console.log(error);
- })
- .then(function () {
- // always executed
- });
+ })
+ .catch(function (error) {
+ // handle error
+ console.log(error);
+ })
+ .then(function () {
+ // always executed
+ });
}
}
-
/*
8 - group
9 - IA
@@ -76,116 +84,116 @@ export function getAvailableGuestlists(token){
15 - DS
*/
-export function changeGuestList(token, guestID){
+export function changeGuestList(token, guestID) {
//http://enei2019.uingress.com/internal/api/Attendee/ChangeGuestlist/
-
-
+
+
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
-
- return (dispatch)=>{
- var full= `/Attendee/ChangeGuestlist/${guestID}`
-console.log(full)
+ return (dispatch) => {
+
+ let full = `/Attendee/ChangeGuestlist/${guestID}`;
+ console.log(full);
axios.get(full)
- .then(function (response) {
-
- // handle success
- console.log(response);
- dispatch({
- type: CHANGE_GUEST,
- //guests: response.data
-
+ .then(function (response) {
+
+ // handle success
+ console.log(response);
+ dispatch({
+ type: CHANGE_GUEST,
+ //guests: response.data
+
});
- })
- .catch(function (error) {
- // handle error
- console.log(response);
- console.log(error);
- })
- .then(function () {
- // always executed
- });
+ })
+ .catch(function (error) {
+ // handle error
+ console.log(response);
+ console.log(error);
+ })
+ .then(function () {
+ // always executed
+ });
}
}
-export function getAvailableSessions(token){
+export function getAvailableSessions(token) {
//http://enei2019.uingress.com/internal/api/Attendee/AvailableSessions
axios.defaults.baseURL = 'http://enei2019.uingress.com/internal/api'
-
+
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
-
- return (dispatch)=>{
+
+ return (dispatch) => {
axios.get('/Attendee/AvailableSessions')
- .then(function (response) {
-
- // handle success
- console.log(response);
- dispatch({
- type: GET_SESSIONS,
- sessions: response.data
-
+ .then(function (response) {
+
+ // handle success
+ console.log(response);
+ dispatch({
+ type: GET_SESSIONS,
+ sessions: response.data
+
});
- })
- .catch(function (error) {
- // handle error
- console.log(error);
- })
- .then(function () {
- // always executed
- });
+ })
+ .catch(function (error) {
+ // handle error
+ console.log(error);
+ })
+ .then(function () {
+ // always executed
+ });
}
}
-export function getEvents(user){
+export function getEvents(user) {
- return (dispatch)=>{
+ return (dispatch) => {
- let events = [];
- console.log("chegou aqui")
+ let events = [];
+ console.log("chegou aqui")
- for(let key in user.Sessions){
+ for (let key in user.Sessions) {
- events.push({
- time: moment(user.Sessions[key].SessionStart).format('h:mm'),
- timeEnd: moment(user.Sessions[key].SessionEnd).format('h:mm'),
- //lineColor:'#009688',
- imageUrl: 'https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/Vjkyj2hBg/welcome-white-sign-with-falling-colorful-confetti-animation-on-white-background_sglmmh3qm__F0013.png',
- description:user.Sessions[key].Description,
- name:user.Sessions[key].Name,
- Enrolled:user.Sessions[key].Enrolled,
- MaxAttendees:user.Sessions[key].MaxAttendees
- })
-
- }
+ events.push({
+ time: moment(user.Sessions[key].SessionStart).format('h:mm'),
+ timeEnd: moment(user.Sessions[key].SessionEnd).format('h:mm'),
+ //lineColor:'#009688',
+ imageUrl: 'https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/Vjkyj2hBg/welcome-white-sign-with-falling-colorful-confetti-animation-on-white-background_sglmmh3qm__F0013.png',
+ description: user.Sessions[key].Description,
+ name: user.Sessions[key].Name,
+ Enrolled: user.Sessions[key].Enrolled,
+ MaxAttendees: user.Sessions[key].MaxAttendees
+ })
- dispatch({
- type: GET_EVENTS,
- events: events
+ }
- });
+ dispatch({
+ type: GET_EVENTS,
+ events: events
+
+ });
}
}
const saveToken = async token => {
-
+
try {
- await AsyncStorage.setItem('refreshToken', token.refreshToken).catch(a=>{
-
- })
- await AsyncStorage.setItem('userToken', token.access_token).catch(a=>{
+ await AsyncStorage.setItem('refreshToken', token.refreshToken).catch(a => {
})
- await AsyncStorage.setItem('expirationDateToken', token.expirationDateToken.toString()).catch(a=>{
-
- })
-
+ await AsyncStorage.setItem('userToken', token.access_token).catch(a => {
+
+ })
+ await AsyncStorage.setItem('expirationDateToken', token.expirationDateToken.toString()).catch(a => {
+
+ })
+
} catch (error) {
@@ -193,24 +201,23 @@ const saveToken = async token => {
console.log(error.message);
}
-
- };
-
- const getToken = async () => {
+};
- obj={}
+
+const getToken = async () => {
+
+ obj = {}
try {
obj.access_token = await AsyncStorage.getItem('userToken') || 'none';
obj.expirationDateToken = await AsyncStorage.getItem('expirationDateToken') || 'none';
obj.refreshToken = await AsyncStorage.getItem('refreshToken') || 'none';
-
-
+
} catch (error) {
- // Error retrieving data
- console.log(error.message);
+ // Error retrieving data
+ console.log(error.message);
}
return obj;
}
@@ -219,49 +226,47 @@ const saveToken = async token => {
const deleteToken = async () => {
try {
- await AsyncStorage.removeItem('userToken');
- await AsyncStorage.removeItem('expirationDateToken');
- await AsyncStorage.removeItem('refreshToken');
+ await AsyncStorage.removeItem('userToken');
+ await AsyncStorage.removeItem('expirationDateToken');
+ await AsyncStorage.removeItem('refreshToken');
} catch (error) {
- // Error retrieving data
- console.log(error.message);
+ // Error retrieving data
+ console.log(error.message);
}
- }
+}
-const renewToken=(refresh)=>{
+const renewToken = (refresh) => {
-
-
}
-export function login(user, pass){
+export function login(user, pass) {
- return (dispatch)=>{
+ return (dispatch) => {
- console.log('user: ' +user + ' password: '+pass );
+ console.log('user: ' + user + ' password: ' + pass);
var details = {
'username': user,
'password': pass,
'grant_type': 'password'
};
-
+
var formBody = [];
for (var property in details) {
-
- var encodedKey = encodeURIComponent(property);
-
- var encodedValue = encodeURIComponent(details[property]);
- formBody.push(encodedKey + "=" + encodedValue);
+ var encodedKey = encodeURIComponent(property);
+
+ var encodedValue = encodeURIComponent(details[property]);
+
+ formBody.push(encodedKey + "=" + encodedValue);
}
formBody = formBody.join("&");
-
+
fetch('http://enei2019.uingress.com/internal/api/token', {
method: 'POST',
@@ -270,150 +275,145 @@ export function login(user, pass){
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
-
+
body: formBody
- }).catch(err=>{
+ }).catch(err => {
console.log(err);
-
+
alert("error");
co
dispatch({
- type: API_LOGIN,
- logged:false,
- failedAttempt:true,
- tokenData:'error'
+ type: API_LOGIN,
+ logged: false,
+ failedAttempt: true,
+ tokenData: 'error'
});
+ }).then(res => res.json()).then(parsed => {
- }).then(res=>res.json()).then(parsed=>{
+ if (parsed.error_description == "Provided username and password is incorrect") {
+ dispatch({
+ type: API_LOGIN,
+ logged: false,
+ failedAttempt: true,
+ token: obj,
+ user: {Name: 'Henrique'}
- if(parsed.error_description=="Provided username and password is incorrect"){
+ });
+ }
+ var obj = {
+ access_token: parsed.access_token,
+ expirationDateToken: Math.round(new Date().getTime() / 1000) + 3598,
+ refreshToken: parsed.refresh_token,
+ valid: true
+ };
+
+ var details = {
+ username: user,
+ password: pass
+ }
dispatch({
- type: API_LOGIN,
- logged:false,
- failedAttempt:true,
+ type: API_LOGIN,
+ logged: true,
+ failedAttempt: false,
token: obj,
- user:{Name:'Henrique'}
-
- });
- }
- var obj={
- access_token:parsed.access_token,
- expirationDateToken:Math.round(new Date().getTime()/1000) + 3598,
- refreshToken:parsed.refresh_token,
- valid:true
- };
-
- var details={
- username:user,
- password:pass
- }
- dispatch({
- type: API_LOGIN,
- logged:true,
- failedAttempt:false,
- token:obj,
- user:{Name:'Henrique'},
- userDetails: details
+ user: {Name: 'Henrique'},
+ userDetails: details
- });
-
-
-
- }
-
+ });
+
+
+ }
)
-
+
}
}
-export function hold(){
- return (dispatch)=>{
+
+export function hold() {
+ return (dispatch) => {
dispatch({
- type: HOLD,
- onHold:true
-
+ type: HOLD,
+ onHold: true
+
});
}
}
-
-export function getUserInfo(token){
+export function getUserInfo(token) {
-
- return (dispatch)=>{
+ return (dispatch) => {
- //TODO: verificar validade do token
+ //TODO: verificar validade do token
- console.log('Chamada "getUserInfo"');
-
- var obj = {
+ console.log('Chamada "getUserInfo"');
+
+ var obj = {
method: 'GET',
- headers: {
+ headers: {
- 'Authorization': `Bearer ${token.access_token}`,
- },
- }
+ 'Authorization': `Bearer ${token.access_token}`,
+ },
+ }
+
+ fetch('http://enei2019.uingress.com/internal/api/Attendee/Detail', obj)
+
+ .then(function (res) {
- fetch('http://enei2019.uingress.com/internal/api/Attendee/Detail', obj)
-
- .then(function(res) {
-
console.log(res);
let obj = JSON.parse(res._bodyText);
- dispatch({ type: USER_INFO, user: obj,onHold:false, logged:true });
-
- }).catch(function(res){
+ dispatch({type: USER_INFO, user: obj, onHold: false, logged: true});
+
+ }).catch(function (res) {
+
+ console.log("erro")
+ // dispatch({ type: USER_INFO,onHold:false});
+ })
- console.log("erro")
- // dispatch({ type: USER_INFO,onHold:false});
- })
-
-
}
}
-export function logoutUser(){
- return (dispatch)=>{
-
- deleteToken().then(a=>{
+export function logoutUser() {
+ return (dispatch) => {
+
+ deleteToken().then(a => {
console.log('token apagado');
dispatch({
- type: LOGOUT_USER,
- loggedIn:false,
- tokenData:'error',
- token:false
+ type: LOGOUT_USER,
+ loggedIn: false,
+ tokenData: 'error',
+ token: false
});
- }).catch(err=>{
+ }).catch(err => {
console.log('errors');
-
+
})
-
+
}
}
//
-function refreshToken(){
+function refreshToken() {
+
+ refresh = a.refreshToken
- refresh=a.refreshToken
-
//chamar funçao para renovar
console.log("expirou")
-
+
var details = {
'grant_type': 'refresh_token',
- 'refresh_token':refresh
+ 'refresh_token': refresh
};
@@ -421,11 +421,11 @@ function refreshToken(){
for (var property in details) {
- var encodedKey = encodeURIComponent(property);
+ var encodedKey = encodeURIComponent(property);
- var encodedValue = encodeURIComponent(details[property]);
-
- formBody.push(encodedKey + "=" + encodedValue);
+ var encodedValue = encodeURIComponent(details[property]);
+
+ formBody.push(encodedKey + "=" + encodedValue);
}
@@ -439,74 +439,74 @@ function refreshToken(){
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
-
+
body: formBody
- }).then(res=>res.json()).then(parsed=>{
+ }).then(res => res.json()).then(parsed => {
console.log(parsed);
- if(parsed.error=='invalid_grant'){
+ if (parsed.error == 'invalid_grant') {
console.log(formBody);
- dispatch({type: CHECK_USER, token:'', logged:false, onHold:false});
+ dispatch({type: CHECK_USER, token: '', logged: false, onHold: false});
- }else{
+ } else {
- var obj={
- access_token:parsed.access_token,
- expirationDateToken:Math.round(new Date().getTime()/1000) + 3598,
- refreshToken:parsed.refresh_token,
- valid:true
+ var obj = {
+ access_token: parsed.access_token,
+ expirationDateToken: Math.round(new Date().getTime() / 1000) + 3598,
+ refreshToken: parsed.refresh_token,
+ valid: true
-
- };
-
- // deleteToken();
- saveToken(obj).then(a=>{
- console.log("Token guardado" )
- console.log(obj)
- dispatch({type: CHECK_USER, token:obj, logged:true, onHold:false});
- })
- }
-
-
- }).catch(a=>{
+ };
+
+ // deleteToken();
+ saveToken(obj).then(a => {
+ console.log("Token guardado")
+ console.log(obj)
+ dispatch({type: CHECK_USER, token: obj, logged: true, onHold: false});
+
+ })
+ }
+
+
+ }).catch(a => {
console.log("erro na api")
- dispatch({type: CHECK_USER, token:'', logged:false, onHold:false});
+ dispatch({type: CHECK_USER, token: '', logged: false, onHold: false});
})
}
- refreshLogin= async (user, pass)=>{
+refreshLogin = async (user, pass) => {
+
-
console.log("login")
- console.log('user: ' +user + ' password: '+pass );
+ console.log('user: ' + user + ' password: ' + pass);
var details = {
'username': user,
'password': pass,
'grant_type': 'password'
};
-
+
var formBody = [];
for (var property in details) {
-
- var encodedKey = encodeURIComponent(property);
-
- var encodedValue = encodeURIComponent(details[property]);
- formBody.push(encodedKey + "=" + encodedValue);
+ var encodedKey = encodeURIComponent(property);
+
+ var encodedValue = encodeURIComponent(details[property]);
+
+ formBody.push(encodedKey + "=" + encodedValue);
}
formBody = formBody.join("&");
-
+
fetch('http://enei2019.uingress.com/internal/api/token', {
method: 'POST',
@@ -515,150 +515,148 @@ function refreshToken(){
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
-
+
body: formBody
- }).catch(err=>{
+ }).catch(err => {
console.log(err);
-
+
alert("error");
-
- }).then(res=>res.json()).then(parsed=>{
- if(parsed.error_description=="Provided username and password is incorrect"){
+ }).then(res => res.json()).then(parsed => {
- console.error("cenas da vida")
+ if (parsed.error_description == "Provided username and password is incorrect") {
+
+ console.error("cenas da vida")
+
+ }
+ else {
+
+ console.log(parsed)
+
+ var obj = {
+ access_token: parsed.access_token,
+ expirationDateToken: Math.round(new Date().getTime() / 1000) + 3598,
+ refreshToken: parsed.refresh_token,
+ valid: true
+ };
+
+ go();
+ return obj;
+
+
+ }
}
- else{
-
- console.log(parsed)
-
- var obj={
- access_token:parsed.access_token,
- expirationDateToken:Math.round(new Date().getTime()/1000) + 3598,
- refreshToken:parsed.refresh_token,
- valid:true
- };
-
- go();
- return obj;
-
-
- }
-
- }
-
)
}
-go=(t)=>{
- dispatch({type: CHECK_USER, logged:true, onHold:false, user:{Name:'Henrique'}, token:t});
+go = (t) => {
+ dispatch({type: CHECK_USER, logged: true, onHold: false, user: {Name: 'Henrique'}, token: t});
}
+export function checkUser(userDetails) {
+ var u = userDetails;
+
+ return (dispatch) => {
-export function checkUser(userDetails){
-
- var u= userDetails;
-
- return (dispatch)=>{
-
//verifica se existe utilizador em memória
- if(
- userDetails.username != undefined &&
- userDetails.username != '' &&
- userDetails.password != undefined &&
+ if (
+ userDetails.username != undefined &&
+ userDetails.username != '' &&
+ userDetails.password != undefined &&
userDetails.password != ''
-
- ){
-
+
+ ) {
+
//verifica a validade do token
- if(Math.round(new Date().getTime()/1000) >= userDetails.token.expirationDateToken){
-
-
+ if (Math.round(new Date().getTime() / 1000) >= userDetails.token.expirationDateToken) {
+
+
var details = {
'username': userDetails.username,
'password': userDetails.password,
'grant_type': 'password'
};
-
+
var formBody = [];
-
+
for (var property in details) {
-
- var encodedKey = encodeURIComponent(property);
-
- var encodedValue = encodeURIComponent(details[property]);
-
- formBody.push(encodedKey + "=" + encodedValue);
-
+
+ var encodedKey = encodeURIComponent(property);
+
+ var encodedValue = encodeURIComponent(details[property]);
+
+ formBody.push(encodedKey + "=" + encodedValue);
+
}
-
+
formBody = formBody.join("&");
-
+
fetch('http://enei2019.uingress.com/internal/api/token', {
-
+
method: 'POST',
-
+
headers: {
-
+
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
-
+
body: formBody
-
- }).catch(err=>{
-
+
+ }).catch(err => {
+
console.log(err);
-
+
alert("error");
-
-
- }).then(res=>res.json()).then(parsed=>{
-
- if(parsed.error_description=="Provided username and password is incorrect"){
-
- console.error("cenas da vida")
-
+
+
+ }).then(res => res.json()).then(parsed => {
+
+ if (parsed.error_description == "Provided username and password is incorrect") {
+
+ console.error("cenas da vida")
+
+ }
+ else {
+
+ console.log(parsed)
+
+ var obj = {
+ access_token: parsed.access_token,
+ expirationDateToken: Math.round(new Date().getTime() / 1000) + 3598,
+ refreshToken: parsed.refresh_token,
+ valid: true
+ };
+
+ dispatch({type: CHECK_USER, logged: true, onHold: false, userDetails: u, token: obj});
+
+
+ }
+
}
- else{
-
- console.log(parsed)
-
- var obj={
- access_token:parsed.access_token,
- expirationDateToken:Math.round(new Date().getTime()/1000) + 3598,
- refreshToken:parsed.refresh_token,
- valid:true
- };
-
- dispatch({type: CHECK_USER, logged:true, onHold:false, userDetails:u,token:obj});
-
-
- }
-
- }
)
- }else{
- console.log("Tempo restante token: "+ Math.round((userDetails.token.expirationDateToken-Math.round(new Date().getTime()/1000) )/60) +" Minutos");
-
+ } else {
+ console.log("Tempo restante token: " + Math.round((userDetails.token.expirationDateToken - Math.round(new Date().getTime() / 1000)) / 60) + " Minutos");
+
//dispatch home
- dispatch({type: CHECK_USER, logged:true, onHold:false, user:{Name:'Henrique'},userDetails:u});
+ dispatch({type: CHECK_USER, logged: true, onHold: false, user: {Name: 'Henrique'}, userDetails: u});
}
}
//utilizador não existe em memória
- else{
-
- dispatch({type: CHECK_USER,logged:false, onHold:false,userDetails:u});
+ else {
+
+ dispatch({type: CHECK_USER, logged: false, onHold: false, userDetails: u});
//dispatch menu de login
}
- }}
\ No newline at end of file
+ }
+}
\ No newline at end of file
diff --git a/App/app/store/reducers/api.js b/App/app/store/reducers/api.js
index 5dd9e151..c8ebb28f 100644
--- a/App/app/store/reducers/api.js
+++ b/App/app/store/reducers/api.js
@@ -22,7 +22,7 @@ let apiState= {
changingGuest:false,
sessions:{}
-}
+};
const apiReducer = (state = apiState, action) => {
@@ -98,7 +98,7 @@ const apiReducer = (state = apiState, action) => {
case CHECK_USER:
var u= action.userDetails;
- if(action.token!=undefined)
+ if(action.token != undefined)
u.token= action.token;
state=Object.assign({},state, {logged:action.logged, onHold:action.onHold, userDetails:u });
diff --git a/App/ios/app.xcodeproj/project.pbxproj b/App/ios/app.xcodeproj/project.pbxproj
index 45d672e3..7e95f411 100644
--- a/App/ios/app.xcodeproj/project.pbxproj
+++ b/App/ios/app.xcodeproj/project.pbxproj
@@ -60,6 +60,7 @@
BE5EAC41221B889900E92E5B /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE5EAC40221B888C00E92E5B /* libReactNativePermissions.a */; };
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F42241E0235464C91B24049 /* libRNDeviceInfo.a */; };
E677346A94D54E90817979B0 /* libRNDeviceInfo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */; };
+ A52E07192CD249F7B10FDA66 /* libAirMaps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C0906CC582484A7393F9B1F6 /* libAirMaps.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -440,6 +441,8 @@
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; name = "RNDeviceInfo.xcodeproj"; path = "../node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo.a"; path = "libRNDeviceInfo.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo-tvOS.a"; path = "libRNDeviceInfo-tvOS.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
+ A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */ = {isa = PBXFileReference; name = "AirMaps.xcodeproj"; path = "../node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
+ C0906CC582484A7393F9B1F6 /* libAirMaps.a */ = {isa = PBXFileReference; name = "libAirMaps.a"; path = "libAirMaps.a"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -473,6 +476,7 @@
BE104176D74E47E9A369B15A /* libRNVectorIcons.a in Frameworks */,
69E1B84AE0DF486CB1B1D226 /* libBVLinearGradient.a in Frameworks */,
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */,
+ A52E07192CD249F7B10FDA66 /* libAirMaps.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -667,6 +671,7 @@
664970B9D10A41A18B44727F /* RNVectorIcons.xcodeproj */,
1908F5E093844AC5A143E888 /* BVLinearGradient.xcodeproj */,
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */,
+ A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */,
);
name = Libraries;
sourceTree = "";
@@ -1450,6 +1455,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = appTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@@ -1461,6 +1467,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@@ -1482,6 +1489,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = appTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@@ -1493,6 +1501,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@@ -1516,6 +1525,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = app/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -1541,6 +1551,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = app/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -1572,6 +1583,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = "app-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -1582,6 +1594,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@@ -1612,6 +1625,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = "app-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -1622,6 +1636,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@@ -1651,6 +1666,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = "app-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -1661,6 +1677,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@@ -1690,6 +1707,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
+ "$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
);
INFOPLIST_FILE = "app-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -1700,6 +1718,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
diff --git a/App/package-lock.json b/App/package-lock.json
index 32913975..45c0891a 100755
--- a/App/package-lock.json
+++ b/App/package-lock.json
@@ -3059,6 +3059,10 @@
"ansi-styles": "^3.2.0"
}
},
+ "react-native-maps": {
+ "version": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
+ "from": "github:expo/react-native-maps#v0.22.1-exp.0"
+ },
"react-native-screens": {
"version": "1.0.0-alpha.22",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz",
@@ -7957,8 +7961,9 @@
}
},
"react-native-maps": {
- "version": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
- "from": "github:expo/react-native-maps#v0.22.1-exp.0"
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/react-native-maps/-/react-native-maps-0.23.0.tgz",
+ "integrity": "sha512-qxOIQGsDtQXQlSJdXMW1wg8pvLaVYdbiIolB7tZTTgTGgIA/hDxXwZbQZ08c4KDD6/VTk8krfd1APaHkqvh6og=="
},
"react-native-material-buttons": {
"version": "0.5.0",
diff --git a/App/package.json b/App/package.json
index 19db1eee..889caa03 100755
--- a/App/package.json
+++ b/App/package.json
@@ -30,6 +30,7 @@
"react-native-linear-gradient": "^2.5.3",
"react-native-loader": "^1.2.1",
"react-native-loading-spinner-overlay": "^1.0.1",
+ "react-native-maps": "^0.23.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-material-shadows": "0.0.2",
"react-native-modal": "^7.0.2",