calendar
This commit is contained in:
parent
e645cee192
commit
b0c4527a72
|
@ -23,7 +23,8 @@ import Scan from './screens/Scan'
|
|||
|
||||
import Calendar from './screens/Calendar'
|
||||
import Home from './screens/Home'
|
||||
|
||||
import febrada from './screens/febrada'
|
||||
import compras from './screens/compras'
|
||||
|
||||
|
||||
/*Icons*/
|
||||
|
@ -183,6 +184,12 @@ const Stack = createStackNavigator({
|
|||
},
|
||||
calendarDetail:{
|
||||
screen:calendarDetail
|
||||
},
|
||||
febrada:{
|
||||
screen:febrada
|
||||
},
|
||||
compras:{
|
||||
screen: compras
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,13 +49,16 @@ class Calendar extends React.Component {
|
|||
{key: 'fourth', weekDay: 'seg', day:15},
|
||||
|
||||
],
|
||||
CP:'SEM'
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
this.props.getEvents(this.props.user);
|
||||
console.log('didMount');
|
||||
console.log(this.props.events);
|
||||
|
||||
this.props.getSessions(this.props.userDetails.token)
|
||||
|
||||
|
||||
}
|
||||
|
||||
_openDetails=()=>{
|
||||
|
@ -135,6 +138,7 @@ class Calendar extends React.Component {
|
|||
};
|
||||
|
||||
|
||||
|
||||
constructor() {
|
||||
|
||||
super()
|
||||
|
@ -272,7 +276,7 @@ class Calendar extends React.Component {
|
|||
textAlign:'center',
|
||||
|
||||
}}>
|
||||
WEB DEVELOPMENT
|
||||
{this.props.careerPath}
|
||||
</Text>
|
||||
</View>
|
||||
<TabView
|
||||
|
@ -384,7 +388,10 @@ function mapStateToProps(state, props) {
|
|||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
events: state.apiReducer.events
|
||||
events: state.apiReducer.events,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
sessions: state.apiReducer.sessions,
|
||||
careerPath: state.apiReducer.careerPath
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@ import {
|
|||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Text
|
||||
Text,
|
||||
Button
|
||||
} from 'react-native';
|
||||
import { TabView, TabBar, SceneMap } from 'react-native-tab-view';
|
||||
|
||||
|
@ -44,7 +45,10 @@ export default class Eventos extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>asd</Text>
|
||||
<Button
|
||||
title="Febrada"
|
||||
onPress={() => this.props.navigation.navigate('febrada')}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -162,7 +162,8 @@ _update=()=>{
|
|||
</View>
|
||||
|
||||
</ImageBackground>
|
||||
|
||||
|
||||
<TouchableOpacity onPress={() => this.props.navigation.navigate('compras')}>
|
||||
<View style={styles.userStats}>
|
||||
|
||||
<Text style={styles.userStatsTitle}>O meu saldo:</Text>
|
||||
|
@ -181,7 +182,7 @@ _update=()=>{
|
|||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
</TouchableOpacity>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import {
|
|||
SectionList,
|
||||
FlatList
|
||||
} from 'react-native';
|
||||
import moment from 'moment'
|
||||
|
||||
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
|
||||
import {
|
||||
|
@ -42,7 +43,9 @@ import IconF from "react-native-vector-icons/Foundation"
|
|||
|
||||
import LinearGradient from 'react-native-linear-gradient';
|
||||
|
||||
import ProgressBarAnimated from 'react-native-progress-bar-animated';
|
||||
|
||||
import IconFA from "react-native-vector-icons/FontAwesome5"
|
||||
const formatObj = (obj) => {
|
||||
|
||||
let a = {};
|
||||
|
@ -58,6 +61,18 @@ const formatObj = (obj) => {
|
|||
|
||||
class choosePath extends React.Component {
|
||||
|
||||
_verifySession=(Id)=>{
|
||||
|
||||
var sessions= this.props.user.Sessions
|
||||
for(let key in sessions){
|
||||
|
||||
if(sessions[key].Id==Id)
|
||||
return true
|
||||
// cenas.push(result[key]);
|
||||
console.log();
|
||||
}
|
||||
|
||||
}
|
||||
static navigationOptions = ({ navigation }) => ({
|
||||
|
||||
headerTitleStyle : {textAlign: 'center',alignSelf:'center'},
|
||||
|
@ -73,12 +88,31 @@ class choosePath extends React.Component {
|
|||
guest:'9'
|
||||
};
|
||||
|
||||
_mount=()=>{
|
||||
|
||||
var sessions= this.props.sessions
|
||||
|
||||
for(let key in sessions){
|
||||
|
||||
if(sessions[key].Name=='IA'){
|
||||
|
||||
this.setState({guest:'9'})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
|
||||
// this.props.getEvents(this.props.user);
|
||||
this.props.getAvailableGuestlists(this.props.userDetails.token)
|
||||
console.log('didMount');
|
||||
console.log(this.props.events);
|
||||
this.props.getSessions(this.props.userDetails.token)
|
||||
this._mount()
|
||||
|
||||
//console.log('didMount');
|
||||
// console.log(this.props.events);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,11 +122,29 @@ class choosePath extends React.Component {
|
|||
console.log(this.props.events);
|
||||
}
|
||||
|
||||
_findPath=(id)=> {
|
||||
|
||||
var sessions= this.props.sessions
|
||||
|
||||
for(let key in sessions){
|
||||
|
||||
if(sessions[key].Name==id){
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
constructor() {
|
||||
|
||||
super()
|
||||
|
||||
this.state={
|
||||
Blocks:[],
|
||||
onHoldBlocks:true,
|
||||
checked:true
|
||||
}
|
||||
|
||||
|
||||
this.data = [
|
||||
|
@ -126,14 +178,18 @@ class choosePath extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
_render=({item})=>{
|
||||
<Text>Cenas: {item.Name}</Text>
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
|
||||
return (
|
||||
<ScrollView style={styles.page}>
|
||||
|
||||
|
||||
{this.state.guest=='9' && <LinearGradient colors={[ '#D95856', '#CC1A17']} style={styles.linearGradient}>
|
||||
{this._findPath('IA') && <LinearGradient colors={[ '#D95856', '#CC1A17']} style={styles.linearGradient}>
|
||||
<Text style={{margin:15,marginBottom:0, fontWeight:'bold', color:'white'}}> Empresa responsável: </Text>
|
||||
<View style={styles.companyContainer}>
|
||||
<View style={styles.companyDescription}>
|
||||
|
@ -149,7 +205,7 @@ aplicações essenciais aos negócios.</Text>
|
|||
</View>
|
||||
</View>
|
||||
</LinearGradient>}
|
||||
{this.state.guest=='10' && <LinearGradient colors={[ '#5887FF', '#715AFF']} style={styles.linearGradient}>
|
||||
{this._findPath('NET') && <LinearGradient colors={[ '#5887FF', '#715AFF']} style={styles.linearGradient}>
|
||||
<Text style={{margin:15,marginBottom:0, fontWeight:'bold', color:'white'}}> Empresa responsável: </Text>
|
||||
<View style={styles.companyContainer}>
|
||||
<View style={styles.companyDescription}>
|
||||
|
@ -175,16 +231,26 @@ aplicações essenciais aos negócios.</Text>
|
|||
selectedValue={this.state.guest}
|
||||
style={{width:'100%'}}
|
||||
onValueChange={(itemValue, itemIndex) =>{
|
||||
|
||||
this.setState({guest: itemValue})
|
||||
this.props.timerChangeGuest();
|
||||
this.props.waitChangeGuest();
|
||||
|
||||
|
||||
this.props.changeGuestList(this.props.userDetails.token,itemValue)
|
||||
this.props.waitChangeGuest();
|
||||
this.props.getAvailableSessions(this.props.userDetails.token);
|
||||
|
||||
|
||||
// this.props.waitChangeGuest();
|
||||
// this.props.getAvailableSessions(this.props.userDetails.token);
|
||||
|
||||
|
||||
// this.props.waitChangeGuest();
|
||||
|
||||
// this.props.getSessionBlocks(this.props.sessions)
|
||||
|
||||
}
|
||||
|
||||
}>
|
||||
<Picker.Item label="Escolhe o teu career path!" value="0" />
|
||||
<Picker.Item label="Inteligência Artificial" value="9" />
|
||||
<Picker.Item label="Redes e Segurança" value="10" />
|
||||
<Picker.Item label="Data Science" value="15" />
|
||||
|
@ -194,26 +260,13 @@ aplicações essenciais aos negócios.</Text>
|
|||
|
||||
</Picker>
|
||||
</View>
|
||||
<FlatList
|
||||
data={this.state.data}
|
||||
renderItem={({ item }) => (
|
||||
<ListItem
|
||||
|
||||
title={`${item.name.first} ${item.name.last}`}
|
||||
subtitle={item.email}
|
||||
avatar={{ uri: item.picture.thumbnail }}
|
||||
containerStyle={{ borderBottomWidth: 0 }}
|
||||
/>
|
||||
)}
|
||||
keyExtractor={item => item.email}
|
||||
/>
|
||||
|
||||
</View >
|
||||
{ !this.props.changingGuest &&
|
||||
|
||||
<View style={styles.block}>
|
||||
|
||||
<View style={styles.time}>
|
||||
<View style={{width:SCREEN_WIDTH}}>
|
||||
|
||||
{
|
||||
!this.props.changingGuest &&<FlatList
|
||||
data={this.props.Blocks}
|
||||
renderItem={({item, index}) => <View style={styles.block}>
|
||||
<View style={styles.time}>
|
||||
<Text style={
|
||||
{
|
||||
margin:10,
|
||||
|
@ -222,8 +275,8 @@ aplicações essenciais aos negócios.</Text>
|
|||
marginBottom:0
|
||||
}
|
||||
}>
|
||||
9:00</Text>
|
||||
<Text style={{marginLeft:20}}>até</Text>
|
||||
{moment(item[0].SessionStart).format('HH:mm')}</Text>
|
||||
<Text style={{marginLeft:20}}>às</Text>
|
||||
<Text style={
|
||||
{
|
||||
margin:10,
|
||||
|
@ -232,77 +285,52 @@ aplicações essenciais aos negócios.</Text>
|
|||
marginTop:5
|
||||
}
|
||||
}>
|
||||
9:30</Text>
|
||||
{moment(item[0].SessionEnd).format('HH:mm')}</Text>
|
||||
|
||||
</View>
|
||||
|
||||
<View style={styles.sessions}>
|
||||
<FlatList
|
||||
data={item}
|
||||
renderItem={({data, index}) => <View><View style={styles.session}>
|
||||
{ this._verifySession(item[index].Id) &&
|
||||
<TouchableOpacity>
|
||||
<IconFA name="check-square" size={30} color={'#CC1A17'}/>
|
||||
</TouchableOpacity>
|
||||
}{
|
||||
!this._verifySession(item[index].Id)
|
||||
&&
|
||||
<TouchableOpacity>
|
||||
<IconFA name="square" size={30}/>
|
||||
</TouchableOpacity>
|
||||
}
|
||||
|
||||
<TouchableOpacity><View style={styles.sessionInfo}>
|
||||
<Text style={styles.sessionTitle}>{item[index].Name}</Text>
|
||||
<Text style={{marginTop:10, marginBottom:5}}>{item[index].MaxAttendees - item[index].Enrolled} Lugares disponíveis</Text>
|
||||
<Progress.Bar color={'#000000'} progress={(item[index].Enrolled/item[index].MaxAttendees)} unfilledColor={'white'} width={170}/>
|
||||
</View></TouchableOpacity>
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
<View style={styles.session}>
|
||||
<Divider style={{ backgroundColor: '#eeeeee' }} />
|
||||
|
||||
<CheckBox
|
||||
style={{margin:10}}
|
||||
value={this.state.checkbox1}
|
||||
onChange={() => this.setState({ checkbox1: !this.state.checkbox1 })}
|
||||
/>
|
||||
<TouchableOpacity><View style={styles.sessionInfo}>
|
||||
<Text style={styles.sessionTitle}>Nome da palestra</Text>
|
||||
<Text style={{marginTop:10, marginBottom:5}}>12 Lugares disponíveis</Text>
|
||||
<Progress.Bar color={'#000000'} progress={0.3} unfilledColor={'white'} width={150}/>
|
||||
</View></TouchableOpacity>
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
<Divider style={{ backgroundColor: '#eeeeee' }} />
|
||||
|
||||
<View style={styles.session}>
|
||||
|
||||
<CheckBox
|
||||
style={{margin:10}}
|
||||
value={this.state.checkbox1}
|
||||
onChange={() => this.setState({ checkbox1: !this.state.checkbox1 })}
|
||||
/>
|
||||
<TouchableOpacity><View style={styles.sessionInfo}>
|
||||
<Text style={styles.sessionTitle}>Nome da palestra</Text>
|
||||
<Text style={{marginTop:10, marginBottom:5}}>12 Lugares disponíveis</Text>
|
||||
<Progress.Bar color={'#000000'} progress={0.3} unfilledColor={'white'} width={150}/>
|
||||
</View></TouchableOpacity>
|
||||
</View>}
|
||||
/>
|
||||
</View>
|
||||
</View>}
|
||||
/>}</View>
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
|
||||
<Divider style={{ backgroundColor: '#eeeeee' }} />
|
||||
</View >
|
||||
|
||||
{(this.props.changingGuest || this.props.Blocks==true) &&
|
||||
|
||||
<View style={styles.session}>
|
||||
|
||||
<CheckBox
|
||||
style={{margin:10}}
|
||||
value={this.state.checkbox1}
|
||||
onChange={() => this.setState({ checkbox1: !this.state.checkbox1 })}
|
||||
/>
|
||||
<TouchableOpacity><View style={styles.sessionInfo}>
|
||||
<Text style={styles.sessionTitle}>Nome da palestra</Text>
|
||||
<Text style={{marginTop:10, marginBottom:5}}>12 Lugares disponíveis</Text>
|
||||
<Progress.Bar color={'#000000'} progress={0.3} unfilledColor={'white'} width={150}/>
|
||||
</View></TouchableOpacity>
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
<Divider style={{ backgroundColor: '#eeeeee' }} />
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
{this.props.changingGuest &&
|
||||
|
||||
<ActivityIndicator size="large" color="red"/>
|
||||
<ActivityIndicator size="large" color="red" style={{flex:1, alignContent:'center'}}/>
|
||||
}
|
||||
|
||||
|
||||
|
@ -346,7 +374,7 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
time:{
|
||||
alignContent:'center',
|
||||
width:SCREEN_WIDTH*0.20,
|
||||
width:SCREEN_WIDTH*0.23,
|
||||
backgroundColor:'white'
|
||||
},
|
||||
|
||||
|
@ -414,6 +442,9 @@ function mapStateToProps(state, props) {
|
|||
calendar : state.apiReducer.calendar,
|
||||
changingGuest : state.apiReducer.changingGuest,
|
||||
sessions:state.apiReducer.sessions,
|
||||
Blocks: state.apiReducer.Blocks,
|
||||
onHoldBlocks:state.apiReducer.onHoldBlocks,
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
import * as React from 'react';
|
||||
import {View, StyleSheet, Dimensions, Image, ScrollView, Text, Button, TouchableOpacity, Animated} from 'react-native';
|
||||
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
|
||||
import {
|
||||
RkButton, RkCard, RkText,
|
||||
RkTheme
|
||||
} from 'react-native-ui-kitten';
|
||||
import Timeline from 'react-native-timeline-feed'
|
||||
|
||||
import * as Progress from 'react-native-progress';
|
||||
|
||||
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {bindActionCreators} from 'redux';
|
||||
|
||||
import * as Actions from '../store/actions'; //Import your actionss
|
||||
|
||||
|
||||
import { Slider } from 'react-native-elements';
|
||||
function round(value, decimals) {
|
||||
return Number(Math.round(value+'e'+decimals)+'e-'+decimals);
|
||||
}
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
class compras extends React.Component {
|
||||
|
||||
state = {
|
||||
index: 0,
|
||||
value:0
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
this.props.getEvents(this.props.user);
|
||||
console.log('didMount');
|
||||
console.log(this.props.events);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
constructor() {
|
||||
|
||||
super()
|
||||
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
|
||||
return (
|
||||
<View style={{flex:1}}>
|
||||
<View style={{ flex: 1, alignItems: 'stretch', justifyContent: 'center' ,width:SCREEN_WIDTH*0.7}}>
|
||||
<Slider
|
||||
maximumValue={20}
|
||||
minimumValue={2}
|
||||
value={this.state.value}
|
||||
onValueChange={value => this.setState({ value })}
|
||||
/>
|
||||
<Text>Finos: {Math.round(this.state.value)}</Text>
|
||||
</View>
|
||||
<Text>Preço Unitário : { round(0.598 + 0.63 * Math.pow(Math.E ,(-0.221* this.state.value)),2)}€</Text>
|
||||
<Text>Preço total: {round((0.598 + 0.63 * Math.pow(Math.E ,(-0.221* this.state.value)))* this.state.value,2)}</Text>
|
||||
<Button
|
||||
title="PAGAR COM MBWAY"
|
||||
onPress={() => this.props.navigation.navigate('febrada')}
|
||||
/>
|
||||
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
|
||||
return {
|
||||
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
events: state.apiReducer.events,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(compras);
|
|
@ -0,0 +1,92 @@
|
|||
import * as React from 'react';
|
||||
import {View, StyleSheet, Dimensions, Image, ScrollView, Text, Button, TouchableOpacity, Animated} from 'react-native';
|
||||
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
|
||||
import {
|
||||
RkButton, RkCard, RkText,
|
||||
RkTheme
|
||||
} from 'react-native-ui-kitten';
|
||||
import Timeline from 'react-native-timeline-feed'
|
||||
|
||||
import * as Progress from 'react-native-progress';
|
||||
|
||||
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {bindActionCreators} from 'redux';
|
||||
|
||||
import * as Actions from '../store/actions'; //Import your actionss
|
||||
|
||||
|
||||
import { Slider } from 'react-native-elements';
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
class febrada extends React.Component {
|
||||
|
||||
state = {
|
||||
index: 0,
|
||||
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
this.props.getEvents(this.props.user);
|
||||
console.log('didMount');
|
||||
console.log(this.props.events);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
constructor() {
|
||||
|
||||
super()
|
||||
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
|
||||
return (
|
||||
<View style={{flex:1}}>
|
||||
<View style={{ flex: 1, alignItems: 'stretch', justifyContent: 'center' ,width:SCREEN_WIDTH*0.7}}>
|
||||
<Slider
|
||||
maximumValue={50}
|
||||
minimumValue={2}
|
||||
value={this.state.value}
|
||||
onValueChange={value => this.setState({ value })}
|
||||
/>
|
||||
<Text>Value: {Math.round(this.state.value)}</Text>
|
||||
</View></View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
|
||||
return {
|
||||
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
events: state.apiReducer.events,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(febrada);
|
|
@ -17,7 +17,8 @@ export const CHANGE_GUEST = 'CHANGE_GUEST'
|
|||
export const GET_SESSIONS= 'GET_SESSIONS'
|
||||
export const SIGN_SESSION= 'SIGN_SESSION'
|
||||
export const WAIT_CHANGE='WAIT_CHANGE'
|
||||
|
||||
export const SESSION_BLOCKS='SESSION_BLOCKS'
|
||||
export const TIMERWAIT_CHANGE='TIMERWAIT_CHANGE'
|
||||
|
||||
//UI
|
||||
|
||||
|
|
|
@ -2,13 +2,18 @@ import { AsyncStorage } from 'react-native';
|
|||
|
||||
import { NetInfo } from 'react-native';
|
||||
|
||||
var _ = require('lodash');
|
||||
|
||||
import { DATA_AVAILABLE, API_LOGIN, CHECK_USER, LOGOUT_USER, USER_INFO, HOLD, GET_EVENTS, GET_CAREERS, GET_SESSIONS, CHANGE_GUEST, WAIT_CHANGE } from "./actionTypes" //Import the actions types constant we defined in our actions
|
||||
|
||||
import {TIMERWAIT_CHANGE,SESSION_BLOCKS, DATA_AVAILABLE, API_LOGIN, CHECK_USER, LOGOUT_USER, USER_INFO, HOLD, GET_EVENTS, GET_CAREERS, GET_SESSIONS, CHANGE_GUEST, WAIT_CHANGE } from "./actionTypes" //Import the actions types constant we defined in our actions
|
||||
|
||||
import moment from 'moment'
|
||||
|
||||
import { compose } from 'redux';
|
||||
|
||||
import tap from "lodash/fp/tap";
|
||||
import flow from "lodash/fp/flow";
|
||||
import groupBy from "lodash/fp/groupBy";
|
||||
|
||||
const axios = require('axios');
|
||||
|
||||
axios.defaults.baseURL = 'http://enei2019.uingress.com/internal/api'
|
||||
|
@ -16,17 +21,22 @@ axios.defaults.baseURL = 'http://enei2019.uingress.com/internal/api'
|
|||
//http://enei2019.uingress.com/internal/api/Attendee/Edit
|
||||
|
||||
|
||||
|
||||
const map = require('lodash/fp/map').convert({ 'cap': false });
|
||||
|
||||
|
||||
|
||||
export function updateUser(token, user){
|
||||
|
||||
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
|
||||
|
||||
console.log("asdasdasdasd")
|
||||
return (dispatch)=>{
|
||||
axios.post('/Attendee/Edit', user).then(a=>{
|
||||
console.log(a);
|
||||
alert("guardado com sucesso")
|
||||
dispatch({
|
||||
type: UPDATE_USER
|
||||
|
||||
axios.post('/Attendee/Edit', user).then(a=>{
|
||||
console.log(a);
|
||||
alert("guardado com sucesso")
|
||||
dispatch({
|
||||
type: UPDATE_USER
|
||||
// guests: response.data
|
||||
|
||||
});
|
||||
|
@ -43,6 +53,16 @@ export const waitChangeGuest= ()=>{
|
|||
return (dispatch)=>{
|
||||
dispatch({
|
||||
type: WAIT_CHANGE,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
export const timerChangeGuest= ()=>{
|
||||
return (dispatch)=>{
|
||||
dispatch({
|
||||
type: TIMERWAIT_CHANGE,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -59,13 +79,85 @@ export const connectionState = (status) => {
|
|||
|
||||
///Attendee/AvailableGuestlists
|
||||
|
||||
export function signSession(token, idSession){
|
||||
//http://enei2019.uingress.com/internal/api/Session/AddAttendee
|
||||
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
|
||||
|
||||
|
||||
var obj={
|
||||
"IdSession": idSession,
|
||||
"Direction": 0
|
||||
}
|
||||
axios.post('/Session/AddAttendee', user).then(a=>{
|
||||
console.log(a);
|
||||
alert("guardado com sucesso")
|
||||
dispatch({
|
||||
type: UPDATE_USER
|
||||
// guests: response.data
|
||||
|
||||
});
|
||||
}).catch(b=>{
|
||||
|
||||
alert("Erro a guardar os dados")
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
export function getSessions(token){
|
||||
console.log("aquiiii")
|
||||
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
|
||||
|
||||
return (dispatch)=>{
|
||||
|
||||
axios.defaults.baseURL = 'http://enei2019.uingress.com/internal/api'
|
||||
|
||||
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
|
||||
|
||||
axios.get('/Attendee/AvailableSessions')
|
||||
.then(function (response) {
|
||||
var careerPath='SEM'
|
||||
var sessions= response.data;
|
||||
var cenas=[];
|
||||
for(let key in sessions){
|
||||
|
||||
if(sessions[key].Name=='IA'){
|
||||
|
||||
careerPath='IA'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const result = flow(
|
||||
groupBy('SessionStart'),
|
||||
// map((Id) => ({Id})),
|
||||
//tap(console.log)
|
||||
)(response.data)
|
||||
for(let key in result){
|
||||
result[key].option=0;
|
||||
cenas.push(result[key]);
|
||||
|
||||
}
|
||||
dispatch({
|
||||
type: GET_SESSIONS,
|
||||
sessions: response.data,
|
||||
Blocks: cenas,
|
||||
careerPath:careerPath
|
||||
//guests: response.data
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
alert("Error a obter sessões disponíveis!!");
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export function getAvailableGuestlists(token){
|
||||
|
||||
|
||||
|
||||
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
|
||||
|
||||
return (dispatch)=>{
|
||||
|
@ -73,6 +165,9 @@ export function getAvailableGuestlists(token){
|
|||
axios.get('/Attendee/AvailableGuestlists')
|
||||
.then(function (response) {
|
||||
|
||||
|
||||
|
||||
|
||||
// handle success
|
||||
console.log(response);
|
||||
dispatch({
|
||||
|
@ -113,28 +208,87 @@ export function changeGuestList(token, guestID){
|
|||
return (dispatch)=>{
|
||||
|
||||
var full= `/Attendee/ChangeGuestlist/${guestID}`
|
||||
console.log(full)
|
||||
|
||||
axios.get(full)
|
||||
.then(function (response) {
|
||||
|
||||
// handle success
|
||||
console.log(response);
|
||||
dispatch({
|
||||
type: CHANGE_GUEST,
|
||||
//guests: response.data
|
||||
|
||||
axios.defaults.baseURL = 'http://enei2019.uingress.com/internal/api'
|
||||
|
||||
axios.defaults.headers.common = {'Authorization': `bearer ${token.access_token}`}
|
||||
|
||||
});
|
||||
axios.get('/Attendee/AvailableSessions')
|
||||
|
||||
.then(function (response) {
|
||||
|
||||
// handle success
|
||||
//console.log(response);
|
||||
|
||||
var cenas=[];
|
||||
|
||||
const result = flow(
|
||||
groupBy('SessionStart'),
|
||||
// map((Id) => ({Id})),
|
||||
//tap(console.log)
|
||||
)(response.data)
|
||||
for(let key in result){
|
||||
result[key].option=0;
|
||||
cenas.push(result[key]);
|
||||
console.log();
|
||||
}
|
||||
console.log(cenas);
|
||||
dispatch({
|
||||
type: CHANGE_GUEST,
|
||||
sessions: response.data,
|
||||
|
||||
Blocks: cenas
|
||||
//guests: response.data
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
alert("Error a obter sessões disponíveis!!");
|
||||
console.log(error);
|
||||
})
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
// handle error
|
||||
console.log(response);
|
||||
console.log(error);
|
||||
alert("Erro a mudar de career path")
|
||||
})
|
||||
.then(function () {
|
||||
// always executed
|
||||
});
|
||||
}
|
||||
}
|
||||
export function getSessionBlocks(sessions){
|
||||
var a;
|
||||
var cenas=[];
|
||||
|
||||
const result = flow(
|
||||
groupBy('SessionStart'),
|
||||
// map((Id) => ({Id})),
|
||||
//tap(console.log)
|
||||
)(sessions)
|
||||
|
||||
return(dispatch)=>{
|
||||
|
||||
for(let key in result){
|
||||
|
||||
cenas.push(result[key]);
|
||||
console.log();
|
||||
}
|
||||
console.log(cenas);
|
||||
|
||||
dispatch({
|
||||
type:SESSION_BLOCKS,
|
||||
Blocks: cenas
|
||||
})
|
||||
}}
|
||||
|
||||
|
||||
export function getAvailableSessions(token){
|
||||
//http://enei2019.uingress.com/internal/api/Attendee/AvailableSessions
|
||||
|
@ -150,19 +304,32 @@ export function getAvailableSessions(token){
|
|||
|
||||
// handle success
|
||||
console.log(response);
|
||||
|
||||
var cenas=[];
|
||||
|
||||
const result = flow(
|
||||
groupBy('SessionStart'),
|
||||
// map((Id) => ({Id})),
|
||||
//tap(console.log)
|
||||
)(response.data)
|
||||
for(let key in result){
|
||||
|
||||
cenas.push(result[key]);
|
||||
console.log();
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: GET_SESSIONS,
|
||||
sessions: response.data
|
||||
|
||||
sessions: response.data,
|
||||
|
||||
Blocks: cenas
|
||||
});
|
||||
})
|
||||
.catch(function (error) {
|
||||
alert("Error a obter sessões disponíveis!!");
|
||||
console.log(error);
|
||||
})
|
||||
.then(function () {
|
||||
// always executed
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -178,8 +345,8 @@ export function getEvents(user){
|
|||
for(let key in user.Sessions){
|
||||
|
||||
events.push({
|
||||
time: moment(user.Sessions[key].SessionStart).format('h:mm'),
|
||||
timeEnd: moment(user.Sessions[key].SessionEnd).format('h:mm'),
|
||||
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',
|
||||
description:user.Sessions[key].Description,
|
||||
|
|
|
@ -7,6 +7,9 @@ export {checkUser,
|
|||
waitChangeGuest,
|
||||
getAvailableSessions,
|
||||
updateUser,
|
||||
getSessionBlocks,
|
||||
timerChangeGuest,
|
||||
getSessions,
|
||||
} from "./api"
|
||||
|
||||
export {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { DATA_AVAILABLE, API_LOGIN, CHECK_USER, LOGOUT_USER, USER_INFO, HOLD, GET_EVENTS, GET_CAREERS, CHANGE_GUEST, WAIT_CHANGE, GET_SESSIONS } from "../actions/actionTypes" //Import the actions types constant we defined in our actions
|
||||
import { DATA_AVAILABLE, API_LOGIN, CHECK_USER, LOGOUT_USER, USER_INFO, HOLD, GET_EVENTS, GET_CAREERS, CHANGE_GUEST, WAIT_CHANGE, GET_SESSIONS, SESSION_BLOCKS, TIMERWAIT_CHANGE } from "../actions/actionTypes" //Import the actions types constant we defined in our actions
|
||||
import { REHYDRATE } from 'redux-persist';
|
||||
|
||||
let apiState= {
|
||||
|
@ -20,7 +20,10 @@ let apiState= {
|
|||
|
||||
},
|
||||
changingGuest:false,
|
||||
sessions:{}
|
||||
sessions:{},
|
||||
Blocks:{},
|
||||
onHoldBlocks:true,
|
||||
careerPath:'SEM'
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,6 +39,7 @@ const apiReducer = (state = apiState, action) => {
|
|||
|
||||
var expirationDateTokenA=0;
|
||||
var access_tokenA='';
|
||||
|
||||
|
||||
if(action.payload.apiReducer.userDetails.token!=undefined){
|
||||
|
||||
|
@ -56,7 +60,7 @@ const apiReducer = (state = apiState, action) => {
|
|||
|
||||
// token: action.payload.apiReducer.token,
|
||||
user: action.payload.apiReducer.user,
|
||||
|
||||
onHoldBlocks:true,
|
||||
userDetails:{
|
||||
token:{
|
||||
expirationDateToken: expirationDateTokenA,
|
||||
|
@ -154,7 +158,9 @@ const apiReducer = (state = apiState, action) => {
|
|||
|
||||
|
||||
|
||||
|
||||
case SESSION_BLOCKS:
|
||||
state=Object.assign({},state, { Blocks: action.Blocks, onHoldBlocks:false, changingGuest:false});
|
||||
return state;
|
||||
|
||||
case GET_CAREERS:
|
||||
var c= {
|
||||
|
@ -165,15 +171,18 @@ const apiReducer = (state = apiState, action) => {
|
|||
return state;
|
||||
|
||||
case CHANGE_GUEST:
|
||||
state=Object.assign({},state, { changingGuest:false});
|
||||
state=Object.assign({},state, { changingGuest:false, sessions:action.sessions, Blocks:action.Blocks});
|
||||
return state;
|
||||
|
||||
case WAIT_CHANGE:
|
||||
state=Object.assign({},state, { changingGuest:true});
|
||||
return state;
|
||||
|
||||
case TIMERWAIT_CHANGE:
|
||||
state=Object.assign({},state, { Blocks:true});
|
||||
return state;
|
||||
case GET_SESSIONS:
|
||||
state=Object.assign({},state, { changingGuest:false, sessions:action.sessions});
|
||||
state=Object.assign({},state, { sessions:action.sessions, Blocks: action.Blocks, careerPath:action.careerPath});
|
||||
return state;
|
||||
default:
|
||||
return state;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
|
||||
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
|
||||
|
@ -35,6 +36,7 @@
|
|||
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
|
||||
2DCD954D1E0B4F2C00145EB5 /* appTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* appTests.m */; };
|
||||
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
|
||||
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F42241E0235464C91B24049 /* libRNDeviceInfo.a */; };
|
||||
514DB1DF2E3B452F9EF272E3 /* libRNVectorIcons-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 95B0A42B6CD8441E904E6EB9 /* libRNVectorIcons-tvOS.a */; };
|
||||
69E1B84AE0DF486CB1B1D226 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C00CE8A4E3B747F9816B91CF /* libBVLinearGradient.a */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
|
@ -58,7 +60,6 @@
|
|||
BE5EAB86221B7D5400E92E5B /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BE5EAB77221B7D5400E92E5B /* Zocial.ttf */; };
|
||||
BE5EAC3A221B83CF00E92E5B /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BE302B75221B7C3B005626CF /* Ionicons.ttf */; };
|
||||
BE5EAC41221B889900E92E5B /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE5EAC40221B888C00E92E5B /* libReactNativePermissions.a */; };
|
||||
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F42241E0235464C91B24049 /* libRNDeviceInfo.a */; };
|
||||
E677346A94D54E90817979B0 /* libRNDeviceInfo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
|
@ -336,6 +337,20 @@
|
|||
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
|
||||
remoteInfo = RCTBlob;
|
||||
};
|
||||
BE05D7E2222EFEA100EC8AFD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = DA5891D81BA9A9FC002B4DB2;
|
||||
remoteInfo = RNDeviceInfo;
|
||||
};
|
||||
BE05D7E4222EFEA100EC8AFD /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E72EC1401F7ABB5A0001BC90;
|
||||
remoteInfo = "RNDeviceInfo-tvOS";
|
||||
};
|
||||
BE302B6B221B7860005626CF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = BE302B67221B7860005626CF /* RNCamera.xcodeproj */;
|
||||
|
@ -397,6 +412,7 @@
|
|||
00E356EE1AD99517003FC87E /* appTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = appTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
00E356F21AD99517003FC87E /* appTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = appTests.m; sourceTree = "<group>"; };
|
||||
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNDeviceInfo.a; sourceTree = "<group>"; };
|
||||
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
|
||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
|
||||
13B07F961A680F5B00A75B9A /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = app.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -411,6 +427,8 @@
|
|||
2D02E47B1E0B4A5D006451C7 /* app-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "app-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D02E4901E0B4A5D006451C7 /* app-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "app-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNDeviceInfo-tvOS.a"; sourceTree = "<group>"; };
|
||||
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNDeviceInfo.xcodeproj; path = "../node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj"; sourceTree = "<group>"; };
|
||||
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
|
||||
664970B9D10A41A18B44727F /* RNVectorIcons.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNVectorIcons.xcodeproj; path = "../node_modules/react-native-vector-icons/RNVectorIcons.xcodeproj"; sourceTree = "<group>"; };
|
||||
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
|
||||
|
@ -437,9 +455,6 @@
|
|||
BE5EAC3B221B888C00E92E5B /* ReactNativePermissions.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativePermissions.xcodeproj; path = "../node_modules/react-native-permissions/ios/ReactNativePermissions.xcodeproj"; sourceTree = "<group>"; };
|
||||
C00CE8A4E3B747F9816B91CF /* libBVLinearGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBVLinearGradient.a; sourceTree = "<group>"; };
|
||||
EB0A5A258CBE4EEFAD3C358E /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
|
||||
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; name = "RNDeviceInfo.xcodeproj"; path = "../node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo.a"; path = "libRNDeviceInfo.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo-tvOS.a"; path = "libRNDeviceInfo-tvOS.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -716,6 +731,15 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BE05D7DE222EFEA000EC8AFD /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BE05D7E3222EFEA100EC8AFD /* libRNDeviceInfo.a */,
|
||||
BE05D7E5222EFEA100EC8AFD /* libRNDeviceInfo-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BE302B68221B7860005626CF /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -760,6 +784,8 @@
|
|||
EB0A5A258CBE4EEFAD3C358E /* libRNVectorIcons.a */,
|
||||
95B0A42B6CD8441E904E6EB9 /* libRNVectorIcons-tvOS.a */,
|
||||
C00CE8A4E3B747F9816B91CF /* libBVLinearGradient.a */,
|
||||
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */,
|
||||
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */,
|
||||
);
|
||||
name = "Recovered References";
|
||||
sourceTree = "<group>";
|
||||
|
@ -876,6 +902,7 @@
|
|||
TargetAttributes = {
|
||||
00E356ED1AD99517003FC87E = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
DevelopmentTeam = HLA62A6826;
|
||||
TestTargetID = 13B07F861A680F5B00A75B9A;
|
||||
};
|
||||
13B07F861A680F5B00A75B9A = {
|
||||
|
@ -964,6 +991,10 @@
|
|||
ProductGroup = BE302B68221B7860005626CF /* Products */;
|
||||
ProjectRef = BE302B67221B7860005626CF /* RNCamera.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = BE05D7DE222EFEA000EC8AFD /* Products */;
|
||||
ProjectRef = 5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = BE302B6F221B7AC7005626CF /* Products */;
|
||||
ProjectRef = BE302B6E221B7AC7005626CF /* RNGestureHandler.xcodeproj */;
|
||||
|
@ -1243,6 +1274,20 @@
|
|||
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
BE05D7E3222EFEA100EC8AFD /* libRNDeviceInfo.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNDeviceInfo.a;
|
||||
remoteRef = BE05D7E2222EFEA100EC8AFD /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
BE05D7E5222EFEA100EC8AFD /* libRNDeviceInfo-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRNDeviceInfo-tvOS.a";
|
||||
remoteRef = BE05D7E4222EFEA100EC8AFD /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
BE302B6C221B7860005626CF /* libRNCamera.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
@ -1441,6 +1486,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
DEVELOPMENT_TEAM = HLA62A6826;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
|
@ -1477,6 +1523,7 @@
|
|||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEVELOPMENT_TEAM = HLA62A6826;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"@redux-offline/redux-offline": "^2.5.1",
|
||||
"axios": "^0.18.0",
|
||||
"expo": "^32.0.5",
|
||||
"lodash": "^4.17.11",
|
||||
"material-icons-react": "^1.0.4",
|
||||
"moment": "^2.24.0",
|
||||
"prop-types": "^15.6.2",
|
||||
|
|
|
@ -23,9 +23,11 @@ namespace api.Data
|
|||
return rEventLocsVisitedList;
|
||||
}
|
||||
|
||||
public Task<IEnumerable<EventLocVisited>> GetEventLocsVisitedTeam(int id)
|
||||
public IEnumerable<EventLocVisited> GetEventLocsVisitedTeam(int id)
|
||||
{
|
||||
List<EventLocVisited> allLocs = _context.EventLocsVisited.ToList();
|
||||
var allLocs = _context.EventLocsVisited.ToList();
|
||||
|
||||
/*
|
||||
allLocs.ForEach(i=>Console.Write("{0}\t", i));
|
||||
Console.WriteLine("teste");
|
||||
List<EventLocVisited> rList = new List<EventLocVisited>();
|
||||
|
@ -34,8 +36,8 @@ namespace api.Data
|
|||
rList.Add(allLocs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return rList;
|
||||
*/
|
||||
return allLocs;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
var http = require('http');
|
||||
|
||||
//create a server object:
|
||||
http.createServer(function (req, res) {
|
||||
res.write('Hello World!'); //write a response to the client
|
||||
res.end(); //end the response
|
||||
}).listen(49152); //the server object listens on port 8080
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"ProjectFilePath": "c:\\Users\\ZMiguel\\Desktop\\ENEI2019\\api\\api.csproj",
|
||||
"ProjectFilePath": "/Users/henrique/ENEI2019/api/api.csproj",
|
||||
"TargetFramework": "netcoreapp2.1",
|
||||
"TagHelpers": [],
|
||||
"Configuration": {
|
||||
|
|
Loading…
Reference in New Issue