Merge remote-tracking branch 'origin/master' into zmiguel

This commit is contained in:
José Valdiviesso 2019-03-14 16:51:08 +00:00
commit 166384ee7f
38 changed files with 5348 additions and 3638 deletions

View File

@ -149,6 +149,7 @@ android {
} }
dependencies { dependencies {
compile project(':react-native-maps')
compile project(':react-native-device-info') compile project(':react-native-device-info')
compile project(':react-native-material-shadows') compile project(':react-native-material-shadows')
compile project(':react-native-linear-gradient') compile project(':react-native-linear-gradient')

View File

@ -1,27 +1,30 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <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.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>
<application <application
android:name=".MainApplication" android:name=".MainApplication"
android:label="@string/app_name" android:label="@string/app_name"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:allowBackup="false" android:allowBackup="false"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> <meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAwM2Q3T62uh6BPDXcFPqdjXy8F7SI0WH4"/>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
</application> </application>
</manifest> </manifest>

View File

@ -3,6 +3,7 @@ package com.app;
import android.app.Application; import android.app.Application;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import com.airbnb.android.react.maps.MapsPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo; import com.learnium.RNDeviceInfo.RNDeviceInfo;
import ui.materialshadows.RNMaterialShadowsPackage; import ui.materialshadows.RNMaterialShadowsPackage;
import com.BV.LinearGradient.LinearGradientPackage; import com.BV.LinearGradient.LinearGradientPackage;
@ -29,6 +30,7 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() { protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList( return Arrays.<ReactPackage>asList(
new MainReactPackage(), new MainReactPackage(),
new MapsPackage(),
new RNDeviceInfo(), new RNDeviceInfo(),
new RNMaterialShadowsPackage(), new RNMaterialShadowsPackage(),
new LinearGradientPackage(), new LinearGradientPackage(),

View File

@ -1,4 +1,6 @@
rootProject.name = 'app' 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' include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android') project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':react-native-material-shadows' 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') project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-gesture-handler' include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android') 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' include ':app'

File diff suppressed because it is too large Load Diff

View File

@ -3,16 +3,23 @@ import {
TouchableOpacity, TouchableOpacity,
Text, Text,
View, View,
Image Image,
} from 'react-native'; } from 'react-native';
import { import {
createStackNavigator, createStackNavigator,
createAppContainer, createAppContainer,
createSwitchNavigator, createSwitchNavigator,
createBottomTabNavigator createBottomTabNavigator,
HeaderBackButton
} from 'react-navigation'; } from 'react-navigation';
import * as Screens from './screens'; 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' import AuthLoadingScreen from './screens/AuthLoading'
@ -25,16 +32,18 @@ import Calendar from './screens/Calendar'
import Home from './screens/Home' 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 Profile from "./screens/Profile";
import editCalendar from './screens/editCalendar'; import editCalendar from './screens/editCalendar';
import choosePath from './screens/choosePath'; import choosePath from './screens/choosePath';
import calendarDetail from './screens/calendarDetail'; import calendarDetail from './screens/calendarDetail';
import FebradaDetail from './screens/FebradaDetail';
import resetPassword from './screens/resetPassword';
const navigationOptions = ({navigation}) => ({
headerLeft: <HeaderBackButton onPress={() => navigation.goBack(null)}/>,
headerStyle: {backgroundColor: 'transparent', zIndex: 100 },
});
const AppStack = createBottomTabNavigator( const AppStack = createBottomTabNavigator(
{ {
@ -48,15 +57,15 @@ const AppStack = createBottomTabNavigator(
) )
}, },
}, },
'Jogo do...': { 'Jogo do...': {
screen: Jogo, screen: Jogo,
navigationOptions: { navigationOptions: {
tabBarIcon: ({tintColor}) => ( 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>
) )
}, },
}, },
@ -71,8 +80,8 @@ const AppStack = createBottomTabNavigator(
}, },
}, },
Eventos: { Eventos: {
screen: Eventos, screen: Eventos,
navigationOptions: { navigationOptions: {
@ -82,7 +91,7 @@ const AppStack = createBottomTabNavigator(
) )
}, },
}, },
Home: { Home: {
screen: Home, screen: Home,
navigationOptions: { navigationOptions: {
@ -94,10 +103,9 @@ const AppStack = createBottomTabNavigator(
}, },
}, },
{ {
initialRouteName: 'Home', initialRouteName: 'Eventos',
tabBarOptions: { tabBarOptions: {
showLabel: true, // hide labels showLabel: true, // hide labels
@ -115,56 +123,67 @@ const Stack = createStackNavigator({
screen: AppStack, screen: AppStack,
navigationOptions: ({navigation}) => { navigationOptions: ({navigation}) => {
const index = navigation.state.index; const index = navigation.state.index;
if (navigation.state.routes[index].routeName == 'Home') { if (navigation.state.routes[index].routeName == 'Home') {
return { return {
headerTitle: `${navigation.state.routes[index].routeName}`, headerTitle: `${navigation.state.routes[index].routeName}`,
headerRight: ( 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> <Text>editar</Text>
<IconFA name="user-edit" size={22}/> <IconFA name="user-edit" size={22}/>
</TouchableOpacity> </TouchableOpacity>
) )
} }
} }
else if(navigation.state.routes[index].routeName == 'Calendário'){ else if (navigation.state.routes[index].routeName == 'Calendário') {
return { return {
headerTitle: 'Calendário', headerTitle: 'Calendário',
headerRight: ( headerRight: (
<View style={{flex:1, flexDirection:'row'}}> <View style={{flex: 1, flexDirection: 'row'}}>
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('Edit')}> <TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
<Text>FAQ</Text> 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 { return {
headerTitle: 'Calendário', headerTitle: 'Calendário',
headerRight: ( headerRight: (
<View style={{flex:1, flexDirection:'row'}}> <View style={{flex: 1, flexDirection: 'row'}}>
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('Edit')}> <TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
<Text>FAQ</Text> 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 == 'Eventos') {
return {
headerTitle: 'Eventos',
}
}
else { else {
return { return {
header: null header: null
@ -175,18 +194,23 @@ const Stack = createStackNavigator({
Profile: { Profile: {
screen: Profile screen: Profile
}, },
Edit:{ Edit: {
screen: editCalendar screen: editCalendar
}, },
choosePath:{ choosePath: {
screen: choosePath screen: choosePath
}, },
calendarDetail:{ calendarDetail: {
screen:calendarDetail screen: calendarDetail,
},
FebradaDetail: {
screen: FebradaDetail,
},
resetPassword:{
screen:resetPassword
} }
}); });
@ -194,7 +218,7 @@ export default createAppContainer(createSwitchNavigator(
{ {
AuthLoading: AuthLoadingScreen, AuthLoading: AuthLoadingScreen,
App: Stack, App: Stack,
}, },
{ {

99
App/app/components/Nav.js Normal file
View File

@ -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

View File

@ -1,397 +1,426 @@
import * as React from 'react'; import * as React from "react";
import {View, StyleSheet, Dimensions, Image, ScrollView, Text, Button, TouchableOpacity, Animated} from 'react-native';
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
import { import {
RkButton, RkCard, RkText, View,
RkTheme StyleSheet,
} from 'react-native-ui-kitten'; Dimensions,
import Timeline from 'react-native-timeline-feed' Image,
ScrollView,
Text,
Button,
TouchableOpacity,
Animated
} from "react-native";
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
import { RkButton, RkCard, RkText, RkTheme } from "react-native-ui-kitten";
import Timeline from "react-native-timeline-feed";
import * as Progress from 'react-native-progress'; import * as Progress from "react-native-progress";
import { connect } from "react-redux";
import {connect} from 'react-redux'; import { bindActionCreators } from "redux";
import PTRView from 'react-native-pull-to-refresh';
import * as Actions from "../store/actions"; //Import your actionss
import {bindActionCreators} from 'redux'; const formatObj = obj => {
let a = {};
import * as Actions from '../store/actions'; //Import your actionss a.push({});
const formatObj = (obj) => {
let a = {};
a.push({})
return a
return a;
}; };
const ThirdRoute = () => (
<View style={[styles.scene, {backgroundColor: '#efc44a'}]}/>
);
const FourthRoute = () => (
<View style={[styles.scene, {backgroundColor: '#49ef97'}]}/>
);
class Calendar extends React.Component { class Calendar extends React.Component {
state = {
state = { index: 0,
index: 0, routes: [
routes: [ { key: "first", weekDay: "sex", day: 12 },
{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: 'third', weekDay: 'dom', day:14}, { key: "fourth", weekDay: "seg", day: 15 }
{key: 'fourth', weekDay: 'seg', day:15}, ],
CP: "SEM",
cpColor: "white",
careerPath: { name: "", color: "" }
};
], componentDidMount() {
}; this.props.getEvents(this.props.user);
componentDidMount() { this.props.getSessions(this.props.userDetails.token);
}
this.props.getEvents(this.props.user); _openDetails = () => {
console.log('didMount'); console.log("los");
console.log(this.props.events); };
}
_openDetails=()=>{ renderDetail = ({ item, index }) => {
const { navigate } = this.props.navigation;
console.log("los"); // <Image source={{ uri:item.imageUrl, width:'100%' , height:100 }} style={{borderRadius:0}}/>
} return (
<TouchableOpacity
renderDetail = ({item, index}) => { onPress={() => navigate("calendarDetail", { info: item })}
const {navigate} = this.props.navigation; >
// <Image source={{ uri:item.imageUrl, width:'100%' , height:100 }} style={{borderRadius:0}}/> <View style={styles.event}>
return ( <View style={styles.titleContainer}>
<TouchableOpacity onPress={() => navigate('calendarDetail', { info: item })} > <Text style={[styles.title]}>{item.name}</Text>
<Text style={{ color: "black" }}>Local: 1</Text>
<View style={styles.event}>
<View style={styles.titleContainer}>
<Text style={[styles.title]}>{item.name}</Text>
<Text style={{color:'black'}}>Local: 1</Text>
</View>
<View>
<Text style={styles.description}>{item.description}</Text>
<View style={styles.details}>
<Progress.Bar color={'#000000'} progress={item.Enrolled/item.MaxAttendees} unfilledColor={'white'} width={210}/>
<Text>{item.Enrolled} / {item.MaxAttendees}</Text>
</View>
</View>
</View>
</TouchableOpacity>
);
}
_update = () => {
this.setState({user: this.props.user});
console.log(this.props.events);
}
_renderTabBar = props => {
const inputRange = props.navigationState.routes.map((x, i) => i);
return (
<View style={styles.tabBar}>
{props.navigationState.routes.map((route, i) => {
const bgcolor = props.position.interpolate({
inputRange,
outputRange: inputRange.map(
inputIndex => (inputIndex === i ? '#CC1A17' : 'rgba(0,0,0,0)')
),
});
const color = props.position.interpolate({
inputRange,
outputRange: inputRange.map(
inputIndex => (inputIndex === i ? 'white' : 'black')
),
});
return (
<TouchableOpacity
style={styles.tabItem}
onPress={() => this.setState({ index: i })}>
<Animated.Text style={{ color :'#7A7B7B' }}>{route.weekDay}</Animated.Text>
<Animated.Text style={{ backgroundColor: bgcolor, borderRadius:90 , padding:10, marginTop:5, color:color, fontSize:15}}>{route.day}</Animated.Text>
</TouchableOpacity>
);
})}
</View> </View>
);
};
<View>
<Text style={styles.description}>{item.description}</Text>
<View style={styles.details}>
<Progress.Bar
color={"#000000"}
progress={0}
unfilledColor={"white"}
width={210}
/>
<Text>
{item.Enrolled} / {item.MaxAttendees}
</Text>
</View>
</View>
</View>
</TouchableOpacity>
);
};
constructor() { _update = () => {
this.setState({ user: this.props.user });
console.log(this.props.events);
};
super() _renderTabBar = props => {
const inputRange = props.navigationState.routes.map((x, i) => i);
const archeryImgSource = require('../assets/img/archery.png'); return (
const badmintonImgSource = require('../assets/img/badminton.png'); <View style={styles.tabBar}>
const lunchImgSource = require('../assets/img/lunch.png'); {props.navigationState.routes.map((route, i) => {
const soccerImgSource = require('../assets/img/soccer.png'); const bgcolor = props.position.interpolate({
const dumbbellImgSource = require('../assets/img/dumbbell.png'); inputRange,
outputRange: inputRange.map(inputIndex =>
inputIndex === i ? "#CC1A17" : "rgba(0,0,0,0)"
)
});
const color = props.position.interpolate({
inputRange,
outputRange: inputRange.map(inputIndex =>
inputIndex === i ? "white" : "black"
)
});
const ArcheryImage = (props) => <Image source={archeryImgSource} {...props} />; return (
const BadmintonImage = (props) => <Image source={badmintonImgSource} {...props} />; <TouchableOpacity
const LunchImage = (props) => <Image source={lunchImgSource} {...props} />; style={styles.tabItem}
const SoccerImage = (props) => <Image source={soccerImgSource} {...props} />; onPress={() => this.setState({ index: i })}
const DumbbellImage = (props) => <Image source={dumbbellImgSource} {...props} />; >
const VectorIconImage = (props) => <Image source={vectorIconImgSource} {...props} />; <Text style={{ color: "#7A7B7B" }}>
{route.weekDay}
</Text>
<Animated.Text
style={{
backgroundColor: bgcolor,
borderRadius: 0,
padding: 10,
marginTop: 5,
color: color,
fontSize: 15
}}
>
{route.day}
</Animated.Text>
</TouchableOpacity>
);
})}
</View>
);
};
this.data = [ constructor() {
super();
}
_refresh=()=>{
this.props.getEvents(this.props.user);
//this.props.getSessions(this.props.userDetails.token);
}
render() {
const ThirdRoute = () => (
<ScrollView contentContainerStyle={styles.contentContainer}>
{this.props.events != undefined && (
<Timeline
data={this.props.c}
timeContainerStyle={{ marginTop: 0 }}
timeStyle={{
textAlign: "center",
height: 100,
color: "#CC1A17",
padding: 5,
fontSize: 23
}}
descriptionStyle={{ color: "red" }}
renderDetail={this.renderDetail}
lineColor="rgba(0,0,0,0)"
lineWidth={1}
separator={false}
flatListProps={{
style: {
margin: 15
}
}}
circleSize={0}
dotColor={"#CC1A17"}
keyExtractor={(item, index) => index.toString()}
/>
)}
</ScrollView>
);
const FourthRoute = () => (
<ScrollView contentContainerStyle={styles.contentContainer}>
{this.props.events != undefined && (
<Timeline
data={this.props.d}
timeContainerStyle={{ marginTop: 0 }}
timeStyle={{
textAlign: "center",
// backgroundColor: 'red',
] height: 100,
} color: "#CC1A17",
padding: 5,
//marginTop:10,
// fontWeight:'bold',
fontSize: 23
render() { //borderRadius: 13
}}
descriptionStyle={{ color: "red" }}
renderDetail={this.renderDetail}
lineColor="rgba(0,0,0,0)"
lineWidth={1}
separator={false}
flatListProps={{
style: {
margin: 15
}
}}
circleSize={0}
dotColor={"#CC1A17"}
keyExtractor={(item, index) => index.toString()}
/>
)}
</ScrollView>
);
const FirstRoute = () => (
<ScrollView contentContainerStyle={styles.contentContainer}>
{this.props.events != undefined && (
<Timeline
data={this.props.a}
timeContainerStyle={{ marginTop: 0 }}
timeStyle={{
textAlign: "center",
height: 100,
color: "#CC1A17",
padding: 5,
fontSize: 23
}}
descriptionStyle={{ color: "red" }}
renderDetail={this.renderDetail}
lineColor="rgba(0,0,0,0)"
lineWidth={1}
separator={false}
flatListProps={{
style: {
margin: 15
}
}}
circleSize={0}
dotColor={"#CC1A17"}
keyExtractor={(item, index) => index.toString()}
/>
)}
</ScrollView>
);
const SecondRoute = () => (
<ScrollView contentContainerStyle={styles.contentContainer}>
{this.props.events != undefined && (
<Timeline
data={this.props.b}
timeContainerStyle={{ marginTop: 0 }}
timeStyle={{
textAlign: "center",
const FirstRoute = () => ( height: 100,
color: "#CC1A17",
padding: 5,
<ScrollView contentContainerStyle={styles.contentContainer}> fontSize: 23
<Timeline //borderRadius: 13
}}
descriptionStyle={{ color: "red" }}
renderDetail={this.renderDetail}
lineColor="rgba(0,0,0,0)"
lineWidth={1}
separator={false}
flatListProps={{
style: {
margin: 15
}
}}
circleSize={0}
dotColor={"#CC1A17"}
keyExtractor={(item, index) => index.toString()}
/>
)}
</ScrollView>
);
data={this.props.events} return (
<View style={{ flex: 1 }}>
timeContainerStyle={{ marginTop: 0}} <View>
{this.props.careerPath != undefined && (
timeStyle={{ <Text
style={{
textAlign: 'center', backgroundColor: this.props.careerPath.color,
// backgroundColor: 'red', color: "white",
fontWeight: "bold",
height:100, fontSize: 15,
color:"#CC1A17", textAlign: "center",
padding: 5, padding:15
//marginTop:10, }}
// fontWeight:'bold', >
fontSize:23, {this.props.careerPath.name}
</Text>
//borderRadius: 13 )}
}} </View>
descriptionStyle={{color: 'red'}} <TabView
navigationState={this.state}
renderDetail={this.renderDetail} renderScene={SceneMap({
first: FirstRoute,
lineColor='rgba(0,0,0,0)' second: SecondRoute,
lineWidth={1} third: ThirdRoute,
separator={false} fourth: FourthRoute
flatListProps={{ })}
style: { renderTabBar={this._renderTabBar}
useNativeDriver={false}
margin: 15 onIndexChange={index => this.setState({ index })}
} initialLayout={{
width: Dimensions.get("window").width,
height: Dimensions.get("window").height
}} }}
keyExtractor={(item, index) => index.toString()} style={{ backgroundColor: "#F2F2F2" }}
indicatorStyle={{ backgroundColor: "pink" }}
/>
/> <Button onPress={this._refresh} title="Refresh" color="#841584"
/>
</View>
</ScrollView>
)
const SecondRoute = () => (
<ScrollView contentContainerStyle={styles.contentContainer}>
<Timeline
data={this.props.events}
timeContainerStyle={{ marginTop: 0}}
timeStyle={{
textAlign: 'center',
// backgroundColor: 'red',
height:100,
color:"#CC1A17",
padding: 5,
//marginTop:10,
// fontWeight:'bold',
fontSize:23,
//borderRadius: 13
}}
descriptionStyle={{color: 'red'}}
renderDetail={this.renderDetail}
lineColor='rgba(0,0,0,0)'
lineWidth={1}
separator={false}
flatListProps={{
style: {
margin: 15
}
}}
keyExtractor={(item, index) => index.toString()}
/>
</ScrollView>
)
return ( );
<View style={{flex:1}}> }
<View>
<Text style={{
backgroundColor:"#CC1A17",
color:'white',
fontWeight:'bold',
fontSize:15,
textAlign:'center',
}}>
WEB DEVELOPMENT
</Text>
</View>
<TabView
navigationState={this.state}
renderScene={SceneMap({
first: FirstRoute,
second: SecondRoute,
third: ThirdRoute,
fourth: FourthRoute
})}
renderTabBar={this._renderTabBar}
useNativeDriver={true}
onIndexChange={index => this.setState({index})}
initialLayout={{width: Dimensions.get('window').width, height: Dimensions.get('window').height}}
style={{backgroundColor:"#F2F2F2"}}
indicatorStyle={{ backgroundColor: 'pink' }}
/>
</View>
);
}
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
tabBar: { tabBar: {
flexDirection: 'row', flexDirection: "row",
paddingTop:0, paddingTop: 0,
marginTop:0, marginTop: 0,
backgroundColor:'white', backgroundColor: "white",
borderWidth: 1, borderWidth: 1,
borderRadius: 2, borderRadius: 2,
borderColor: '#ddd', borderColor: "#ddd",
borderBottomWidth: 0, borderBottomWidth: 0,
shadowColor: '#000', shadowColor: "#000",
shadowOffset: { width: 0, height: 2 }, shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.8, shadowOpacity: 0.8,
shadowRadius: 2, shadowRadius: 2,
elevation: 2, elevation: 2
},
tabItem: {
}, flex: 1,
tabItem: { alignItems: "center",
flex: 1, padding: 10
alignItems: 'center', },
padding: 10, details: {
}, backgroundColor: "#FFFFFF",
details: { borderBottomRightRadius: 10,
backgroundColor: "#FFFFFF", borderBottomLeftRadius: 10,
borderBottomRightRadius: 10, padding: 10,
borderBottomLeftRadius: 10, paddingTop: 0
padding: 10, },
paddingTop:0 description: {
padding: 10,
}, paddingLeft: 0,
description: { paddingTop: 0
padding: 10, },
paddingLeft:0, title: {
paddingTop:0 color: "#212121",
fontWeight: "bold",
}, fontSize: 15
title: { },
color: '#212121', titleContainer: {
fontWeight: 'bold', padding: 10
fontSize: 15, },
event: {
}, borderRadius: 5,
titleContainer:{ backgroundColor: "#FFFFFF",
padding: 10 marginLeft: -25,
},
event: {
borderRadius: 5,
backgroundColor: "#FFFFFF",
marginLeft:-25,
shadowColor: "#000", shadowColor: "#000",
shadowOffset: { width: 0, height: 2,}, shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.25, shadowOpacity: 0.25,
shadowRadius: 1, shadowRadius: 1,
elevation: 2, elevation: 2,
marginRight:2 marginRight: 2
},
scene: {
}, flex: 1
scene: { },
flex: 1, contentContainer: {
}, //paddingVertical: 20,
contentContainer: { backgroundColor: "#F2F2F2"
//paddingVertical: 20, }
backgroundColor:'#F2F2F2'
}
}); });
RkTheme.setType('RkCard', 'story', { RkTheme.setType("RkCard", "story", {
img: { img: {
height: 100, height: 100,
opacity: 0.7 opacity: 0.7
}, },
header: { header: {
alignSelf: 'center' alignSelf: "center"
}, },
content: { content: {
alignSelf: 'center' alignSelf: "center"
} }
}); });
function mapStateToProps(state, props) { function mapStateToProps(state, props) {
return {
return { token: state.apiReducer.token,
user: state.apiReducer.user,
token: state.apiReducer.token, logged: state.apiReducer.logged,
user: state.apiReducer.user, events: state.apiReducer.events,
logged: state.apiReducer.logged, userDetails: state.apiReducer.userDetails,
events: state.apiReducer.events sessions: state.apiReducer.sessions,
careerPath: state.apiReducer.careerPath,
} a: state.apiReducer.a,
b: state.apiReducer.b,
c: state.apiReducer.c,
d: state.apiReducer.d
};
} }
function mapDispatchToProps(dispatch) { function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
return bindActionCreators(Actions, dispatch);
} }
export default connect(mapStateToProps, mapDispatchToProps)(Calendar); export default connect(
mapStateToProps,
mapDispatchToProps
)(Calendar);

View File

@ -1,57 +1,142 @@
import * as React from 'react'; import * as React from "react";
import { import {View, StyleSheet, Dimensions, Text, Button, ScrollView, Image, TouchableOpacity} from "react-native";
View, import {TabView, TabBar, SceneMap} from "react-native-tab-view";
StyleSheet,
Dimensions,
Text
} from 'react-native';
import { TabView, TabBar, SceneMap } from 'react-native-tab-view';
const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
const FirstRoute = () => ( const FirstRoute = () => (
<View style={[styles.scene, { backgroundColor: '#ff4081' }]} /> <View style={[styles.scene, {backgroundColor: "#ff4081"}]}/>
); );
const SecondRoute = () => ( const SecondRoute = () => (
<View style={[styles.scene, { backgroundColor: '#673ab7' }]} /> <View style={[styles.scene, {backgroundColor: "#673ab7"}]}/>
); );
const ThirdRoute = () => ( const ThirdRoute = () => (
<View style={[styles.scene, { backgroundColor: '#673ab7' }]} /> <View style={[styles.scene, {backgroundColor: "#673ab7"}]}/>
); );
const FourthRoute = () => ( const FourthRoute = () => (
<View style={[styles.scene, { backgroundColor: '#673ab7' }]} /> <View style={[styles.scene, {backgroundColor: "#673ab7"}]}/>
); );
export default class Eventos extends React.Component {
state = {
index: 0,
routes: [
{key: "first", title: "Festarola"},
{key: "second", title: "Febrada"},
{key: "third", title: "Rally"},
{key: "fourth", title: "Peddy"}
]
};
renderFebrada = (navigate) => {
return (
<View>
<TouchableOpacity onPress={() => navigate('FebradaDetail')}>
<View style={styles.cardContainer}>
<Image
style={{
flex: 1,
width: undefined,
height: undefined
}}
resizeMode="contain"
source={require('../assets/altice_logo.png')}
>
</Image>
</View>
</TouchableOpacity>
export default class Eventos extends React.Component { </View>
);
state = {
index: 0,
routes: [
{ key: 'first', title: 'Festarola' },
{ key: 'second', title: 'Febrada' },
{ key: 'third', title: 'Rally' },
{ key: 'fourth', title: 'Peddy' },
], };
};
render() { renderRally = () => {
return (
<View> return (
<Text>asd</Text> <View>
</View> <View style={styles.cardContainer}>
); <Image
} style={{
flex: 1,
width: undefined,
height: undefined
}}
resizeMode="contain"
source={require('../assets/altice_logo.png')}
>
</Image>
</View>
</View>
);
};
renderCaching = () => {
return (
<View>
<View style={styles.cardContainer}>
<Image
style={{
flex: 1,
width: undefined,
height: undefined
}}
resizeMode="contain"
source={require('../assets/altice_logo.png')}
>
</Image>
</View>
</View>
);
};
render() {
const {navigate} = this.props.navigation;
return (
<View style={styles.container}>
<ScrollView styles={styles.scroll}>
{this.renderFebrada(navigate)}
{this.renderRally()}
{this.renderCaching()}
</ScrollView>
</View>
);
}
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
scene: { container: {
flex: 1, backgroundColor: '#eee',
}, flex: 1,
}); flexGrow: 1,
flexDirection: 'column',
},
scroll: {
flex: 1,
},
cardContainer: {
flex: 1,
padding: 10,
margin: 20,
backgroundColor: '#fff',
height: SCREEN_WIDTH * (1 / 2),
borderRadius: 5,
//borderWidth: 2,
},
scene: {
flex: 1
}
});

View File

@ -0,0 +1,246 @@
import * as React from 'react';
import {
View,
StyleSheet,
Dimensions,
ScrollView,
Text,
ImageBackground
} from 'react-native';
import {Divider} from 'react-native-elements'
import AppIntroSlider from 'react-native-app-intro-slider';
import NavAbsolute from '../components/Nav';
import * as Actions from "../store/actions";
import {connect} from "react-redux";
import {bindActionCreators} from "redux";
const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
class FebradaDetail extends React.Component {
static navigationOptions = ({navigation}) => ({
header: (
<NavAbsolute
navigation={navigation}
// title={navigation.state.params.info.name}
/>
),
});
renderHeader = () => {
return (
<View style={styles.headerContainer}>
<View style={styles.coverContainer}>
<ImageBackground
source={{
uri: 'https://upload.wikimedia.org/wikipedia/commons/9/94/Logo_TvAAC_2014.png',
}}
style={styles.coverImage}
>
</ImageBackground>
</View>
</View>
)
};
renderDescription = () => {
return (
<View style={{height: SCREEN_HEIGHT * (1 / 3)}}>
<View
style={{flexDirection: "row"}}>
<View style={styles.header}>
<View style={styles.nameText}>
<Text
style={{color: '#CC1A17', fontSize: 20}}>Febrada</Text>
</View>
<View style={styles.timeText}>
<Text style={{color: "#CC1A17", fontSize: 15}}>
<Text style={{color: "#CC1A17", fontSize: 15}}>
Sexta 12 -
</Text>
14h00{/*{info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}*/}
</Text>
</View>
</View>
</View>
<View style={styles.descContainer}>
<Text style={{fontSize: 20, color: '#CC1A17'}}>Descrição</Text>
<Divider style={{backgroundColor: '#000'}}/>
<Text style={{paddingRight: 10, paddingTop: 10}}>g</Text>
</View>
</View>
)
};
renderSlider = () => {
const slides = [
{
key: 'somethun',
title: 'Title 1',
titleStyle: '',
text: 'blblbalbalba',
textStyle: '',
backgroundColor: '#59b2ab',
},
{
key: 'somethun-dos',
title: 'Title 2',
titleStyle: '',
text: 'blblbalbalba',
textStyle: '',
backgroundColor: '#febe29',
},
{
key: 'somethun1',
title: 'Rocket guy',
titleStyle: '',
text: 'blblbalbalba',
textStyle: '',
backgroundColor: '#22bcb5',
}
];
return (
<AppIntroSlider
slides={slides}
style={{height: SCREEN_WIDTH * 0.54}}
activeDotStyle={{backgroundColor:'#CC1A17'}}
renderDoneButton={this._buyFinosOrBifanas()}
renderNextButton={this._renderNextButton}
/>
)
};
_buyFinosOrBifanas = () => {
//Modal
};
render() {
return (
<View style={styles.mainViewStyle}>
<ScrollView style={styles.scroll}>
<View style={styles.container}>
<View style={styles.headerContainer}>
{this.renderHeader()}
</View>
<View style={{backgroundColor: "#fff"}}>
{this.renderDescription()}
{this.renderSlider()}
</View>
</View>
</ScrollView>
</View>
)
}
}
const styles = StyleSheet.create({
mainContent: {
flex: 1,
alignItems: 'center',
justifyContent: 'space-around',
},
text: {
//color: 'rgba(255, 255, 255, 0.8)',
backgroundColor: 'transparent',
textAlign: 'center',
color:'#000',
paddingHorizontal: 16,
},
title: {
fontSize: 22,
color: 'white',
backgroundColor: 'transparent',
textAlign: 'center',
marginBottom: 16,
},
header: {
flex: 1,
flexDirection: 'row',
padding: 10,
backgroundColor: 'white',
//height: SCREEN_HEIGHT * (1 / 3),
},
nameText: {
alignSelf: 'flex-start',
flex: 1,
},
timeText: {
alignItems: 'flex-end',
flex: 1,
marginRight: 4,
},
mainViewStyle: {
flex: 1,
flexGrow: 1,
flexDirection: 'column',
},
scroll: {
backgroundColor: '#eee',
flex: 1,
//marginBottom: 55,
},
descContainer: {
padding: 10,
},
headerContainer: {
flex: 1,
},
container: {
flex: 1,
flexDirection: 'column',
},
coverContainer: {
position: 'relative',
},
coverImage: {
height: Dimensions.get('window').width * (2 / 4),
width: Dimensions.get('window').width,
},
});
function mapStateToProps(state, props) {
return {
token: state.apiReducer.token,
user: state.apiReducer.user,
logged: state.apiReducer.logged,
events: state.apiReducer.events,
careerPath: state.apiReducer.careerPath,
}
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(FebradaDetail);

View File

@ -1,338 +1,429 @@
import React, {Component} from 'react'; import React, { Component } from "react";
import { import {
Button, Button,
View, View,
Text, Text,
TouchableOpacity, TouchableOpacity,
FlatList, FlatList,
ActivityIndicator, ActivityIndicator,
Dimensions, Dimensions,
StyleSheet, StyleSheet,
Image, Image,
ImageBackground, ImageBackground,
NetInfo, NetInfo,
AppState AppState
} from 'react-native'; } from "react-native";
import {Shadow} from 'react-native-shadow' import { Shadow } from "react-native-shadow";
import Icon from "react-native-vector-icons/Ionicons" import Icon from "react-native-vector-icons/Ionicons";
import { import { RkButton, RkTheme } from "react-native-ui-kitten";
RkButton,
RkTheme
} from 'react-native-ui-kitten';
import { connect } from "react-redux";
import {connect} from 'react-redux'; import { bindActionCreators } from "redux";
import {bindActionCreators} from 'redux'; import * as Actions from "../store/actions"; //Import your actionss
import * as Actions from '../store/actions'; //Import your actionss
import ImageOverlay from "react-native-image-overlay"; import ImageOverlay from "react-native-image-overlay";
import {createStore} from 'redux'; import { createStore } from "redux";
import PTRView from 'react-native-pull-to-refresh'; import PTRView from "react-native-pull-to-refresh";
import {Provider} from 'react-redux' import { Provider } from "react-redux";
import { ScrollView } from 'react-native-gesture-handler'; import { ScrollView } from "react-native-gesture-handler";
const SCREEN_HEIGHT = Dimensions.get("window").height; const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width; const SCREEN_WIDTH = Dimensions.get("window").width;
import {Card, Divider} from 'react-native-elements' import { Card, Divider } from "react-native-elements";
import RNMaterialShadows from 'react-native-material-shadows';
import RNMaterialShadows from "react-native-material-shadows";
import IconFA from "react-native-vector-icons/FontAwesome5";
class Home extends Component { class Home extends Component {
_handleConnectionChange = (isConnected) => { _handleConnectionChange = isConnected => {
// this.props.dispatch(connectionState({ status: isConnected })); // this.props.dispatch(connectionState({ status: isConnected }));
console.log("fck that") console.log("fck that");
}; };
_refresh() { _refresh() {
return new Promise((resolve) => { return new Promise(resolve => {
setTimeout(()=>{resolve()}, 2000) setTimeout(() => {
}); resolve();
} }, 2000);
_callApi(){ });
}
this.props.getUserInfo(this.props.token); _callApi() {
} this.props.getUserInfo(this.props.token);
constructor(props) { }
constructor(props) {
super(props);
super(props); this.state = {
token: { valid: false },
logged: true,
onHold: true,
user: { Name: "" },
userDetails: {},
appState: AppState.currentState
};
}
handleConnectivityChange = () => {
console.log("asdasdasdasdasd");
};
this.state = { componentDidMount() {
// NetInfo.isConnected.addEventListener('connectionChange', this.handleConnectivityChange);
token: {valid: false}, // this.props.hold();
logged: true, console.log("hold" + this.props.onHold);
onHold: true, //this.props.logoutUser();
user: {Name: ''},
userDetails:{},
appState: AppState.currentState,
};
}
handleConnectivityChange = () => {
console.log("asdasdasdasdasd");
}
componentDidMount() { //console.log(this.props.token);
// NetInfo.isConnected.addEventListener('connectionChange', this.handleConnectivityChange);
// this.props.hold();
console.log("hold"+ this.props.onHold)
//this.props.logoutUser();
//console.log(this.props.token);
this.props.getUserInfo(this.props.userDetails.token);
//console.log('logged:'+this.props.logged);
//console.log(th2is.props)
}
componentWillUnmount() {
}
bClick() {
//this.props.logoutUser();
let a = {};
// this.setState({ user: this.props.user });
// console.log(this.props.user)
//
//var navigate = this.props.navigation.navigate
}
_update=()=>{
this.props.getUserInfo(this.props.userDetails.token); this.props.getUserInfo(this.props.userDetails.token);
}
render() {
//console.log('logged:'+this.props.logged);
const {navigate} = this.props.navigation; //console.log(th2is.props)
}
componentWillUnmount() {}
if (this.props.onHold) { bClick() {
//this.props.logoutUser();
return ( let a = {};
<View> // this.setState({ user: this.props.user });
<Text>lollsss {this.props.onHold}</Text> // console.log(this.props.user)
<ActivityIndicator size="large" color="#0000ff"/> //
</View>
)
}
if (this.props.logged) {
return ( //var navigate = this.props.navigation.navigate
<PTRView onRefresh={this._update} > }
<ScrollView style={{backgroundColor:'#eeeeee'}}> _update = () => {
<View> this.props.getUserInfo(this.props.userDetails.token);
};
<ImageBackground
opacity={0.9}
source={require('../assets/img/bg_3.jpg')}
style={{
width: '100%',
// marginTop:150,
backgroundColor: 'rgba(255,255,255,1)' ,
}
}>
<View style={styles.homeHeader}>
<View style={styles.userImageContainer}>
<Image style={styles.userImage} source={{uri: 'https://i.imgur.com/XXJ7LxV.jpg'}}/>
</View>
<Text style={styles.userText}>{this.props.user.Name}</Text>
<Text style={styles.userTextSub}>{this.props.user.Company}</Text>
</View>
</ImageBackground>
<View style={styles.userStats}>
<Text style={styles.userStatsTitle}>O meu saldo:</Text>
<View style={styles.userStatsBox}>
<View style={styles.userBox}>
<Icon name="ios-beer" style={styles.userStatsBoxIcon} size={50}/>
<Text style={styles.userBoxText}>0 Fino(s)</Text>
</View>
<View style={styles.userBox}>
<Icon name="ios-beer" style={styles.userStatsBoxIcon} size={50}/>
<Text style={styles.userBoxText}>0 Fino(s)</Text>
</View>
<View style={styles.userBox}>
<Icon name="ios-beer" style={styles.userStatsBoxIcon} size={50}/>
<Text style={styles.userBoxText}>0 Fino(s)</Text>
</View>
</View>
</View>
</View>
</ScrollView>
</PTRView>
);
}
else {
return (
<View>
<Text>sem permissões para aceder aqui</Text>
</View>
);
}
render() {
const { navigate } = this.props.navigation;
if (this.props.onHold) {
return (
<View>
<Text>lollsss {this.props.onHold}</Text>
<ActivityIndicator size="large" color="#0000ff" />
</View>
);
} }
if (this.props.logged) {
return (
<PTRView onRefresh={this._update}>
<ScrollView style={{ backgroundColor: "#eeeeee" }}>
<View>
<ImageBackground
opacity={0.9}
source={require("../assets/img/bg_3.jpg")}
style={{
width: "100%",
// marginTop:150,
backgroundColor: "rgba(255,255,255,1)"
}}
>
<View style={styles.homeHeader}>
<View style={styles.userImageContainer}>
<Image
style={styles.userImage}
source={{ uri: "https://i.imgur.com/XXJ7LxV.jpg" }}
/>
</View>
{this.props.user != undefined && (
<Text style={styles.userText}>{this.props.user.Name}</Text>
)}
<Text style={styles.userTextSub}>
{this.props.user.Company}
</Text>
</View>
</ImageBackground>
<View style={styles.userStats}>
<View style={{backgroundColor:'orange'}}>
<Text style={styles.userStatsTitle}>Informações Importantes</Text>
</View>
<View style={styles.userStatsBox}>
<Text style={{margin:10}}>Grupo de ....</Text>
<Text style={{margin:10}}>Alojamento</Text>
</View>
</View>
<View>
<View
style={{
margin: 10,
marginTop: 20,
backgroundColor: "white",
borderRadius: 3
}}
>
<View style={{ backgroundColor: "#CC1A17" , flex:1, flexDirection:'row'}}>
<View style={{width:'79%'}}>
<Text
style={{
fontSize: 25,
color: "white",
margin: 10,
fontWeight: "bold",
marginBottom: 0
}}
>
Os tones
</Text>
<Text
style={{
color: "white",
marginLeft: 10,
marginBottom: 5
}}
>
5/6 elementos
</Text>
</View>
<View style={{alignItems:'center', alignContent:'center',alignSelf:'center'}}>
<IconFA name="plus" color={'white'} size={30} />
<Text style={{color:'white'}}>Adicionar</Text>
</View>
</View>
<View>
<View style={{ flex: 1 }}>
<View style={styles.user}>
<View style={styles.userLogo}>
<IconFA name="user" size={40} />
</View>
<View style={styles.userT}>
<Text style={styles.userName}>Henrique Dias</Text>
<Text>AFFJASDXZ</Text>
</View>
<TouchableOpacity style={styles.userRemove}>
<Text style={{fontWeight:'bold'}}>rm equipa</Text>
</TouchableOpacity>
</View>
<Divider style={{ backgroundColor: "black" }} />
<View style={styles.user}>
<View style={styles.userLogo}>
<IconFA name="user" size={40} />
</View>
<View style={styles.userT}>
<Text style={styles.userName}>Henrique Dias</Text>
<Text>AFFJASDXZ</Text>
</View>
<TouchableOpacity style={styles.userRemove}>
<IconFA name="times" color={"#CC1A17"} size={30} />
<Text>remover</Text>
</TouchableOpacity>
</View>
<Divider style={{ backgroundColor: "black" }} />
<View style={styles.user}>
<View style={styles.userLogo}>
<IconFA name="user" size={40} />
</View>
<View style={styles.userT}>
<Text style={styles.userName}>Henrique Dias</Text>
<Text>AFFJASDXZ</Text>
</View>
<TouchableOpacity style={styles.userRemove}>
<IconFA name="times" color={"#CC1A17"} size={30} />
<Text>remover</Text>
</TouchableOpacity>
</View>
<Divider style={{ backgroundColor: "black" }} />
<View style={styles.user}>
<View style={styles.userLogo}>
<IconFA name="user" size={40} />
</View>
<View style={styles.userT}>
<Text style={styles.userName}>Henrique Dias</Text>
<Text>AFFJASDXZ</Text>
</View>
<TouchableOpacity style={styles.userRemove}>
<IconFA name="times" color={"#CC1A17"} size={30} />
<Text>remover</Text>
</TouchableOpacity>
</View>
<Divider style={{ backgroundColor: "black" }} />
<View style={styles.user}>
<View style={styles.userLogo}>
<IconFA name="user" size={40} />
</View>
<View style={styles.userT}>
<Text style={styles.userName}>Henrique Dias</Text>
<Text>AFFJASDXZ</Text>
</View>
<TouchableOpacity style={styles.userRemove}>
<IconFA name="times" color={"#CC1A17"} size={30} />
<Text>remover</Text>
</TouchableOpacity>
</View>
</View>
</View>
</View>
</View>
</View>
</ScrollView>
</PTRView>
);
} else {
return (
<View>
<Text>sem permissões para aceder aqui</Text>
</View>
);
}
}
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
userBoxText:{ userName:{
color:'white', fontSize:16,
fontWeight:'bold' fontWeight:'bold'
}, },
userStatsBoxIcon:{ userRemove: {
color:'white' alignContent: "center",
}, alignItems: "center",
userStatsBox:{
flex:1, alignSelf:'center'
flexDirection:'row'
}, },
userBox:{ userT: {
alignItems:'center', margin: 10,
justifyContent:'center',
width:'33%',
}, width: "55%",
userCurriculum:{ // backgroundColor: "red"
paddingTop:5, },
color:'red', userLogo: {
fontWeight:'bold', paddingLeft: 10,
fontSize:15
},
userBioRow:{
flex:1,
flexDirection:'row',
padding:10,
},
userBioText:{
}, margin: 10
userBioLogo:{ },
marginLeft: SCREEN_WIDTH*0.05, user: {
width: SCREEN_WIDTH*0.15, alignSelf: "center",
flex: 1,
}, flexDirection: "row",
margin: 10,
userTextSub:{
backgroundColor: 'rgba(0,0,0,0.7)' ,
color:'white',
},
userText:{
backgroundColor: 'rgba(0,0,0,0.7)' ,
color:'white',
fontWeight:'bold',
fontSize:20,
},
homeHeader:{
flex:1,
height: SCREEN_HEIGHT*0.3,
justifyContent: 'center',
alignItems:'center' ,
},
userImage:{
width:110,
height:110,
borderWidth: 1,
borderRadius: 5,
borderWidth:2,
borderColor: 'white',
},
userBio:{
flex:1,
padding:10,
margin:9,
backgroundColor:'white',
// height: SCREEN_HEIGHT*0.20,
color:'black',
borderRadius:5,
},
userStats:{
backgroundColor:'#CC1A17',
height: SCREEN_HEIGHT*0.2,
padding:10,
margin:10,
borderRadius:5,
marginTop:10,
marginBottom:0
marginTop: 5,
}, width: "100%"
userStatsTitle:{ },
color:'white', userBoxText: {
fontSize:17, color: "white",
fontWeight:'bold', fontWeight: "bold"
padding:1 },
}, userStatsBoxIcon: {
userImageContainer:{ color: "white"
alignSelf: 'center', },
userStatsBox: {
flex: 1,
backgroundColor:'white',
flexDirection: "row"
},
// transform: [{ rotate: '-15deg'}], userBox: {
alignItems: "center",
} justifyContent: "center",
width: "33%"
},
userCurriculum: {
paddingTop: 5,
color: "red",
fontWeight: "bold",
fontSize: 15
},
userBioRow: {
flex: 1,
flexDirection: "row",
padding: 10
},
userBioText: {},
userBioLogo: {
marginLeft: SCREEN_WIDTH * 0.05,
width: SCREEN_WIDTH * 0.15
},
userTextSub: {
backgroundColor: "rgba(0,0,0,0.7)",
color: "white"
},
userText: {
backgroundColor: "rgba(0,0,0,0.7)",
color: "white",
fontWeight: "bold",
fontSize: 20
},
homeHeader: {
flex: 1,
height: SCREEN_HEIGHT * 0.3,
justifyContent: "center",
alignItems: "center"
},
userImage: {
width: 110,
height: 110,
borderWidth: 1,
borderRadius: 5,
borderWidth: 2,
borderColor: "white"
},
userBio: {
flex: 1,
padding: 10,
margin: 9,
backgroundColor: "white",
// height: SCREEN_HEIGHT*0.20,
color: "black",
borderRadius: 5
},
userStats: {
backgroundColor: "white",
height: SCREEN_HEIGHT * 0.2,
// padding: 10,
margin: 10,
borderRadius: 5,
marginTop: 10,
marginBottom: 0
},
userStatsTitle: {
margin:10,
color: "white",
fontSize: 17,
fontWeight: "bold",
padding: 1
},
userImageContainer: {
alignSelf: "center"
// transform: [{ rotate: '-15deg'}],
}
}); });
function mapStateToProps(state, props) { function mapStateToProps(state, props) {
return {
return { token: state.apiReducer.token,
user: state.apiReducer.user,
token: state.apiReducer.token, logged: state.apiReducer.logged,
user: state.apiReducer.user, userDetails: state.apiReducer.userDetails,
logged: state.apiReducer.logged, onHold: state.apiReducer.onHold
userDetails: state.apiReducer.userDetails, };
onHold: state.apiReducer.onHold
}
} }
function mapDispatchToProps(dispatch) { function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
return bindActionCreators(Actions, dispatch);
} }
export default connect(mapStateToProps, mapDispatchToProps)(Home); export default connect(
mapStateToProps,
mapDispatchToProps
)(Home);

View File

@ -45,8 +45,8 @@ class Profile extends Component {
super(props); super(props);
this.state = { this.state = {
name:this.props.user.Name, name: this.props.user.Name,
userDetails:{}, userDetails: {},
token: false, token: false,
tokenData: '', tokenData: '',
loggedIn: false, loggedIn: false,
@ -64,7 +64,7 @@ class Profile extends Component {
email: this.props.user.Email, email: this.props.user.Email,
emailError: false, emailError: false,
emailErrorMessage: '', emailErrorMessage: '',
phone: this.props.user.Mobile, phone: this.props.user.Mobile,
phoneError: false, phoneError: false,
@ -78,19 +78,35 @@ class Profile extends Component {
cityError: false, cityError: false,
cityErrorMessage: '', cityErrorMessage: '',
oldPass:'',
new1:'',
new2:'',
url:this.props.user.Url,
curso:this.props.user.LastName,
}; };
} }
_press=()=>{
this.props.changePassword(
this.props.userDetails.token,
this.state.oldPass,
this.state.new1,
this.state.new2
)
}
_logout = () => { _logout = () => {
this.props.logoutUser(); this.props.logoutUser();
}; };
_validateData = (name,jobs, email, phone, address, city) => { _validateData = (name, jobs, email, phone, address, city) => {
let valid = null; let valid = null;
v = Validate('name',name ); v = Validate('name', name);
let v = Validate('email', email); let v = Validate('email', email);
@ -138,29 +154,28 @@ class Profile extends Component {
saveData() { saveData() {
const {name,jobs, email, phone, address, city, formValid} = this.state; const {name, jobs, email, phone, address, city, formValid, url,curso} = this.state;
this._validateData(name,jobs, email, phone, address, city); // this._validateData(name, jobs, email, phone, address, city,curso);
console.log(formValid); console.log(formValid);
if (formValid){ if (formValid) {
console.log("data valid"); console.log("data valid");
this.props.updateUser(this.props.userDetails.token,{ this.props.updateUser(this.props.userDetails.token, {
Name: this.state.name, Name: this.state.name,
// LastName: "Último", Company: jobs,
Company: jobs, LastName: curso,
// Job: jobs, Address: address,
Address: address, City: city,
City: city, Mobile: phone,
// PostalCode: "3000-010", Avatar: "base64",
Url:url,
Mobile: phone, });
Avatar: "base64"
} ); this.props.getUserInfo(this.props.userDetails.token);
} }
else else
@ -176,27 +191,34 @@ class Profile extends Component {
<View style={styles.container}> <View style={styles.container}>
<View style={styles.userBioRowHeader}> <View style={styles.userBioRowHeader}>
<View style={styles.userBioRowTitle}> <View style={styles.userBioRowTitle}>
<Text style={{color: '#CC1A17', fontWeight: 'bold', fontSize: 20}}>User Bio</Text> <Text style={{color: '#CC1A17', fontWeight: 'bold', fontSize: 20}}>Informações Pessoais</Text>
</View>
<View>
<TouchableOpacity onPress={() => this.saveData()}>
<Icon name="ios-save" size={30}/><Text>Save</Text>
</TouchableOpacity>
</View> </View>
</View> </View>
<View style={styles.userBio}> <View style={styles.userBio}>
<View style={styles.userBioRow}> <View style={styles.userBioRow}>
<Icon name="ios-person" style={styles.userBioLogo} size={25}/> <Text style={styles.userBioLogo} >Nome</Text>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
onChangeText={(n) => { onChangeText={(n) => {
this.setState({name:n }) this.setState({name: n})
}} }}
value={this.state.name}/> value={this.state.name}/>
</View> </View>
<Divider style={{backgroundColor: 'black'}}/> <Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}> <View style={styles.userBioRow}>
<Icon name="ios-laptop" style={styles.userBioLogo} size={25}/> <Text style={styles.userBioLogo} >Curso</Text>
<TextInput style={styles.userBioText}
onChangeText={(cu) => {
this.setState({curso: cu})
}}
value={this.state.curso}/>
</View>
<Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}>
<Text style={styles.userBioLogo} >Faculdade</Text>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
onChangeText={(job) => { onChangeText={(job) => {
@ -206,10 +228,9 @@ class Profile extends Component {
</View> </View>
<Divider style={{backgroundColor: 'black'}}/> <Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}> <View style={styles.userBioRow}>
<Icon name="ios-phone-portrait" style={styles.userBioLogo} size={25}/> <Text style={styles.userBioLogo} >Telemóvel</Text>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
onChangeText={(phone) => { onChangeText={(phone) => {
@ -221,7 +242,7 @@ class Profile extends Component {
<View style={styles.userBioRow}> <View style={styles.userBioRow}>
<Icon name="ios-map" style={styles.userBioLogo} size={25}/> <Text style={styles.userBioLogo} >Morada</Text>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
onChangeText={(add) => { onChangeText={(add) => {
@ -233,22 +254,19 @@ class Profile extends Component {
<Divider style={{backgroundColor: 'black'}}/> <Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}> <View style={styles.userBioRow}>
<Icon name="ios-map" style={styles.userBioLogo} size={25}/> <Text style={styles.userBioLogo} >LinkedIn</Text>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
onChangeText={(city) => { onChangeText={(u) => {
this.setState({city: city}) this.setState({url: u})
}} }}
value={this.state.city}/> value={this.state.url}/>
</View> </View>
<Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}> <Button onPress={() => this.saveData() } title="Guardar Alterações" color="#CC1A17"
<Icon name="ios-person" style={styles.userBioLogo} size={25}/> />
<TouchableOpacity>
<Text style={styles.userCurriculum}>O meu Curriculo</Text>
</TouchableOpacity>
</View>
</View> </View>
</View> </View>
@ -256,46 +274,77 @@ class Profile extends Component {
<View style={styles.container}> <View style={styles.container}>
<View style={styles.userBioRowHeader}> <View style={styles.userBioRowHeader}>
<View style={styles.userBioRowTitle}> <View style={styles.userBioRowTitle}>
<Text style={{color: '#CC1A17', fontWeight: 'bold', fontSize: 20}}>Nova Password:</Text> <Text style={{color: '#CC1A17', fontWeight: 'bold', fontSize: 20}}>Alterar Password</Text>
</View> </View>
</View> </View>
<View style={styles.userBio}> <View style={styles.userBio}>
<View style={styles.userBioRow}>
<Text style={styles.userPassText} size={25}>
Old Password:
</Text>
<View style={styles.userBioRow}>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
placeholder='Antiga Password' secureTextEntry={true} placeholder='Antiga Password'
onChangeText={(old => {
this.setState({oldPass: old})
})}
value={this.state.oldPass}
maxLength = {20}
secureTextEntry={true}
/> />
</View> </View>
<Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}> <View style={styles.userBioRow}>
<Text style={styles.userPassText} size={25}>
Nova Password:
</Text>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
placeholder='Nova Password' secureTextEntry={true} placeholder='Nova Password'
secureTextEntry={true}
onChangeText={(newz => {
this.setState({new1: newz})
})}
value={this.state.new1}
maxLength = {20}
/> />
</View> </View>
<Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}> <View style={styles.userBioRow}>
<Text style={styles.userPassText} size={25}>
Repetir Password:
</Text>
<TextInput style={styles.userBioText} <TextInput style={styles.userBioText}
placeholder='Repetir Password' secureTextEntry={true} placeholder='Repetir Password'
secureTextEntry={true}
onChangeText={(newzz => {
this.setState({new2: newzz})
})}
value={this.state.new2}
maxLength = {20}
/> />
</View> </View>
<Button onPress={this._press} title="Alterar Password" color="#CC1A17"
/>
</View> </View>
</View> </View>
<TouchableOpacity onPress={this._logout} style={{
height: 50,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'black',
marginTop:30
}}>
<Text style={{color: "#fff", fontWeight: 'bold'}}>Logout</Text>
</TouchableOpacity>
</ScrollView> </ScrollView>
<TouchableOpacity onPress={this._logout} style={{ height: 50, justifyContent: 'center', alignItems: 'center', backgroundColor: '#CC1A17'}}>
<Text style={{color:"#fff", fontWeight: 'bold'}}>Logout</Text>
</TouchableOpacity>
</View> </View>
@ -330,23 +379,27 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'flex-start', justifyContent: 'flex-start',
padding: 10 padding: 10,
// borderWidth: 2,
alignItems: 'center',
}, },
userBioText: { userBioText: {
width: SCREEN_WIDTH * 0.50, width: SCREEN_WIDTH * 0.40,
flex: 2,
// borderWidth: 2,
}, },
userPassText: { userPassText: {
flex: 1, flex: 1,
flexDirection: 'row', //alignSelf: 'flex-start',
justifyContent: 'flex-start', justifyContent: 'flex-end',
borderWidth: 2,
}, },
userBioLogo: { userBioLogo: {
marginLeft: SCREEN_WIDTH * 0.05, marginLeft: 10,
width: SCREEN_WIDTH * 0.15, width:80,
}, },
bottomLogOut: { bottomLogOut: {

View File

@ -1,121 +1,174 @@
import React from 'react'; 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 QRCodeScanner from 'react-native-qrcode-scanner';
import {UtilStyles} from '../assets/styles' import {UtilStyles} from '../assets/styles'
import CodeInput from 'react-native-confirmation-code-input'; import CodeInput from 'react-native-confirmation-code-input';
import Modal from "react-native-modal"; 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, import IconMI from "react-native-vector-icons/MaterialIcons"
RkTheme , RkText} from 'react-native-ui-kitten';
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 { export default class Scan extends React.Component {
_toggleModal = () => _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(); this.scanner.reactivate();
} }
onSuccess = (e) => { onSuccess = (e) => {
this.setState({ isModalVisible: !this.state.isModalVisible ,isActive:false}); this.setState({isModalVisible: !this.state.isModalVisible, isActive: false});
this.setState({code:e.data}); this.setState({code: e.data});
}; };
state = {
isActive:true, state = {
isRender: true, isActive: true,
reactivate:false, isRender: true,
isModalVisible: false, reactivate: false,
code:'' isModalVisible: false,
code: '',
}
componentDidMount() { 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.props.navigation.addListener('willFocus', (route) => {
this.setState({ isRender: true }) this.setState({isRender: true})
}); });
this.props.navigation.addListener('willBlur', (route) => { this.props.navigation.addListener('willBlur', (route) => {
this.setState({ isRender: false }) this.setState({isRender: false})
}); });
} }
render() {
{
return ( render() {
<View style={{flex: 1}}> /*Screen SCAN*/
const scanScreen = () => (
{ this.state.isRender && <QRCodeScanner
<QRCodeScanner
showMarker showMarker
ref={(node) => { this.scanner = node }} ref={(node) => {
this.scanner = node
}}
reactivate={false} reactivate={false}
cameraProps={{captureAudio: false}}
onRead={this.onSuccess.bind(this)} onRead={this.onSuccess.bind(this)}
showMarker={true} showMarker={true}
cameraStyle={{height: SCREEN_HEIGHT}}
cameraStyle={{ height: SCREEN_HEIGHT }}
fadeIn={true} fadeIn={true}
customMarker={ customMarker={
<View style={{flex: 1}}>
<View style={{ flex: 1 }}> <Modal isVisible={this.state.isModalVisible}
style={{backgroundColor: '#E8E8E8', borderRadius: 30, height: 100}}>
<Modal isVisible={this.state.isModalVisible} style={{backgroundColor:'#E8E8E8', borderRadius:30, height:100}}> <View style={{flex: 1}}>
<View style={{ flex: 1 }}> <Text></Text>
<Text></Text> <Text> Qr code data: {this.state.code}</Text>
<Text> Qr code data: {this.state.code}</Text> <Button onPress={this._activate} title="Close" color="#841584"
<Button onPress={this._activate} title="Close" color="#841584" accessibilityLabel="Learn more about this purple button"/> accessibilityLabel="Learn more about this purple button"/>
</View>
</View> </Modal>
</Modal> </View>
</View>
} }
/> />
} );
</View>
)} const historyScreen = () => (
<View style={{backgroundColor: '#ff4081'}}>
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> </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>
);
}
} }
RkTheme.setType('RkButton', 'dark', { RkTheme.setType('RkButton', 'dark', {
container: { container: {
paddingTop:10, paddingTop: 10,
backgroundColor: 'gray', backgroundColor: 'gray',
borderRadius: 90, borderRadius: 90,
} }
}); });
const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a 393 device width 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 overlayColor = 'rgba(0,0,0,0.30)';
const styles = { const styles = {
recover:{ recover: {
paddingTop:10, paddingTop: 10,
color: "red", color: "red",
paddingBottom:10 paddingBottom: 10
}, },
manual:{ manual: {},
}, logo: {
logo:{
height:SCREEN_HEIGHT*0.35, height: SCREEN_HEIGHT * 0.35,
width:SCREEN_WIDTH, width: SCREEN_WIDTH,
backgroundColor: overlayColor, backgroundColor: overlayColor,
}, },
rectangleContainer: { rectangleContainer: {
flex: 1, flex: 1,
alignItems: "center", alignItems: "center",
justifyContent: "center", justifyContent: "center",
backgroundColor: "transparent", backgroundColor: "transparent",
}, },
rectangle: { rectangle: {
height: rectDimensions, height: rectDimensions,
width: rectDimensions, width: rectDimensions,
alignItems: "center", alignItems: "center",

View File

@ -1,15 +1,17 @@
import * as React from 'react'; import * as React from 'react';
import { import {
View, View,
StyleSheet, StyleSheet,
Dimensions, Dimensions,
Image, Image,
ScrollView, ScrollView,
Text, Text,
Button, Button,
TouchableOpacity TouchableOpacity,
} from 'react-native'; ImageBackground
} from 'react-native';
import {Divider, Icon, Avatar} from 'react-native-elements'
import {TabView, TabBar, SceneMap} from 'react-native-tab-view'; import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
import { import {
RkButton, RkCard, RkText, RkButton, RkCard, RkText,
@ -19,6 +21,7 @@ import Timeline from 'react-native-timeline-feed'
import * as Progress from 'react-native-progress'; import * as Progress from 'react-native-progress';
import NavAbsolute from '../components/Nav';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
@ -29,8 +32,10 @@ import Swiper from 'react-native-swiper';
const SCREEN_HEIGHT = Dimensions.get("window").height; const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width; const SCREEN_WIDTH = Dimensions.get("window").width;
import FitImage from 'react-native-fit-image'; import FitImage from 'react-native-fit-image';
import MapView, {PROVIDER_GOOGLE} from 'react-native-maps';
const formatObj = (obj) => { const formatObj = (obj) => {
@ -43,26 +48,38 @@ const formatObj = (obj) => {
}; };
class calendarDetail extends React.Component { class calendarDetail extends React.Component {
state = {
static navigationOptions = ({navigation}) => ({
}; header: (
<NavAbsolute
navigation={navigation}
// title={navigation.state.params.info.name}
/>
),
});
state = {};
componentDidMount() { componentDidMount() {
this.props.getEvents(this.props.user); this.props.getEvents(this.props.user);
console.log('didMount'); console.log('didMount');
console.log(this.props.events); console.log(this.props.events);
const {navigation} = this.props;
const info = navigation.getParam('info', 'error');
console.log("putas")
console.log(info)
} }
_update = () => { _update = () => {
this.setState({user: this.props.user}); this.setState({user: this.props.user});
console.log(this.props.events); console.log(this.props.events);
} };
constructor(props) { constructor(props) {
@ -70,97 +87,347 @@ class calendarDetail extends React.Component {
super(props) super(props)
this.data = []
this.data = [
]
} }
render() { renderHeader = (info) => {
const { navigation } = this.props;
const info = navigation.getParam('info', 'error');
console.log(info);
return ( return (
<View> <View style={styles.headerContainer}>
<Text>{info.name}, {info.description}</Text> <View style={styles.coverContainer}>
<ImageBackground
source={{
uri: info.imageUrl,
}}
style={styles.coverImage}
>
</ImageBackground>
</View>
</View> </View>
) )
};
renderDescription = (info) => {
return (
<View>
<View style={styles.header}>
<View style={{flexDirection: "row", alignItems: 'center', alignSelf:'center'}}>
<View style={styles.timeText}>
<Text style={{color: "#CC1A17", fontSize: 15}}>
{info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}
</Text>
</View>
</View>
<View><Text style={{margin:10,marginTop:0, fontSize:20, color:'#CC1A17'}}>{info.name}</Text></View>
<View style={{margin:10}}>
<Progress.Bar color={'#000000'} progress={info.Enrolled / info.MaxAttendees} height={10}
unfilledColor={'white'} width={210}/>
<Text >{info.Enrolled} / {info.MaxAttendees}</Text>
</View>
<Divider style={{backgroundColor: '#000'}}/>
<View>
<Text style={{fontSize:15, color:'#CC1A17', padding:10}}>Descrição</Text>
<Text style={{paddingLeft:10, paddingRigh:10}}></Text>
</View>
</View>
<View style={styles.block}>
<Text style={{fontSize: 20, color: "#CC1A17"}}>Descrição</Text>
<Divider style={{backgroundColor: '#000'}}/>
<View style={{marginTop: 10}}>
<Text>
{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');
return (
<View style={styles.mainViewStyle}>
<ScrollView style={styles.scroll}>
<View style={styles.container}>
<View style={styles.headerContainer}>
{this.renderHeader(info)}
</View>
{this.renderDescription(info)}
</View>
<View style={styles.block}>
<Text style={{fontSize: 20, color: "#CC1A17"}}>Localização</Text>
<Divider style={{backgroundColor: '#000', marginBottom: 10}}/>
</View>
</ScrollView>
<Divider style={{backgroundColor: 'black'}}/>
</View>
)
} }
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
carreerPathContainer:{ block:{
backgroundColor:'#CC1A17', marginTop:15,
height:50,
flex:1, backgroundColor:'white',
alignItems:'center', padding:20
justifyContent:'center',
paddingTop:15,
}, },
carreerPathText:{ AttendeeContainer: {
flexDirection: 'row',
height: 55,
justifyContent: 'center',
marginLeft: 10,
marginRight: 10,
},
centerRow: {
alignItems: 'center',
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: 'white',
fontSize: 17,
fontWeight: '400',
},
timeText: {
alignItems: 'flex-end',
flex: 2,
lineHeight: 10,
marginRight: 4,
},
mainViewStyle: {
flex: 1,
flexGrow: 1,
flexDirection: 'column',
},
scroll: {
backgroundColor: '#eee',
flex: 1,
//marginBottom: 55,
},
header:{
flex: 1,
padding: 10,
backgroundColor: 'white',
borderRadius: 0,
height:50, },
color:'white', cardContainer: {
fontWeight:'bold', flex: 1,
fontSize:20, padding: 10,
// margin: 20,
backgroundColor: 'white',
borderRadius: 5,
},
headerContainer: {
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:{ companyHeader: {
backgroundColor:'#dddddd', backgroundColor: '#dddddd',
// height:150, // height:150,
borderRadius:5, borderRadius: 5,
margin:10, margin: 10,
padding:10 padding: 10
}, },
companyTitle:{ companyTitle: {
paddingBottom:5, paddingBottom: 5,
fontWeight:'bold', fontWeight: 'bold',
color:'#777777', color: '#777777',
fontSize:17, fontSize: 17,
// padding:20 // padding:20
}, },
companyLogo: { companyLogo: {
borderRadius: 20, borderRadius: 20,
},
wrapper: {
},
company:{
flex:1,
flexDirection:'row',
// backgroundColor:'red',
color:'black'
}, },
companyLogoContainer:{ wrapper: {},
flex:1, company: {
flex: 1,
flexDirection: 'row',
// backgroundColor:'red',
color: 'black'
},
companyLogoContainer: {
flex: 1,
justifyContent: 'center', justifyContent: 'center',
width:'60%', width: '60%',
// backgroundColor:'white', // backgroundColor:'white',
margin:20, margin: 20,
}, },
aboutCompany:{ aboutCompany: {
width:SCREEN_WIDTH, width: SCREEN_WIDTH,
flex:1, flex: 1,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
} }
});
});
function mapStateToProps(state, props) { function mapStateToProps(state, props) {
@ -170,7 +437,8 @@ function mapStateToProps(state, props) {
token: state.apiReducer.token, token: state.apiReducer.token,
user: state.apiReducer.user, user: state.apiReducer.user,
logged: state.apiReducer.logged, logged: state.apiReducer.logged,
events: state.apiReducer.events events: state.apiReducer.events,
careerPath: state.apiReducer.careerPath,
} }
} }

View File

@ -1,427 +1,519 @@
import * as React from 'react'; import * as React from "react";
import { import {
View, View,
StyleSheet, StyleSheet,
Dimensions, Dimensions,
Image, ScrollView,
ScrollView, Text,
Text, Button,
Button, TouchableOpacity,
TouchableOpacity, Picker,
Picker, ActivityIndicator,
CheckBox,
ActivityIndicator, FlatList
SectionList, } from "react-native";
FlatList import moment from "moment";
} from 'react-native';
import {TabView, TabBar, SceneMap} from 'react-native-tab-view'; import Modal from "react-native-modal";
import {
RkButton, RkCard, RkText,
RkTheme
} from 'react-native-ui-kitten';
import Timeline from 'react-native-timeline-feed'
import * as Progress from 'react-native-progress';
import {connect} from 'react-redux'; import * as Progress from "react-native-progress";
import {bindActionCreators} from 'redux'; import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import * as Actions from "../store/actions"; //Import your actionss
import AwesomeAlert from 'react-native-awesome-alerts';
import * as Actions from '../store/actions'; //Import your actionss
import Swiper from 'react-native-swiper';
const SCREEN_HEIGHT = Dimensions.get("window").height; const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width; const SCREEN_WIDTH = Dimensions.get("window").width;
import FitImage from 'react-native-fit-image';
import { Dropdown } from 'react-native-material-dropdown'; import FitImage from "react-native-fit-image";
import {Card, Divider} from 'react-native-elements'
import IconF from "react-native-vector-icons/Foundation"
import LinearGradient from 'react-native-linear-gradient';
const formatObj = (obj) => { import { Divider } from "react-native-elements";
let a = {};
a.push({})
return a
};
import LinearGradient from "react-native-linear-gradient";
import IconFA from "react-native-vector-icons/FontAwesome5";
class choosePath extends React.Component { class choosePath extends React.Component {
_verifySession = Id => {
var sessions = this.props.user.Sessions;
for (let key in sessions) {
if (sessions[key].Id == Id) return true;
// cenas.push(result[key]);
console.log();
}
};
static navigationOptions = ({ navigation }) => ({
headerTitleStyle: { textAlign: "center", alignSelf: "center" },
headerStyle: {
backgroundColor: "rgba(0,0,0,0)",
shadowRadius: 0,
elevation: 0
}
});
static navigationOptions = ({ navigation }) => ({ state = {
calendar: {},
headerTitleStyle : {textAlign: 'center',alignSelf:'center'}, guest: "9"
headerStyle:{ };
backgroundColor:'rgba(0,0,0,0)',
shadowRadius:0,
elevation:0
},
});
state = { _mount = () => {
calendar:{}, var sessions = this.props.sessions;
guest:'9'
for (let key in sessions) {
if (sessions[key].Name == "IA") {
this.setState({ guest: "9" });
}
//...
}
};
componentDidMount() {
// this.props.getEvents(this.props.user);
this.props.getAvailableGuestlists(this.props.userDetails.token);
this.props.getSessions(this.props.userDetails.token);
this._mount();
//console.log('didMount');
// console.log(this.props.events);
}
_update = () => {
this.setState({ user: this.props.user });
console.log(this.props.events);
};
_findPath = id => {
var sessions = this.props.sessions;
for (let key in sessions) {
if (sessions[key].Name == id) {
return true;
}
}
return false;
};
constructor() {
super();
this.state = {
showAlert:true,
Blocks: [],
onHoldBlocks: true,
checked: true,
modalVisible: false,
isModalVisible: false,
}; };
componentDidMount() { this.data = [];
}
onPress = () => {
};
// this.props.getEvents(this.props.user); _s() {
this.props.getAvailableGuestlists(this.props.userDetails.token)
console.log('didMount'); this.props.signSession(this.props.userDetails.token, item[index].Id);
console.log(this.props.events); }
} getCareerPaths = () => {
this.props.getAvailableGuestlists(this.props.userDetails.token);
console.log(this.props.calendar);
};
_keyExtractor = (item, index) => item.id;
_renderItem = ({ item }) => (
<MyListItem
id={item.id}
onPressItem={this._onPressItem}
selected={!!this.state.selected.get(item.id)}
title={item.title}
/>
);
_toggleModal = () =>
this.setState({ isModalVisible: !this.state.isModalVisible });
_update = () => {
this.setState({user: this.props.user}); _onPressItem = id => {
console.log(this.props.events); // updater functions are preferred for transactional updates
} this.setState(state => {
// copy the map rather than modifying state.
const selected = new Map(state.selected);
selected.set(id, !selected.get(id)); // toggle
return { selected };
});
};
_render = ({ item }) => {
<Text>Cenas: {item.Name}</Text>;
};
constructor() { render() {
return (
<View>
<ScrollView style={styles.page}>
super() {this._findPath("IA") && (
<LinearGradient
colors={["#D95856", "#CC1A17"]}
style={styles.linearGradient}
this.data = [ >
<Text
style={{
margin: 15,
] marginBottom: 0,
} fontWeight: "bold",
getCareerPaths=()=>{ color: "white"
}}
this.props.getAvailableGuestlists(this.props.userDetails.token) >
console.log(this.props.calendar) {" "}
} Empresa responsável:{" "}
_keyExtractor = (item, index) => item.id; </Text>
<View style={styles.companyContainer}>
_renderItem = ({item}) => ( <View style={styles.companyDescription}>
<MyListItem <Text
id={item.id} style={{
onPressItem={this._onPressItem} fontSize: 16,
selected={!!this.state.selected.get(item.id)} fontWeight: "bold",
title={item.title} margin: 6,
/> color: "white"
); }}
_onPressItem = (id) => { >
// updater functions are preferred for transactional updates Critical Software
this.setState((state) => { </Text>
// copy the map rather than modifying state. <Text style={{ margin: 6, marginTop: 0, color: "white" }}>
const selected = new Map(state.selected); A CRITICAL Software fornece sistemas e serviços de software
selected.set(id, !selected.get(id)); // toggle para segurança e aplicações essenciais aos negócios.
return {selected}; </Text>
}); </View>
}; <View style={styles.companyLogo}>
<FitImage
render() { source={{
uri:
"https://upload.wikimedia.org/wikipedia/commons/8/8a/CSW_Gradiente_rgb.png"
return ( }}
<ScrollView style={styles.page}> style={styles.fitImage}
/>
</View>
{this.state.guest=='9' && <LinearGradient colors={[ '#D95856', '#CC1A17']} style={styles.linearGradient}> </View>
<Text style={{margin:15,marginBottom:0, fontWeight:'bold', color:'white'}}> Empresa responsável: </Text> </LinearGradient>
<View style={styles.companyContainer}> )}
<View style={styles.companyDescription}> {this._findPath("NET") && (
<Text style={{fontSize:16, fontWeight:'bold', margin:6, color:'white'}}>Critical Software</Text> <LinearGradient
<Text style={{margin:6, marginTop:0, color:'white'}}>A CRITICAL Software fornece sistemas e serviços de software para segurança e colors={["#5887FF", "#715AFF"]}
aplicações essenciais aos negócios.</Text> style={styles.linearGradient}
</View> >
<View style={styles.companyLogo}> <Text
<FitImage style={{
source={{ uri: 'https://upload.wikimedia.org/wikipedia/commons/8/8a/CSW_Gradiente_rgb.png' }} margin: 15,
style={styles.fitImage} marginBottom: 0,
/> fontWeight: "bold",
</View> color: "white"
</View> }}
</LinearGradient>} >
{this.state.guest=='10' && <LinearGradient colors={[ '#5887FF', '#715AFF']} style={styles.linearGradient}> {" "}
<Text style={{margin:15,marginBottom:0, fontWeight:'bold', color:'white'}}> Empresa responsável: </Text> Empresa responsável:{" "}
<View style={styles.companyContainer}> </Text>
<View style={styles.companyDescription}> <View style={styles.companyContainer}>
<Text style={{fontSize:16, fontWeight:'bold', margin:6, color:'white'}}>Altice</Text> <View style={styles.companyDescription}>
<Text style={{margin:6, marginTop:0, color:'white'}}>Altice é uma multinacional neerlandesa de telecomunicações, conteúdos, media, entretenimento e publicidade.</Text> <Text
</View> style={{
<View style={styles.companyLogo}> fontSize: 16,
<FitImage fontWeight: "bold",
source={{ uri: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTuIfl0Km4mTbCGdJSr4bWn_ApFHnOrjYsmJ4VlBL1OkaIlb93t' }} margin: 6,
style={styles.fitImage} color: "white"
/> }}
</View> >
</View> Altice
</LinearGradient>} </Text>
<Text style={{ margin: 6, marginTop: 0, color: "white" }}>
Altice é uma multinacional neerlandesa de telecomunicações,
conteúdos, media, entretenimento e publicidade.
<View style={{flex:1,width:SCREEN_WIDTH*0.7, alignContent:'center'}}> </Text>
</View>
<View style={styles.companyLogo}>
<View style={styles.pickerCareer}> <FitImage
<Picker source={{
selectedValue={this.state.guest} uri:
style={{width:'100%'}} "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTuIfl0Km4mTbCGdJSr4bWn_ApFHnOrjYsmJ4VlBL1OkaIlb93t"
onValueChange={(itemValue, itemIndex) =>{ }}
this.setState({guest: itemValue}) style={styles.fitImage}
this.props.waitChangeGuest(); />
this.props.changeGuestList(this.props.userDetails.token,itemValue) </View>
this.props.waitChangeGuest(); </View>
this.props.getAvailableSessions(this.props.userDetails.token); </LinearGradient>
}
}>
<Picker.Item label="Inteligência Artificial" value="9" />
<Picker.Item label="Redes e Segurança" value="10" />
<Picker.Item label="Data Science" value="15" />
<Picker.Item label="Desenvolvimento Web" value="14" />
<Picker.Item label="Internet das Coisas" value="12" />
<Picker.Item label="Desenvolvimento Mobile" value="11" />
</Picker>
</View>
<FlatList
data={this.state.data}
renderItem={({ item }) => (
<ListItem
title={`${item.name.first} ${item.name.last}`}
subtitle={item.email}
avatar={{ uri: item.picture.thumbnail }}
containerStyle={{ borderBottomWidth: 0 }}
/>
)} )}
keyExtractor={item => item.email}
/>
</View > <View
{ !this.props.changingGuest && style={{ flex: 1, width: SCREEN_WIDTH * 0.7, alignContent: "center" }}
>
<View style={styles.block}> <View style={styles.pickerCareer}>
<Picker
<View style={styles.time}> selectedValue={this.state.guest}
<Text style={ style={{ width: "100%" }}
{ onValueChange={(itemValue, itemIndex) => {
margin:10, this.setState({ guest: itemValue });
fontSize:25, // this.props.timerChangeGuest();
color:'#CC1A17', this.props.waitChangeGuest();
marginBottom:0
}
}>
9:00</Text>
<Text style={{marginLeft:20}}>até</Text>
<Text style={
{
margin:10,
fontSize:25,
color:'#CC1A17',
marginTop:5
}
}>
9:30</Text>
</View>
<View style={styles.sessions}>
this.props.changeGuestList(
this.props.userDetails.token,
itemValue
);
// this.props.waitChangeGuest();
// this.props.getAvailableSessions(this.props.userDetails.token);
// this.props.waitChangeGuest();
// this.props.getSessionBlocks(this.props.sessions)
}}
>
<Picker.Item label="Escolhe o teu career path!" value="0" />
<Picker.Item label="Inteligência Artificial" value="9" />
<Picker.Item label="Redes e Segurança" value="10" />
<Picker.Item label="Data Science" value="15" />
<Picker.Item label="Desenvolvimento Web" value="14" />
<Picker.Item label="Internet das Coisas" value="12" />
<Picker.Item label="Desenvolvimento Mobile" value="11" />
</Picker>
</View>
<View style={{ width: SCREEN_WIDTH }}>
{!this.props.changingGuest && (
<FlatList
data={this.props.Blocks}
renderItem={({ item, index }) => (
<View style={styles.block}>
<View style={styles.time}>
<Text
style={{
margin: 10,
fontSize: 25,
color: "#CC1A17",
marginBottom: 0
}}
>
{moment(item[0].SessionStart).format("HH:mm")}
</Text>
<Text style={{ marginLeft: 20 }}>às</Text>
<Text
style={{
margin: 10,
fontSize: 25,
color: "#CC1A17",
marginTop: 5
}}
>
{moment(item[0].SessionEnd).format("HH:mm")}
</Text>
</View>
<View style={styles.sessions}>
<FlatList
data={item}
renderItem={({ data, index }) => (
<View>
<View style={styles.session}> <View style={styles.session}>
{this._verifySession(item[index].Id) && (
<TouchableOpacity
onPress={() => {
this.props.removeSession(
this.props.user,
this.props.userDetails.token,
item[index].Id
);
}}
style={{ flex: 1, alignSelf: "center" }}
>
<View>
<IconFA
name="check-square"
color={"#CC1A17"}
size={35}
/>
</View>
</TouchableOpacity>
)}
{!this._verifySession(item[index].Id) && (
<TouchableOpacity
onPress={() => {
//this.props.waitChangeGuest()
this.props.signSession(
this.props.user,
this.props.userDetails.token,
item[index].Id
);
}}
style={{ flex: 1, alignSelf: "center" }}
>
<View>
<IconFA name="square" size={35} />
</View>
</TouchableOpacity>
)}
<CheckBox <TouchableOpacity
style={{margin:10}} onPress={() =>
value={this.state.checkbox1} this.props.navigation.navigate("febrada")
onChange={() => this.setState({ checkbox1: !this.state.checkbox1 })} }
/> >
<TouchableOpacity><View style={styles.sessionInfo}> <View style={styles.sessionInfo}>
<Text style={styles.sessionTitle}>Nome da palestra</Text> <Text style={styles.sessionTitle}>
<Text style={{marginTop:10, marginBottom:5}}>12 Lugares disponíveis</Text> {item[index].Name}
<Progress.Bar color={'#000000'} progress={0.3} unfilledColor={'white'} width={150}/> </Text>
</View></TouchableOpacity> <Text
style={{ marginTop: 10, marginBottom: 5 }}
>
{item[index].MaxAttendees -
item[index].Enrolled}{" "}
Lugares disponíveis
</Text>
<Progress.Bar
color={"#000000"}
progress={
item[index].Enrolled /
item[index].MaxAttendees
}
unfilledColor={"white"}
width={170}
/>
</View>
</TouchableOpacity>
</View> </View>
<Divider style={{ backgroundColor: '#eeeeee' }} /> <Divider style={{ backgroundColor: "#eeeeee" }} />
</View>
<View style={styles.session}> )}
/>
<CheckBox
style={{margin:10}}
value={this.state.checkbox1}
onChange={() => this.setState({ checkbox1: !this.state.checkbox1 })}
/>
<TouchableOpacity><View style={styles.sessionInfo}>
<Text style={styles.sessionTitle}>Nome da palestra</Text>
<Text style={{marginTop:10, marginBottom:5}}>12 Lugares disponíveis</Text>
<Progress.Bar color={'#000000'} progress={0.3} unfilledColor={'white'} width={150}/>
</View></TouchableOpacity>
</View>
<Divider style={{ backgroundColor: '#eeeeee' }} />
<View style={styles.session}>
<CheckBox
style={{margin:10}}
value={this.state.checkbox1}
onChange={() => this.setState({ checkbox1: !this.state.checkbox1 })}
/>
<TouchableOpacity><View style={styles.sessionInfo}>
<Text style={styles.sessionTitle}>Nome da palestra</Text>
<Text style={{marginTop:10, marginBottom:5}}>12 Lugares disponíveis</Text>
<Progress.Bar color={'#000000'} progress={0.3} unfilledColor={'white'} width={150}/>
</View></TouchableOpacity>
</View>
<Divider style={{ backgroundColor: '#eeeeee' }} />
</View>
</View> </View>
} </View>
{this.props.changingGuest && )}
/>
)}
</View>
</View>
<ActivityIndicator size="large" color="red"/> {(this.props.changingGuest || this.props.Blocks == true) && (
} <View style={{ flex:1, height:SCREEN_HEIGHT*0.6, alignSelf:'center',}}>
<ActivityIndicator
size="large"
color="red"
</ScrollView> style={{ alignContent: "center" , alignSelf:'center', marginTop:SCREEN_HEIGHT*0.2}}
); /></View>
} )}
</ScrollView>
</View>
);
}
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
companyLogo:{ companyLogo: {
backgroundColor:'white', backgroundColor: "white",
margin:20, margin: 20,
width:SCREEN_WIDTH*0.35, width: SCREEN_WIDTH * 0.35,
borderRadius:3, borderRadius: 3,
padding:5 padding: 5
}, },
companyDescription:{ companyDescription: {
// backgroundColor:'white', // backgroundColor:'white',
margin:20, margin: 20,
marginRight:0, marginRight: 0,
width:SCREEN_WIDTH*0.5, width: SCREEN_WIDTH * 0.5,
borderRadius:3, borderRadius: 3
}, },
sessionInfo:{ sessionInfo: {
margin:5 margin: 5
}, },
sessionTitle:{ sessionTitle: {
fontSize:15, fontSize: 15,
fontWeight:'bold' fontWeight: "bold"
}, },
day:{ day: {
margin:10 margin: 10
}, },
dayText:{ dayText: {
fontSize:20, fontSize: 20,
color: '#CC1A17', color: "#CC1A17",
textAlign: 'center', textAlign: "center"
},
}, time: {
time:{ alignContent: "center",
alignContent:'center', width: SCREEN_WIDTH * 0.23,
width:SCREEN_WIDTH*0.20, backgroundColor: "white"
backgroundColor:'white'
},
block:{
flex:1,
flexDirection:'row',
backgroundColor:'red',
margin:10,
borderRadius:5
},
companyContainer:{
flex:1,
// backgroundColor:'blue',
flexDirection:'row',
marginTop:0
}, },
block: {
sessions:{ flex: 1,
flex:1, flexDirection: "row",
flexDirection:'column', backgroundColor: "red",
margin: 10,
backgroundColor:'white', borderRadius: 5
}, },
page:{ companyContainer: {
backgroundColor:'#eeeeee', flex: 1,
// backgroundColor:'blue',
},
pickerCareer:{
paddingLeft:30,
paddingRight:30,
backgroundColor:'white',
width:SCREEN_WIDTH,
flexDirection: "row",
marginTop: 0
}, },
session:{
margin:10, sessions: {
flex:1, flex: 1,
flexDirection:'row', flexDirection: "column",
backgroundColor: "white"
},
page: {
backgroundColor: "#eeeeee"
},
pickerCareer: {
paddingLeft: 30,
paddingRight: 30,
backgroundColor: "white",
width: SCREEN_WIDTH
},
session: {
margin: 10,
flex: 1,
flexDirection: "row"
} }
}); });
function mapStateToProps(state, props) { function mapStateToProps(state, props) {
return {
return { // token: state.apiReducer.token,
showAlert: state.apiReducer.showAlert,
// token: state.apiReducer.token, user: state.apiReducer.user,
user: state.apiReducer.user, logged: state.apiReducer.logged,
logged: state.apiReducer.logged, events: state.apiReducer.events,
events: state.apiReducer.events, userDetails: state.apiReducer.userDetails,
userDetails: state.apiReducer.userDetails, calendar: state.apiReducer.calendar,
calendar : state.apiReducer.calendar, changingGuest: state.apiReducer.changingGuest,
changingGuest : state.apiReducer.changingGuest, sessions: state.apiReducer.sessions,
sessions:state.apiReducer.sessions, Blocks: state.apiReducer.Blocks,
showAlert: state.apiReducer.showAlert
};
}
} }
function mapDispatchToProps(dispatch) { function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
return bindActionCreators(Actions, dispatch);
} }
export default connect(mapStateToProps, mapDispatchToProps)(choosePath); export default connect(
mapStateToProps,
mapDispatchToProps
)(choosePath);

View File

@ -0,0 +1,29 @@
import React, {Component} from 'react';
import {
ActivityIndicator,
AsyncStorage,
Button,
StatusBar,
StyleSheet,
View,
} from 'react-native';
import {UtilStyles} from '../assets/styles'
export default class resetPassword extends Component {
constructor() {
super();
this._bootstrapAsync();
}
// Render Loading
render() {
return (
<View style={UtilStyles.containerLoading}>
<Text>Reset Password</Text>
</View>
);
}
}

View File

@ -9,6 +9,12 @@ export const LOGOUT_USER= 'LOGOUT_USER';
export const USER_INFO= 'USER_INFO' export const USER_INFO= 'USER_INFO'
export const HOLD='HOLD' export const HOLD='HOLD'
export const GET_EVENTS='GET_EVENTS' export const GET_EVENTS='GET_EVENTS'
export const UPDATE_USER='UPDATE_USER'
export const RESET_PASSWORD='RESET_PASSWORD'
export const CHECK_AND_RENEW='CHECK_AND_RENEW'
//API BLUETREND CALENDÁRIO //API BLUETREND CALENDÁRIO
@ -17,7 +23,7 @@ export const CHANGE_GUEST = 'CHANGE_GUEST'
export const GET_SESSIONS= 'GET_SESSIONS' export const GET_SESSIONS= 'GET_SESSIONS'
export const SIGN_SESSION= 'SIGN_SESSION' export const SIGN_SESSION= 'SIGN_SESSION'
export const WAIT_CHANGE='WAIT_CHANGE' export const WAIT_CHANGE='WAIT_CHANGE'
export const REMOVE_SESSION = 'REMOVE_SESSION'
//UI //UI
@ -29,6 +35,9 @@ export const UI_LOGIN_PASSWORD_INPUT_LOADING='UI_LOGIN_PASSWORD_INPUT_LOADING'
export const UI_LOGIN_PASSWORD_INPUT_INVALID='UI_LOGIN_PASSWORD_INPUT_INVALID' export const UI_LOGIN_PASSWORD_INPUT_INVALID='UI_LOGIN_PASSWORD_INPUT_INVALID'
export const UI_LOGIN_NOINTERNET='UI_LOGIN_NOINTERNET' export const UI_LOGIN_NOINTERNET='UI_LOGIN_NOINTERNET'
export const UI_LOGIN_OPEN_SCANNER='UI_LOIN_OPEN_SCANNER' export const UI_LOGIN_OPEN_SCANNER='UI_LOIN_OPEN_SCANNER'
export const LOADINGLOGIN = 'LOADINGLOGIN'
//HOME
export const OPEN_MODAL='OPEN_MODAL'
export const CLOSE_MODAL='CLOSE_MODAL'

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,26 @@
export {checkUser, export {checkUser,
login,getEvents, login,
hold, getUserInfo, getEvents,
hold,
getUserInfo,
logoutUser, logoutUser,
getAvailableGuestlists, getAvailableGuestlists,
changeGuestList, changeGuestList,
waitChangeGuest, waitChangeGuest,
getAvailableSessions, getAvailableSessions,
updateUser, updateUser,
getSessionBlocks,
timerChangeGuest,
getSessions,
signSession,
openModal,
closeModal,
loginInternal,
waitLogin,
removeSession,
changePassword,
resetPassword
} from "./api" } from "./api"
export { export {

View File

@ -1,182 +1,269 @@
import { DATA_AVAILABLE, API_LOGIN, CHECK_USER, LOGOUT_USER, USER_INFO, HOLD, GET_EVENTS, GET_CAREERS, CHANGE_GUEST, WAIT_CHANGE, GET_SESSIONS } from "../actions/actionTypes" //Import the actions types constant we defined in our actions import {
import { REHYDRATE } from 'redux-persist'; DATA_AVAILABLE,
API_LOGIN,
let apiState= { CHECK_USER,
LOGOUT_USER,
USER_INFO,
HOLD,
GET_EVENTS,
GET_CAREERS,
CHANGE_GUEST,
WAIT_CHANGE,
GET_SESSIONS,
SESSION_BLOCKS,
TIMERWAIT_CHANGE,
SIGN_SESSION,
OPEN_MODAL,
CLOSE_MODAL,
LOADINGLOGIN,
REMOVE_SESSION,
UPDATE_USER,
} from "../actions/actionTypes"; //Import the actions types constant we defined in our actions
isConnected:false, import { REHYDRATE } from "redux-persist";
logged:false,
onHold:true,user:{},
events:[],
failedAttempt:false,
userDetails:{
username:'',
password:'',
token:{
expirationDateToken:0,
access_token:''
}
},
calendar:{
}, let apiState = {
changingGuest:false, isConnected: false,
sessions:{} logged: false,
onHold: true,
} user: {},
events: [],
showAlert: true,
failedAttempt: false,
userDetails: {
username: "",
password: "",
token: {
expirationDateToken: 0,
access_token: ""
}
},
calendar: {},
changingGuest: false,
sessions: {},
Blocks: {},
onHoldBlocks: true,
careerPath: { name: "Sem Career Path", color: "#eeeeee" },
a: {},
b: {},
c: {},
d: {},
loadingLogin: false
};
const apiReducer = (state = apiState, action) => { const apiReducer = (state = apiState, action) => {
switch (action.type) {
switch(action.type){ case REHYDRATE:
console.log(action);
if (action.payload != undefined) {
console.log(action.payload);
case REHYDRATE: var expirationDateTokenA = 0;
console.log(action) var access_tokenA = "";
if(action.payload!=undefined){
console.log( action.payload)
var expirationDateTokenA=0; if (action.payload.apiReducer.userDetails.token != undefined) {
var access_tokenA=''; if (
action.payload.apiReducer.userDetails.token.expirationDateToken !=
undefined
) {
expirationDateTokenA =
action.payload.apiReducer.userDetails.token.expirationDateToken;
}
if(action.payload.apiReducer.userDetails.token!=undefined){ if (
action.payload.apiReducer.userDetails.token.access_token !=
if(action.payload.apiReducer.userDetails.token.expirationDateToken!= undefined){ undefined
) {
expirationDateTokenA= action.payload.apiReducer.userDetails.token.expirationDateToken; access_tokenA =
} action.payload.apiReducer.userDetails.token.access_token;
}
if((action.payload.apiReducer.userDetails.token.access_token!= undefined)){ }
access_tokenA= action.payload.apiReducer.userDetails.token.access_token; return {
sessions: action.payload.apiReducer.sessions,
} // token: action.payload.apiReducer.token,
user: action.payload.apiReducer.user,
} onHoldBlocks: true,
userDetails: {
return { token: {
expirationDateToken: expirationDateTokenA,
// token: action.payload.apiReducer.token, access_token: access_tokenA
user: action.payload.apiReducer.user, },
username: action.payload.apiReducer.userDetails.username,
userDetails:{ password: action.payload.apiReducer.userDetails.password
token:{ }
expirationDateToken: expirationDateTokenA, };
access_token:access_tokenA, }
}, case "CHANGE_CONNECTION_STATUS":
username:action.payload.apiReducer.userDetails.username, return Object.assign({}, state, {
password:action.payload.apiReducer.userDetails.password isConnected: action.isConnected
} });
};
} case UPDATE_USER:
state = Object.assign({}, state, { user:action.user});
case 'CHANGE_CONNECTION_STATUS': return state
return Object.assign({}, state, { case LOADINGLOGIN:
isConnected: action.isConnected, state = Object.assign({}, state, { loadingLogin: true });
});
case HOLD:
state = Object.assign({}, state, { onHold: true });
return state;
case API_LOGIN:
state = Object.assign({}, state, {
logged: action.logged,
//token:action.token,
failedAttempt: action.failedAttempt,
user: action.user,
userDetails: {
token: action.token,
username: action.userDetails.username,
password: action.userDetails.password
},
loadingLogin: false,
onHold: action.onHold
});
return state;
case CHECK_USER:
var u = action.userDetails;
if (action.token != undefined) u.token = action.token;
state = Object.assign({}, state, {
logged: action.logged,
onHold: action.onHold,
userDetails: u
});
return state;
case LOGOUT_USER:
state = Object.assign({}, state, {
user: {},
userDetails: {},
logged: false
});
return state;
case USER_INFO:
state = Object.assign({}, state, {
user: action.user,
loggedIn: action.loggedIn,
onHold: action.onHold
});
return state;
case GET_EVENTS:
state = Object.assign({}, state, {
events: action.events,
a: action.day1,
b: action.day2,
c: action.day3,
d: action.day4
});
return state;
case REMOVE_SESSION:
state = Object.assign({}, state, {
sessions: action.sessions,
Blocks: action.Blocks,
careerPath: action.careerPath,
changingGuest: action.changingGuest,
user: action.user
});
return state;
case OPEN_MODAL:
console.log("open modal");
state = Object.assign({}, state, {
modalOpen: true,
modalInfo: action.modalInfo,
modalType: action.type
});
return state;
case CLOSE_MODAL:
state = Object.assign({}, state, {
modalOpen: false,
modalInfo: "",
type: ""
});
return state;
case SIGN_SESSION:
if(action.sessions==undefined || action.Blocks==undefined || action.user==undefined){
state = Object.assign({}, state, {
changingGuest: false,
case HOLD: });
}
else{
state = Object.assign({}, state, {
sessions: action.sessions,
Blocks: action.Blocks,
careerPath: action.careerPath,
changingGuest: false,
user: action.user,
a:action.day1,
b:action.day2,
c:action.day3,
d:action.day4
});
}
return state;
state=Object.assign({},state, { onHold:true }); case SESSION_BLOCKS:
return state; state = Object.assign({}, state, {
Blocks: action.Blocks,
onHoldBlocks: false,
changingGuest: false
});
return state;
case API_LOGIN: case GET_CAREERS:
var c = {
guests: action.guests
state=Object.assign({},state, { };
logged:action.logged, state = Object.assign({}, state, { calendar: c });
//token:action.token,
failedAttempt: action.failedAttempt,
user:action.user,
userDetails: {token:action.token, username:action.userDetails.username, password:action.userDetails.password},
});
return state; return state;
case CHECK_USER: case CHANGE_GUEST:
state = Object.assign({}, state, {
changingGuest: false,
sessions: action.sessions,
Blocks: action.Blocks,
careerPath: action.careerPath
});
return state;
var u= action.userDetails; case WAIT_CHANGE:
if(action.token!=undefined) state = Object.assign({}, state, { changingGuest: true });
u.token= action.token; return state;
state=Object.assign({},state, {logged:action.logged, onHold:action.onHold, userDetails:u }); case TIMERWAIT_CHANGE:
state = Object.assign({}, state, { Blocks: true });
return state; return state;
case GET_SESSIONS:
case LOGOUT_USER: state = Object.assign({}, state, {
sessions: action.sessions,
state=Object.assign({},state, { logged:false}); Blocks: action.Blocks,
careerPath: action.careerPath
return state; });
return state;
case USER_INFO: default:
return state;
state=Object.assign({},state, { user: action.user , loggedIn:action.loggedIn, onHold:action.onHold}); }
};
return state;
case GET_EVENTS:
state=Object.assign({},state, { events: action.events});
return state;
case GET_CAREERS:
var c= {
guests:action.guests
}
state=Object.assign({},state, { calendar:c });
return state;
case CHANGE_GUEST:
state=Object.assign({},state, { changingGuest:false});
return state;
case WAIT_CHANGE:
state=Object.assign({},state, { changingGuest:true});
return state;
case GET_SESSIONS:
state=Object.assign({},state, { changingGuest:false, sessions:action.sessions});
return state;
default:
return state;
}
}
export default apiReducer; export default apiReducer;

View File

@ -60,6 +60,7 @@
BE5EAC41221B889900E92E5B /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE5EAC40221B888C00E92E5B /* libReactNativePermissions.a */; }; BE5EAC41221B889900E92E5B /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE5EAC40221B888C00E92E5B /* libReactNativePermissions.a */; };
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F42241E0235464C91B24049 /* libRNDeviceInfo.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 */; }; 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 */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy 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; }; 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; }; 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; }; 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 */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -473,6 +476,7 @@
BE104176D74E47E9A369B15A /* libRNVectorIcons.a in Frameworks */, BE104176D74E47E9A369B15A /* libRNVectorIcons.a in Frameworks */,
69E1B84AE0DF486CB1B1D226 /* libBVLinearGradient.a in Frameworks */, 69E1B84AE0DF486CB1B1D226 /* libBVLinearGradient.a in Frameworks */,
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */, 4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */,
A52E07192CD249F7B10FDA66 /* libAirMaps.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -667,6 +671,7 @@
664970B9D10A41A18B44727F /* RNVectorIcons.xcodeproj */, 664970B9D10A41A18B44727F /* RNVectorIcons.xcodeproj */,
1908F5E093844AC5A143E888 /* BVLinearGradient.xcodeproj */, 1908F5E093844AC5A143E888 /* BVLinearGradient.xcodeproj */,
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */, 5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */,
A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */,
); );
name = Libraries; name = Libraries;
sourceTree = "<group>"; sourceTree = "<group>";
@ -1450,6 +1455,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = appTests/Info.plist; INFOPLIST_FILE = appTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@ -1461,6 +1467,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",
@ -1482,6 +1489,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = appTests/Info.plist; INFOPLIST_FILE = appTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@ -1493,6 +1501,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",
@ -1516,6 +1525,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = app/Info.plist; INFOPLIST_FILE = app/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 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-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = app/Info.plist; INFOPLIST_FILE = app/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 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-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = "app-tvOS/Info.plist"; INFOPLIST_FILE = "app-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@ -1582,6 +1594,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",
@ -1612,6 +1625,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = "app-tvOS/Info.plist"; INFOPLIST_FILE = "app-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@ -1622,6 +1636,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",
@ -1651,6 +1666,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = "app-tvOSTests/Info.plist"; INFOPLIST_FILE = "app-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 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)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",
@ -1690,6 +1707,7 @@
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager", "$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo", "$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
); );
INFOPLIST_FILE = "app-tvOSTests/Info.plist"; INFOPLIST_FILE = "app-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 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)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"", "\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
); );
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-ObjC", "-ObjC",

22
App/package-lock.json generated
View File

@ -2745,6 +2745,11 @@
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
}, },
"email-validator": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/email-validator/-/email-validator-2.0.4.tgz",
"integrity": "sha512-gYCwo7kh5S3IDyZPLZf6hSS0MnZT8QmJFqYvbqlDZSbwdZlY6QZWxJ4i/6UhITOJ4XzyI647Bm2MXKCLqnJ4nQ=="
},
"emojis-list": { "emojis-list": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
@ -3059,6 +3064,10 @@
"ansi-styles": "^3.2.0" "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": { "react-native-screens": {
"version": "1.0.0-alpha.22", "version": "1.0.0-alpha.22",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz", "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz",
@ -7840,6 +7849,14 @@
"resolved": "https://registry.npmjs.org/react-native-app-intro-slider/-/react-native-app-intro-slider-1.0.1.tgz", "resolved": "https://registry.npmjs.org/react-native-app-intro-slider/-/react-native-app-intro-slider-1.0.1.tgz",
"integrity": "sha512-5Gzg5FG2uP/RHkSDFB5+2df4vQ2FpyUJ5PGYd23lLEISsEOJe0Zredh1hHMJj+fB5D9B7ZoL0IlR+SNn8iFxHg==" "integrity": "sha512-5Gzg5FG2uP/RHkSDFB5+2df4vQ2FpyUJ5PGYd23lLEISsEOJe0Zredh1hHMJj+fB5D9B7ZoL0IlR+SNn8iFxHg=="
}, },
"react-native-awesome-alerts": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/react-native-awesome-alerts/-/react-native-awesome-alerts-1.2.0.tgz",
"integrity": "sha512-ouxDGJ/porNkuaeqpgxIJA4jAPqHC9bJIsxLA21NA6eZhnEhbqWOprjsNqwI0/7bJxXm9baTzXESCMzwAy3eZw==",
"requires": {
"prop-types": "^15.5.10"
}
},
"react-native-branch": { "react-native-branch": {
"version": "2.2.5", "version": "2.2.5",
"resolved": "https://registry.npmjs.org/react-native-branch/-/react-native-branch-2.2.5.tgz", "resolved": "https://registry.npmjs.org/react-native-branch/-/react-native-branch-2.2.5.tgz",
@ -7957,8 +7974,9 @@
} }
}, },
"react-native-maps": { "react-native-maps": {
"version": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2", "version": "0.23.0",
"from": "github:expo/react-native-maps#v0.22.1-exp.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": { "react-native-material-buttons": {
"version": "0.5.0", "version": "0.5.0",

View File

@ -9,6 +9,7 @@
"dependencies": { "dependencies": {
"@redux-offline/redux-offline": "^2.5.1", "@redux-offline/redux-offline": "^2.5.1",
"axios": "^0.18.0", "axios": "^0.18.0",
"email-validator": "^2.0.4",
"expo": "^32.0.5", "expo": "^32.0.5",
"material-icons-react": "^1.0.4", "material-icons-react": "^1.0.4",
"moment": "^2.24.0", "moment": "^2.24.0",
@ -17,6 +18,7 @@
"react-native": "0.57.8", "react-native": "0.57.8",
"react-native-action-button": "^2.8.5", "react-native-action-button": "^2.8.5",
"react-native-app-intro-slider": "^1.0.1", "react-native-app-intro-slider": "^1.0.1",
"react-native-awesome-alerts": "^1.2.0",
"react-native-camera": "^1.9.2", "react-native-camera": "^1.9.2",
"react-native-check-box": "^2.1.7", "react-native-check-box": "^2.1.7",
"react-native-cli": "^2.0.1", "react-native-cli": "^2.0.1",
@ -30,6 +32,7 @@
"react-native-linear-gradient": "^2.5.3", "react-native-linear-gradient": "^2.5.3",
"react-native-loader": "^1.2.1", "react-native-loader": "^1.2.1",
"react-native-loading-spinner-overlay": "^1.0.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-dropdown": "^0.11.1",
"react-native-material-shadows": "0.0.2", "react-native-material-shadows": "0.0.2",
"react-native-modal": "^7.0.2", "react-native-modal": "^7.0.2",

0
App/{ Normal file
View File

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Net.Http;
using System.Security.Claims; using System.Security.Claims;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -14,6 +15,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json.Linq;
namespace api.Controllers namespace api.Controllers
{ {
@ -30,15 +32,18 @@ namespace api.Controllers
public IUsersRepository _repo { get; } public IUsersRepository _repo { get; }
private readonly IMapper _mapper; private readonly IMapper _mapper;
private readonly RoleManager<Role> _roleManager; private readonly RoleManager<Role> _roleManager;
private readonly System.Net.Http.IHttpClientFactory clientFactory;
public AuthController(IConfiguration config, UserManager<User> UserManager, SignInManager<User> SignInManager, IMapper mapper, RoleManager<Role> roleManager, IUsersRepository repo) public AuthController(IConfiguration config, UserManager<User> UserManager, SignInManager<User> SignInManager, IMapper mapper, RoleManager<Role> roleManager, IUsersRepository repo, System.Net.Http.IHttpClientFactory clientFactory)
{ {
_mapper = mapper; _mapper = mapper;
_roleManager = roleManager; _roleManager = roleManager;
_repo = repo; _repo = repo;
this.clientFactory = clientFactory;
this.config = config; this.config = config;
_userManager = UserManager; _userManager = UserManager;
_signInManager = SignInManager; _signInManager = SignInManager;
} }
@ -80,6 +85,40 @@ namespace api.Controllers
} }
[HttpPost("loginQR")]
public async Task<IActionResult> loginQr(UserForLoginDto userLoginDTO){
var token= "_A6q1cVGa12QutCrYCsYETfz9nPspnbcnPqjD-87kDaYPr99ArEfpdRTbkEzA4p-WEJzPFQhsMX7nG5BmUm0E6RTju8vQHnaTjGd80NIqUCr-jXefUtGwyl6I00fGD4sN6psW714JnCFuZRbtZbIXsdIRKmD3b8YUpPo2lvYP8SzjoEgACyabj13T3CLpHF43PI8Dvny6ylW6j0ka5qGNvw5MHVvYFURUPiTA7hlxoyQ35eOqHE8-eIiLNSTUJW7q-o8CxIGqGWSkltKPxbrY-Xo5iYagUucesqmj64VxYs";
using (var client = new HttpClient())
{
try{
var url = "http://enei2019.uingress.com/internal/api/Attendee/Detail";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
//var resource = JObject.Parse(response);
return Ok(response);
}catch(Exception e){
Console.WriteLine(e);
return Unauthorized();
}
}
}
private async Task<string> GenerateJwtToken(User user) private async Task<string> GenerateJwtToken(User user)
{ {
var claims = new List<Claim> var claims = new List<Claim>

23
api/Dtos/tokenDto.cs Normal file
View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using api.Models;
namespace api.Dtos
{
public class tokenDto
{
public string access_token{get;set;} //teamid
public string token_type{get;set;} //user qr
public int expires_in{get;set;}
public string refresh_token{get;set;}
}
}

18
api/Dtos/userDetails.cs Normal file
View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using api.Models;
namespace api.Dtos
{
public class userDetails
{
public string name{get;set;} //teamid
public string qr{get;set;} //user qr
}
}

View File

@ -42,7 +42,7 @@ namespace api
// This method gets called by the runtime. Use this method to add services to the container. // This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
services.AddHttpClient();
services.AddAutoMapper(); services.AddAutoMapper();
services.AddScoped<IUsersRepository, UsersRepository>(); services.AddScoped<IUsersRepository, UsersRepository>();
services.AddScoped<IEventsRepository, EventsRepository>(); services.AddScoped<IEventsRepository, EventsRepository>();

View File

@ -3,12 +3,13 @@
<TargetFramework>netcoreapp2.1</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Folder Include="wwwroot\"/> <Folder Include="wwwroot\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0"/> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.1"/> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="5.0.1"/> <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0"/> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,5 +1,5 @@
{ {
"ProjectFilePath": "c:\\Users\\ZMiguel\\Desktop\\ENEI2019\\api\\api.csproj", "ProjectFilePath": "/Users/henrique/ENEI2019/api/api.csproj",
"TargetFramework": "netcoreapp2.1", "TargetFramework": "netcoreapp2.1",
"TagHelpers": [], "TagHelpers": [],
"Configuration": { "Configuration": {

180
website/ctf.html Normal file
View File

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt" xml:lang="pt">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="width=device-width, initial-scale=1, user-scalable=0" name="viewport">
<meta content="width" name="MobileOptimized">
<meta content="true" name="HandheldFriendly">
<!-- Place favicon.ico in the root directory -->
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="site.webmanifest">
<link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<title>ENEI'19</title>
<meta name="description"
content="Página do Encontro Nacional de Estudantes de Informática 2019, no Instituto Superior de Engenharia de Coimbra (ISEC) a realizar-se entre 12 e 15 de abril de 2019. O ENEI pretende oferecer aos estudantes de todo o país um evento que promove a aprendizagem, a troca de ideias e o convívio, enquanto tenta criar fortes ligações com o mundo empresarial.">
<meta property="og:locale" content="pt_PT" />
<meta property="og:title" content="ENEI'19" />
<meta property="og:description"
content="Página do Encontro Nacional de Estudantes de Informática 2019, no Instituto Superior de Engenharia de Coimbra (ISEC) a realizar-se entre 12 e 15 de abril de 2019. O ENEI pretende oferecer aos estudantes de todo o país um evento que promove a aprendizagem, a troca de ideias e o convívio, enquanto tenta criar fortes ligações com o mundo empresarial." />
<meta property="og:site_name" content="ENEI'19" />
<meta property="og:url" content="http://www.enei.pt/" />
<meta property="og:image" content="http://www.enei.pt/imgs/share-image.jpg" />
<meta property="og:type" content="Website" />
<link rel="canonical" href="http://www.enei.pt/" />
<link href="bootstrap-grid.css" rel="stylesheet" type="text/css" />
<link href="main.css" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Bai+Jamjuree:400,600,700" rel="stylesheet">
</head>
<body>
<header id="main-menu">
<nav>
<a href="#" title="Abrir menu" rel="nofollow" id="open-menu-mobile">Menu</a>
<ul>
<li><a href="#enei" title="Enei">Enei</a></li>
<li class="unavailable">Oradores</li>
<li class="unavailable">Programa</li>
<li><a href="#precos" title="Preços">Preços</a></li>
<li class="unavailable">App</li>
<li><a href="#ctf" title="Faq's">CTF</li>
<li><a href="#sponsors" title="Sponsors">Sponsors</a></li>
<li><a href="#faqs" title="Faq's">Faq's</a></li>
</ul>
</nav>
</header>
<section id="ctf">
<div class="container ctf-container">
<div class="col-lg-12 centerctf">
<h1>Capture the flag</h1>
<h1></h1>
</div>
</div>
</section>
<section>
</section>
<!-- faqs section -->
<section id="faqs">
<div class="container">
<div class="row">
<div class="col-lg-5">
<div class="pre-h1">Perguntas Frequentes</div>
<h1>Faq</h1>
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-10">
<ul id="accordion">
<li>
<a href="#" title="O que é o ENEI?" rel="nofollow" class="toggle">O que é o ENEI?</a>
<div class="content-accordion">
<p>O Encontro Nacional de Estudantes de Informática (ENEI) é um evento que pretende
oferecer aos estudantes de todo o país um evento que promove a aprendizagem, a troca
de
ideias e o convívio, enquanto tenta criar fortes ligações com o mundo empresarial.
</p>
<p>Esta versão do evento também incluirá os tradicionais momentos de diversão noturnos
que
muito apelam a todos os participantes das antigas edições e são uma excelente via de
networking e transferência de conhecimento!</p>
</div>
</li>
<li>
<a href="#" title="Onde me posso inscrever?" rel="nofollow" class="toggle">Onde me posso
inscrever?</a>
<div class="content-accordion">
<p>Podes adquirir o teu bilhete <a href="https://tickets.enei.pt" title="Aqui">AQUI</a>.
</p>
</div>
</li>
<li>
<a href="#" title="Quando é o programa vai estar disponível?" rel="nofollow"
class="toggle">Quando é o programa vai estar disponível?</a>
<div class="content-accordion">
<p>O programa vai sendo lançado nas próximas semanas de forma iterativa.</p>
</div>
</li>
<li>
<a href="#" title="Quem pode participar no evento?" rel="nofollow" class="toggle">Quem pode
participar no evento?</a>
<div class="content-accordion">
<p>Podem participar no ENEI19 todos os estudantes de cursos relacionados com
informática e
todos aqueles que querem aprender mais sobre os temas abordados!</p>
</div>
</li>
<li>
<a href="#" title="Tenho acesso a todas as sessões?" rel="nofollow" class="toggle">Tenho
acesso a todas as sessões?</a>
<div class="content-accordion">
<p>Não, as palestras e workshops necessitam de inscrições visto que têm lugares
limitados.</p>
<p>Brevemente poderás te inscrever na aplicação móvel do ENEI'19!</p>
</div>
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- social network section -->
<aside id="social-network">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2>Segue-nos</h2>
<ul>
<li><a href="https://www.facebook.com/ENEIConf/" title="Facebook" target="_blank"
class="icon-facebook"></a></li>
<li><a href="https://www.instagram.com/eneiconf/" title="Instagram" target="_blank"
class="icon-instagram"></a></li>
<li><a href="https://www.linkedin.com/company/enei/" title="Linkedin" target="_blank"
class="icon-linkedin"></a></li>
<li><a href="mailto:geral@enei.pt" title="Email" target="_blank" class="icon-email"></a></li>
</ul>
</div>
</div>
</div>
</aside>
<!-- footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-12">
<p>© 2019 ENEI . Todos os direitos reservados</p>
</div>
</div>
</div>
</footer>
<!-- Scripts -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-130588243-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-130588243-1');
</script>
</body>
</html>

BIN
website/imgs/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

View File

@ -43,6 +43,7 @@
<li class="unavailable">Programa</li> <li class="unavailable">Programa</li>
<li><a href="#precos" title="Preços">Preços</a></li> <li><a href="#precos" title="Preços">Preços</a></li>
<li class="unavailable">App</li> <li class="unavailable">App</li>
<li><a href="#ctf" title="Faq's">CTF</li>
<li><a href="#sponsors" title="Sponsors">Sponsors</a></li> <li><a href="#sponsors" title="Sponsors">Sponsors</a></li>
<li><a href="#faqs" title="Faq's">Faq's</a></li> <li><a href="#faqs" title="Faq's">Faq's</a></li>
</ul> </ul>
@ -121,42 +122,53 @@
<h1>Preços</h1> <h1>Preços</h1>
<hr> <hr>
<div class="price-block"> <div class="price-block">
<div class="type">Early-Bird</div> <div class="type">Normal</div>
<div> <div>
<div class="individual-price"> <div class="individual-price">
<div class="price"><span></span>25</div> <div class="price"><span></span>25</div>
<div class="label">Grupo</div> <div class="label">Grupo</div>
<span class="options">*Alimentação e alojamento (pavilhão) incluídos</span> <span class="options">*Alimentação [5,00€] e alojamento (pavilhão) [5,10€]</span>
</div> </div>
</div> </div>
<a href="https://tickets.enei.pt/group" title="Comprar" target="_blank" <a href="https://tickets.enei.pt/group" title="Comprar" target="_blank"
class="buy-button">Comprar</a> class="buy-button">Comprar</a>
</div> </div>
<div class="price-block"> <div class="price-block">
<div class="type">Early-Bird</div> <div class="type">Normal</div>
<div> <div>
<div class="individual-price"> <div class="individual-price">
<div class="price"><span></span>30</div> <div class="price"><span></span>30</div>
<div class="label">Individual</div> <div class="label">Individual</div>
<span class="options">*Alimentação e alojamento (pavilhão) incluídos</span> <span class="options">*Alimentação [5,00€] e alojamento (pavilhão) [5,10€]</span>
</div> </div>
</div> </div>
<a href="https://tickets.enei.pt" title="Comprar" target="_blank" class="buy-button">Comprar</a> <a href="https://tickets.enei.pt" title="Comprar" target="_blank" class="buy-button">Comprar</a>
</div> </div>
<div class="price-block disable"> <div class="price-block">
<div class="type">Pontual</div> <div class="type">Pontual</div>
<div class="individual-price"> <div class="individual-price">
<div class="price"><span></span>20</div> <div class="price"><span></span>20</div>
<div class="label">Individual</div> <div class="label">Individual</div>
<span class="options">*Alimentação incluída</span> <span class="options">*Alimentação incluída</span>
</div> </div>
<span class="buy-button">Brevemente</span> <a href="https://tickets.enei.pt/pontual" title="Comprar" target="_blank"
class="buy-button">Comprar</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<section id="ctf">
<div class="container ctf-container">
<div class="col-lg-12">
<div class="prectf-h1">Brevemente disponível</div>
<h1>Capture the flag</h1>
<a class ="button-ctf" href="ctf.html" title="Comprar" target="_blank">Começar</a>
<h1></h1>
</div>
</div>
</section>
<!-- sponsors section --> <!-- sponsors section -->
<section id="sponsors"> <section id="sponsors">
<div class="container"> <div class="container">
@ -173,6 +185,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="container gold">
<div class="row">
<div class="col-lg-4 col-lg-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1">
<h1>Gold Sponsor</h1>
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-10 col-lg-offset-1 col-sm-8 col-sm-offset-2 col-xs-10 col-xs-offset-1">
<a href="http://www.novabase.pt/pt" title="Novabase" target="_blank"
class="sponsor-image"><img src="imgs/novaBase-sponsor.jpg" alt="Novabase Image"></a>
</div>
</div>
</div>
</section> </section>
<!-- faqs section --> <!-- faqs section -->
@ -277,14 +303,12 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="js/scripts.js"></script> <script type="text/javascript" src="js/scripts.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-130588243-1"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-130588243-1"></script>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); } function gtag() { dataLayer.push(arguments); }
gtag('js', new Date()); gtag('js', new Date());
gtag('config', 'UA-130588243-1'); gtag('config', 'UA-130588243-1');
</script> </script>
</body> </body>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -892,6 +892,61 @@ hr {
} }
} }
#ctf{
background-image: url("imgs/image.png");
text-align: center;
h1 {
color: white;
margin-top: 80px;
margin-bottom: 50px;
}
.button-ctf {
&:hover {
border-color: #cc1a17;
background-color: white;
color: $grey;
}
}
}
.prectf-h1{
@include font($mont-font, 20px, 22px, $grey);
font-weight: $semi-bold;
text-transform: uppercase;
margin-bottom:100px;
@include portable {
font-size: 17px;
}
@include mobile {
margin-bottom: 5px;
}
color: #cc1a17;
}
.button-ctf{
font-family: "Bai Jamjuree", sans-serif;
font-size: 18px;
line-height: 14px;
color: #CC1A17;
font-weight: 700;
text-transform: uppercase;
border: 1px solid #eeeeee;
padding: 20px 40px;
margin: 200;
transition: border-color 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
-webkit-transition: border-color 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
}
#faqs, #faqs,
#tickets { #tickets {
background: url("imgs/cubes2-image.png") no-repeat bottom right; background: url("imgs/cubes2-image.png") no-repeat bottom right;
@ -971,6 +1026,22 @@ hr {
transform: scale(1.03); transform: scale(1.03);
} }
} }
.gold {
h1 {
font-size: 30px;
line-height: 26px;
margin-top: 75px;
@include portable{
font-size: 27px;
}
@include mobile{
font-size: 23px;
}
}
.sponsor-image {
max-width: 135px;
}
}
} }
#social-network { #social-network {