talk details
This commit is contained in:
parent
c476e7bbf5
commit
71b9ce7a51
|
@ -105,7 +105,7 @@ const AppStack = createBottomTabNavigator(
|
|||
|
||||
},
|
||||
{
|
||||
initialRouteName: 'Eventos',
|
||||
initialRouteName: 'Home',
|
||||
|
||||
tabBarOptions: {
|
||||
showLabel: true, // hide labels
|
||||
|
@ -132,7 +132,7 @@ const Stack = createStackNavigator({
|
|||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('Profile')}>
|
||||
|
||||
<Text>editar</Text>
|
||||
<Text>Editar dados</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
|
||||
</TouchableOpacity>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 297 KiB |
|
@ -82,7 +82,8 @@ class Home extends Component {
|
|||
|
||||
//console.log('logged:'+this.props.logged);
|
||||
|
||||
//console.log(th2is.props)
|
||||
//console.log(th2is.props
|
||||
this.props.getEvents(this.props.user);
|
||||
}
|
||||
componentWillUnmount() {}
|
||||
|
||||
|
@ -98,6 +99,7 @@ class Home extends Component {
|
|||
}
|
||||
_update = () => {
|
||||
this.props.getUserInfo(this.props.token);
|
||||
this.props.getEvents(this.props.user);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
@ -143,13 +145,45 @@ class Home extends Component {
|
|||
</ImageBackground>
|
||||
|
||||
<View style={styles.userStats}>
|
||||
<View style={{backgroundColor:'orange'}}>
|
||||
<Text style={styles.userStatsTitle}>Informações Importantes</Text>
|
||||
<View style={{ backgroundColor: "orange" }}>
|
||||
<Text style={styles.userStatsTitle}>
|
||||
O que inclui o meu bilhete?
|
||||
</Text>
|
||||
</View>
|
||||
<View style={{ flex: 1, flexDirection: 'row', flexWrap: 'wrap' }}>
|
||||
<View style={styles.colBilhete}>
|
||||
<Text style={styles.titleBilhete}>Acesso </Text>
|
||||
<FlatList
|
||||
data={this.props.acesso}
|
||||
renderItem={({item}) =>
|
||||
<View style={styles.boxStyle}>
|
||||
<Text><IconFA name="check" size={18} color={'#CC1A17'}/> {item}</Text>
|
||||
</View>}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.colBilhete}>
|
||||
<Text style={styles.titleBilhete}>Alojamento</Text>
|
||||
<FlatList
|
||||
data={this.props.alojamento}
|
||||
renderItem={({item}) =>
|
||||
<View style={styles.boxStyle}>
|
||||
<Text><IconFA name="check" size={18} color={'#CC1A17'}/> {item}</Text>
|
||||
</View>}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.colBilhete}>
|
||||
<Text style={styles.titleBilhete}>Alimentação</Text>
|
||||
<FlatList
|
||||
|
||||
data={this.props.alimentacao}
|
||||
renderItem={({item}) =>
|
||||
<View style={styles.boxStyle}>
|
||||
<Text><IconFA name="check" size={18} color={'#CC1A17'}/> {item}</Text>
|
||||
</View>}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View style={styles.userStatsBox}>
|
||||
<Text style={{margin:10}}>Grupo de ....</Text>
|
||||
<Text style={{margin:10}}>Alojamento</Text>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
|
||||
|
@ -162,8 +196,14 @@ class Home extends Component {
|
|||
borderRadius: 3
|
||||
}}
|
||||
>
|
||||
<View style={{ backgroundColor: "#CC1A17" , flex:1, flexDirection:'row'}}>
|
||||
<View style={{width:'79%'}}>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "#CC1A17",
|
||||
flex: 1,
|
||||
flexDirection: "row"
|
||||
}}
|
||||
>
|
||||
<View style={{ width: "79%" }}>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 25,
|
||||
|
@ -185,9 +225,15 @@ class Home extends Component {
|
|||
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
|
||||
style={{
|
||||
alignItems: "center",
|
||||
alignContent: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<IconFA name="plus" color={"white"} size={30} />
|
||||
<Text style={{ color: "white" }}>Adicionar</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
|
@ -203,8 +249,7 @@ class Home extends Component {
|
|||
</View>
|
||||
|
||||
<TouchableOpacity style={styles.userRemove}>
|
||||
|
||||
<Text style={{fontWeight:'bold'}}>rm equipa</Text>
|
||||
<Text style={{ fontWeight: "bold" }}>rm equipa</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
|
@ -267,8 +312,6 @@ class Home extends Component {
|
|||
<Text>remover</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
@ -288,20 +331,39 @@ class Home extends Component {
|
|||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
titleBilhete:{
|
||||
textAlign:'center',
|
||||
fontSize:15,
|
||||
fontWeight:'bold',
|
||||
marginBottom:10
|
||||
},
|
||||
colBilhete:{
|
||||
width:'33%',
|
||||
padding:10
|
||||
},
|
||||
boxStyle: {
|
||||
|
||||
|
||||
padding:10,
|
||||
borderWidth: 1,
|
||||
marginBottom: 5,
|
||||
borderColor:'#CC1A17'
|
||||
|
||||
},
|
||||
userName: {
|
||||
fontSize: 16,
|
||||
fontWeight:'bold'
|
||||
fontWeight: "bold"
|
||||
},
|
||||
userRemove: {
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
|
||||
alignSelf:'center'
|
||||
alignSelf: "center"
|
||||
},
|
||||
userT: {
|
||||
margin: 10,
|
||||
|
||||
width: "55%",
|
||||
width: "55%"
|
||||
// backgroundColor: "red"
|
||||
},
|
||||
userLogo: {
|
||||
|
@ -328,7 +390,7 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
userStatsBox: {
|
||||
flex: 1,
|
||||
backgroundColor:'white',
|
||||
backgroundColor: "white",
|
||||
flexDirection: "row"
|
||||
},
|
||||
userBox: {
|
||||
|
@ -389,7 +451,7 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
userStats: {
|
||||
backgroundColor: "white",
|
||||
height: SCREEN_HEIGHT * 0.2,
|
||||
//height: SCREEN_HEIGHT * 0.2,
|
||||
// padding: 10,
|
||||
margin: 10,
|
||||
borderRadius: 5,
|
||||
|
@ -415,7 +477,11 @@ function mapStateToProps(state, props) {
|
|||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
onHold: state.apiReducer.onHold
|
||||
onHold: state.apiReducer.onHold,
|
||||
bilhete: state.apiReducer.bilhete,
|
||||
alimentacao: state.apiReducer.alimentacao,
|
||||
alojamento: state.apiReducer.alojamento,
|
||||
acesso: state.apiReducer.acesso
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
|
@ -9,141 +9,188 @@ import {
|
|||
Button,
|
||||
TouchableOpacity,
|
||||
ImageBackground
|
||||
} from 'react-native';
|
||||
} from "react-native";
|
||||
|
||||
import {Divider, Icon, Avatar} from 'react-native-elements'
|
||||
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 { Divider, Icon, Avatar } from "react-native-elements";
|
||||
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 NavAbsolute from '../components/Nav';
|
||||
import NavAbsolute from "../components/Nav";
|
||||
|
||||
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 Swiper from 'react-native-swiper';
|
||||
import * as Actions from "../store/actions"; //Import your actionss
|
||||
import Swiper from "react-native-swiper";
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
import FitImage from 'react-native-fit-image';
|
||||
import FitImage from "react-native-fit-image";
|
||||
|
||||
import MapView, {PROVIDER_GOOGLE} from 'react-native-maps';
|
||||
|
||||
const formatObj = (obj) => {
|
||||
import MapView, { PROVIDER_GOOGLE } from "react-native-maps";
|
||||
|
||||
const formatObj = obj => {
|
||||
let a = {};
|
||||
|
||||
a.push({})
|
||||
|
||||
return a
|
||||
a.push({});
|
||||
|
||||
return a;
|
||||
};
|
||||
|
||||
|
||||
class calendarDetail extends React.Component {
|
||||
|
||||
|
||||
static navigationOptions = ({ navigation }) => ({
|
||||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
// title={navigation.state.params.info.name}
|
||||
/>
|
||||
),
|
||||
)
|
||||
});
|
||||
|
||||
|
||||
state = {};
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
this.props.getEvents(this.props.user);
|
||||
console.log('didMount');
|
||||
console.log("didMount");
|
||||
console.log(this.props.events);
|
||||
const { navigation } = this.props;
|
||||
const info = navigation.getParam('info', 'error');
|
||||
console.log("putas")
|
||||
console.log(info)
|
||||
|
||||
const info = navigation.getParam("info", "error");
|
||||
console.log("putas");
|
||||
console.log(info);
|
||||
}
|
||||
|
||||
|
||||
_update = () => {
|
||||
this.setState({ user: this.props.user });
|
||||
console.log(this.props.events);
|
||||
};
|
||||
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
super(props)
|
||||
|
||||
|
||||
this.data = []
|
||||
this.data = [];
|
||||
}
|
||||
|
||||
renderHeader = (info) => {
|
||||
renderHeader = info => {
|
||||
return (
|
||||
<View style={styles.headerContainer}>
|
||||
<View style={styles.coverContainer}>
|
||||
<ImageBackground
|
||||
source={{
|
||||
uri: info.imageUrl,
|
||||
uri: info.imageUrl
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
>
|
||||
</ImageBackground>
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
renderDescription = (info) => {
|
||||
renderDescription = info => {
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
<View style={{flexDirection: "row", alignItems: 'center', alignSelf:'center'}}>
|
||||
|
||||
<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}`}
|
||||
{info.time === info.timeEnd
|
||||
? info.time
|
||||
: `${info.time}H - ${info.timeEnd}H`}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View><Text style={{margin:10,marginTop:0, fontSize:20, color:'#CC1A17'}}>{info.name}</Text></View>
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
margin: 10,
|
||||
marginBottom: 0,
|
||||
marginTop: 0,
|
||||
fontSize: 20,
|
||||
color: "#CC1A17"
|
||||
}}
|
||||
>
|
||||
{info.name}
|
||||
</Text>
|
||||
<Text style={{ marginLeft: 10 }}>Workshop</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>
|
||||
<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: "#eeeeee" }} />
|
||||
<View style={{ flex: 1, flexDirection: "row", marginTop: 10 }}>
|
||||
<View style={{ width: 100, height: 100, padding: 5 }}>
|
||||
<FitImage
|
||||
source={{
|
||||
uri:
|
||||
"http://enei2019.uingress.com/adminpoint/Content/Images/Uploads/Speakers/ffb043cb-3073-421c-a070-5d273b50fc23.jpeg"
|
||||
}}
|
||||
style={{ padding: 5 }}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: '#000'}}/>
|
||||
<View>
|
||||
<Text style={{fontSize:15, color:'#CC1A17', padding:10}}>Descrição</Text>
|
||||
<Text style={{paddingLeft:10, paddingRigh:10}}></Text>
|
||||
<Text style={{ fontWeight: "bold", fontSize: 20, margin: 10 }}>
|
||||
André Duarte
|
||||
</Text>
|
||||
<Text style={{ marginLeft: 10 }}>
|
||||
Project manager at ubiwhere
|
||||
</Text>
|
||||
<TouchableOpacity>
|
||||
<Text style={{ color: "#CC1A17", marginLeft: 10 }}>
|
||||
website
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
fontWeight: "bold",
|
||||
color: "#CC1A17",
|
||||
margin: 10,
|
||||
marginBottom: 0,
|
||||
fontSize: 15
|
||||
}}
|
||||
>
|
||||
Descrição do orador:
|
||||
</Text>
|
||||
<Text style={{ margin: 10 }}>
|
||||
Existem muitas variações das passagens do Lorem Ipsum disponíveis,
|
||||
mas a maior parte sofreu alterações de alguma forma, pela injecção
|
||||
de humor, ou de palavras aleatórias que nem sequer parecem
|
||||
suficientemente credíveis.{" "}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.block}>
|
||||
<Text style={{fontSize: 20, color: "#CC1A17"}}>Descrição</Text>
|
||||
<Divider style={{backgroundColor: '#000'}}/>
|
||||
<Text style={{ fontSize: 15, color: "#CC1A17", fontWeight:'bold' }}>Descrição da palestra/workshop</Text>
|
||||
<Divider style={{ backgroundColor: "#000" }} />
|
||||
<View style={{ marginTop: 10 }}>
|
||||
<Text>
|
||||
{info.description}
|
||||
</Text>
|
||||
<Text>{info.description}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
);
|
||||
};
|
||||
/*
|
||||
|
||||
|
@ -170,14 +217,15 @@ class calendarDetail extends React.Component {
|
|||
*/
|
||||
renderAttendee = () => {
|
||||
return (
|
||||
<View style={{backgroundColor: '#fff', height: SCREEN_HEIGHT * 0.1}}>
|
||||
<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",
|
||||
uri:
|
||||
"https://cdn3.iconfinder.com/data/icons/vector-icons-6/96/256-512.png"
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
|
@ -192,7 +240,7 @@ class calendarDetail extends React.Component {
|
|||
name="visibility"
|
||||
type="material-icon"
|
||||
onPress={() => navigation.goBack(null)}
|
||||
color='#000'
|
||||
color="#000"
|
||||
iconStyle={styles.icon}
|
||||
underlayColor="transparent"
|
||||
underlineColorAndroid="transparent"
|
||||
|
@ -205,14 +253,11 @@ class calendarDetail extends React.Component {
|
|||
);
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { navigation } = this.props;
|
||||
const info = navigation.getParam('info', 'error');
|
||||
|
||||
const info = navigation.getParam("info", "error");
|
||||
|
||||
return (
|
||||
|
||||
<View style={styles.mainViewStyle}>
|
||||
<ScrollView style={styles.scroll}>
|
||||
<View style={styles.container}>
|
||||
|
@ -222,230 +267,229 @@ class calendarDetail extends React.Component {
|
|||
{this.renderDescription(info)}
|
||||
</View>
|
||||
<View style={styles.block}>
|
||||
|
||||
<Text style={{fontSize: 20, color: "#CC1A17"}}>Localização</Text>
|
||||
<Divider style={{backgroundColor: '#000', marginBottom: 10}}/>
|
||||
|
||||
<Text style={{ fontSize: 15, color: "#CC1A17",fontWeight:'bold' }}>Localização</Text>
|
||||
<Divider style={{ backgroundColor: "#000", marginBottom: 10 }} />
|
||||
<Image source={require('../assets/img/campus.png')} style={{width:SCREEN_WIDTH*0.9}}></Image>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
</View>
|
||||
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
||||
block: {
|
||||
marginTop: 15,
|
||||
|
||||
backgroundColor:'white',
|
||||
padding:20
|
||||
backgroundColor: "white",
|
||||
padding: 20,
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 3
|
||||
},
|
||||
AttendeeContainer: {
|
||||
flexDirection: 'row',
|
||||
flexDirection: "row",
|
||||
height: 55,
|
||||
justifyContent: 'center',
|
||||
justifyContent: "center",
|
||||
marginLeft: 10,
|
||||
marginRight: 10,
|
||||
marginRight: 10
|
||||
},
|
||||
|
||||
centerRow: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'transparent',
|
||||
alignItems: "center",
|
||||
backgroundColor: "transparent",
|
||||
flex: 3,
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'center',
|
||||
flexDirection: "column",
|
||||
justifyContent: "center"
|
||||
},
|
||||
|
||||
leftRow: {
|
||||
backgroundColor: 'transparent',
|
||||
backgroundColor: "transparent",
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
alignSelf: 'center',
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
alignSelf: "center"
|
||||
},
|
||||
rightRow: {
|
||||
alignItems: 'flex-end',
|
||||
backgroundColor: 'transparent',
|
||||
alignItems: "flex-end",
|
||||
backgroundColor: "transparent",
|
||||
flex: 2,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-end',
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-end",
|
||||
marginRight: 4,
|
||||
alignSelf: 'center'
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
icon: {
|
||||
justifyContent: 'flex-start',
|
||||
marginTop: 2.8,
|
||||
justifyContent: "flex-start",
|
||||
marginTop: 2.8
|
||||
},
|
||||
|
||||
nameAttendee: {
|
||||
alignSelf: 'center',
|
||||
alignSelf: "center",
|
||||
fontSize: 20,
|
||||
fontWeight: '400',
|
||||
color: '#000',
|
||||
marginBottom: 10,
|
||||
fontWeight: "400",
|
||||
color: "#000",
|
||||
marginBottom: 10
|
||||
},
|
||||
|
||||
details: {
|
||||
marginTop: 20,
|
||||
flex: 1,
|
||||
alignSelf: 'center',
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
infoRow: {
|
||||
margin: 25,
|
||||
margin: 25
|
||||
},
|
||||
|
||||
ramoText: {
|
||||
alignSelf: 'flex-start',
|
||||
alignSelf: "flex-start",
|
||||
marginBottom: 5,
|
||||
color: 'white',
|
||||
color: "white",
|
||||
fontSize: 17,
|
||||
fontWeight: '400',
|
||||
fontWeight: "400"
|
||||
},
|
||||
|
||||
timeText: {
|
||||
alignItems: 'flex-end',
|
||||
alignItems: "flex-end",
|
||||
flex: 2,
|
||||
lineHeight: 10,
|
||||
marginRight: 4,
|
||||
marginRight: 20
|
||||
},
|
||||
|
||||
mainViewStyle: {
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: 'column',
|
||||
flexDirection: "column"
|
||||
},
|
||||
|
||||
scroll: {
|
||||
backgroundColor: '#eee',
|
||||
flex: 1,
|
||||
backgroundColor: "#eee",
|
||||
flex: 1
|
||||
//marginBottom: 55,
|
||||
},
|
||||
|
||||
header: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
backgroundColor: 'white',
|
||||
backgroundColor: "white",
|
||||
borderRadius: 0,
|
||||
shadowColor: "#000",
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 3
|
||||
},
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
// margin: 20,
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 5,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 5
|
||||
},
|
||||
|
||||
headerContainer: {
|
||||
flex: 1,
|
||||
flex: 1
|
||||
},
|
||||
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: 'column',
|
||||
flexDirection: "column"
|
||||
},
|
||||
coverContainer: {
|
||||
position: 'relative',
|
||||
position: "relative"
|
||||
},
|
||||
coverImage: {
|
||||
height: Dimensions.get('window').width * (2 / 4),
|
||||
width: Dimensions.get('window').width,
|
||||
height: Dimensions.get("window").width * (2 / 4),
|
||||
width: Dimensions.get("window").width
|
||||
},
|
||||
/*headerContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#FFF',
|
||||
},*/
|
||||
|
||||
|
||||
carreerPathContainer: {
|
||||
backgroundColor: '#CC1A17',
|
||||
backgroundColor: "#CC1A17",
|
||||
height: 50,
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingTop: 15,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
paddingTop: 15
|
||||
},
|
||||
carreerPathText: {
|
||||
|
||||
height: 50,
|
||||
color: 'white',
|
||||
fontWeight: 'bold',
|
||||
fontSize: 20,
|
||||
|
||||
color: "white",
|
||||
fontWeight: "bold",
|
||||
fontSize: 20
|
||||
},
|
||||
companyHeader: {
|
||||
backgroundColor: '#dddddd',
|
||||
backgroundColor: "#dddddd",
|
||||
// height:150,
|
||||
borderRadius: 5,
|
||||
margin: 10,
|
||||
padding: 10
|
||||
|
||||
|
||||
},
|
||||
companyTitle: {
|
||||
paddingBottom: 5,
|
||||
fontWeight: 'bold',
|
||||
color: '#777777',
|
||||
fontSize: 17,
|
||||
fontWeight: "bold",
|
||||
color: "#777777",
|
||||
fontSize: 17
|
||||
|
||||
// padding:20
|
||||
},
|
||||
companyLogo: {
|
||||
borderRadius: 20,
|
||||
|
||||
borderRadius: 20
|
||||
},
|
||||
|
||||
wrapper: {},
|
||||
company: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
flexDirection: "row",
|
||||
// backgroundColor:'red',
|
||||
color: 'black'
|
||||
color: "black"
|
||||
},
|
||||
|
||||
companyLogoContainer: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
width: '60%',
|
||||
justifyContent: "center",
|
||||
width: "60%",
|
||||
// backgroundColor:'white',
|
||||
margin: 20,
|
||||
|
||||
|
||||
margin: 20
|
||||
},
|
||||
aboutCompany: {
|
||||
width: SCREEN_WIDTH,
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
justifyContent: "center",
|
||||
alignItems: "center"
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
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,
|
||||
|
||||
}
|
||||
careerPath: state.apiReducer.careerPath
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(calendarDetail);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(calendarDetail);
|
||||
|
|
|
@ -734,84 +734,151 @@ export function getAvailableSessions(token) {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
//ESTA FUNÇÃO TEM MUITO CÓDIGO MAL FEITO...
|
||||
|
||||
function getE(user) {
|
||||
|
||||
var cenas = [];
|
||||
let events = [];
|
||||
var alimentacao=[];
|
||||
var alojamento=[];
|
||||
var acesso=[]
|
||||
var i = 0;
|
||||
console.log(user.Sessions)
|
||||
for (let key in user.Sessions) {
|
||||
|
||||
//se forem sessões de bilhete, adiciona a outra lista
|
||||
if(
|
||||
user.Sessions[key].Id==1 || //dia 12 de abril
|
||||
user.Sessions[key].Id==22 || //jantar 12 de abril
|
||||
user.Sessions[key].Id==23 || //almoço e jantar 13 de abril
|
||||
user.Sessions[key].Id==24 || //almoço e jantar 14 de abril
|
||||
user.Sessions[key].Id==25 || //almoço 15 de abril
|
||||
user.Sessions[key].Id==26 || //alojamento 12 de abril
|
||||
user.Sessions[key].Id==29 || //alojamento 13 de abril
|
||||
user.Sessions[key].Id==31 || //alojamento 14 de abril
|
||||
user.Sessions[key].Id==32 || //dia 13 de abril
|
||||
user.Sessions[key].Id==33 || //dia 14 de abril
|
||||
user.Sessions[key].Id==34 || //dia 15 de abril
|
||||
user.Sessions[key].Id==35 || //jantar dia 12 de abril
|
||||
user.Sessions[key].Id==36 || //jantar dia 13 de abril
|
||||
user.Sessions[key].Id==37 //jantar dia 14 de abril
|
||||
){
|
||||
// bilhete.push( user.Sessions[key])
|
||||
|
||||
if(user.Sessions[key].Id==1){
|
||||
|
||||
acesso.push("dia 12")
|
||||
|
||||
}
|
||||
|
||||
if(user.Sessions[key].Id==22)
|
||||
alimentacao.push("dia 12")
|
||||
|
||||
if(user.Sessions[key].Id==23)
|
||||
alimentacao.push("dia 13")
|
||||
|
||||
if(user.Sessions[key].Id==24)
|
||||
alimentacao.push("dia 14")
|
||||
|
||||
if(user.Sessions[key].Id==25)
|
||||
alimentacao.push("dia 15")
|
||||
|
||||
if(user.Sessions[key].Id==26)
|
||||
alojamento.push("dia 12")
|
||||
if(user.Sessions[key].Id==29)
|
||||
alojamento.push("dia 13")
|
||||
if(user.Sessions[key].Id==31)
|
||||
alojamento.push("dia 14")
|
||||
|
||||
if(user.Sessions[key].Id==32)
|
||||
acesso.push("dia 13")
|
||||
if(user.Sessions[key].Id==33)
|
||||
acesso.push("dia 14")
|
||||
if(user.Sessions[key].Id==34)
|
||||
acesso.push("dia 15")
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
events.push({
|
||||
key: i++,
|
||||
time: moment(user.Sessions[key].SessionStart).format("HH:mm"),
|
||||
timeEnd: moment(user.Sessions[key].SessionEnd).format("HH:mm"),
|
||||
//lineColor:'#009688',
|
||||
imageUrl:
|
||||
"https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/Vjkyj2hBg/welcome-white-sign-with-falling-colorful-confetti-animation-on-white-background_sglmmh3qm__F0013.png",
|
||||
"https://tickets.enei.pt/adminpoint/Content/Images/Uploads/Sessions/"+user.Sessions[key].Image,
|
||||
description: user.Sessions[key].Description,
|
||||
name: user.Sessions[key].Name,
|
||||
Enrolled: user.Sessions[key].Enrolled,
|
||||
MaxAttendees: user.Sessions[key].MaxAttendees,
|
||||
day: moment(user.Sessions[key].SessionStart).format("DD")
|
||||
});
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
const result = flow(groupBy("day"))(events);
|
||||
|
||||
for (let key in result) {
|
||||
cenas.push(result[key]);
|
||||
}
|
||||
|
||||
var a = [],
|
||||
b = [],
|
||||
c = [],
|
||||
d = [];
|
||||
|
||||
for (let key in cenas[0]) {
|
||||
|
||||
|
||||
//MEU DEUS QUE É ISTO???
|
||||
|
||||
for (let key in result["12"]) {
|
||||
a.push({
|
||||
time: cenas[0][key].time,
|
||||
timeEnd: cenas[0][key].timeEnd,
|
||||
imageUrl: cenas[0][key].imageUrl,
|
||||
description: cenas[0][key].description,
|
||||
name: cenas[0][key].name,
|
||||
Enrolled: cenas[0][key].Enrolled,
|
||||
MaxAttendees: cenas[0][key].MaxAttendees,
|
||||
day: cenas[0][key].day
|
||||
time: result["12"][key].time,
|
||||
timeEnd: result["12"][key].timeEnd,
|
||||
imageUrl:result["12"][key].imageUrl,
|
||||
description: result["12"][key].description,
|
||||
name:result["12"][key].name,
|
||||
Enrolled: result["12"][key].Enrolled,
|
||||
MaxAttendees: result["12"][key].MaxAttendees,
|
||||
day: result["12"][key].day
|
||||
});
|
||||
}
|
||||
|
||||
for (let key in cenas[1]) {
|
||||
for (let key in result["13"]) {
|
||||
b.push({
|
||||
time: cenas[1][key].time,
|
||||
timeEnd: cenas[1][key].timeEnd,
|
||||
imageUrl: cenas[1][key].imageUrl,
|
||||
description: cenas[1][key].description,
|
||||
name: cenas[1][key].name,
|
||||
Enrolled: cenas[1][key].Enrolled,
|
||||
MaxAttendees: cenas[1][key].MaxAttendees,
|
||||
day: cenas[1][key].day
|
||||
time: result["13"][key].time,
|
||||
timeEnd: result["13"][key].timeEnd,
|
||||
imageUrl: result["13"][key].imageUrl,
|
||||
description:result["13"][key].description,
|
||||
name: result["13"][key].name,
|
||||
Enrolled:result["13"][key].Enrolled,
|
||||
MaxAttendees: result["13"][key].MaxAttendees,
|
||||
day: result["13"][key].day
|
||||
});
|
||||
}
|
||||
for (let key in cenas[2]) {
|
||||
for (let key in result["14"]) {
|
||||
c.push({
|
||||
time: cenas[2][key].time,
|
||||
timeEnd: cenas[2][key].timeEnd,
|
||||
imageUrl: cenas[2][key].imageUrl,
|
||||
description: cenas[2][key].description,
|
||||
name: cenas[2][key].name,
|
||||
Enrolled: cenas[2][key].Enrolled,
|
||||
MaxAttendees: cenas[2][key].MaxAttendees,
|
||||
day: cenas[2][key].day
|
||||
time: result["14"][key].time,
|
||||
timeEnd: result["14"][key].timeEnd,
|
||||
imageUrl: result["14"][key].imageUrl,
|
||||
description: result["14"][key].description,
|
||||
name:result["14"][key].name,
|
||||
Enrolled: result["14"][key].Enrolled,
|
||||
MaxAttendees: result["14"][key].MaxAttendees,
|
||||
day: result["14"][key].day
|
||||
});
|
||||
}
|
||||
|
||||
for (let key in cenas[3]) {
|
||||
for (let key in result["15"]) {
|
||||
d.push({
|
||||
time: cenas[3][key].time,
|
||||
timeEnd: cenas[3][key].timeEnd,
|
||||
imageUrl: cenas[3][key].imageUrl,
|
||||
description: cenas[3][key].description,
|
||||
name: cenas[3][key].name,
|
||||
Enrolled: cenas[3][key].Enrolled,
|
||||
MaxAttendees: cenas[3][key].MaxAttendees,
|
||||
day: cenas[3][key].day
|
||||
time: result["15"][key].time,
|
||||
timeEnd: result["15"][key].timeEnd,
|
||||
imageUrl:result["15"][key].imageUrl,
|
||||
description: result["15"][key].description,
|
||||
name: result["15"][key].name,
|
||||
Enrolled: result["15"][key].Enrolled,
|
||||
MaxAttendees: result["15"][key].MaxAttendees,
|
||||
day: result["15"][key].day
|
||||
});
|
||||
}
|
||||
a = _.sortBy(a, function(o) {
|
||||
|
@ -827,11 +894,13 @@ function getE(user) {
|
|||
return o.time;
|
||||
});
|
||||
|
||||
return { a, b, c, d };
|
||||
console.log(alimentacao)
|
||||
return { a, b, c, d ,ab:alimentacao, acc: acesso, al:alojamento};
|
||||
}
|
||||
|
||||
export function getEvents(user) {
|
||||
var result = getE(user);
|
||||
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: GET_EVENTS,
|
||||
|
@ -839,7 +908,10 @@ export function getEvents(user) {
|
|||
day1: result.a,
|
||||
day2: result.b,
|
||||
day3: result.c,
|
||||
day4: result.d
|
||||
day4: result.d,
|
||||
alimentacao: result.ab,
|
||||
acesso: result.acc,
|
||||
alojamento: result.al
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -50,7 +50,10 @@ let apiState = {
|
|||
b: {},
|
||||
c: {},
|
||||
d: {},
|
||||
loadingLogin: false
|
||||
loadingLogin: false,
|
||||
alimentacao:[],
|
||||
acesso:[],
|
||||
alojamento:[]
|
||||
};
|
||||
|
||||
const apiReducer = (state = apiState, action) => {
|
||||
|
@ -180,7 +183,11 @@ const apiReducer = (state = apiState, action) => {
|
|||
a: action.day1,
|
||||
b: action.day2,
|
||||
c: action.day3,
|
||||
d: action.day4
|
||||
d: action.day4,
|
||||
alimentacao: action.alimentacao,
|
||||
alojamento: action.alojamento,
|
||||
acesso:action.acesso
|
||||
|
||||
});
|
||||
|
||||
return state;
|
||||
|
|
Loading…
Reference in New Issue