talk details
This commit is contained in:
parent
c476e7bbf5
commit
71b9ce7a51
|
@ -105,7 +105,7 @@ const AppStack = createBottomTabNavigator(
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
initialRouteName: 'Eventos',
|
initialRouteName: 'Home',
|
||||||
|
|
||||||
tabBarOptions: {
|
tabBarOptions: {
|
||||||
showLabel: true, // hide labels
|
showLabel: true, // hide labels
|
||||||
|
@ -132,7 +132,7 @@ const Stack = createStackNavigator({
|
||||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||||
onPress={() => navigation.navigate('Profile')}>
|
onPress={() => navigation.navigate('Profile')}>
|
||||||
|
|
||||||
<Text>editar</Text>
|
<Text>Editar dados</Text>
|
||||||
<IconFA name="user-edit" size={22}/>
|
<IconFA name="user-edit" size={22}/>
|
||||||
|
|
||||||
</TouchableOpacity>
|
</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('logged:'+this.props.logged);
|
||||||
|
|
||||||
//console.log(th2is.props)
|
//console.log(th2is.props
|
||||||
|
this.props.getEvents(this.props.user);
|
||||||
}
|
}
|
||||||
componentWillUnmount() {}
|
componentWillUnmount() {}
|
||||||
|
|
||||||
|
@ -98,6 +99,7 @@ class Home extends Component {
|
||||||
}
|
}
|
||||||
_update = () => {
|
_update = () => {
|
||||||
this.props.getUserInfo(this.props.token);
|
this.props.getUserInfo(this.props.token);
|
||||||
|
this.props.getEvents(this.props.user);
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -143,14 +145,46 @@ class Home extends Component {
|
||||||
</ImageBackground>
|
</ImageBackground>
|
||||||
|
|
||||||
<View style={styles.userStats}>
|
<View style={styles.userStats}>
|
||||||
<View style={{backgroundColor:'orange'}}>
|
<View style={{ backgroundColor: "orange" }}>
|
||||||
<Text style={styles.userStatsTitle}>Informações Importantes</Text>
|
<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>
|
||||||
|
|
||||||
<View style={styles.userStatsBox}>
|
|
||||||
<Text style={{margin:10}}>Grupo de ....</Text>
|
</View>
|
||||||
<Text style={{margin:10}}>Alojamento</Text>
|
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View>
|
<View>
|
||||||
|
@ -162,32 +196,44 @@ class Home extends Component {
|
||||||
borderRadius: 3
|
borderRadius: 3
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View style={{ backgroundColor: "#CC1A17" , flex:1, flexDirection:'row'}}>
|
<View
|
||||||
<View style={{width:'79%'}}>
|
style={{
|
||||||
<Text
|
backgroundColor: "#CC1A17",
|
||||||
style={{
|
flex: 1,
|
||||||
fontSize: 25,
|
flexDirection: "row"
|
||||||
color: "white",
|
}}
|
||||||
margin: 10,
|
>
|
||||||
fontWeight: "bold",
|
<View style={{ width: "79%" }}>
|
||||||
marginBottom: 0
|
<Text
|
||||||
}}
|
style={{
|
||||||
>
|
fontSize: 25,
|
||||||
Os tones
|
color: "white",
|
||||||
</Text>
|
margin: 10,
|
||||||
<Text
|
fontWeight: "bold",
|
||||||
style={{
|
marginBottom: 0
|
||||||
color: "white",
|
}}
|
||||||
marginLeft: 10,
|
>
|
||||||
marginBottom: 5
|
Os tones
|
||||||
}}
|
</Text>
|
||||||
>
|
<Text
|
||||||
5/6 elementos
|
style={{
|
||||||
</Text>
|
color: "white",
|
||||||
|
marginLeft: 10,
|
||||||
|
marginBottom: 5
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
5/6 elementos
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={{alignItems:'center', alignContent:'center',alignSelf:'center'}}>
|
<View
|
||||||
<IconFA name="plus" color={'white'} size={30} />
|
style={{
|
||||||
<Text style={{color:'white'}}>Adicionar</Text>
|
alignItems: "center",
|
||||||
|
alignContent: "center",
|
||||||
|
alignSelf: "center"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IconFA name="plus" color={"white"} size={30} />
|
||||||
|
<Text style={{ color: "white" }}>Adicionar</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
@ -203,8 +249,7 @@ class Home extends Component {
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<TouchableOpacity style={styles.userRemove}>
|
<TouchableOpacity style={styles.userRemove}>
|
||||||
|
<Text style={{ fontWeight: "bold" }}>rm equipa</Text>
|
||||||
<Text style={{fontWeight:'bold'}}>rm equipa</Text>
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
<Divider style={{ backgroundColor: "black" }} />
|
<Divider style={{ backgroundColor: "black" }} />
|
||||||
|
@ -267,8 +312,6 @@ class Home extends Component {
|
||||||
<Text>remover</Text>
|
<Text>remover</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -288,21 +331,40 @@ class Home extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
userName:{
|
titleBilhete:{
|
||||||
fontSize:16,
|
textAlign:'center',
|
||||||
fontWeight:'bold'
|
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"
|
||||||
|
},
|
||||||
userRemove: {
|
userRemove: {
|
||||||
alignContent: "center",
|
alignContent: "center",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
|
||||||
alignSelf:'center'
|
alignSelf: "center"
|
||||||
},
|
},
|
||||||
userT: {
|
userT: {
|
||||||
margin: 10,
|
margin: 10,
|
||||||
|
|
||||||
width: "55%",
|
width: "55%"
|
||||||
// backgroundColor: "red"
|
// backgroundColor: "red"
|
||||||
},
|
},
|
||||||
userLogo: {
|
userLogo: {
|
||||||
paddingLeft: 10,
|
paddingLeft: 10,
|
||||||
|
@ -328,7 +390,7 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
userStatsBox: {
|
userStatsBox: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor:'white',
|
backgroundColor: "white",
|
||||||
flexDirection: "row"
|
flexDirection: "row"
|
||||||
},
|
},
|
||||||
userBox: {
|
userBox: {
|
||||||
|
@ -389,15 +451,15 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
userStats: {
|
userStats: {
|
||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
height: SCREEN_HEIGHT * 0.2,
|
//height: SCREEN_HEIGHT * 0.2,
|
||||||
// padding: 10,
|
// padding: 10,
|
||||||
margin: 10,
|
margin: 10,
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
marginTop: 10,
|
marginTop: 10,
|
||||||
marginBottom: 0
|
marginBottom: 0
|
||||||
},
|
},
|
||||||
userStatsTitle: {
|
userStatsTitle: {
|
||||||
margin:10,
|
margin: 10,
|
||||||
color: "white",
|
color: "white",
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
|
@ -415,7 +477,11 @@ function mapStateToProps(state, props) {
|
||||||
user: state.apiReducer.user,
|
user: state.apiReducer.user,
|
||||||
logged: state.apiReducer.logged,
|
logged: state.apiReducer.logged,
|
||||||
userDetails: state.apiReducer.userDetails,
|
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,151 +1,198 @@
|
||||||
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,
|
||||||
ImageBackground
|
ImageBackground
|
||||||
} from 'react-native';
|
} from "react-native";
|
||||||
|
|
||||||
import {Divider, Icon, Avatar} from 'react-native-elements'
|
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, RkTheme } from "react-native-ui-kitten";
|
||||||
RkButton, RkCard, RkText,
|
import Timeline from "react-native-timeline-feed";
|
||||||
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 * as Actions from "../store/actions"; //Import your actionss
|
||||||
import Swiper from 'react-native-swiper';
|
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';
|
import MapView, { PROVIDER_GOOGLE } from "react-native-maps";
|
||||||
|
|
||||||
const formatObj = (obj) => {
|
const formatObj = obj => {
|
||||||
|
let a = {};
|
||||||
|
|
||||||
let a = {};
|
a.push({});
|
||||||
|
|
||||||
a.push({})
|
|
||||||
|
|
||||||
return a
|
|
||||||
|
|
||||||
|
return a;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class calendarDetail extends React.Component {
|
class calendarDetail extends React.Component {
|
||||||
|
static navigationOptions = ({ navigation }) => ({
|
||||||
|
header: (
|
||||||
|
<NavAbsolute
|
||||||
|
navigation={navigation}
|
||||||
|
// title={navigation.state.params.info.name}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
state = {};
|
||||||
static navigationOptions = ({navigation}) => ({
|
|
||||||
header: (
|
componentDidMount() {
|
||||||
<NavAbsolute
|
this.props.getEvents(this.props.user);
|
||||||
navigation={navigation}
|
console.log("didMount");
|
||||||
// title={navigation.state.params.info.name}
|
console.log(this.props.events);
|
||||||
|
const { navigation } = this.props;
|
||||||
|
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);
|
||||||
|
|
||||||
|
this.data = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
renderHeader = info => {
|
||||||
|
return (
|
||||||
|
<View style={styles.headerContainer}>
|
||||||
|
<View style={styles.coverContainer}>
|
||||||
|
<ImageBackground
|
||||||
|
source={{
|
||||||
|
uri: info.imageUrl
|
||||||
|
}}
|
||||||
|
style={styles.coverImage}
|
||||||
|
/>
|
||||||
|
</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}H - ${info.timeEnd}H`}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</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>
|
||||||
|
</View>
|
||||||
state = {};
|
<Divider style={{ backgroundColor: "#eeeeee" }} />
|
||||||
|
<View style={{ flex: 1, flexDirection: "row", marginTop: 10 }}>
|
||||||
componentDidMount() {
|
<View style={{ width: 100, height: 100, padding: 5 }}>
|
||||||
|
<FitImage
|
||||||
this.props.getEvents(this.props.user);
|
source={{
|
||||||
console.log('didMount');
|
uri:
|
||||||
console.log(this.props.events);
|
"http://enei2019.uingress.com/adminpoint/Content/Images/Uploads/Speakers/ffb043cb-3073-421c-a070-5d273b50fc23.jpeg"
|
||||||
const {navigation} = this.props;
|
}}
|
||||||
const info = navigation.getParam('info', 'error');
|
style={{ padding: 5 }}
|
||||||
console.log("putas")
|
/>
|
||||||
console.log(info)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
_update = () => {
|
|
||||||
this.setState({user: this.props.user});
|
|
||||||
console.log(this.props.events);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
constructor(props) {
|
|
||||||
|
|
||||||
super(props)
|
|
||||||
|
|
||||||
|
|
||||||
this.data = []
|
|
||||||
}
|
|
||||||
|
|
||||||
renderHeader = (info) => {
|
|
||||||
return (
|
|
||||||
<View style={styles.headerContainer}>
|
|
||||||
<View style={styles.coverContainer}>
|
|
||||||
<ImageBackground
|
|
||||||
source={{
|
|
||||||
uri: info.imageUrl,
|
|
||||||
}}
|
|
||||||
style={styles.coverImage}
|
|
||||||
>
|
|
||||||
</ImageBackground>
|
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
)
|
|
||||||
};
|
|
||||||
|
|
||||||
renderDescription = (info) => {
|
|
||||||
return (
|
|
||||||
<View>
|
<View>
|
||||||
<View style={styles.header}>
|
<Text style={{ fontWeight: "bold", fontSize: 20, margin: 10 }}>
|
||||||
<View style={{flexDirection: "row", alignItems: 'center', alignSelf:'center'}}>
|
André Duarte
|
||||||
|
</Text>
|
||||||
<View style={styles.timeText}>
|
<Text style={{ marginLeft: 10 }}>
|
||||||
<Text style={{color: "#CC1A17", fontSize: 15}}>
|
Project manager at ubiwhere
|
||||||
{info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}
|
</Text>
|
||||||
</Text>
|
<TouchableOpacity>
|
||||||
</View>
|
<Text style={{ color: "#CC1A17", marginLeft: 10 }}>
|
||||||
</View>
|
website
|
||||||
<View><Text style={{margin:10,marginTop:0, fontSize:20, color:'#CC1A17'}}>{info.name}</Text></View>
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
<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>
|
</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: 15, color: "#CC1A17", fontWeight:'bold' }}>Descrição da palestra/workshop</Text>
|
||||||
|
<Divider style={{ backgroundColor: "#000" }} />
|
||||||
|
<View style={{ marginTop: 10 }}>
|
||||||
|
<Text>{info.description}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
|
||||||
renderMap = () => {
|
renderMap = () => {
|
||||||
return (
|
return (
|
||||||
|
@ -168,284 +215,281 @@ class calendarDetail extends React.Component {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
renderAttendee = () => {
|
renderAttendee = () => {
|
||||||
return (
|
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.AttendeeContainer}>
|
||||||
<View style={styles.leftRow}>
|
<View style={styles.leftRow}>
|
||||||
<Avatar
|
<Avatar
|
||||||
rounded
|
rounded
|
||||||
size="medium"
|
size="medium"
|
||||||
source={{
|
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>
|
/>
|
||||||
<View style={styles.centerRow}>
|
</View>
|
||||||
<Text style={styles.titleText} numberOfLines={1}>
|
<View style={styles.centerRow}>
|
||||||
Nome do gajo
|
<Text style={styles.titleText} numberOfLines={1}>
|
||||||
</Text>
|
Nome do gajo
|
||||||
</View>
|
</Text>
|
||||||
<View style={styles.rightRow}>
|
</View>
|
||||||
<Icon
|
<View style={styles.rightRow}>
|
||||||
size={24}
|
<Icon
|
||||||
name="visibility"
|
size={24}
|
||||||
type="material-icon"
|
name="visibility"
|
||||||
onPress={() => navigation.goBack(null)}
|
type="material-icon"
|
||||||
color='#000'
|
onPress={() => navigation.goBack(null)}
|
||||||
iconStyle={styles.icon}
|
color="#000"
|
||||||
underlayColor="transparent"
|
iconStyle={styles.icon}
|
||||||
underlineColorAndroid="transparent"
|
underlayColor="transparent"
|
||||||
containerStyle={styles.iconContainer}
|
underlineColorAndroid="transparent"
|
||||||
hitSlop={{top: 15, bottom: 15, left: 15, right: 15}}
|
containerStyle={styles.iconContainer}
|
||||||
/>
|
hitSlop={{ top: 15, bottom: 15, left: 15, right: 15 }}
|
||||||
</View>
|
/>
|
||||||
</View>
|
</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>
|
</View>
|
||||||
);
|
{this.renderDescription(info)}
|
||||||
};
|
</View>
|
||||||
|
<View style={styles.block}>
|
||||||
|
<Text style={{ fontSize: 15, color: "#CC1A17",fontWeight:'bold' }}>Localização</Text>
|
||||||
render() {
|
<Divider style={{ backgroundColor: "#000", marginBottom: 10 }} />
|
||||||
const {navigation} = this.props;
|
<Image source={require('../assets/img/campus.png')} style={{width:SCREEN_WIDTH*0.9}}></Image>
|
||||||
const info = navigation.getParam('info', 'error');
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
<Divider style={{ backgroundColor: "black" }} />
|
||||||
return (
|
</View>
|
||||||
|
);
|
||||||
<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({
|
||||||
|
block: {
|
||||||
|
marginTop: 15,
|
||||||
|
|
||||||
block:{
|
backgroundColor: "white",
|
||||||
marginTop:15,
|
padding: 20,
|
||||||
|
shadowOffset: {
|
||||||
|
width: 0,
|
||||||
|
height: 2
|
||||||
|
},
|
||||||
|
shadowOpacity: 0.25,
|
||||||
|
shadowRadius: 3.84,
|
||||||
|
|
||||||
backgroundColor:'white',
|
elevation: 3
|
||||||
padding:20
|
},
|
||||||
},
|
AttendeeContainer: {
|
||||||
AttendeeContainer: {
|
flexDirection: "row",
|
||||||
flexDirection: 'row',
|
height: 55,
|
||||||
height: 55,
|
justifyContent: "center",
|
||||||
justifyContent: 'center',
|
marginLeft: 10,
|
||||||
marginLeft: 10,
|
marginRight: 10
|
||||||
marginRight: 10,
|
},
|
||||||
},
|
|
||||||
|
|
||||||
centerRow: {
|
centerRow: {
|
||||||
alignItems: 'center',
|
alignItems: "center",
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: "transparent",
|
||||||
flex: 3,
|
flex: 3,
|
||||||
flexDirection: 'column',
|
flexDirection: "column",
|
||||||
justifyContent: 'center',
|
justifyContent: "center"
|
||||||
},
|
},
|
||||||
|
|
||||||
leftRow: {
|
leftRow: {
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: "transparent",
|
||||||
flex: 1,
|
flex: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: "row",
|
||||||
justifyContent: 'flex-start',
|
justifyContent: "flex-start",
|
||||||
alignSelf: 'center',
|
alignSelf: "center"
|
||||||
},
|
},
|
||||||
rightRow: {
|
rightRow: {
|
||||||
alignItems: 'flex-end',
|
alignItems: "flex-end",
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: "transparent",
|
||||||
flex: 2,
|
flex: 2,
|
||||||
flexDirection: 'row',
|
flexDirection: "row",
|
||||||
justifyContent: 'flex-end',
|
justifyContent: "flex-end",
|
||||||
marginRight: 4,
|
marginRight: 4,
|
||||||
alignSelf: 'center'
|
alignSelf: "center"
|
||||||
},
|
},
|
||||||
|
|
||||||
icon: {
|
icon: {
|
||||||
justifyContent: 'flex-start',
|
justifyContent: "flex-start",
|
||||||
marginTop: 2.8,
|
marginTop: 2.8
|
||||||
},
|
},
|
||||||
|
|
||||||
nameAttendee: {
|
nameAttendee: {
|
||||||
alignSelf: 'center',
|
alignSelf: "center",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: '400',
|
fontWeight: "400",
|
||||||
color: '#000',
|
color: "#000",
|
||||||
marginBottom: 10,
|
marginBottom: 10
|
||||||
},
|
},
|
||||||
|
|
||||||
details: {
|
details: {
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignSelf: 'center',
|
alignSelf: "center"
|
||||||
},
|
},
|
||||||
|
|
||||||
infoRow: {
|
infoRow: {
|
||||||
margin: 25,
|
margin: 25
|
||||||
},
|
},
|
||||||
|
|
||||||
ramoText: {
|
ramoText: {
|
||||||
alignSelf: 'flex-start',
|
alignSelf: "flex-start",
|
||||||
marginBottom: 5,
|
marginBottom: 5,
|
||||||
color: 'white',
|
color: "white",
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
fontWeight: '400',
|
fontWeight: "400"
|
||||||
},
|
},
|
||||||
|
|
||||||
timeText: {
|
timeText: {
|
||||||
alignItems: 'flex-end',
|
alignItems: "flex-end",
|
||||||
flex: 2,
|
flex: 2,
|
||||||
lineHeight: 10,
|
lineHeight: 10,
|
||||||
marginRight: 4,
|
marginRight: 20
|
||||||
},
|
},
|
||||||
|
|
||||||
mainViewStyle: {
|
mainViewStyle: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
flexDirection: 'column',
|
flexDirection: "column"
|
||||||
},
|
},
|
||||||
|
|
||||||
scroll: {
|
scroll: {
|
||||||
backgroundColor: '#eee',
|
backgroundColor: "#eee",
|
||||||
flex: 1,
|
flex: 1
|
||||||
//marginBottom: 55,
|
//marginBottom: 55,
|
||||||
},
|
},
|
||||||
|
|
||||||
header:{
|
header: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
padding: 10,
|
padding: 10,
|
||||||
backgroundColor: 'white',
|
backgroundColor: "white",
|
||||||
borderRadius: 0,
|
borderRadius: 0,
|
||||||
|
shadowColor: "#000",
|
||||||
},
|
shadowOffset: {
|
||||||
cardContainer: {
|
width: 0,
|
||||||
flex: 1,
|
height: 2
|
||||||
padding: 10,
|
|
||||||
// margin: 20,
|
|
||||||
backgroundColor: 'white',
|
|
||||||
borderRadius: 5,
|
|
||||||
},
|
},
|
||||||
|
shadowOpacity: 0.25,
|
||||||
|
shadowRadius: 3.84,
|
||||||
|
|
||||||
headerContainer: {
|
elevation: 3
|
||||||
flex: 1,
|
},
|
||||||
},
|
cardContainer: {
|
||||||
|
flex: 1,
|
||||||
|
padding: 10,
|
||||||
|
// margin: 20,
|
||||||
|
backgroundColor: "white",
|
||||||
|
borderRadius: 5
|
||||||
|
},
|
||||||
|
|
||||||
container: {
|
headerContainer: {
|
||||||
flex: 1,
|
flex: 1
|
||||||
flexDirection: 'column',
|
},
|
||||||
},
|
|
||||||
coverContainer: {
|
container: {
|
||||||
position: 'relative',
|
flex: 1,
|
||||||
},
|
flexDirection: "column"
|
||||||
coverImage: {
|
},
|
||||||
height: Dimensions.get('window').width * (2 / 4),
|
coverContainer: {
|
||||||
width: Dimensions.get('window').width,
|
position: "relative"
|
||||||
},
|
},
|
||||||
/*headerContainer: {
|
coverImage: {
|
||||||
|
height: Dimensions.get("window").width * (2 / 4),
|
||||||
|
width: Dimensions.get("window").width
|
||||||
|
},
|
||||||
|
/*headerContainer: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
backgroundColor: '#FFF',
|
backgroundColor: '#FFF',
|
||||||
},*/
|
},*/
|
||||||
|
|
||||||
|
carreerPathContainer: {
|
||||||
|
backgroundColor: "#CC1A17",
|
||||||
|
height: 50,
|
||||||
|
flex: 1,
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
paddingTop: 15
|
||||||
|
},
|
||||||
|
carreerPathText: {
|
||||||
|
height: 50,
|
||||||
|
color: "white",
|
||||||
|
fontWeight: "bold",
|
||||||
|
fontSize: 20
|
||||||
|
},
|
||||||
|
companyHeader: {
|
||||||
|
backgroundColor: "#dddddd",
|
||||||
|
// height:150,
|
||||||
|
borderRadius: 5,
|
||||||
|
margin: 10,
|
||||||
|
padding: 10
|
||||||
|
},
|
||||||
|
companyTitle: {
|
||||||
|
paddingBottom: 5,
|
||||||
|
fontWeight: "bold",
|
||||||
|
color: "#777777",
|
||||||
|
fontSize: 17
|
||||||
|
|
||||||
carreerPathContainer: {
|
// padding:20
|
||||||
backgroundColor: '#CC1A17',
|
},
|
||||||
height: 50,
|
companyLogo: {
|
||||||
flex: 1,
|
borderRadius: 20
|
||||||
alignItems: 'center',
|
},
|
||||||
justifyContent: 'center',
|
|
||||||
paddingTop: 15,
|
|
||||||
},
|
|
||||||
carreerPathText: {
|
|
||||||
|
|
||||||
height: 50,
|
|
||||||
color: 'white',
|
|
||||||
fontWeight: 'bold',
|
|
||||||
fontSize: 20,
|
|
||||||
|
|
||||||
},
|
|
||||||
companyHeader: {
|
|
||||||
backgroundColor: '#dddddd',
|
|
||||||
// height:150,
|
|
||||||
borderRadius: 5,
|
|
||||||
margin: 10,
|
|
||||||
padding: 10
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
companyTitle: {
|
|
||||||
paddingBottom: 5,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
color: '#777777',
|
|
||||||
fontSize: 17,
|
|
||||||
|
|
||||||
// padding:20
|
|
||||||
},
|
|
||||||
companyLogo: {
|
|
||||||
borderRadius: 20,
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
wrapper: {},
|
|
||||||
company: {
|
|
||||||
flex: 1,
|
|
||||||
flexDirection: 'row',
|
|
||||||
// backgroundColor:'red',
|
|
||||||
color: 'black'
|
|
||||||
},
|
|
||||||
|
|
||||||
companyLogoContainer: {
|
|
||||||
flex: 1,
|
|
||||||
justifyContent: 'center',
|
|
||||||
width: '60%',
|
|
||||||
// backgroundColor:'white',
|
|
||||||
margin: 20,
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
aboutCompany: {
|
|
||||||
width: SCREEN_WIDTH,
|
|
||||||
flex: 1,
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
}
|
|
||||||
|
|
||||||
|
wrapper: {},
|
||||||
|
company: {
|
||||||
|
flex: 1,
|
||||||
|
flexDirection: "row",
|
||||||
|
// backgroundColor:'red',
|
||||||
|
color: "black"
|
||||||
|
},
|
||||||
|
|
||||||
|
companyLogoContainer: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: "center",
|
||||||
|
width: "60%",
|
||||||
|
// backgroundColor:'white',
|
||||||
|
margin: 20
|
||||||
|
},
|
||||||
|
aboutCompany: {
|
||||||
|
width: SCREEN_WIDTH,
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "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,
|
careerPath: state.apiReducer.careerPath
|
||||||
events: state.apiReducer.events,
|
};
|
||||||
careerPath: state.apiReducer.careerPath,
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mapDispatchToProps(dispatch) {
|
function mapDispatchToProps(dispatch) {
|
||||||
|
return bindActionCreators(Actions, 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) {
|
function getE(user) {
|
||||||
|
|
||||||
var cenas = [];
|
var cenas = [];
|
||||||
let events = [];
|
let events = [];
|
||||||
|
var alimentacao=[];
|
||||||
|
var alojamento=[];
|
||||||
|
var acesso=[]
|
||||||
var i = 0;
|
var i = 0;
|
||||||
|
console.log(user.Sessions)
|
||||||
for (let key in 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({
|
events.push({
|
||||||
key: i++,
|
key: i++,
|
||||||
time: moment(user.Sessions[key].SessionStart).format("HH:mm"),
|
time: moment(user.Sessions[key].SessionStart).format("HH:mm"),
|
||||||
timeEnd: moment(user.Sessions[key].SessionEnd).format("HH:mm"),
|
timeEnd: moment(user.Sessions[key].SessionEnd).format("HH:mm"),
|
||||||
//lineColor:'#009688',
|
//lineColor:'#009688',
|
||||||
imageUrl:
|
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,
|
description: user.Sessions[key].Description,
|
||||||
name: user.Sessions[key].Name,
|
name: user.Sessions[key].Name,
|
||||||
Enrolled: user.Sessions[key].Enrolled,
|
Enrolled: user.Sessions[key].Enrolled,
|
||||||
MaxAttendees: user.Sessions[key].MaxAttendees,
|
MaxAttendees: user.Sessions[key].MaxAttendees,
|
||||||
day: moment(user.Sessions[key].SessionStart).format("DD")
|
day: moment(user.Sessions[key].SessionStart).format("DD")
|
||||||
});
|
});
|
||||||
}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const result = flow(groupBy("day"))(events);
|
const result = flow(groupBy("day"))(events);
|
||||||
|
|
||||||
for (let key in result) {
|
|
||||||
cenas.push(result[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
var a = [],
|
var a = [],
|
||||||
b = [],
|
b = [],
|
||||||
c = [],
|
c = [],
|
||||||
d = [];
|
d = [];
|
||||||
|
|
||||||
for (let key in cenas[0]) {
|
|
||||||
|
|
||||||
|
//MEU DEUS QUE É ISTO???
|
||||||
|
|
||||||
|
for (let key in result["12"]) {
|
||||||
a.push({
|
a.push({
|
||||||
time: cenas[0][key].time,
|
time: result["12"][key].time,
|
||||||
timeEnd: cenas[0][key].timeEnd,
|
timeEnd: result["12"][key].timeEnd,
|
||||||
imageUrl: cenas[0][key].imageUrl,
|
imageUrl:result["12"][key].imageUrl,
|
||||||
description: cenas[0][key].description,
|
description: result["12"][key].description,
|
||||||
name: cenas[0][key].name,
|
name:result["12"][key].name,
|
||||||
Enrolled: cenas[0][key].Enrolled,
|
Enrolled: result["12"][key].Enrolled,
|
||||||
MaxAttendees: cenas[0][key].MaxAttendees,
|
MaxAttendees: result["12"][key].MaxAttendees,
|
||||||
day: cenas[0][key].day
|
day: result["12"][key].day
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let key in cenas[1]) {
|
for (let key in result["13"]) {
|
||||||
b.push({
|
b.push({
|
||||||
time: cenas[1][key].time,
|
time: result["13"][key].time,
|
||||||
timeEnd: cenas[1][key].timeEnd,
|
timeEnd: result["13"][key].timeEnd,
|
||||||
imageUrl: cenas[1][key].imageUrl,
|
imageUrl: result["13"][key].imageUrl,
|
||||||
description: cenas[1][key].description,
|
description:result["13"][key].description,
|
||||||
name: cenas[1][key].name,
|
name: result["13"][key].name,
|
||||||
Enrolled: cenas[1][key].Enrolled,
|
Enrolled:result["13"][key].Enrolled,
|
||||||
MaxAttendees: cenas[1][key].MaxAttendees,
|
MaxAttendees: result["13"][key].MaxAttendees,
|
||||||
day: cenas[1][key].day
|
day: result["13"][key].day
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (let key in cenas[2]) {
|
for (let key in result["14"]) {
|
||||||
c.push({
|
c.push({
|
||||||
time: cenas[2][key].time,
|
time: result["14"][key].time,
|
||||||
timeEnd: cenas[2][key].timeEnd,
|
timeEnd: result["14"][key].timeEnd,
|
||||||
imageUrl: cenas[2][key].imageUrl,
|
imageUrl: result["14"][key].imageUrl,
|
||||||
description: cenas[2][key].description,
|
description: result["14"][key].description,
|
||||||
name: cenas[2][key].name,
|
name:result["14"][key].name,
|
||||||
Enrolled: cenas[2][key].Enrolled,
|
Enrolled: result["14"][key].Enrolled,
|
||||||
MaxAttendees: cenas[2][key].MaxAttendees,
|
MaxAttendees: result["14"][key].MaxAttendees,
|
||||||
day: cenas[2][key].day
|
day: result["14"][key].day
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let key in cenas[3]) {
|
for (let key in result["15"]) {
|
||||||
d.push({
|
d.push({
|
||||||
time: cenas[3][key].time,
|
time: result["15"][key].time,
|
||||||
timeEnd: cenas[3][key].timeEnd,
|
timeEnd: result["15"][key].timeEnd,
|
||||||
imageUrl: cenas[3][key].imageUrl,
|
imageUrl:result["15"][key].imageUrl,
|
||||||
description: cenas[3][key].description,
|
description: result["15"][key].description,
|
||||||
name: cenas[3][key].name,
|
name: result["15"][key].name,
|
||||||
Enrolled: cenas[3][key].Enrolled,
|
Enrolled: result["15"][key].Enrolled,
|
||||||
MaxAttendees: cenas[3][key].MaxAttendees,
|
MaxAttendees: result["15"][key].MaxAttendees,
|
||||||
day: cenas[3][key].day
|
day: result["15"][key].day
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
a = _.sortBy(a, function(o) {
|
a = _.sortBy(a, function(o) {
|
||||||
|
@ -827,11 +894,13 @@ function getE(user) {
|
||||||
return o.time;
|
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) {
|
export function getEvents(user) {
|
||||||
var result = getE(user);
|
var result = getE(user);
|
||||||
|
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: GET_EVENTS,
|
type: GET_EVENTS,
|
||||||
|
@ -839,7 +908,10 @@ export function getEvents(user) {
|
||||||
day1: result.a,
|
day1: result.a,
|
||||||
day2: result.b,
|
day2: result.b,
|
||||||
day3: result.c,
|
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: {},
|
b: {},
|
||||||
c: {},
|
c: {},
|
||||||
d: {},
|
d: {},
|
||||||
loadingLogin: false
|
loadingLogin: false,
|
||||||
|
alimentacao:[],
|
||||||
|
acesso:[],
|
||||||
|
alojamento:[]
|
||||||
};
|
};
|
||||||
|
|
||||||
const apiReducer = (state = apiState, action) => {
|
const apiReducer = (state = apiState, action) => {
|
||||||
|
@ -180,7 +183,11 @@ const apiReducer = (state = apiState, action) => {
|
||||||
a: action.day1,
|
a: action.day1,
|
||||||
b: action.day2,
|
b: action.day2,
|
||||||
c: action.day3,
|
c: action.day3,
|
||||||
d: action.day4
|
d: action.day4,
|
||||||
|
alimentacao: action.alimentacao,
|
||||||
|
alojamento: action.alojamento,
|
||||||
|
acesso:action.acesso
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
|
|
Loading…
Reference in New Issue