Calendário Detail Layout
This commit is contained in:
parent
c8389af216
commit
64813d3b17
|
@ -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')
|
||||
|
|
|
@ -1,27 +1,30 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.app">
|
||||
package="com.app">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="false"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
||||
android:name=".MainApplication"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="false"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<meta-data
|
||||
android:name="com.google.android.geo.API_KEY"
|
||||
android:value="AIzaSyAwM2Q3T62uh6BPDXcFPqdjXy8F7SI0WH4"/>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
|
@ -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<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(),
|
||||
new MapsPackage(),
|
||||
new RNDeviceInfo(),
|
||||
new RNMaterialShadowsPackage(),
|
||||
new LinearGradientPackage(),
|
||||
|
|
|
@ -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'
|
||||
|
|
404
App/app/App.js
404
App/app/App.js
|
@ -40,38 +40,38 @@ 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");
|
||||
}
|
||||
console.log("asdasd");
|
||||
}
|
||||
|
||||
class App extends Component {
|
||||
handleConnectivityChange = isConnected => {
|
||||
this.setState({ isConnected });
|
||||
}
|
||||
_activate=()=>{
|
||||
handleConnectivityChange = isConnected => {
|
||||
this.setState({isConnected});
|
||||
}
|
||||
_activate = () => {
|
||||
|
||||
this.setState({ isModalVisible: !this.state.isModalVisible});
|
||||
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) {
|
||||
|
||||
|
@ -84,31 +84,34 @@ 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=()=>{
|
||||
|
||||
_print = () => {
|
||||
console.log("hello")
|
||||
this.setState({push:0})
|
||||
}
|
||||
checkValue=(e)=>{
|
||||
console.log("check"+e)
|
||||
}
|
||||
this.setState({push: 0})
|
||||
};
|
||||
|
||||
checkValue = (e) => {
|
||||
console.log("check" + e)
|
||||
};
|
||||
|
||||
_handleConnectionChange = (isConnected) => {
|
||||
this.props.connectionState(true);
|
||||
};
|
||||
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
|
||||
|
@ -118,43 +121,44 @@ class App extends Component {
|
|||
|
||||
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange);
|
||||
}
|
||||
NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange);
|
||||
}
|
||||
|
||||
_keyboardDidShow () {
|
||||
_keyboardDidShow() {
|
||||
//alert('Keyboard Shown');
|
||||
// this.setState({push:0})
|
||||
// this.setState({push:0})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
_keyboardDidHide () {
|
||||
_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 (
|
||||
<View>
|
||||
<Text>cenas da vida</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (!this.props.logged && this.props.onHold) {
|
||||
if (!this.state.isConnected) {
|
||||
return (
|
||||
<View>
|
||||
<Text>cenas da vida</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (!this.props.logged && this.props.onHold) {
|
||||
|
||||
|
||||
return (
|
||||
|
@ -165,14 +169,13 @@ class App extends Component {
|
|||
)
|
||||
|
||||
}
|
||||
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 (
|
||||
|
||||
|
@ -182,113 +185,108 @@ class App extends Component {
|
|||
return (
|
||||
|
||||
|
||||
<View style={styles.slide2}>
|
||||
<Modal isVisible={this.props.UI_loginScannerActive}>
|
||||
<View style={{flex: 1, backgroundColor: 'white'}}>
|
||||
<Button onPress={this.props.closeLoginQRScan} title={"Fechar scanner"}> </Button>
|
||||
|
||||
<View style={styles.slide2}>
|
||||
<Modal isVisible={this.props.UI_loginScannerActive}>
|
||||
<View style={{ flex: 1 , backgroundColor:'white'}}>
|
||||
<Button onPress={this.props.closeLoginQRScan} title={"Fechar scanner"}> </Button>
|
||||
<QRCodeScanner
|
||||
cameraProps={{captureAudio: false}}
|
||||
onRead={this.onSuccess}
|
||||
cameraStyle={styles.cameraContainer}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<QRCodeScanner
|
||||
onRead={this.onSuccess}
|
||||
cameraStyle={ styles.cameraContainer}
|
||||
</Modal>
|
||||
<View style={{
|
||||
width: '100%',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/>
|
||||
</View>
|
||||
|
||||
</Modal>
|
||||
<View style={{ width:'100%',
|
||||
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',}}>
|
||||
<Image style={styles.logo2} source={require('./assets/img/logo2.png')}/>
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}}>
|
||||
<Image style={styles.logo2} source={require('./assets/img/logo2.png')}/>
|
||||
|
||||
</View>
|
||||
<View styles={styles.loginContainer}>
|
||||
<View styles={styles.loginContainer}>
|
||||
|
||||
|
||||
<View style={styles.inputSection}>
|
||||
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
placeholder={this.state.username}
|
||||
onChangeText={(searchString) => {
|
||||
this.setState({searchString})
|
||||
}}
|
||||
maxLength={15}
|
||||
underlineColorAndroid="transparent"
|
||||
/>
|
||||
<TouchableOpacity onPress={this._scanQr}>
|
||||
|
||||
<View style={styles.inputSection}>
|
||||
<View style={styles.scanQR}>
|
||||
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
placeholder={this.state.username}
|
||||
onChangeText={(searchString) => {this.setState({searchString})}}
|
||||
maxLength={15}
|
||||
underlineColorAndroid="transparent"
|
||||
/>
|
||||
<TouchableOpacity onPress={this._scanQr}>
|
||||
<Icon style={styles.searchIcon} name="ios-qr-scanner" size={30} color="#000"/>
|
||||
<Text>Scan QR</Text>
|
||||
|
||||
<View style={styles.scanQR}>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
||||
<Icon style={styles.searchIcon} name="ios-qr-scanner" size={30} color="#000"/>
|
||||
<Text>Scan QR</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
<TextInput style={styles.passwordInput}
|
||||
onFocus={this._print}
|
||||
maxLength={10}
|
||||
blurOnSubmit={true}
|
||||
secureTextEntry={true}
|
||||
|
||||
</View>
|
||||
onChangeText={(text) => this.setState({text})}
|
||||
clearButtonMode='always'
|
||||
value={this.state.text}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder='Password'/>
|
||||
|
||||
<TextInput style={styles.passwordInput}
|
||||
onFocus={this._print}
|
||||
maxLength={10}
|
||||
blurOnSubmit ={true}
|
||||
secureTextEntry={true}
|
||||
|
||||
onChangeText={(text) => this.setState({text})}
|
||||
clearButtonMode='always'
|
||||
value={this.state.text}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder='Password' />
|
||||
|
||||
<RkButton rkType='dark' style={styles.loginBtn} onPress={this._tryLogin}>Entrar</RkButton>
|
||||
<RkButton rkType='dark' style={styles.loginBtn} onPress={this._tryLogin}>Entrar</RkButton>
|
||||
|
||||
</View>
|
||||
|
||||
<View style={ styles.buttons }>
|
||||
<TouchableOpacity
|
||||
style={styles.button}>
|
||||
<View style={styles.buttons}>
|
||||
<TouchableOpacity
|
||||
style={styles.button}>
|
||||
|
||||
<Icon name="logo-facebook" size={40}/>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
style={styles.button}>
|
||||
<Icon name="logo-facebook" size={40}/>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
style={styles.button}>
|
||||
|
||||
<Icon name="logo-instagram" size={40}/>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
style={styles.button}>
|
||||
<Icon name="logo-instagram" size={40}/>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
style={styles.button}>
|
||||
|
||||
<Icon name="md-heart" size={40}/>
|
||||
<Icon name="md-heart" size={40}/>
|
||||
|
||||
</TouchableOpacity>
|
||||
</TouchableOpacity>
|
||||
|
||||
</View>
|
||||
<View style={styles.footer}>
|
||||
<View style={styles.textRow}>
|
||||
</View>
|
||||
<View style={styles.footer}>
|
||||
<View style={styles.textRow}>
|
||||
|
||||
<RkText rkType='primary3'>Não sabes a password?</RkText>
|
||||
<RkButton rkType='clear' onPress={this.onSignUpButtonPressed}>
|
||||
<RkText rkType='primary3'>Não sabes a password?</RkText>
|
||||
<RkButton rkType='clear' onPress={this.onSignUpButtonPressed}>
|
||||
|
||||
<TouchableOpacity>
|
||||
<RkText style={{color:'red'}} kType='header6'>Recuperar Password</RkText>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity>
|
||||
<RkText style={{color: 'red'}} kType='header6'>Recuperar Password</RkText>
|
||||
</TouchableOpacity>
|
||||
|
||||
</RkButton>
|
||||
</RkButton>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
|
||||
);
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -310,46 +308,46 @@ 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,
|
||||
paddingLeft: SCREEN_WIDTH * 0.05,
|
||||
|
||||
},
|
||||
scanQRText:{
|
||||
scanQRText: {
|
||||
|
||||
paddingTop:50
|
||||
// paddingTop:20,
|
||||
paddingTop: 50
|
||||
// paddingTop:20,
|
||||
|
||||
|
||||
},
|
||||
scanQR:{
|
||||
scanQR: {
|
||||
|
||||
//flexDirection: 'row',
|
||||
paddingTop:5,
|
||||
backgroundColor:10,
|
||||
paddingTop: 5,
|
||||
backgroundColor: 10,
|
||||
|
||||
width:80,
|
||||
paddingLeft:10,
|
||||
backgroundColor:'#f24b4b',
|
||||
borderBottomRightRadius:90,
|
||||
borderTopRightRadius:90,
|
||||
height:'100%',
|
||||
width: 80,
|
||||
paddingLeft: 10,
|
||||
backgroundColor: '#f24b4b',
|
||||
borderBottomRightRadius: 90,
|
||||
borderTopRightRadius: 90,
|
||||
height: '100%',
|
||||
|
||||
},
|
||||
inputSection: {
|
||||
|
@ -360,111 +358,109 @@ const styles = {
|
|||
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:{
|
||||
logoContainer: {
|
||||
|
||||
width:'100%',
|
||||
width: '100%',
|
||||
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
marginTop:200
|
||||
marginTop: 200
|
||||
|
||||
},
|
||||
|
||||
logo2:{
|
||||
logo2: {
|
||||
|
||||
// flex: 1,
|
||||
// resizeMode: 'contain',
|
||||
// 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,18 +516,18 @@ 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) => {
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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: <HeaderBackButton onPress={() => navigation.goBack(null)}/>,
|
||||
headerStyle: {backgroundColor: 'transparent', zIndex: 100 },
|
||||
|
||||
});
|
||||
|
||||
const AppStack = createBottomTabNavigator(
|
||||
{
|
||||
Calendário: {
|
||||
|
@ -56,7 +64,7 @@ const AppStack = createBottomTabNavigator(
|
|||
|
||||
tabBarIcon: ({tintColor}) => (
|
||||
|
||||
<Image style={{width:30, height:30}}source={require('./assets/img/logo2.png')}></Image>
|
||||
<Image style={{width: 30, height: 30}} source={require('./assets/img/logo2.png')}></Image>
|
||||
)
|
||||
},
|
||||
},
|
||||
|
@ -72,7 +80,7 @@ const AppStack = createBottomTabNavigator(
|
|||
},
|
||||
|
||||
|
||||
Eventos: {
|
||||
Eventos: {
|
||||
screen: Eventos,
|
||||
|
||||
navigationOptions: {
|
||||
|
@ -94,7 +102,6 @@ const AppStack = createBottomTabNavigator(
|
|||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
initialRouteName: 'Home',
|
||||
|
@ -120,7 +127,8 @@ const Stack = createStackNavigator({
|
|||
return {
|
||||
headerTitle: `${navigation.state.routes[index].routeName}`,
|
||||
headerRight: (
|
||||
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('Profile')}>
|
||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('Profile')}>
|
||||
|
||||
<Text>editar</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
|
@ -129,38 +137,42 @@ const Stack = createStackNavigator({
|
|||
)
|
||||
}
|
||||
}
|
||||
else if(navigation.state.routes[index].routeName == 'Calendário'){
|
||||
else if (navigation.state.routes[index].routeName == 'Calendário') {
|
||||
return {
|
||||
headerTitle: 'Calendário',
|
||||
headerRight: (
|
||||
<View style={{flex:1, flexDirection:'row'}}>
|
||||
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('Edit')}>
|
||||
<Text>FAQ</Text>
|
||||
<View style={{flex: 1, flexDirection: 'row'}}>
|
||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('Edit')}>
|
||||
<Text>FAQ</Text>
|
||||
|
||||
</TouchableOpacity>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('choosePath')}>
|
||||
<Text>Escolher</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
</TouchableOpacity></View>
|
||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('choosePath')}>
|
||||
<Text>Escolher</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
</TouchableOpacity></View>
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
else if(navigation.state.routes[index].routeName == 'choosePath'){
|
||||
else if (navigation.state.routes[index].routeName == 'choosePath') {
|
||||
return {
|
||||
headerTitle: 'Calendário',
|
||||
headerRight: (
|
||||
<View style={{flex:1, flexDirection:'row'}}>
|
||||
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('Edit')}>
|
||||
<Text>FAQ</Text>
|
||||
<View style={{flex: 1, flexDirection: 'row'}}>
|
||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('Edit')}>
|
||||
<Text>FAQ</Text>
|
||||
|
||||
</TouchableOpacity>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('choosePath')}>
|
||||
<Text>Escolher</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
</TouchableOpacity></View>
|
||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('choosePath')}>
|
||||
<Text>Escolher</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
</TouchableOpacity></View>
|
||||
|
||||
)
|
||||
}
|
||||
|
@ -175,17 +187,15 @@ const Stack = createStackNavigator({
|
|||
Profile: {
|
||||
screen: Profile
|
||||
},
|
||||
Edit:{
|
||||
Edit: {
|
||||
screen: editCalendar
|
||||
},
|
||||
choosePath:{
|
||||
choosePath: {
|
||||
screen: choosePath
|
||||
},
|
||||
calendarDetail:{
|
||||
screen:calendarDetail
|
||||
}
|
||||
|
||||
|
||||
calendarDetail: {
|
||||
screen: calendarDetail,
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -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 (
|
||||
<View>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.leftRow}>
|
||||
<Icon
|
||||
size={24}
|
||||
name="arrow-back"
|
||||
type="material-icon"
|
||||
onPress={() => navigation.goBack(null)}
|
||||
color= '#000'
|
||||
iconStyle={styles.icon}
|
||||
underlayColor="transparent"
|
||||
underlineColorAndroid="transparent"
|
||||
containerStyle={styles.iconContainer}
|
||||
hitSlop={{ top: 15, bottom: 15, left: 15, right: 15 }}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.centerRow}>
|
||||
<Text style={styles.titleText} numberOfLines={1}>
|
||||
{title}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.rightRow}>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Nav
|
|
@ -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 {
|
|||
|
||||
</ScrollView>
|
||||
|
||||
)
|
||||
);
|
||||
const SecondRoute = () => (
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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() {
|
||||
render() {
|
||||
|
||||
{
|
||||
|
||||
return (
|
||||
|
||||
<View style={{flex: 1}}>
|
||||
|
||||
{ this.state.isRender &&
|
||||
|
||||
<QRCodeScanner
|
||||
/*Screen SCAN*/
|
||||
const scanScreen = () => (
|
||||
<QRCodeScanner
|
||||
showMarker
|
||||
ref={(node) => { 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={
|
||||
|
||||
<View style={{ flex: 1 }}>
|
||||
|
||||
<Modal isVisible={this.state.isModalVisible} style={{backgroundColor:'#E8E8E8', borderRadius:30, height:100}}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Text></Text>
|
||||
<Text> Qr code data: {this.state.code}</Text>
|
||||
<Button onPress={this._activate} title="Close" color="#841584" accessibilityLabel="Learn more about this purple button"/>
|
||||
|
||||
</View>
|
||||
</Modal>
|
||||
</View>
|
||||
<View style={{flex: 1}}>
|
||||
<Modal isVisible={this.state.isModalVisible}
|
||||
style={{backgroundColor: '#E8E8E8', borderRadius: 30, height: 100}}>
|
||||
<View style={{flex: 1}}>
|
||||
<Text></Text>
|
||||
<Text> Qr code data: {this.state.code}</Text>
|
||||
<Button onPress={this._activate} title="Close" color="#841584"
|
||||
accessibilityLabel="Learn more about this purple button"/>
|
||||
</View>
|
||||
</Modal>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
|
||||
const historyScreen = () => (
|
||||
<View style={{backgroundColor: '#ff4081'}}>
|
||||
</View>
|
||||
);
|
||||
|
||||
const favScreen = () => (
|
||||
<View style={{backgroundColor: '#a95'}}>
|
||||
</View>
|
||||
|
||||
);
|
||||
|
||||
|
||||
_renderLazyPlaceholder = () => {
|
||||
return (
|
||||
<ActivityIndicator size="large" color="red" />
|
||||
);
|
||||
};
|
||||
|
||||
{
|
||||
|
||||
return (
|
||||
|
||||
<View style={{flex: 1}}>
|
||||
|
||||
{this.state.isRender &&
|
||||
<TabView
|
||||
lazy
|
||||
navigationState={this.state}
|
||||
renderScene={SceneMap({
|
||||
scan: scanScreen,
|
||||
history: historyScreen,
|
||||
fav: favScreen,
|
||||
})}
|
||||
renderLazyPlaceholder={this._renderLazyPlaceholder}
|
||||
onIndexChange={(index) => this.setState({index})}
|
||||
initialLayout={{width: SCREEN_WIDTH, height: SCREEN_HEIGHT}}
|
||||
renderIcon={({route}) => (
|
||||
<IconMI
|
||||
name={route.icon}
|
||||
size={15}
|
||||
color={'white'}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<TouchableOpacity onPress={this._toggleModal}>
|
||||
<Text>Show Modal</Text>
|
||||
</TouchableOpacity>
|
||||
<Modal isVisible={this.state.isModalVisible}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Text>Hello!</Text>
|
||||
<TouchableOpacity onPress={this._toggleModal}>
|
||||
<Text>Hide me!</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</Modal>
|
||||
<View style={{flex: 1}}>
|
||||
<TouchableOpacity onPress={this._toggleModal}>
|
||||
<Text>Show Modal</Text>
|
||||
</TouchableOpacity>
|
||||
<Modal isVisible={this.state.isModalVisible}>
|
||||
<View style={{flex: 1}}>
|
||||
<Text>Hello!</Text>
|
||||
<TouchableOpacity onPress={this._toggleModal}>
|
||||
<Text>Hide me!</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</Modal>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
RkTheme.setType('RkButton', 'dark', {
|
||||
container: {
|
||||
paddingTop:10,
|
||||
backgroundColor: 'gray',
|
||||
paddingTop: 10,
|
||||
backgroundColor: 'gray',
|
||||
|
||||
borderRadius: 90,
|
||||
borderRadius: 90,
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a 393 device width
|
||||
|
@ -124,21 +177,17 @@ 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: {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
state = {
|
||||
static navigationOptions = ({navigation}) => ({
|
||||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
title={navigation.state.params.info.name}
|
||||
/>
|
||||
),
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
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,90 +79,313 @@ 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 (
|
||||
<View style={styles.headerContainer}>
|
||||
<View style={styles.coverContainer}>
|
||||
<ImageBackground
|
||||
source={{
|
||||
uri: info.imageUrl,
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
>
|
||||
</ImageBackground>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
};
|
||||
|
||||
renderDescription = (info) => {
|
||||
return (
|
||||
<View>
|
||||
<Text>{info.name}, {info.description}</Text>
|
||||
<View style={styles.infoRow}>
|
||||
<View style={{flexDirection: "row"}}>
|
||||
<Text style={styles.ramoText}>Onde está o ramo? xD </Text>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{color: "#CC1A17", fontSize: 20,}}>
|
||||
{info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.details}>
|
||||
<Text style={styles.nameAttendee}>Attendee Name</Text>
|
||||
<Progress.Bar color={'#000000'} progress={info.Enrolled / info.MaxAttendees} height={10}
|
||||
unfilledColor={'white'} width={210}/>
|
||||
<Text style={{alignSelf: "center"}}>{info.Enrolled} / {info.MaxAttendees}</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.infoRow}>
|
||||
<Text style={{fontSize: 30, color: "#CC1A17"}}>Descrição</Text>
|
||||
<Divider style={{backgroundColor: '#000'}}/>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text style={{fontSize: 15}}>
|
||||
{info.description}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
renderMap = () => {
|
||||
return (
|
||||
<MapView
|
||||
provider={PROVIDER_GOOGLE}
|
||||
style={{flex: 2}}
|
||||
region={{
|
||||
latitude: 40.19092111672049,
|
||||
latitudeDelta: 0.007664297080957283,
|
||||
longitude: -8.410662319511175,
|
||||
longitudeDelta: 0.007551424205303192
|
||||
}}
|
||||
onRegionChangeComplete={(region) => {
|
||||
|
||||
console.log(region);
|
||||
|
||||
}}
|
||||
|
||||
/>
|
||||
)
|
||||
};
|
||||
|
||||
renderAttendee = () => {
|
||||
return (
|
||||
<View style={{backgroundColor: '#fff', height: SCREEN_HEIGHT * 0.1}}>
|
||||
<View style={styles.AttendeeContainer}>
|
||||
<View style={styles.leftRow}>
|
||||
<Avatar
|
||||
rounded
|
||||
size="medium"
|
||||
source={{
|
||||
uri: "https://cdn3.iconfinder.com/data/icons/vector-icons-6/96/256-512.png",
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.centerRow}>
|
||||
<Text style={styles.titleText} numberOfLines={1}>
|
||||
Nome do gajo
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.rightRow}>
|
||||
<Icon
|
||||
size={24}
|
||||
name="visibility"
|
||||
type="material-icon"
|
||||
onPress={() => navigation.goBack(null)}
|
||||
color='#000'
|
||||
iconStyle={styles.icon}
|
||||
underlayColor="transparent"
|
||||
underlineColorAndroid="transparent"
|
||||
containerStyle={styles.iconContainer}
|
||||
hitSlop={{top: 15, bottom: 15, left: 15, right: 15}}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const {navigation} = this.props;
|
||||
const info = navigation.getParam('info', 'error');
|
||||
console.log(info);
|
||||
|
||||
return (
|
||||
|
||||
<View style={styles.mainViewStyle}>
|
||||
<ScrollView style={styles.scroll}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.cardContainer}>
|
||||
{this.renderHeader(info)}
|
||||
</View>
|
||||
{this.renderDescription(info)}
|
||||
</View>
|
||||
<View style={styles.infoRow}>
|
||||
<Text style={{fontSize: 30, color: "#CC1A17"}}>Localização</Text>
|
||||
<Divider style={{backgroundColor: '#000', marginBottom: 10}}/>
|
||||
{this.renderMap()}
|
||||
</View>
|
||||
</ScrollView>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
{this.renderAttendee()}
|
||||
</View>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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,
|
||||
companyTitle: {
|
||||
paddingBottom: 5,
|
||||
fontWeight: 'bold',
|
||||
color: '#777777',
|
||||
fontSize: 17,
|
||||
|
||||
// padding:20
|
||||
// padding:20
|
||||
},
|
||||
companyLogo: {
|
||||
|
||||
borderRadius: 20,
|
||||
|
||||
},
|
||||
|
||||
wrapper: {
|
||||
|
||||
},
|
||||
company:{
|
||||
flex:1,
|
||||
flexDirection:'row',
|
||||
// backgroundColor:'red',
|
||||
color:'black'
|
||||
wrapper: {},
|
||||
company: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
// backgroundColor:'red',
|
||||
color: 'black'
|
||||
},
|
||||
|
||||
companyLogoContainer:{
|
||||
flex:1,
|
||||
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',
|
||||
}
|
||||
|
@ -162,7 +394,6 @@ const styles = StyleSheet.create({
|
|||
});
|
||||
|
||||
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
|
||||
return {
|
||||
|
|
|
@ -1,22 +1,34 @@
|
|||
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,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,48 +36,44 @@ export const waitChangeGuest= ()=>{
|
|||
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}`};
|
||||
|
||||
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
|
||||
|
||||
return (dispatch)=>{
|
||||
return (dispatch) => {
|
||||
|
||||
axios.get('/Attendee/AvailableGuestlists')
|
||||
.then(function (response) {
|
||||
.then(function (response) {
|
||||
|
||||
// handle success
|
||||
console.log(response);
|
||||
dispatch({
|
||||
type: GET_CAREERS,
|
||||
guests: response.data
|
||||
// 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,98 +84,98 @@ 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)=>{
|
||||
return (dispatch) => {
|
||||
|
||||
var full= `/Attendee/ChangeGuestlist/${guestID}`
|
||||
console.log(full)
|
||||
let full = `/Attendee/ChangeGuestlist/${guestID}`;
|
||||
console.log(full);
|
||||
axios.get(full)
|
||||
.then(function (response) {
|
||||
.then(function (response) {
|
||||
|
||||
// handle success
|
||||
console.log(response);
|
||||
dispatch({
|
||||
type: CHANGE_GUEST,
|
||||
//guests: response.data
|
||||
// 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) {
|
||||
.then(function (response) {
|
||||
|
||||
// handle success
|
||||
console.log(response);
|
||||
dispatch({
|
||||
type: GET_SESSIONS,
|
||||
sessions: response.data
|
||||
// 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
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -176,13 +184,13 @@ const saveToken = async token => {
|
|||
|
||||
|
||||
try {
|
||||
await AsyncStorage.setItem('refreshToken', token.refreshToken).catch(a=>{
|
||||
await AsyncStorage.setItem('refreshToken', token.refreshToken).catch(a => {
|
||||
|
||||
})
|
||||
await AsyncStorage.setItem('userToken', token.access_token).catch(a=>{
|
||||
await AsyncStorage.setItem('userToken', token.access_token).catch(a => {
|
||||
|
||||
})
|
||||
await AsyncStorage.setItem('expirationDateToken', token.expirationDateToken.toString()).catch(a=>{
|
||||
await AsyncStorage.setItem('expirationDateToken', token.expirationDateToken.toString()).catch(a => {
|
||||
|
||||
})
|
||||
|
||||
|
@ -194,12 +202,12 @@ const saveToken = async token => {
|
|||
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
const getToken = async () => {
|
||||
const getToken = async () => {
|
||||
|
||||
obj={}
|
||||
obj = {}
|
||||
try {
|
||||
|
||||
obj.access_token = await AsyncStorage.getItem('userToken') || 'none';
|
||||
|
@ -207,10 +215,9 @@ const saveToken = async token => {
|
|||
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,28 +226,26 @@ 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,
|
||||
|
@ -252,11 +257,11 @@ export function login(user, pass){
|
|||
|
||||
for (var property in details) {
|
||||
|
||||
var encodedKey = encodeURIComponent(property);
|
||||
var encodedKey = encodeURIComponent(property);
|
||||
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
|
||||
}
|
||||
|
||||
|
@ -273,7 +278,7 @@ export function login(user, pass){
|
|||
|
||||
body: formBody
|
||||
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
|
||||
console.log(err);
|
||||
|
||||
|
@ -281,119 +286,114 @@ export function login(user, pass){
|
|||
co
|
||||
dispatch({
|
||||
type: API_LOGIN,
|
||||
logged:false,
|
||||
failedAttempt:true,
|
||||
tokenData:'error'
|
||||
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,
|
||||
logged: true,
|
||||
failedAttempt: false,
|
||||
token: obj,
|
||||
user:{Name:'Henrique'}
|
||||
user: {Name: 'Henrique'},
|
||||
userDetails: details
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
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
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
export function hold(){
|
||||
return (dispatch)=>{
|
||||
|
||||
export function hold() {
|
||||
return (dispatch) => {
|
||||
dispatch({
|
||||
type: HOLD,
|
||||
onHold:true
|
||||
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"');
|
||||
|
||||
console.log('Chamada "getUserInfo"');
|
||||
|
||||
var obj = {
|
||||
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)
|
||||
fetch('http://enei2019.uingress.com/internal/api/Attendee/Detail', obj)
|
||||
|
||||
.then(function(res) {
|
||||
.then(function (res) {
|
||||
|
||||
console.log(res);
|
||||
let obj = JSON.parse(res._bodyText);
|
||||
|
||||
dispatch({ type: USER_INFO, user: obj,onHold:false, logged:true });
|
||||
dispatch({type: USER_INFO, user: obj, onHold: false, logged: true});
|
||||
|
||||
}).catch(function(res){
|
||||
|
||||
console.log("erro")
|
||||
// dispatch({ type: USER_INFO,onHold:false});
|
||||
})
|
||||
}).catch(function (res) {
|
||||
|
||||
console.log("erro")
|
||||
// dispatch({ type: USER_INFO,onHold:false});
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export function logoutUser(){
|
||||
return (dispatch)=>{
|
||||
export function logoutUser() {
|
||||
return (dispatch) => {
|
||||
|
||||
deleteToken().then(a=>{
|
||||
deleteToken().then(a => {
|
||||
|
||||
console.log('token apagado');
|
||||
dispatch({
|
||||
type: LOGOUT_USER,
|
||||
loggedIn:false,
|
||||
tokenData:'error',
|
||||
token:false
|
||||
loggedIn: false,
|
||||
tokenData: 'error',
|
||||
token: false
|
||||
});
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
|
||||
console.log('errors');
|
||||
|
||||
|
@ -403,9 +403,9 @@ export function logoutUser(){
|
|||
}
|
||||
|
||||
//
|
||||
function refreshToken(){
|
||||
function refreshToken() {
|
||||
|
||||
refresh=a.refreshToken
|
||||
refresh = a.refreshToken
|
||||
|
||||
//chamar funçao para renovar
|
||||
console.log("expirou")
|
||||
|
@ -413,7 +413,7 @@ function refreshToken(){
|
|||
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]);
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
|
||||
}
|
||||
|
||||
|
@ -442,50 +442,50 @@ function refreshToken(){
|
|||
|
||||
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});
|
||||
// deleteToken();
|
||||
saveToken(obj).then(a => {
|
||||
console.log("Token guardado")
|
||||
console.log(obj)
|
||||
dispatch({type: CHECK_USER, token: obj, logged: true, onHold: false});
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}).catch(a=>{
|
||||
}).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,
|
||||
|
@ -497,11 +497,11 @@ function refreshToken(){
|
|||
|
||||
for (var property in details) {
|
||||
|
||||
var encodedKey = encodeURIComponent(property);
|
||||
var encodedKey = encodeURIComponent(property);
|
||||
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
|
||||
}
|
||||
|
||||
|
@ -518,68 +518,65 @@ function refreshToken(){
|
|||
|
||||
body: formBody
|
||||
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
|
||||
console.log(err);
|
||||
|
||||
alert("error");
|
||||
|
||||
|
||||
}).then(res=>res.json()).then(parsed=>{
|
||||
}).then(res => res.json()).then(parsed => {
|
||||
|
||||
if(parsed.error_description=="Provided username and password is incorrect"){
|
||||
if (parsed.error_description == "Provided username and password is incorrect") {
|
||||
|
||||
console.error("cenas da vida")
|
||||
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;
|
||||
|
||||
export function checkUser(userDetails){
|
||||
|
||||
var u= userDetails;
|
||||
|
||||
return (dispatch)=>{
|
||||
return (dispatch) => {
|
||||
|
||||
//verifica se existe utilizador em memória
|
||||
if(
|
||||
if (
|
||||
userDetails.username != undefined &&
|
||||
userDetails.username != '' &&
|
||||
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 = {
|
||||
|
@ -592,11 +589,11 @@ export function checkUser(userDetails){
|
|||
|
||||
for (var property in details) {
|
||||
|
||||
var encodedKey = encodeURIComponent(property);
|
||||
var encodedKey = encodeURIComponent(property);
|
||||
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
|
||||
}
|
||||
|
||||
|
@ -613,52 +610,53 @@ export function checkUser(userDetails){
|
|||
|
||||
body: formBody
|
||||
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
|
||||
console.log(err);
|
||||
|
||||
alert("error");
|
||||
|
||||
|
||||
}).then(res=>res.json()).then(parsed=>{
|
||||
}).then(res => res.json()).then(parsed => {
|
||||
|
||||
if(parsed.error_description=="Provided username and password is incorrect"){
|
||||
if (parsed.error_description == "Provided username and password is incorrect") {
|
||||
|
||||
console.error("cenas da vida")
|
||||
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{
|
||||
else {
|
||||
|
||||
dispatch({type: CHECK_USER,logged:false, onHold:false,userDetails:u});
|
||||
dispatch({type: CHECK_USER, logged: false, onHold: false, userDetails: u});
|
||||
//dispatch menu de login
|
||||
}
|
||||
}}
|
||||
}
|
||||
}
|
|
@ -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 });
|
||||
|
|
|
@ -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 = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo.a"; path = "libRNDeviceInfo.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo-tvOS.a"; path = "libRNDeviceInfo-tvOS.a"; sourceTree = "<group>"; 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 = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
C0906CC582484A7393F9B1F6 /* libAirMaps.a */ = {isa = PBXFileReference; name = "libAirMaps.a"; path = "libAirMaps.a"; sourceTree = "<group>"; 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 = "<group>";
|
||||
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue