This commit is contained in:
henrydays 2019-04-09 05:19:08 +01:00
parent 18d64775f2
commit eaf79af65f
17 changed files with 224 additions and 45 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -45,6 +45,9 @@ import teamDetail from './screens/teamDetail';
import event from './screens/event';
import map from './screens/map'
const navigationOptions = ({navigation}) => ({
headerLeft: <HeaderBackButton onPress={() => navigation.goBack(null)}/>,
headerStyle: {backgroundColor: 'transparent', zIndex: 100 },
@ -64,6 +67,15 @@ const AppStack = createBottomTabNavigator(
)
},
},
Mapa:{
screen: map,
navigationOptions: {
tabBarIcon: ({tintColor}) => (
<IconF name="map" color={tintColor} size={25}/>
)
},
},
'Jogo': {
screen: Jogo,
@ -88,7 +100,7 @@ const AppStack = createBottomTabNavigator(
},
Eventos: {
Atividades: {
screen: Eventos,
navigationOptions: {
@ -98,7 +110,7 @@ const AppStack = createBottomTabNavigator(
)
},
},
Home: {
screen: Home,
navigationOptions: {
@ -201,9 +213,15 @@ const Stack = createStackNavigator({
)
}
}
else if (navigation.state.routes[index].routeName == 'Eventos') {
else if (navigation.state.routes[index].routeName == 'Atividades') {
return {
headerTitle: 'Eventos',
headerTitle: 'Atividade',
}
}
else if (navigation.state.routes[index].routeName == 'Mapa') {
return {
headerTitle: 'Mapa do Evento',
}
}

View File

@ -72,7 +72,7 @@ class Calendar extends React.Component {
</View>
<View>
<Text style={styles.description}>{item.description}</Text>
<Text style={styles.description} numberOfLines={8}>{item.description}</Text>
</View>
</View>
</TouchableOpacity>
@ -355,7 +355,8 @@ const styles = StyleSheet.create({
description: {
padding: 10,
paddingLeft: 0,
paddingTop: 0
paddingTop: 0,
textAlign:"justify"
},
title: {
color: "#212121",

View File

@ -132,9 +132,8 @@ const styles = StyleSheet.create({
cardHours: {
textAlign: "center",
color: "white",
margin: 10
// width:'20%'
margin: 10,
width:'45%'
},
cardDesc: {

View File

@ -352,12 +352,12 @@ class Home extends Component {
</Text>
</View>
<View style={{ margin: 10 }}>
<Text style={{ fontSize: 12, textAlign: "center" }}>
<Text style={{ fontSize: 13, textAlign: "center" }}>
Para participares no ENEI caching ou no Rally Tascas deves
formar uma equipa (4 a 6) elementos.
</Text>
<Text
style={{ fontSize: 12, textAlign: "center", margin: 5 }}
style={{ fontSize: 13, textAlign: "center", margin: 5 }}
>
Ao criares a equipa, ficas como capitão. Podes adicionar e
remover outros elementos.
@ -431,9 +431,9 @@ class Home extends Component {
</View>
</View>
<Text
style={{ fontSize: 12, textAlign: "center", margin: 5 }}
style={{ fontSize: 13, textAlign: "center", margin: 5 }}
>
A incrição no Rally tem custo de 5 por elemento. A equipa
A inscrição no Rally tem custo de 5 por elemento. A equipa
apenas fica ativa quando efectuar o pagamento na banca no
ENEI
</Text>

View File

@ -146,7 +146,7 @@ class Jogo extends React.Component {
</Text>
</View>
<View style={{ width: "100%", marginTop: 10 }}>
<TouchableOpacity onPress={()=>this.handleClick(this.state.cromo.websitecromo)} >
<TouchableOpacity onPress={()=>this.handleClick(this.state.cromo.websiteCromo)} >
<Text
style={{
textAlign: "center",

View File

@ -183,7 +183,7 @@ class calendarDetail extends React.Component {
>
{item.Name}
</Text>
<Text style={{ marginLeft: 10 }}>
<Text style={{ marginLeft: 10 , textAlign:'justify'}}>
{item.MoreInfo}
</Text>
<TouchableOpacity>
@ -207,7 +207,7 @@ class calendarDetail extends React.Component {
>
Descrição do orador:
</Text>
<Text style={{ margin: 10 }}>{item.Description}</Text>
<Text style={{ margin: 10, textAlign:"justify" }}>{item.Description}</Text>
</View>
</View>
)}
@ -223,7 +223,7 @@ class calendarDetail extends React.Component {
</Text>
<Divider style={{ backgroundColor: "#000" }} />
<View style={{ marginTop: 10 }}>
<Text>{this.props.sessionDetail.Description}</Text>
<Text style={{textAlign:'justify'}}>{this.props.sessionDetail.Description}</Text>
</View>
</View>
</View>

View File

@ -311,7 +311,7 @@ class choosePath extends React.Component {
<ScrollView style={styles.page}>
{this._findPath("IA") && (
<LinearGradient
colors={["#D95856", "#CC1A17"]}
colors={["#F54B10", "#F54B10"]}
style={styles.linearGradient}
>
<Text
@ -341,7 +341,7 @@ class choosePath extends React.Component {
)}
{this._findPath("NET") && (
<LinearGradient
colors={["#4D76B3", "#055CA0"]}
colors={["#214198", "#214198"]}
style={styles.linearGradient}
>
<Text
@ -370,7 +370,7 @@ class choosePath extends React.Component {
)}
{this._findPath("WEB") && (
<LinearGradient
colors={["#FDC657", "#FBB81B"]}
colors={["#3A1484", "#3A1484"]}
style={styles.linearGradient}
>
<Text
@ -399,7 +399,7 @@ class choosePath extends React.Component {
)}
{this._findPath("IOT") && (
<LinearGradient
colors={["#69447F", "#4B266A"]}
colors={["#EC174A", "#EC174A"]}
style={styles.linearGradient}
>
<Text
@ -432,7 +432,7 @@ class choosePath extends React.Component {
)}
{this._findPath("DS") && (
<LinearGradient
colors={["#F28C59", "#ED6B33"]}
colors={["#DC160D", "#DC160D"]}
style={styles.linearGradient}
>
<Text
@ -474,7 +474,7 @@ class choosePath extends React.Component {
)}
{this._findPath("MOB") && (
<LinearGradient
colors={["#559159", "#0B7D3C"]}
colors={["#971384", "#971384"]}
style={styles.linearGradient}
>
<Text
@ -531,11 +531,11 @@ class choosePath extends React.Component {
}}
>
<Picker.Item label="Artificial Intelligence" value="9" />
<Picker.Item label="Networking and Securiy" value="10" />
<Picker.Item label="Networking and Security" value="10" />
<Picker.Item label="Data Science" value="15" />
<Picker.Item label="Web development" value="14" />
<Picker.Item label="Mobile development" value="11" />
<Picker.Item label="Internet of things" value="12" />
<Picker.Item label="Web Development" value="14" />
<Picker.Item label="Mobile Development" value="11" />
<Picker.Item label="Internet of Things" value="12" />
</Picker>
</View>
<View style={{ width: SCREEN_WIDTH }}>
@ -883,7 +883,8 @@ class choosePath extends React.Component {
style={{
fontSize: 15,
fontWeight: "bold",
marginLeft: 5
marginLeft: 5,
maxWidth:150
}}
>
{item[index].Name}
@ -892,7 +893,8 @@ class choosePath extends React.Component {
<Text
style={{
marginTop: 10,
marginBottom: 5
marginBottom: 5,
marginLeft:25
}}
>
{item[index].MaxAttendees -
@ -910,6 +912,7 @@ class choosePath extends React.Component {
}
unfilledColor={"white"}
width={150}
style={{marginLeft:25}}
/>
)}
</View>

View File

@ -112,7 +112,7 @@ class eventDetail extends React.Component {
</Text>
<Divider style={{ backgroundColor: "#000" }} />
<View style={{ marginTop: 10 }}>
<Text>{info.location.desc}</Text>
<Text style={{textAlign:'justify'}}>{info.location.desc}</Text>
</View>
<Text
style={{
@ -126,7 +126,7 @@ class eventDetail extends React.Component {
</Text>
<Divider style={{ backgroundColor: "#000" }} />
<View style={{ marginTop: 10 }}>
<Text>{info.location.desafio}</Text>
<Text style={{textAlign:"justify"}}>{info.location.desafio}</Text>
</View>
</View>
</View>
@ -173,7 +173,7 @@ class eventDetail extends React.Component {
</Text>
<Divider style={{ backgroundColor: "#000" }} />
<View style={{ marginTop: 10 }}>
<Text>{info.desc}</Text>
<Text style={{textAlign:'justify'}}>{info.desc}</Text>
</View>
<Text
style={{

148
App/app/screens/map.js Normal file
View File

@ -0,0 +1,148 @@
import * as React from "react";
import {
View,
StyleSheet,
Dimensions,
Text,
Button,
ScrollView,
Image,
TouchableOpacity,
FlatList,
ActivityIndicator,
Modal
} from "react-native";
import IconFA from "react-native-vector-icons/FontAwesome5";
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
import rallyImg from "../assets/rallyTascas.jpg";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import * as Actions from "../store/actions"; //Import your actionss
const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
import ImageViewer from 'react-native-image-zoom-viewer';
import PTRView from "react-native-pull-to-refresh";
const images = [{
url: 'https://avatars2.githubusercontent.com/u/7970947?v=3&s=460'
},]
class map extends React.Component {
_update = () => {
this.props.getAllEvents(this.props.internalToken);
this.props.getEventLocsVisited(
this.props.team.id,
this.props.internalToken
);
};
state = {
index: 0,
routes: [
{ key: "first", title: "Festarola" },
{ key: "second", title: "Febrada" },
{ key: "third", title: "Rally" },
{ key: "fourth", title: "Peddy" }
]
};
componentDidMount() {
this.props.getAllEvents(this.props.internalToken);
this.props.getEventLocsVisited(
this.props.team.id,
this.props.internalToken
);
}
render() {
const { navigate } = this.props.navigation;
return (
<ImageViewer imageUrls={images}/>
)
}
}
const styles = StyleSheet.create({
cardHours: {
textAlign: "center",
color: "white",
margin: 10,
width:'45%'
},
cardDesc: {
//alignSelf:'center',
backgroundColor: "#CC1A17",
// flex:1,
flexDirection: "row"
},
cardDescText: {
fontWeight: "bold",
color: "white",
fontSize: 18,
width: "45%",
margin: 10
},
container: {
backgroundColor: "white",
flex: 1,
flexGrow: 1,
flexDirection: "column",
paddingBottom: 20
},
scroll: {
flex: 1
},
cardContainer: {
flex: 1,
//flexDirection: 'row',
//padding: 10,
margin: 20,
marginBottom: 0,
backgroundColor: "#fff",
height: SCREEN_WIDTH * 0.62,
borderRadius: 5
//borderWidth: 2,
},
scene: {
flex: 1
}
});
function mapStateToProps(state, props) {
return {
token: state.apiReducer.token,
user: state.apiReducer.user,
logged: state.apiReducer.logged,
userDetails: state.apiReducer.userDetails,
onHold: state.apiReducer.onHold,
bilhete: state.apiReducer.bilhete,
alimentacao: state.apiReducer.alimentacao,
alojamento: state.apiReducer.alojamento,
acesso: state.apiReducer.acesso,
team: state.apiReducer.team,
internalToken: state.apiReducer.internalToken,
eventsInternal: state.apiReducer.eventsInternal
};
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(map);

View File

@ -864,32 +864,32 @@ function getCareerPath(sessions) {
for (let key in sessions) {
if (sessions[key].Name == "IA") {
careerPath = "Artificial Intelligence";
careerColor = "#CC1A17";
careerColor = "#F54B10";
code = "IA";
}
if (sessions[key].Name == "IOT") {
careerPath = "Internet of things";
careerColor = "#4B266A";
careerPath = "Internet of Things";
careerColor = "#EC174A";
code = "IOT";
}
if (sessions[key].Name == "WEB") {
careerPath = "Web development";
careerColor = "#FBB81B";
careerPath = "Web Development";
careerColor = "#3A1484";
code = "WEB";
}
if (sessions[key].Name == "NET") {
careerPath = "Networking and Security";
careerColor = "#055CA0";
careerColor = "#214198";
code = "NET";
}
if (sessions[key].Name == "MOB") {
careerPath = "Mobile Development";
careerColor = "#0B7D3C";
careerColor = "#971384";
code = "MOB";
}
if (sessions[key].Name == "DS") {
careerPath = "Data Science";
careerColor = "#ED6B33";
careerColor = "#DC160D";
code = "DS";
}
}

15
App/package-lock.json generated
View File

@ -7961,7 +7961,6 @@
}
}
},
"react-native-image-overlay": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/react-native-image-overlay/-/react-native-image-overlay-0.1.2.tgz",
@ -7970,7 +7969,19 @@
"prop-types": "^15.6.1"
}
},
"react-native-image-pan-zoom": {
"version": "2.1.11",
"resolved": "https://registry.npmjs.org/react-native-image-pan-zoom/-/react-native-image-pan-zoom-2.1.11.tgz",
"integrity": "sha512-ZCisGUFpPchHXsjT7ZI0anlSLPgcTmjRKXqpVnPu3RDWFXfKjuL4zpY57DX4Y8YgGZCpbf9fApN7KjVYody2Mw=="
},
"react-native-image-zoom-viewer": {
"version": "2.2.25",
"resolved": "https://registry.npmjs.org/react-native-image-zoom-viewer/-/react-native-image-zoom-viewer-2.2.25.tgz",
"integrity": "sha512-/w3GsUD9F5c6ZE+3GC1UmE0I9yCAfTf/5Jjz5bDCvIQFp2MoMod3BQzRnZ1PjZbCq6a90eZ5rnB2Zvm1rFOgeQ==",
"requires": {
"react-native-image-pan-zoom": "^2.1.9"
}
},
"react-native-ionicons": {
"version": "4.5.5",
"resolved": "https://registry.npmjs.org/react-native-ionicons/-/react-native-ionicons-4.5.5.tgz",

View File

@ -27,9 +27,8 @@
"react-native-elements": "^1.0.0",
"react-native-fit-image": "^1.5.4",
"react-native-gesture-handler": "^1.0.15",
"react-native-image-overlay": "^0.1.2",
"react-native-image-zoom-viewer": "^2.2.25",
"react-native-ionicons": "^4.5.5",
"react-native-linear-gradient": "^2.5.3",
"react-native-loader": "^1.2.1",

BIN
website/.DS_Store vendored

Binary file not shown.

View File

@ -92,7 +92,7 @@
<div class="prizes-container">
<div class="prize">
<div class="prize-logo"><i class="fab fa-nintendo-switch"></i></div>
<h4>Nitendo Switch</h4>
<h4>Nintendo Switch</h4>
</div>
<div class="prize">
<div class="prize-logo"><i class="fas fa-volume-up"></i></div>

BIN
website/imgs/.DS_Store vendored

Binary file not shown.

BIN
website/imgs/mapa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB