This commit is contained in:
commit
1d71783892
|
@ -104,7 +104,10 @@ const AppStack = createBottomTabNavigator(
|
|||
|
||||
},
|
||||
{
|
||||
initialRouteName: 'Home',
|
||||
//initialRouteName: 'Home',
|
||||
initialRouteName: 'Eventos',
|
||||
|
||||
//initialRouteName: 'Calendário',
|
||||
|
||||
tabBarOptions: {
|
||||
showLabel: true, // hide labels
|
||||
|
|
|
@ -1,46 +1,95 @@
|
|||
import * as React from "react";
|
||||
import { View, StyleSheet, Dimensions, Text, Button } from "react-native";
|
||||
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
|
||||
import {View, StyleSheet, Dimensions, Text, Button, ScrollView} 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 = () => (
|
||||
<View style={[styles.scene, { backgroundColor: "#ff4081" }]} />
|
||||
<View style={[styles.scene, {backgroundColor: "#ff4081"}]}/>
|
||||
);
|
||||
const SecondRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: "#673ab7" }]} />
|
||||
<View style={[styles.scene, {backgroundColor: "#673ab7"}]}/>
|
||||
);
|
||||
|
||||
const ThirdRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: "#673ab7" }]} />
|
||||
<View style={[styles.scene, {backgroundColor: "#673ab7"}]}/>
|
||||
);
|
||||
|
||||
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" }
|
||||
{key: "first", title: "Festarola"},
|
||||
{key: "second", title: "Febrada"},
|
||||
{key: "third", title: "Rally"},
|
||||
{key: "fourth", title: "Peddy"}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
renderFebrada = () => {
|
||||
return (
|
||||
<View>
|
||||
<Text>Ola mundo</Text>
|
||||
</View>
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
renderRally = () => {
|
||||
|
||||
};
|
||||
|
||||
renderCaching = () => {
|
||||
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Button
|
||||
title="Febrada"
|
||||
onPress={() => this.props.navigation.navigate("febrada")}
|
||||
/>
|
||||
<View style={styles.container}>
|
||||
<ScrollView styles={styles.scroll}>
|
||||
<View styles={styles.cardContainer}>
|
||||
{this.renderFebrada()}
|
||||
</View>
|
||||
<View styles={styles.cardContainer}>
|
||||
|
||||
</View>
|
||||
<View styles={styles.cardContainer}>
|
||||
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
backgroundColor: '#eee',
|
||||
flex: 1,
|
||||
},
|
||||
|
||||
scroll: {
|
||||
flex: 1,
|
||||
},
|
||||
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
margin: 20,
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 5,
|
||||
height: SCREEN_WIDTH * (1/2),
|
||||
},
|
||||
|
||||
scene: {
|
||||
flex: 1
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ class Profile extends Component {
|
|||
super(props);
|
||||
|
||||
this.state = {
|
||||
name:this.props.user.Name,
|
||||
userDetails:{},
|
||||
name: this.props.user.Name,
|
||||
userDetails: {},
|
||||
token: false,
|
||||
tokenData: '',
|
||||
loggedIn: false,
|
||||
|
@ -87,10 +87,10 @@ class Profile extends Component {
|
|||
};
|
||||
|
||||
|
||||
_validateData = (name,jobs, email, phone, address, city) => {
|
||||
_validateData = (name, jobs, email, phone, address, city) => {
|
||||
let valid = null;
|
||||
|
||||
v = Validate('name',name );
|
||||
v = Validate('name', name);
|
||||
|
||||
|
||||
let v = Validate('email', email);
|
||||
|
@ -138,16 +138,16 @@ class Profile extends Component {
|
|||
|
||||
saveData() {
|
||||
|
||||
const {name,jobs, email, phone, address, city, formValid} = this.state;
|
||||
const {name, jobs, email, phone, address, city, formValid} = this.state;
|
||||
|
||||
this._validateData(name,jobs, email, phone, address, city);
|
||||
this._validateData(name, jobs, email, phone, address, city);
|
||||
|
||||
console.log(formValid);
|
||||
|
||||
if (formValid){
|
||||
if (formValid) {
|
||||
console.log("data valid");
|
||||
|
||||
this.props.updateUser(this.props.userDetails.token,{
|
||||
this.props.updateUser(this.props.userDetails.token, {
|
||||
Name: this.state.name,
|
||||
// LastName: "Último",
|
||||
Company: jobs,
|
||||
|
@ -158,11 +158,11 @@ class Profile extends Component {
|
|||
|
||||
Mobile: phone,
|
||||
Avatar: "base64"
|
||||
} ); this.props.getUserInfo(this.props.userDetails.token);
|
||||
});
|
||||
this.props.getUserInfo(this.props.userDetails.token);
|
||||
}
|
||||
|
||||
|
||||
|
||||
else
|
||||
console.log("data not valid");
|
||||
|
||||
|
@ -190,7 +190,7 @@ class Profile extends Component {
|
|||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(n) => {
|
||||
this.setState({name:n })
|
||||
this.setState({name: n})
|
||||
}}
|
||||
value={this.state.name}/>
|
||||
</View>
|
||||
|
@ -207,7 +207,6 @@ class Profile extends Component {
|
|||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Icon name="ios-phone-portrait" style={styles.userBioLogo} size={25}/>
|
||||
|
||||
|
@ -261,7 +260,7 @@ class Profile extends Component {
|
|||
</View>
|
||||
<View style={styles.userBio}>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userPassText} size={25}>
|
||||
<Text style={styles.userPassText} size={20}>
|
||||
Old Password:
|
||||
</Text>
|
||||
|
||||
|
@ -270,7 +269,7 @@ class Profile extends Component {
|
|||
/>
|
||||
</View>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userPassText} size={25}>
|
||||
<Text style={styles.userPassText} size={20}>
|
||||
Nova Password:
|
||||
</Text>
|
||||
|
||||
|
@ -279,7 +278,7 @@ class Profile extends Component {
|
|||
/>
|
||||
</View>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userPassText} size={25}>
|
||||
<Text style={styles.userPassText} size={20}>
|
||||
Repetir Password:
|
||||
</Text>
|
||||
|
||||
|
@ -293,8 +292,13 @@ class Profile extends Component {
|
|||
</ScrollView>
|
||||
|
||||
|
||||
<TouchableOpacity onPress={this._logout} style={{ height: 50, justifyContent: 'center', alignItems: 'center', backgroundColor: '#CC1A17'}}>
|
||||
<Text style={{color:"#fff", fontWeight: 'bold'}}>Logout</Text>
|
||||
<TouchableOpacity onPress={this._logout} style={{
|
||||
height: 50,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#CC1A17'
|
||||
}}>
|
||||
<Text style={{color: "#fff", fontWeight: 'bold'}}>Logout</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
</View>
|
||||
|
@ -330,23 +334,27 @@ const styles = StyleSheet.create({
|
|||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
padding: 10
|
||||
padding: 10,
|
||||
borderWidth: 2,
|
||||
alignItems: 'center',
|
||||
|
||||
},
|
||||
userBioText: {
|
||||
width: SCREEN_WIDTH * 0.50,
|
||||
width: SCREEN_WIDTH * 0.40,
|
||||
flex: 2,
|
||||
borderWidth: 2,
|
||||
},
|
||||
|
||||
userPassText: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
//alignSelf: 'flex-start',
|
||||
justifyContent: 'flex-end',
|
||||
borderWidth: 2,
|
||||
},
|
||||
|
||||
userBioLogo: {
|
||||
marginLeft: SCREEN_WIDTH * 0.05,
|
||||
width: SCREEN_WIDTH * 0.15,
|
||||
|
||||
},
|
||||
|
||||
bottomLogOut: {
|
||||
|
|
|
@ -103,11 +103,11 @@ class calendarDetail extends React.Component {
|
|||
renderDescription = (info) => {
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.infoRow}>
|
||||
<View style={{flexDirection: "row"}}>
|
||||
<View style={styles.cardContainer}>
|
||||
<View style={{flexDirection: "row", alignItems: 'center', alignSelf:'center'}}>
|
||||
<Text style={styles.ramoText}>Onde está o ramo? xD </Text>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{color: "#CC1A17", fontSize: 20,}}>
|
||||
<Text style={{color: "#CC1A17", fontSize: 15}}>
|
||||
{info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}
|
||||
</Text>
|
||||
</View>
|
||||
|
@ -121,15 +121,14 @@ class calendarDetail extends React.Component {
|
|||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.infoRow}>
|
||||
<Text style={{fontSize: 30, color: "#CC1A17"}}>Descrição</Text>
|
||||
<View style={styles.cardContainer}>
|
||||
<Text style={{fontSize: 20, color: "#CC1A17"}}>Descrição</Text>
|
||||
<Divider style={{backgroundColor: '#000'}}/>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text style={{fontSize: 15}}>
|
||||
<Text style={{fontSize: 10}}>
|
||||
{info.description}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
@ -205,13 +204,14 @@ class calendarDetail extends React.Component {
|
|||
<View style={styles.mainViewStyle}>
|
||||
<ScrollView style={styles.scroll}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.cardContainer}>
|
||||
<View style={styles.headerContainer}>
|
||||
{this.renderHeader(info)}
|
||||
</View>
|
||||
{this.renderDescription(info)}
|
||||
</View>
|
||||
<View style={styles.infoRow}>
|
||||
<Text style={{fontSize: 30, color: "#CC1A17"}}>Localização</Text>
|
||||
<View style={styles.cardContainer}>
|
||||
|
||||
<Text style={{fontSize: 20, color: "#CC1A17"}}>Localização</Text>
|
||||
<Divider style={{backgroundColor: '#000', marginBottom: 10}}/>
|
||||
|
||||
</View>
|
||||
|
@ -236,7 +236,7 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
|
||||
centerRow: {
|
||||
alignItems: 'flex-start',
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'transparent',
|
||||
flex: 3,
|
||||
flexDirection: 'column',
|
||||
|
@ -248,7 +248,7 @@ const styles = StyleSheet.create({
|
|||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
alignSelf: 'center'
|
||||
alignSelf: 'center',
|
||||
},
|
||||
rightRow: {
|
||||
alignItems: 'flex-end',
|
||||
|
@ -294,7 +294,7 @@ const styles = StyleSheet.create({
|
|||
timeText: {
|
||||
alignItems: 'flex-end',
|
||||
flex: 2,
|
||||
marginBottom: 5,
|
||||
lineHeight: 10,
|
||||
marginRight: 4,
|
||||
},
|
||||
|
||||
|
@ -305,14 +305,23 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
|
||||
scroll: {
|
||||
backgroundColor: '#FFF',
|
||||
backgroundColor: '#eee',
|
||||
flex: 1,
|
||||
//marginBottom: 55,
|
||||
},
|
||||
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
margin: 20,
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 5,
|
||||
},
|
||||
|
||||
headerContainer: {
|
||||
flex: 1,
|
||||
},
|
||||
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: 'column',
|
||||
|
@ -324,10 +333,10 @@ const styles = StyleSheet.create({
|
|||
height: Dimensions.get('window').width * (2 / 4),
|
||||
width: Dimensions.get('window').width,
|
||||
},
|
||||
headerContainer: {
|
||||
/*headerContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#FFF',
|
||||
},
|
||||
},*/
|
||||
|
||||
|
||||
carreerPathContainer: {
|
||||
|
|
Loading…
Reference in New Issue