Merge branch 'master' into filipe
|
@ -99,11 +99,11 @@ android {
|
|||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.app"
|
||||
applicationId "pt.enei"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionCode 3
|
||||
versionName "3"
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':react-native-image-picker')
|
||||
|
||||
compile project(':react-native-maps')
|
||||
compile project(':react-native-device-info')
|
||||
compile project(':react-native-material-shadows')
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.app;
|
|||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.imagepicker.ImagePickerPackage;
|
||||
|
||||
import com.airbnb.android.react.maps.MapsPackage;
|
||||
import com.learnium.RNDeviceInfo.RNDeviceInfo;
|
||||
import ui.materialshadows.RNMaterialShadowsPackage;
|
||||
|
@ -31,7 +31,7 @@ public class MainApplication extends Application implements ReactApplication {
|
|||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(),
|
||||
new ImagePickerPackage(),
|
||||
|
||||
new MapsPackage(),
|
||||
new RNDeviceInfo(),
|
||||
new RNMaterialShadowsPackage(),
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 20 KiB |
|
@ -1,3 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">ENEI 2019</string>
|
||||
<string name="app_name">ENEI 19</string>
|
||||
</resources>
|
||||
|
|
Before Width: | Height: | Size: 42 KiB |
|
@ -21,5 +21,5 @@ android.enableAapt2=false
|
|||
|
||||
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
|
||||
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
|
||||
MYAPP_RELEASE_STORE_PASSWORD=aspire98H
|
||||
MYAPP_RELEASE_KEY_PASSWORD=aspire98H
|
||||
MYAPP_RELEASE_STORE_PASSWORD=9xbHZxMXjR
|
||||
MYAPP_RELEASE_KEY_PASSWORD=9xbHZxMXjR
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
rootProject.name = 'app'
|
||||
include ':react-native-image-picker'
|
||||
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
|
||||
|
||||
include ':react-native-maps'
|
||||
project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
|
||||
include ':react-native-device-info'
|
||||
|
|
339
App/app/App.js
|
@ -16,7 +16,7 @@ import {
|
|||
TouchableOpacity,
|
||||
TextInput,
|
||||
NetInfo,
|
||||
Animated
|
||||
Animated, Linking,
|
||||
} from "react-native";
|
||||
|
||||
import { bindActionCreators } from "redux";
|
||||
|
@ -34,12 +34,12 @@ import Modal from "react-native-modal";
|
|||
import Router from "./Router";
|
||||
|
||||
import Icon from "react-native-vector-icons/Ionicons";
|
||||
|
||||
import IconFA from "react-native-vector-icons/FontAwesome5"
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
import Swiper from "react-native-swiper";
|
||||
import resetPassword from "./screens/resetPassword";
|
||||
//import resetPassword from "./screens/resetPassword";
|
||||
var TimerMixin = require("react-timer-mixin");
|
||||
|
||||
function handleConnectivityChange() {
|
||||
|
@ -48,7 +48,7 @@ function handleConnectivityChange() {
|
|||
|
||||
class App extends Component {
|
||||
|
||||
|
||||
|
||||
|
||||
handleConnectivityChange = isConnected => {
|
||||
this.setState({ isConnected });
|
||||
|
@ -81,15 +81,15 @@ class App extends Component {
|
|||
logged: false,
|
||||
isModalVisible: false,
|
||||
state: { text: "" },
|
||||
username: "QR code ou",
|
||||
username: "",
|
||||
failedAttempt: false,
|
||||
push: 4,
|
||||
UI_loginScannerActive: false,
|
||||
userDetails: { username: "", password: "" },
|
||||
isConnected: true,
|
||||
modalOpen: false,
|
||||
modalResetPassword:false,
|
||||
resetText:''
|
||||
modalResetPassword: false,
|
||||
resetText: ''
|
||||
};
|
||||
}
|
||||
_print = () => {
|
||||
|
@ -105,13 +105,13 @@ class App extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
//this.props.hold();
|
||||
|
||||
|
||||
|
||||
|
||||
this.setState({ isModalVisible: false });
|
||||
//verifica se o utilizador tem token guardado
|
||||
this.props.checkUser(this.props.token);
|
||||
|
||||
|
||||
}
|
||||
componentWillUnmount() {
|
||||
NetInfo.isConnected.removeEventListener(
|
||||
|
@ -119,14 +119,14 @@ class App extends Component {
|
|||
this.handleConnectivityChange
|
||||
);
|
||||
}
|
||||
_toggle=()=>{
|
||||
this.setState({modalResetPassword:false})
|
||||
_toggle = () => {
|
||||
this.setState({ modalResetPassword: false })
|
||||
}
|
||||
//faz call
|
||||
_reset=()=>{
|
||||
_reset = () => {
|
||||
//fecha modal
|
||||
this.props.resetPassword(this.props.token,this.state.resetText),
|
||||
this.setState({modalResetPassword:false})
|
||||
this.props.resetPassword(this.props.token, this.state.resetText),
|
||||
this.setState({ modalResetPassword: false })
|
||||
//faz call
|
||||
}
|
||||
|
||||
|
@ -148,8 +148,8 @@ class App extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!this.props.logged && this.props.onHold) {
|
||||
|
@ -167,69 +167,69 @@ class App extends Component {
|
|||
return <Router />;
|
||||
}
|
||||
return (
|
||||
|
||||
|
||||
<View style={styles.slide2}>
|
||||
|
||||
|
||||
<Modal
|
||||
isVisible={this.props.UI_loginScannerActive}
|
||||
onBackdropPress={this._toggle}
|
||||
onBackButtonPress={this._toggle}
|
||||
animationInTiming={1100}
|
||||
animationOutTiming={1100}
|
||||
style={{marginTop:-20}}
|
||||
>
|
||||
|
||||
<QRCodeScanner
|
||||
onRead={this.onSuccess}
|
||||
|
||||
cameraStyle={styles.cameraContainer}
|
||||
showMarker={true}
|
||||
/>
|
||||
<Button
|
||||
onPress={this.props.closeLoginQRScan}
|
||||
title={"Fechar Scan"}
|
||||
color={"#CC1A17"}
|
||||
></Button>
|
||||
<Text style={{textAlign:'center', fontSize:12, margin:10,marginBottom:5, color:'white'}}>
|
||||
Sim, o quadrado não está centrado. Era só para testar a tua atenção!
|
||||
isVisible={this.props.UI_loginScannerActive}
|
||||
onBackdropPress={this._toggle}
|
||||
onBackButtonPress={this._toggle}
|
||||
animationInTiming={1100}
|
||||
animationOutTiming={1100}
|
||||
style={{ marginTop: -20 }}
|
||||
>
|
||||
|
||||
<QRCodeScanner
|
||||
onRead={this.onSuccess}
|
||||
|
||||
cameraStyle={styles.cameraContainer}
|
||||
showMarker={true}
|
||||
/>
|
||||
<Button
|
||||
onPress={this.props.closeLoginQRScan}
|
||||
title={"Fechar Scan"}
|
||||
color={"#CC1A17"}
|
||||
></Button>
|
||||
<Text style={{ textAlign: 'center', fontSize: 12, margin: 10, marginBottom: 5, color: 'white' }}>
|
||||
Sim, o quadrado não está centrado. Era só para testar a tua atenção!
|
||||
</Text>
|
||||
|
||||
|
||||
|
||||
</Modal>
|
||||
|
||||
|
||||
|
||||
</Modal>
|
||||
<Modal
|
||||
isVisible={this.state.modalResetPassword}
|
||||
onBackdropPress={this._toggle}
|
||||
onBackButtonPress={this._toggle}
|
||||
animationInTiming={1100}
|
||||
animationOutTiming={1100}
|
||||
>
|
||||
|
||||
<View style={{ backgroundColor: "white" , padding:20,paddingBottom:0, alignItems:'center'}}>
|
||||
<View>
|
||||
<Text style={{textAlign:'center',fontSize:23, fontWeight:'bold', color:'#CC1A17', margin:30}}>Reset Password</Text>
|
||||
<Text style={{textAlign:'center', }}>Deves introduzir o email com o qual efectuaste a compra do bilhete.</Text>
|
||||
<TextInput
|
||||
style={styles.resetPassword}
|
||||
onFocus={this._print}
|
||||
maxLength={50}
|
||||
blurOnSubmit={true}
|
||||
|
||||
onChangeText={r => this.setState({ resetText:r })}
|
||||
clearButtonMode="always"
|
||||
value={this.state.resetText}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder="Email ou Qr code"
|
||||
/>
|
||||
|
||||
<Button
|
||||
onPress={this._reset}
|
||||
title={"Enviar"}
|
||||
color={"#CC1A17"}
|
||||
></Button>
|
||||
<Text style={{textAlign:'center', fontSize:12, margin:10,marginBottom:5}}> Caso tenhas problemas com este processo deves contactar a comissão organizadora atravês do email geral.</Text>
|
||||
|
||||
>
|
||||
|
||||
<View style={{ backgroundColor: "white", padding: 20, paddingBottom: 0, alignItems: 'center' }}>
|
||||
<View>
|
||||
<Text style={{ textAlign: 'center', fontSize: 23, fontWeight: 'bold', color: '#CC1A17', margin: 30 }}>Reset Password</Text>
|
||||
<Text style={{ textAlign: 'center', }}>Deves introduzir o email com o qual efectuaste a compra do bilhete.</Text>
|
||||
<TextInput
|
||||
style={styles.resetPassword}
|
||||
onFocus={this._print}
|
||||
maxLength={50}
|
||||
blurOnSubmit={true}
|
||||
|
||||
onChangeText={r => this.setState({ resetText: r })}
|
||||
clearButtonMode="always"
|
||||
value={this.state.resetText}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder="Email ou Qr code"
|
||||
/>
|
||||
|
||||
<Button
|
||||
onPress={this._reset}
|
||||
title={"Enviar"}
|
||||
color={"#CC1A17"}
|
||||
></Button>
|
||||
<Text style={{ textAlign: 'center', fontSize: 12, margin: 10, marginBottom: 5 }}> Caso tenhas problemas com este processo deves contactar a comissão organizadora atravês do email geral.</Text>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
</Modal>
|
||||
|
@ -239,7 +239,7 @@ class App extends Component {
|
|||
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
margin:20
|
||||
margin: 20
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
|
@ -247,83 +247,118 @@ class App extends Component {
|
|||
source={require("./assets/img/logo2.png")}
|
||||
/>
|
||||
</View>
|
||||
{!this.props.loadingLogin &&
|
||||
<View styles={styles.loginContainer}>
|
||||
<View style={styles.inputSection}>
|
||||
{!this.props.loadingLogin &&
|
||||
<View styles={styles.loginContainer}>
|
||||
<View style={styles.inputSection}>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
|
||||
underlineColorAndroid="transparent"
|
||||
|
||||
//onFocus={this._print}
|
||||
maxLength={15}
|
||||
blurOnSubmit={true}
|
||||
// secureTextEntry={true}
|
||||
onChangeText={user => {
|
||||
this.setState({ username:user });
|
||||
}}
|
||||
clearButtonMode="always"
|
||||
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
value={this.state.username}
|
||||
placeholder="QR code"
|
||||
|
||||
/>
|
||||
<TouchableOpacity onPress={this._scanQr}>
|
||||
<View style={styles.scanQR}>
|
||||
<Icon
|
||||
style={styles.searchIcon}
|
||||
name="ios-qr-scanner"
|
||||
size={40}
|
||||
color="#000"
|
||||
/>
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
placeholder={this.state.username}
|
||||
onChangeText={searchString => {
|
||||
this.setState({ username:searchString });
|
||||
}}
|
||||
maxLength={15}
|
||||
underlineColorAndroid="transparent"
|
||||
style={styles.passwordInput}
|
||||
onFocus={this._print}
|
||||
maxLength={10}
|
||||
blurOnSubmit={true}
|
||||
secureTextEntry={true}
|
||||
onChangeText={text => this.setState({ text })}
|
||||
clearButtonMode="always"
|
||||
value={this.state.text}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder="Password"
|
||||
/>
|
||||
<TouchableOpacity onPress={this._scanQr}>
|
||||
<View style={styles.scanQR}>
|
||||
<Icon
|
||||
style={styles.searchIcon}
|
||||
name="ios-qr-scanner"
|
||||
size={40}
|
||||
color="#000"
|
||||
/>
|
||||
|
||||
{!this.props.loadingLogin &&
|
||||
<View style={{ alignItems: 'center', margin: 20 }}>
|
||||
<TouchableOpacity onPress={this._tryLogin} style={{ backgroundColor: '#CC1A17', borderRadius: 3 }}>
|
||||
<Text style={{ color: 'white', fontSize: 20, margin: 10, width: 150, textAlign: 'center', }}>Login</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
}
|
||||
|
||||
<TextInput
|
||||
style={styles.passwordInput}
|
||||
onFocus={this._print}
|
||||
maxLength={10}
|
||||
blurOnSubmit={true}
|
||||
secureTextEntry={true}
|
||||
onChangeText={text => this.setState({ text })}
|
||||
clearButtonMode="always"
|
||||
value={this.state.text}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder="Password"
|
||||
/>
|
||||
{ !this.props.loadingLogin &&
|
||||
<View style={{alignItems:'center', margin:20}}>
|
||||
<TouchableOpacity onPress={this._tryLogin} style={{backgroundColor:'#CC1A17',borderRadius:3}}>
|
||||
<Text style={{color:'white', fontSize:20, margin:10, width:150,textAlign:'center',}}>Login</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
}
|
||||
|
||||
</View>
|
||||
}{
|
||||
this.props.loadingLogin &&
|
||||
<View style={{margin:100}}>
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
}{
|
||||
this.props.loadingLogin &&
|
||||
<View style={{ margin: 100 }}>
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
</View>
|
||||
}
|
||||
<View style={styles.buttons}>
|
||||
<TouchableOpacity style={styles.button}>
|
||||
<TouchableOpacity style={styles.button} onPress={() => {
|
||||
Linking.canOpenURL("https://www.facebook.com/ENEIConf/").then(supported => {
|
||||
if (supported) {
|
||||
Linking.openURL("https://www.facebook.com/ENEIConf/");
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
}}>
|
||||
<Icon name="logo-facebook" size={40} />
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={styles.button}>
|
||||
<Icon name="logo-instagram" size={40} />
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={styles.button}>
|
||||
<Icon name="md-heart" size={40} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<View style={styles.footer}>
|
||||
<View style={styles.textRow}>
|
||||
<RkText rkType="primary3">Não sabes a password?</RkText>
|
||||
<RkButton rkType="clear" onPress={this.onSignUpButtonPressed}>
|
||||
<TouchableOpacity onPress={() => {this.setState({modalResetPassword:true})}}>
|
||||
<RkText style={{ color: "#CC1A17", fontWeight:'bold' }} kType="header6">
|
||||
Reset Password
|
||||
<TouchableOpacity style={styles.button} onPress={() => {
|
||||
Linking.canOpenURL("https://www.instagram.com/eneiconf/").then(supported => {
|
||||
if (supported) {
|
||||
Linking.openURL("https://www.instagram.com/eneiconf/");
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
}}>
|
||||
<Icon name="logo-instagram" size={40} />
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity style={styles.button} onPress={() => {
|
||||
Linking.canOpenURL("https://enei.pt").then(supported => {
|
||||
if (supported) {
|
||||
Linking.openURL("https://enei.pt");
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
}}>
|
||||
<IconFA name="globe" size={35}/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<View style={styles.footer}>
|
||||
<View style={styles.textRow}>
|
||||
<RkText rkType="primary3">Não sabes a password?</RkText>
|
||||
<RkButton rkType="clear" onPress={this.onSignUpButtonPressed}>
|
||||
<TouchableOpacity onPress={() => { this.setState({ modalResetPassword: true }) }}>
|
||||
<RkText style={{ color: "#CC1A17", fontWeight: 'bold' }} kType="header6">
|
||||
Reset Password
|
||||
</RkText>
|
||||
</TouchableOpacity>
|
||||
</RkButton>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</RkButton>
|
||||
</View>
|
||||
</View>
|
||||
</View >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -344,15 +379,15 @@ const overlayColor = "rgba(0,0,0,0.30)";
|
|||
|
||||
const styles = {
|
||||
cameraContainer: {
|
||||
height: Dimensions.get('window').height ,
|
||||
height: Dimensions.get('window').height,
|
||||
},
|
||||
resetPassword:{
|
||||
|
||||
|
||||
resetPassword: {
|
||||
|
||||
|
||||
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
margin:20,
|
||||
margin: 20,
|
||||
marginTop: 60,
|
||||
marginBottom: 60,
|
||||
|
||||
|
@ -367,7 +402,7 @@ const styles = {
|
|||
paddingLeft: SCREEN_WIDTH * 0.05
|
||||
},
|
||||
passwordInput: {
|
||||
|
||||
|
||||
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
|
@ -389,19 +424,19 @@ const styles = {
|
|||
},
|
||||
scanQR: {
|
||||
//flexDirection: 'row',
|
||||
flex:1,
|
||||
//paddingTop: 5,
|
||||
flex: 1,
|
||||
//paddingTop: 5,
|
||||
backgroundColor: 10,
|
||||
alignItems:'center',
|
||||
padding:5,
|
||||
paddingRight:15,
|
||||
alignItems: 'center',
|
||||
padding: 5,
|
||||
paddingRight: 15,
|
||||
|
||||
//width: 80,
|
||||
// paddingLeft: 10,
|
||||
// paddingLeft: 10,
|
||||
backgroundColor: "#CC1A17",
|
||||
borderBottomRightRadius: 3,
|
||||
borderTopRightRadius: 3,
|
||||
// height: "100%"
|
||||
// height: "100%"
|
||||
},
|
||||
inputSection: {
|
||||
flexDirection: "row",
|
||||
|
@ -578,7 +613,7 @@ mapStateToProps = (state, props) => {
|
|||
modalOpen: state.apiReducer.modalOpen,
|
||||
modalInfo: state.apiReducer.modalInfo,
|
||||
type: state.apiReducer.type,
|
||||
loadingLogin:state.apiReducer.loadingLogin
|
||||
loadingLogin: state.apiReducer.loadingLogin
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import editCalendar from './screens/editCalendar';
|
|||
import choosePath from './screens/choosePath';
|
||||
import calendarDetail from './screens/calendarDetail';
|
||||
|
||||
import resetPassword from './screens/resetPassword';
|
||||
//import resetPassword from './screens/resetPassword';
|
||||
|
||||
import eventDetail from './screens/eventDetail';
|
||||
|
||||
|
@ -147,6 +147,7 @@ const Stack = createStackNavigator({
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (navigation.state.routes[index].routeName == 'Jogo') {
|
||||
return {
|
||||
header: (<View style={{backgroundColor:'#CC1A17', padding:15}}>
|
||||
|
@ -226,9 +227,7 @@ const Stack = createStackNavigator({
|
|||
screen: teamDetail,
|
||||
},
|
||||
|
||||
resetPassword:{
|
||||
screen:resetPassword
|
||||
},
|
||||
|
||||
event:{
|
||||
screen: event
|
||||
}
|
||||
|
|
|
@ -141,6 +141,7 @@ class Calendar extends React.Component {
|
|||
|
||||
render() {
|
||||
const ThirdRoute = () => (
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
{this.props.events != undefined && (
|
||||
<Timeline
|
||||
|
@ -208,6 +209,7 @@ class Calendar extends React.Component {
|
|||
</ScrollView>
|
||||
);
|
||||
const FirstRoute = () => (
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
{this.props.events != undefined && (
|
||||
<Timeline
|
||||
|
@ -236,6 +238,7 @@ class Calendar extends React.Component {
|
|||
/>
|
||||
)}
|
||||
</ScrollView>
|
||||
|
||||
);
|
||||
const SecondRoute = () => (
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
|
@ -315,6 +318,7 @@ class Calendar extends React.Component {
|
|||
|
||||
</View>
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
FlatList,
|
||||
ActivityIndicator
|
||||
} from "react-native";
|
||||
|
||||
import IconFA from "react-native-vector-icons/FontAwesome5";
|
||||
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
|
||||
|
||||
import rallyImg from "../assets/rallyTascas.jpg";
|
||||
|
@ -57,12 +57,33 @@ class Eventos extends React.Component {
|
|||
const { navigate } = this.props.navigation;
|
||||
return (
|
||||
<PTRView onRefresh={this._update}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignContent: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{
|
||||
textAlign: "right",
|
||||
fontSize: 12,
|
||||
paddingTop: 10,
|
||||
marginRight: 5
|
||||
}}
|
||||
>
|
||||
Arrasta o ecrã para atualizar
|
||||
</Text>
|
||||
<IconFA name="chevron-circle-down" size={13} color={"#CC1A17"} />
|
||||
</View>
|
||||
<View style={styles.container}>
|
||||
{this.props.eventsInternal == undefined && (
|
||||
<View
|
||||
style={{
|
||||
height: SCREEN_HEIGHT,
|
||||
marginTop: SCREEN_HEIGHT * 0.27,
|
||||
//marginTop: SCREEN_HEIGHT * 0.27,
|
||||
backgroundColor: "white"
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -18,9 +18,10 @@ import {
|
|||
Switch,
|
||||
Alert
|
||||
} from "react-native";
|
||||
import ToggleSwitch from 'toggle-switch-react-native'
|
||||
const axios = require("axios");
|
||||
import ToggleSwitch from "toggle-switch-react-native";
|
||||
import Modal from "react-native-modal";
|
||||
import QRCodeScanner from 'react-native-qrcode-scanner';
|
||||
import QRCodeScanner from "react-native-qrcode-scanner";
|
||||
import { Shadow } from "react-native-shadow";
|
||||
import Icon from "react-native-vector-icons/Ionicons";
|
||||
import { RkButton, RkTheme } from "react-native-ui-kitten";
|
||||
|
@ -69,22 +70,38 @@ class Home extends Component {
|
|||
user: { Name: "" },
|
||||
userDetails: {},
|
||||
appState: AppState.currentState,
|
||||
addUser:false,
|
||||
switch:false,
|
||||
team:""
|
||||
addUser: false,
|
||||
switch: false,
|
||||
team: "",
|
||||
img:
|
||||
""
|
||||
};
|
||||
}
|
||||
handleConnectivityChange = () => {
|
||||
console.log("asdasdasdasdasd");
|
||||
};
|
||||
|
||||
_getImage = qr => {
|
||||
//enei.pt/api/Users/getProfileImage/ZV4ZWJXTVV
|
||||
https: axios
|
||||
.get(`https://enei.pt/api/Users/getProfileImage/${qr}`)
|
||||
.then(function(response) {
|
||||
// handle success
|
||||
return response.data;
|
||||
})
|
||||
.catch(function(error) {
|
||||
// handle error
|
||||
console.log(error);
|
||||
});
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
console.log("hold" + this.props.onHold);
|
||||
|
||||
this.props.getUserInfo(this.props.token);
|
||||
|
||||
this.props.getEvents(this.props.user,this.props.token);
|
||||
|
||||
this.props.getEvents(this.props.user, this.props.token);
|
||||
this._getImage();
|
||||
}
|
||||
componentWillUnmount() {}
|
||||
|
||||
|
@ -100,51 +117,64 @@ class Home extends Component {
|
|||
}
|
||||
_update = () => {
|
||||
this.props.getUserInfo(this.props.token);
|
||||
this.props.getEvents(this.props.user,this.props.token);
|
||||
this.props.getUserTeam(this.props.user, this.props.internalToken )
|
||||
this.props.getEvents(this.props.user, this.props.token);
|
||||
this.props.getUserTeam(this.props.user, this.props.internalToken);
|
||||
};
|
||||
onSuccess=e=>{
|
||||
//fecha o scanner
|
||||
this.props.addUserTeam({id:this.props.team.id, newQr:e.data},this.props.internalToken, this.props.user)
|
||||
this.setState({addUser:!this.state.addUser})
|
||||
onSuccess = e => {
|
||||
//fecha o scanner
|
||||
this.props.addUserTeam(
|
||||
{ id: this.props.team.id, newQr: e.data },
|
||||
this.props.internalToken,
|
||||
this.props.user
|
||||
);
|
||||
this.setState({ addUser: !this.state.addUser });
|
||||
};
|
||||
_rm = qr => {
|
||||
this.props.removeUserTeam(
|
||||
{
|
||||
TeamId: this.props.team.id,
|
||||
UserQR: this.props.team.cap.qRcode,
|
||||
UserToRemoveQR: qr
|
||||
},
|
||||
this.props.internalToken
|
||||
);
|
||||
};
|
||||
_toggle = () => {
|
||||
this.setState({ addUser: !this.state.addUser });
|
||||
};
|
||||
_delTeam = () => {
|
||||
Alert.alert(
|
||||
"Apagar equipa",
|
||||
"Tens a certeza que queres apagar a tua equipa?\n\nAo apagares a equipa, todos os dados serão perdidos... \n\nThere is no coming back..\n\n",
|
||||
[
|
||||
{ text: "No, bring my mommy", onPress: () => alert("pussy!!!!") },
|
||||
|
||||
}
|
||||
_rm=(qr)=>{
|
||||
this.props.removeUserTeam({TeamId: this.props.team.id, UserQR: this.props.team.cap.qRcode, UserToRemoveQR: qr}, this.props.internalToken)
|
||||
}
|
||||
_toggle=()=>{
|
||||
{
|
||||
text: "YES",
|
||||
onPress: () =>
|
||||
this.props.deleteTeam(
|
||||
{ TeamId: this.props.team.id, UserQr: this.props.user.Code },
|
||||
this.props.internalToken
|
||||
)
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
);
|
||||
};
|
||||
_creatTeam = () => {
|
||||
var tipo;
|
||||
if (this.state.switch) tipo = 1;
|
||||
else {
|
||||
tipo = 3;
|
||||
}
|
||||
var o = {
|
||||
EventId: tipo,
|
||||
Nome: this.state.team,
|
||||
capQR: this.props.user.Code
|
||||
};
|
||||
|
||||
|
||||
this.setState({addUser:!this.state.addUser})
|
||||
|
||||
}
|
||||
_delTeam=()=>{
|
||||
Alert.alert(
|
||||
'Apagar equipa',
|
||||
'Tens a certeza que queres apagar a tua equipa?\n\nAo apagares a equipa, todos os dados serão perdidos... \n\nThere is no coming back..\n\n',
|
||||
[
|
||||
{text: 'No, bring my mommy', onPress: () => alert('pussy!!!!')},
|
||||
|
||||
{text: 'YES', onPress: () => this.props.deleteTeam({TeamId: this.props.team.id, UserQr: this.props.user.Code},this.props.internalToken)},
|
||||
],
|
||||
{cancelable: false},
|
||||
);
|
||||
}
|
||||
_creatTeam=()=>{
|
||||
var tipo
|
||||
if(this.state.switch)
|
||||
tipo=1
|
||||
else{
|
||||
tipo=3
|
||||
}
|
||||
var o={
|
||||
EventId:tipo,
|
||||
Nome:this.state.team,
|
||||
capQR:this.props.user.Code
|
||||
}
|
||||
|
||||
this.props.createTeam(o, this.props.internalToken, this.props.user)
|
||||
}
|
||||
this.props.createTeam(o, this.props.internalToken, this.props.user);
|
||||
};
|
||||
render() {
|
||||
const { navigate } = this.props.navigation;
|
||||
|
||||
|
@ -159,33 +189,43 @@ _creatTeam=()=>{
|
|||
if (this.props.logged) {
|
||||
return (
|
||||
<PTRView onRefresh={this._update}>
|
||||
<ScrollView style={{ backgroundColor: "#eeeeee", minHeight: SCREEN_HEIGHT}}>
|
||||
<ScrollView
|
||||
style={{ backgroundColor: "#eeeeee", minHeight: SCREEN_HEIGHT }}
|
||||
>
|
||||
<View>
|
||||
<Modal
|
||||
isVisible={this.state.addUser}
|
||||
onBackdropPress={this._toggle}
|
||||
onBackButtonPress={this._toggle}
|
||||
animationInTiming={1100}
|
||||
animationOutTiming={1100}
|
||||
style={{marginTop:-20}}
|
||||
>
|
||||
|
||||
<QRCodeScanner
|
||||
onRead={this.onSuccess}
|
||||
|
||||
cameraStyle={styles.cameraContainer}
|
||||
showMarker={true}
|
||||
/>
|
||||
<Button
|
||||
onPress={this._toggle}
|
||||
title={"Fechar Scan"}
|
||||
color={"#CC1A17"}
|
||||
></Button>
|
||||
<Text style={{textAlign:'center', fontSize:12, margin:10,marginBottom:5, color:'white'}}> Caso tenhas problemas com este processo deves contactar a comissão organizadora atravês do email geral.</Text>
|
||||
|
||||
|
||||
</Modal>
|
||||
|
||||
<Modal
|
||||
isVisible={this.state.addUser}
|
||||
onBackdropPress={this._toggle}
|
||||
onBackButtonPress={this._toggle}
|
||||
animationInTiming={1100}
|
||||
animationOutTiming={1100}
|
||||
style={{ marginTop: -20 }}
|
||||
>
|
||||
<QRCodeScanner
|
||||
onRead={this.onSuccess}
|
||||
cameraStyle={styles.cameraContainer}
|
||||
showMarker={true}
|
||||
/>
|
||||
<Button
|
||||
onPress={this._toggle}
|
||||
title={"Fechar Scan"}
|
||||
color={"#CC1A17"}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
textAlign: "center",
|
||||
fontSize: 12,
|
||||
margin: 10,
|
||||
marginBottom: 5,
|
||||
color: "white"
|
||||
}}
|
||||
>
|
||||
{" "}
|
||||
Caso tenhas problemas com este processo deves contactar a
|
||||
comissão organizadora atravês do email geral.
|
||||
</Text>
|
||||
</Modal>
|
||||
|
||||
<ImageBackground
|
||||
opacity={0.9}
|
||||
source={require("../assets/img/bg_3.jpg")}
|
||||
|
@ -198,20 +238,48 @@ _creatTeam=()=>{
|
|||
>
|
||||
<View style={styles.homeHeader}>
|
||||
<View style={styles.userImageContainer}>
|
||||
{this.props.user.Avatar != null && <Image
|
||||
style={styles.userImage}
|
||||
source={{
|
||||
uri: this.props.user.Avatar
|
||||
}}
|
||||
/>
|
||||
}{ this.props.user.Avatar==null &&
|
||||
<Image
|
||||
style={styles.userImage}
|
||||
source={{ uri: "https://i.imgur.com/XXJ7LxV.jpg" }}
|
||||
/>
|
||||
source={require('../assets/logo_black.jpg')}
|
||||
/>}
|
||||
</View>
|
||||
{this.props.user != undefined && (
|
||||
<Text style={styles.userText}>{this.props.user.Name}</Text>
|
||||
)}
|
||||
<Text style={styles.userTextSub}>
|
||||
{this.props.user.Company}
|
||||
</Text>
|
||||
{this.props.user != undefined && (
|
||||
<Text style={styles.userTextSub}>
|
||||
{this.props.user.Company}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
</ImageBackground>
|
||||
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignContent: "center",
|
||||
alignSelf:'center'
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{ textAlign: "right", fontSize: 12, paddingTop:10 , marginRight:5}}
|
||||
>
|
||||
Arrasta o ecrã para atualizar
|
||||
</Text>
|
||||
<IconFA
|
||||
name="chevron-circle-down"
|
||||
size={13}
|
||||
color={"#CC1A17"}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.userStats}>
|
||||
<View style={{ backgroundColor: "orange" }}>
|
||||
<Text style={styles.userStatsTitle}>
|
||||
|
@ -265,183 +333,266 @@ _creatTeam=()=>{
|
|||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{ this.props.team!= undefined && this.props.team=='none' &&
|
||||
<View style={{backgroundColor:'white', margin:10}}>
|
||||
<View style={{backgroundColor:'#CC1A17'}}>
|
||||
<Text style={{ fontSize: 18,
|
||||
color: "white",
|
||||
margin: 10,
|
||||
fontWeight: "bold",
|
||||
marginBottom: 10}}>Equipas Rally / Caching</Text>
|
||||
</View>
|
||||
<View style={{margin:10}}>
|
||||
<Text style={{fontSize:12, textAlign:'center'}}>Para participares no ENEI caching ou no Rally Tascas deves formar uma equipa (4 a 6) elementos.</Text>
|
||||
<Text style={{fontSize:12, textAlign:'center', margin:5}}>Ao criares a equipa, ficas como capitão. Podes adicionar e remover outros elementos.</Text>
|
||||
<TextInput
|
||||
style={{
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
margin:30,
|
||||
|
||||
|
||||
width: SCREEN_WIDTH * 0.8,
|
||||
|
||||
backgroundColor: "white",
|
||||
|
||||
borderRadius: 3,
|
||||
height: SCREEN_HEIGHT * 0.08,
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
paddingLeft: SCREEN_WIDTH * 0.05}}
|
||||
onFocus={this._print}
|
||||
maxLength={50}
|
||||
blurOnSubmit={true}
|
||||
|
||||
onChangeText={t => this.setState({ team:t})}
|
||||
clearButtonMode="always"
|
||||
value={this.state.team}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder="Nome da Equipa"
|
||||
/>
|
||||
<View style={{flex:1 ,flexDirection:'row', margin:20, marginBottom:40, alignSelf:'center'}}>
|
||||
<View style={{width:'33%',alignSelf:'center'}}>
|
||||
<Text style={{fontWeight:'bold', fontSize:17, textAlign:'center'}}>ENEI Caching</Text>
|
||||
</View>
|
||||
<ToggleSwitch
|
||||
isOn={this.state.switch}
|
||||
onColor='#CC1A17'
|
||||
offColor='#eeeeee'
|
||||
labelStyle={{color: 'black', fontWeight: '900'}}
|
||||
size='large'
|
||||
onToggle={ (isOn) => this.setState({switch:!this.state.switch}) }
|
||||
|
||||
/><View style={{width:'33%',alignSelf:'center'}}>
|
||||
<Text style={{fontWeight:'bold', fontSize:17, textAlign:'center'}}>Rally Tascas</Text>
|
||||
</View>
|
||||
</View><Text style={{fontSize:12, textAlign:'center', margin:5}}>A incrição no Rally tem custo de 5€ por elemento. A equipa apenas fica ativa quando efectuar o pagamento na banca no ENEI</Text>
|
||||
|
||||
<Button
|
||||
onPress={this._creatTeam}
|
||||
disabled={this.state.team==""}
|
||||
title={"Criar Equipa"}
|
||||
color={"#CC1A17"}
|
||||
>
|
||||
</Button>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
{
|
||||
this.props.team!= undefined && this.props.team!='none' &&
|
||||
|
||||
<View>
|
||||
<View
|
||||
style={{
|
||||
margin: 10,
|
||||
marginTop: 20,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 3
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "#CC1A17",
|
||||
flex: 1,
|
||||
flexDirection: "row"
|
||||
}}
|
||||
>
|
||||
<View style={{ width: "60%" }}>
|
||||
<Text onPress={() => navigate('teamDetail')}
|
||||
style={{
|
||||
fontSize: 25,
|
||||
color: "white",
|
||||
margin: 10,
|
||||
fontWeight: "bold",
|
||||
marginBottom: 0
|
||||
}}
|
||||
>
|
||||
{this.props.team.nome}
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
color: "white",
|
||||
marginLeft: 10,
|
||||
marginBottom: 5
|
||||
}}
|
||||
>
|
||||
{this.props.team.nMembros}/6 elementos
|
||||
</Text>
|
||||
</View>
|
||||
{ this.props.team != undefined && this.props.team.cap.qRcode == this.props.user.Code && <TouchableOpacity onPress={this._delTeam}>
|
||||
<View
|
||||
{this.props.team != undefined && this.props.team == "none" && (
|
||||
<View style={{ backgroundColor: "white", margin: 10 }}>
|
||||
<View style={{ backgroundColor: "#CC1A17" }}>
|
||||
<Text
|
||||
style={{
|
||||
alignItems: "center",
|
||||
alignContent: "center",
|
||||
alignSelf: "center",
|
||||
|
||||
margin:10
|
||||
fontSize: 18,
|
||||
color: "white",
|
||||
margin: 10,
|
||||
fontWeight: "bold",
|
||||
marginBottom: 10
|
||||
}}
|
||||
>
|
||||
<IconFA name="trash-alt" color={"white"} size={30} />
|
||||
|
||||
<View>
|
||||
<Text style={{ color: "white" }}>rm Team </Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>}
|
||||
{this.props.team.nMembros<6 && <TouchableOpacity onPress={this._toggle}>
|
||||
<View
|
||||
style={{
|
||||
alignItems: "center",
|
||||
alignContent: "center",
|
||||
alignSelf: "center",
|
||||
margin:10
|
||||
}}
|
||||
>
|
||||
<IconFA name="plus" color={"white"} size={30} />
|
||||
|
||||
<View>
|
||||
<Text style={{ color: "white" }}> Add</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>}
|
||||
Equipas Rally / Caching
|
||||
</Text>
|
||||
</View>
|
||||
<View style={{ margin: 10 }}>
|
||||
<Text style={{ fontSize: 12, textAlign: "center" }}>
|
||||
Para participares no ENEI caching ou no Rally Tascas deves
|
||||
formar uma equipa (4 a 6) elementos.
|
||||
</Text>
|
||||
<Text
|
||||
style={{ fontSize: 12, textAlign: "center", margin: 5 }}
|
||||
>
|
||||
Ao criares a equipa, ficas como capitão. Podes adicionar e
|
||||
remover outros elementos.
|
||||
</Text>
|
||||
<TextInput
|
||||
style={{
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
margin: 30,
|
||||
|
||||
<View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<FlatList
|
||||
data={this.props.team.membros}
|
||||
renderItem={({ item }) => (
|
||||
<View>
|
||||
<View style={styles.user}>
|
||||
<View style={styles.userLogo}>
|
||||
<IconFA name="user" size={40} />
|
||||
</View>
|
||||
<View style={styles.userT}>
|
||||
<Text style={styles.userName}>
|
||||
{item.fullName}
|
||||
</Text>
|
||||
<Text>{item.qRcode}</Text>
|
||||
</View>
|
||||
|
||||
<TouchableOpacity style={styles.userRemove} onPress={()=>this._rm(item.qRcode)}>
|
||||
<Text style={{ fontWeight: "bold" }}>
|
||||
remover
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
</View>
|
||||
)}
|
||||
width: SCREEN_WIDTH * 0.8,
|
||||
|
||||
backgroundColor: "white",
|
||||
|
||||
borderRadius: 3,
|
||||
height: SCREEN_HEIGHT * 0.08,
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
paddingLeft: SCREEN_WIDTH * 0.05
|
||||
}}
|
||||
onFocus={this._print}
|
||||
maxLength={50}
|
||||
blurOnSubmit={true}
|
||||
onChangeText={t => this.setState({ team: t })}
|
||||
clearButtonMode="always"
|
||||
value={this.state.team}
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder="Nome da Equipa"
|
||||
/>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
margin: 20,
|
||||
marginBottom: 40,
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<View style={{ width: "33%", alignSelf: "center" }}>
|
||||
<Text
|
||||
style={{
|
||||
fontWeight: "bold",
|
||||
fontSize: 17,
|
||||
textAlign: "center"
|
||||
}}
|
||||
>
|
||||
ENEI Caching
|
||||
</Text>
|
||||
</View>
|
||||
<ToggleSwitch
|
||||
isOn={this.state.switch}
|
||||
onColor="#CC1A17"
|
||||
offColor="#eeeeee"
|
||||
labelStyle={{ color: "black", fontWeight: "900" }}
|
||||
size="large"
|
||||
onToggle={isOn =>
|
||||
this.setState({ switch: !this.state.switch })
|
||||
}
|
||||
/>
|
||||
<View style={{ width: "33%", alignSelf: "center" }}>
|
||||
<Text
|
||||
style={{
|
||||
fontWeight: "bold",
|
||||
fontSize: 17,
|
||||
textAlign: "center"
|
||||
}}
|
||||
>
|
||||
Rally Tascas
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<Text
|
||||
style={{ fontSize: 12, textAlign: "center", margin: 5 }}
|
||||
>
|
||||
A incrição no Rally tem custo de 5€ por elemento. A equipa
|
||||
apenas fica ativa quando efectuar o pagamento na banca no
|
||||
ENEI
|
||||
</Text>
|
||||
|
||||
<Button
|
||||
onPress={this._creatTeam}
|
||||
disabled={this.state.team == ""}
|
||||
title={"Criar Equipa"}
|
||||
color={"#CC1A17"}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
)}
|
||||
{this.props.team != undefined && this.props.team != "none" && (
|
||||
<View>
|
||||
<View
|
||||
style={{
|
||||
margin: 10,
|
||||
marginTop: 20,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 3
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "#CC1A17",
|
||||
flex: 1,
|
||||
flexDirection: "row"
|
||||
}}
|
||||
>
|
||||
<View style={{ width: "60%" }}>
|
||||
<Text
|
||||
onPress={() => navigate("teamDetail")}
|
||||
style={{
|
||||
fontSize: 25,
|
||||
color: "white",
|
||||
margin: 10,
|
||||
fontWeight: "bold",
|
||||
marginBottom: 0
|
||||
}}
|
||||
>
|
||||
{this.props.team.nome}
|
||||
</Text>
|
||||
<Text
|
||||
style={{
|
||||
color: "white",
|
||||
marginLeft: 10,
|
||||
marginBottom: 5
|
||||
}}
|
||||
>
|
||||
{this.props.team.nMembros}/6 elementos
|
||||
</Text>
|
||||
</View>
|
||||
{this.props.team != undefined &&
|
||||
this.props.team.cap.qRcode == this.props.user.Code && (
|
||||
<TouchableOpacity onPress={this._delTeam}>
|
||||
<View
|
||||
style={{
|
||||
alignItems: "center",
|
||||
alignContent: "center",
|
||||
alignSelf: "center",
|
||||
|
||||
margin: 10
|
||||
}}
|
||||
>
|
||||
<IconFA
|
||||
name="trash-alt"
|
||||
color={"white"}
|
||||
size={30}
|
||||
/>
|
||||
|
||||
<View>
|
||||
<Text style={{ color: "white" }}>rm Team </Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{this.props.team.nMembros < 6 &&
|
||||
this.props.team.cap.qRcode == this.props.user.Code && (
|
||||
<TouchableOpacity onPress={this._toggle}>
|
||||
<View
|
||||
style={{
|
||||
alignItems: "center",
|
||||
alignContent: "center",
|
||||
alignSelf: "center",
|
||||
margin: 10
|
||||
}}
|
||||
>
|
||||
<IconFA name="plus" color={"white"} size={30} />
|
||||
|
||||
<View>
|
||||
<Text style={{ color: "white" }}> Add</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
|
||||
<View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<View>
|
||||
<View style={styles.user}>
|
||||
<View style={styles.userLogo}>
|
||||
<IconFA name="user" size={40} />
|
||||
</View>
|
||||
<View style={styles.userT}>
|
||||
<Text style={styles.userName}>
|
||||
{this.props.team.cap.fullName}
|
||||
</Text>
|
||||
<Text>{this.props.team.cap.qRcode}</Text>
|
||||
</View>
|
||||
|
||||
<View style={styles.userRemove}>
|
||||
<Text
|
||||
style={{ fontWeight: "bold", color: "#CC1A17" }}
|
||||
>
|
||||
Capitão
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
</View>
|
||||
<FlatList
|
||||
data={this.props.team.membros}
|
||||
renderItem={({ item }) => (
|
||||
<View>
|
||||
{item.id != this.props.team.cap.id && (
|
||||
<View style={styles.user}>
|
||||
<View style={styles.userLogo}>
|
||||
<IconFA name="user" size={40} />
|
||||
</View>
|
||||
<View style={styles.userT}>
|
||||
<Text style={styles.userName}>
|
||||
{item.fullName}
|
||||
</Text>
|
||||
<Text>{item.qRcode}</Text>
|
||||
</View>
|
||||
|
||||
{this.props.user.Code ==
|
||||
this.props.team.cap.qRcode && (
|
||||
<TouchableOpacity
|
||||
style={styles.userRemove}
|
||||
onPress={() => this._rm(item.qRcode)}
|
||||
>
|
||||
<Text style={{ fontWeight: "bold" }}>
|
||||
remover
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<TouchableOpacity onPress={() => navigate("teamDetail")} style={{backgroundColor:'orange'}}><Text style={{color:'white', fontSize:17, fontWeight:'bold', margin:10, textAlign:'center'}}>Ver o progresso da equipa </Text></TouchableOpacity>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</PTRView>
|
||||
|
@ -458,8 +609,7 @@ _creatTeam=()=>{
|
|||
|
||||
const styles = StyleSheet.create({
|
||||
cameraContainer: {
|
||||
height: Dimensions.get('window').height,
|
||||
|
||||
height: Dimensions.get("window").height
|
||||
},
|
||||
titleBilhete: {
|
||||
textAlign: "center",
|
||||
|
@ -470,18 +620,17 @@ const styles = StyleSheet.create({
|
|||
colBilhete: {
|
||||
width: "33%",
|
||||
padding: 10,
|
||||
alignContent:'center',
|
||||
alignItems:'center'
|
||||
alignContent: "center",
|
||||
alignItems: "center"
|
||||
},
|
||||
boxStyle: {
|
||||
padding: 5,
|
||||
paddingTop:10,
|
||||
paddingBottom :10,
|
||||
paddingTop: 10,
|
||||
paddingBottom: 10,
|
||||
borderWidth: 1,
|
||||
marginBottom: 5,
|
||||
width:'100%',
|
||||
borderColor: "#CC1A17",
|
||||
|
||||
width: "100%",
|
||||
borderColor: "#CC1A17"
|
||||
},
|
||||
userName: {
|
||||
fontSize: 16,
|
||||
|
|
|
@ -29,13 +29,7 @@ import * as Actions from "../store/actions"; //Import your actionss
|
|||
|
||||
class Jogo extends React.Component {
|
||||
|
||||
static navigationOptions = ({ navigation }) => ({
|
||||
header: (
|
||||
<View style={{backgroundColor:'#CC1A17'}}>
|
||||
<Text>a</Text>
|
||||
</View>
|
||||
)
|
||||
});
|
||||
|
||||
|
||||
|
||||
handleClick = (link) => {
|
||||
|
@ -271,13 +265,15 @@ class Jogo extends React.Component {
|
|||
justifyContent: "space-around"
|
||||
}}
|
||||
>
|
||||
<Text style={{ fontWeight: "bold" }}> 1 </Text>
|
||||
{this.props.cromos!= undefined &&
|
||||
<Text style={{ fontWeight: "bold" }}> { this.props.cromos.pontuacao}</Text>}
|
||||
{this.props.cromos!= undefined &&
|
||||
<ProgressBarAnimated
|
||||
width={barWidth * 0.7}
|
||||
value={this.state.progress}
|
||||
value={this.props.cromos.pontuacao*100/256}
|
||||
backgroundColorOnComplete="#CC2A17"
|
||||
/>
|
||||
<Text style={{ fontWeight: "bold" }}> 2 </Text>
|
||||
/>}
|
||||
<Text style={{ fontWeight: "bold" }}>256</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
@ -300,9 +296,7 @@ class Jogo extends React.Component {
|
|||
>
|
||||
<View style={[styles.triangle, this.props.style]} />
|
||||
<Text style={styles.points}>{item.pontos}</Text>
|
||||
<View
|
||||
style={[styles.triangleNumber, this.props.style]}
|
||||
/>
|
||||
|
||||
<Text style={styles.number}>{item.id-1}</Text>
|
||||
</ImageBackground>
|
||||
}
|
||||
|
@ -315,9 +309,7 @@ class Jogo extends React.Component {
|
|||
>
|
||||
<View style={[styles.triangle, this.props.style]} />
|
||||
<Text style={styles.points}>{item.pontos}</Text>
|
||||
<View
|
||||
style={[styles.triangleNumber, this.props.style]}
|
||||
/>
|
||||
|
||||
<Text style={styles.number}>{item.id-1}</Text>
|
||||
</ImageBackground>
|
||||
}
|
||||
|
|
|
@ -1,461 +1,455 @@
|
|||
import React, {Component} from 'react'
|
||||
import {Card, Divider,} from 'react-native-elements'
|
||||
import React, { Component } from "react";
|
||||
import { Card, Divider } from "react-native-elements";
|
||||
import {
|
||||
Image,
|
||||
ImageBackground,
|
||||
Linking,
|
||||
ListView,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
TouchableOpacity,
|
||||
Dimensions,
|
||||
TextInput,
|
||||
Button,
|
||||
ActivityIndicator
|
||||
} from 'react-native'
|
||||
import PropTypes from 'prop-types';
|
||||
Image,
|
||||
ImageBackground,
|
||||
Linking,
|
||||
ListView,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
TouchableOpacity,
|
||||
Dimensions,
|
||||
TextInput,
|
||||
Button,
|
||||
ActivityIndicator
|
||||
} from "react-native";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import {connect, Provider} from "react-redux";
|
||||
import {bindActionCreators} from "redux";
|
||||
import { connect, Provider } from "react-redux";
|
||||
import { bindActionCreators } from "redux";
|
||||
import * as Actions from "../store/actions";
|
||||
|
||||
import {Validate} from '../Helpers/Validation'
|
||||
import {RkTextInput} from 'react-native-ui-kitten';
|
||||
import { Validate } from "../Helpers/Validation";
|
||||
import { RkTextInput } from "react-native-ui-kitten";
|
||||
|
||||
import {createStore} from 'redux';
|
||||
import { createStore } from "redux";
|
||||
|
||||
import Email from "../components/Email";
|
||||
|
||||
import Email from '../components/Email';
|
||||
|
||||
import Separator from '../components/Separator';
|
||||
import Tel from '../components/Telephone';
|
||||
|
||||
import Separator from "../components/Separator";
|
||||
import Tel from "../components/Telephone";
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
import Icon from "react-native-vector-icons/Ionicons"
|
||||
import ImagePicker from 'react-native-image-picker';
|
||||
import Icon from "react-native-vector-icons/Ionicons";
|
||||
|
||||
|
||||
var options = {
|
||||
title: 'Select Avatar',
|
||||
customButtons: [
|
||||
{name: 'fb', title: 'Choose Photo from Facebook'},
|
||||
],
|
||||
storageOptions: {
|
||||
skipBackup: true,
|
||||
path: 'images'
|
||||
}
|
||||
title: "Selecionar foto de perfil",
|
||||
|
||||
storageOptions: {
|
||||
skipBackup: true,
|
||||
path: "images"
|
||||
}
|
||||
};
|
||||
|
||||
class Profile extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
name: this.props.user.Name,
|
||||
userDetails: {},
|
||||
token: false,
|
||||
tokenData: "",
|
||||
loggedIn: false,
|
||||
onHold: true,
|
||||
user: {},
|
||||
cenas: { Name: "as" },
|
||||
text: "",
|
||||
profileIcon: this.props.user.Avatar,
|
||||
|
||||
formValid: true,
|
||||
|
||||
jobs: this.props.user.Company,
|
||||
jobsError: false,
|
||||
jobsErrorMessage: "",
|
||||
|
||||
email: this.props.user.Email,
|
||||
emailError: false,
|
||||
emailErrorMessage: "",
|
||||
|
||||
phone: this.props.user.Mobile,
|
||||
phoneError: false,
|
||||
phoneErrorMessage: "",
|
||||
|
||||
address: this.props.user.Address,
|
||||
addressError: false,
|
||||
addressErrorMessage: "",
|
||||
|
||||
city: this.props.user.City,
|
||||
cityError: false,
|
||||
cityErrorMessage: "",
|
||||
|
||||
oldPass: "",
|
||||
new1: "",
|
||||
new2: "",
|
||||
|
||||
url: this.props.user.Url,
|
||||
curso: this.props.user.LastName
|
||||
};
|
||||
}
|
||||
|
||||
_press = () => {
|
||||
this.props.hold();
|
||||
this.props.changePassword(
|
||||
this.props.token,
|
||||
this.state.oldPass,
|
||||
this.state.new1,
|
||||
this.state.new2
|
||||
);
|
||||
};
|
||||
_logout = () => {
|
||||
this.props.logoutUser();
|
||||
};
|
||||
|
||||
_validateData = (name, jobs, email, phone, address, city) => {
|
||||
let valid = null;
|
||||
|
||||
|
||||
class Profile extends Component {
|
||||
v = Validate("name", name);
|
||||
|
||||
let v = Validate("email", email);
|
||||
this.setState({ emailError: v[0], emailErrorMessage: v[1] });
|
||||
|
||||
constructor(props) {
|
||||
v = Validate("jobs", jobs);
|
||||
|
||||
super(props);
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({ jobsError: v[0], jobsErrorMessage: v[1] }, () => {
|
||||
console.log(
|
||||
"email error: " +
|
||||
this.state.emailError +
|
||||
" job Error: " +
|
||||
this.state.jobsError
|
||||
);
|
||||
});
|
||||
|
||||
this.state = {
|
||||
name: this.props.user.Name,
|
||||
userDetails: {},
|
||||
token: false,
|
||||
tokenData: '',
|
||||
loggedIn: false,
|
||||
onHold: true,
|
||||
user: {},
|
||||
cenas: {Name: 'as'},
|
||||
text: '',
|
||||
v = Validate("city", city);
|
||||
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({ cityError: v[0], cityErrorMessage: v[1] });
|
||||
|
||||
formValid: true,
|
||||
v = Validate("address", address);
|
||||
|
||||
jobs: this.props.user.Company,
|
||||
jobsError: false,
|
||||
jobsErrorMessage: '',
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({ addressError: v[0], addressErrorMessage: v[1] });
|
||||
|
||||
email: this.props.user.Email,
|
||||
emailError: false,
|
||||
emailErrorMessage: '',
|
||||
v = Validate("city", city);
|
||||
|
||||
phone: this.props.user.Mobile,
|
||||
phoneError: false,
|
||||
phoneErrorMessage: '',
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({ cityError: v[0], cityErrorMessage: v[1] }, () => {
|
||||
console.log(this.state.cityError + " Error: " + this.state.addressError);
|
||||
|
||||
address: this.props.user.Address,
|
||||
addressError: false,
|
||||
addressErrorMessage: '',
|
||||
if (
|
||||
this.state.emailError ||
|
||||
this.state.jobsError ||
|
||||
this.state.phoneError ||
|
||||
this.state.addressError ||
|
||||
this.state.cityError
|
||||
)
|
||||
this.setState({ formValid: false });
|
||||
});
|
||||
};
|
||||
|
||||
city: this.props.user.City,
|
||||
cityError: false,
|
||||
cityErrorMessage: '',
|
||||
saveData() {
|
||||
const {
|
||||
name,
|
||||
jobs,
|
||||
email,
|
||||
phone,
|
||||
address,
|
||||
city,
|
||||
formValid,
|
||||
url,
|
||||
curso,
|
||||
profileIcon
|
||||
} = this.state;
|
||||
|
||||
oldPass:'',
|
||||
new1:'',
|
||||
new2:'',
|
||||
// this._validateData(name, jobs, email, phone, address, city,curso);
|
||||
|
||||
url:this.props.user.Url,
|
||||
curso:this.props.user.LastName,
|
||||
|
||||
console.log(formValid);
|
||||
|
||||
};
|
||||
this.props.hold();
|
||||
if (formValid) {
|
||||
console.log("data valid");
|
||||
|
||||
this.props.updateUser(this.props.token, {
|
||||
Name: this.state.name,
|
||||
Company: jobs,
|
||||
LastName: curso,
|
||||
Address: address,
|
||||
City: city,
|
||||
Mobile: phone,
|
||||
//Avatar: "aaa",
|
||||
Url: url
|
||||
});
|
||||
} else console.log("data not valid");
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
if (this.props.onHold) {
|
||||
return (
|
||||
<View style={{ marginTop: SCREEN_HEIGHT * 0.4 }}>
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
_press=()=>{
|
||||
this.props.hold()
|
||||
this.props.changePassword(
|
||||
this.props.token,
|
||||
this.state.oldPass,
|
||||
this.state.new1,
|
||||
this.state.new2
|
||||
)
|
||||
}
|
||||
_logout = () => {
|
||||
|
||||
this.props.logoutUser();
|
||||
};
|
||||
|
||||
|
||||
_validateData = (name, jobs, email, phone, address, city) => {
|
||||
let valid = null;
|
||||
|
||||
v = Validate('name', name);
|
||||
|
||||
|
||||
let v = Validate('email', email);
|
||||
this.setState({emailError: v[0], emailErrorMessage: v[1]});
|
||||
|
||||
v = Validate('jobs', jobs);
|
||||
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({jobsError: v[0], jobsErrorMessage: v[1]}, () => {
|
||||
|
||||
console.log('email error: ' + this.state.emailError + ' job Error: ' + this.state.jobsError);
|
||||
});
|
||||
|
||||
|
||||
v = Validate('city', city);
|
||||
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({cityError: v[0], cityErrorMessage: v[1]})
|
||||
|
||||
|
||||
v = Validate('address', address);
|
||||
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({addressError: v[0], addressErrorMessage: v[1]});
|
||||
|
||||
|
||||
v = Validate('city', city);
|
||||
|
||||
// setState is asynchronous and so trying to work with state directly after a setState
|
||||
// call won't work as the update won't necessarily have run. Instead you can use the second argument to setState which is a callback
|
||||
this.setState({cityError: v[0], cityErrorMessage: v[1]}, () => {
|
||||
console.log(this.state.cityError + ' Error: ' + this.state.addressError);
|
||||
|
||||
if (this.state.emailError || this.state.jobsError || this.state.phoneError || this.state.addressError || this.state.cityError)
|
||||
this.setState({formValid: false});
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
saveData() {
|
||||
|
||||
const {name, jobs, email, phone, address, city, formValid, url,curso} = this.state;
|
||||
|
||||
// this._validateData(name, jobs, email, phone, address, city,curso);
|
||||
|
||||
console.log(formValid);
|
||||
|
||||
this.props.hold();
|
||||
if (formValid) {
|
||||
console.log("data valid");
|
||||
|
||||
this.props.updateUser(this.props.token, {
|
||||
Name: this.state.name,
|
||||
Company: jobs,
|
||||
LastName: curso,
|
||||
Address: address,
|
||||
City: city,
|
||||
Mobile: phone,
|
||||
Avatar: "base64",
|
||||
Url:url,
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
console.log("data not valid");
|
||||
|
||||
}
|
||||
_open=()=>{
|
||||
ImagePicker.launchCamera(options, (response) => {
|
||||
// Same code as in above section!
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.props.onHold) {
|
||||
return (
|
||||
<View style={{marginTop:SCREEN_HEIGHT*0.40}}>
|
||||
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<ScrollView style={{ backgroundColor: "#eee" }}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.userBioRowHeader}>
|
||||
<View style={styles.userBioRowTitle}>
|
||||
<Text
|
||||
style={{ color: "#CC1A17", fontWeight: "bold", fontSize: 20 }}
|
||||
>
|
||||
Informações Pessoais
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<View style={{flex: 1}}>
|
||||
<ScrollView style={{backgroundColor: '#eee'}}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.userBioRowHeader}>
|
||||
<View style={styles.userBioRowTitle}>
|
||||
<Text style={{color: '#CC1A17', fontWeight: 'bold', fontSize: 20}}>Informações Pessoais</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
<Button onPress={ this._open} title="Editar foto de perfil" color="#CC1A17"
|
||||
/>
|
||||
<View style={styles.userBio}>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo} >Nome</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(n) => {
|
||||
this.setState({name: n})
|
||||
}}
|
||||
value={this.state.name}/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo} >Curso</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(cu) => {
|
||||
this.setState({curso: cu})
|
||||
}}
|
||||
value={this.state.curso}/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo} >Faculdade</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(job) => {
|
||||
this.setState({jobs: job})
|
||||
}}
|
||||
value={this.state.jobs}/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo} >Telemóvel</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(phone) => {
|
||||
this.setState({phone: phone})
|
||||
}}
|
||||
value={this.state.phone}/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo} >Morada</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(add) => {
|
||||
this.setState({address: add})
|
||||
}}
|
||||
value={this.state.address}/>
|
||||
</View>
|
||||
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo} >LinkedIn</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(u) => {
|
||||
this.setState({url: u})
|
||||
}}
|
||||
value={this.state.url}/>
|
||||
</View>
|
||||
|
||||
|
||||
<Button onPress={() => this.saveData() } title="Guardar Alterações" color="#CC1A17"
|
||||
/>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/*PassWord Edit*/}
|
||||
<View style={styles.container}>
|
||||
<View style={styles.userBioRowHeader}>
|
||||
<View style={styles.userBioRowTitle}>
|
||||
<Text style={{color: '#CC1A17', fontWeight: 'bold', fontSize: 20}}>Alterar Password</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.userBio}>
|
||||
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
placeholder='Antiga Password'
|
||||
onChangeText={(old => {
|
||||
this.setState({oldPass: old})
|
||||
})}
|
||||
value={this.state.oldPass}
|
||||
maxLength = {20}
|
||||
|
||||
secureTextEntry={true}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
placeholder='Nova Password'
|
||||
secureTextEntry={true}
|
||||
onChangeText={(newz => {
|
||||
this.setState({new1: newz})
|
||||
})}
|
||||
value={this.state.new1}
|
||||
maxLength = {20}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
placeholder='Repetir Password'
|
||||
secureTextEntry={true}
|
||||
onChangeText={(newzz => {
|
||||
this.setState({new2: newzz})
|
||||
})}
|
||||
value={this.state.new2}
|
||||
maxLength = {20}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Button onPress={this._press} title="Alterar Password" color="#CC1A17"
|
||||
/>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<TouchableOpacity onPress={this._logout} style={{
|
||||
height: 50,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'black',
|
||||
marginTop:30
|
||||
}}>
|
||||
<Text style={{color: "#fff", fontWeight: 'bold'}}>Logout</Text>
|
||||
|
||||
</TouchableOpacity>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
|
||||
</View>
|
||||
<Image source={this.state.avatarSource} />
|
||||
|
||||
)
|
||||
}
|
||||
<View style={styles.userBio}>
|
||||
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo}>Nome</Text>
|
||||
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
onChangeText={n => {
|
||||
this.setState({ name: n });
|
||||
}}
|
||||
value={this.state.name}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo}>Curso</Text>
|
||||
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
onChangeText={cu => {
|
||||
this.setState({ curso: cu });
|
||||
}}
|
||||
value={this.state.curso}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo}>Faculdade</Text>
|
||||
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
onChangeText={job => {
|
||||
this.setState({ jobs: job });
|
||||
}}
|
||||
value={this.state.jobs}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo}>Telemóvel</Text>
|
||||
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
onChangeText={phone => {
|
||||
this.setState({ phone: phone });
|
||||
}}
|
||||
value={this.state.phone}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo}>Morada</Text>
|
||||
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
onChangeText={add => {
|
||||
this.setState({ address: add });
|
||||
}}
|
||||
value={this.state.address}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userBioLogo}>LinkedIn</Text>
|
||||
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
onChangeText={u => {
|
||||
this.setState({ url: u });
|
||||
}}
|
||||
value={this.state.url}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Button
|
||||
onPress={() => this.saveData()}
|
||||
title="Guardar Alterações"
|
||||
color="#CC1A17"
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/*PassWord Edit*/}
|
||||
<View style={styles.container}>
|
||||
<View style={styles.userBioRowHeader}>
|
||||
<View style={styles.userBioRowTitle}>
|
||||
<Text
|
||||
style={{ color: "#CC1A17", fontWeight: "bold", fontSize: 20 }}
|
||||
>
|
||||
Alterar Password
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.userBio}>
|
||||
<View style={styles.userBioRow}>
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
placeholder="Antiga Password"
|
||||
onChangeText={old => {
|
||||
this.setState({ oldPass: old });
|
||||
}}
|
||||
value={this.state.oldPass}
|
||||
maxLength={20}
|
||||
secureTextEntry={true}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
placeholder="Nova Password"
|
||||
secureTextEntry={true}
|
||||
onChangeText={newz => {
|
||||
this.setState({ new1: newz });
|
||||
}}
|
||||
value={this.state.new1}
|
||||
maxLength={20}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<TextInput
|
||||
style={styles.userBioText}
|
||||
placeholder="Repetir Password"
|
||||
secureTextEntry={true}
|
||||
onChangeText={newzz => {
|
||||
this.setState({ new2: newzz });
|
||||
}}
|
||||
value={this.state.new2}
|
||||
maxLength={20}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Button
|
||||
onPress={this._press}
|
||||
title="Alterar Password"
|
||||
color="#CC1A17"
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<TouchableOpacity
|
||||
onPress={this._logout}
|
||||
style={{
|
||||
height: 50,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundColor: "black",
|
||||
marginTop: 30
|
||||
}}
|
||||
>
|
||||
<Text style={{ color: "#fff", fontWeight: "bold" }}>Logout</Text>
|
||||
</TouchableOpacity>
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
margin: 10,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 5
|
||||
},
|
||||
|
||||
container: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
margin: 10,
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 5,
|
||||
},
|
||||
userBioRowHeader: {
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
alignItems: "center"
|
||||
},
|
||||
|
||||
userBioRowHeader: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
userBioRowTitle: {
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
padding: 10
|
||||
},
|
||||
|
||||
userBioRowTitle: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
padding: 10,
|
||||
},
|
||||
userBioRow: {
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
padding: 10,
|
||||
// borderWidth: 2,
|
||||
alignItems: "center"
|
||||
},
|
||||
userBioText: {
|
||||
width: SCREEN_WIDTH * 0.4,
|
||||
flex: 2
|
||||
// borderWidth: 2,
|
||||
},
|
||||
|
||||
userBioRow: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
padding: 10,
|
||||
// borderWidth: 2,
|
||||
alignItems: 'center',
|
||||
|
||||
},
|
||||
userBioText: {
|
||||
width: SCREEN_WIDTH * 0.40,
|
||||
flex: 2,
|
||||
// borderWidth: 2,
|
||||
},
|
||||
|
||||
userPassText: {
|
||||
flex: 1,
|
||||
//alignSelf: 'flex-start',
|
||||
justifyContent: 'flex-end',
|
||||
borderWidth: 2,
|
||||
},
|
||||
|
||||
userBioLogo: {
|
||||
marginLeft: 10,
|
||||
width:80,
|
||||
},
|
||||
|
||||
bottomLogOut: {
|
||||
height: 20,
|
||||
},
|
||||
userPassText: {
|
||||
flex: 1,
|
||||
//alignSelf: 'flex-start',
|
||||
justifyContent: "flex-end",
|
||||
borderWidth: 2
|
||||
},
|
||||
|
||||
userBioLogo: {
|
||||
marginLeft: 10,
|
||||
width: 80
|
||||
},
|
||||
|
||||
bottomLogOut: {
|
||||
height: 20
|
||||
}
|
||||
});
|
||||
|
||||
mapStateToProps = (state, props) => {
|
||||
|
||||
return {
|
||||
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
onHold:state.apiReducer.onHold
|
||||
}
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
onHold: state.apiReducer.onHold
|
||||
};
|
||||
};
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Profile);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Profile);
|
||||
|
|
|
@ -32,9 +32,11 @@ import {RkButton,
|
|||
|
||||
onSuccess = (e) => {
|
||||
|
||||
this.setState({ isModalVisible: !this.state.isModalVisible ,isActive:false});
|
||||
|
||||
this.setState({code:e.data});
|
||||
this.props.scanQrCode({UserQR:this.props.user.Code, ScanQR: e.data},this.props.internalToken);
|
||||
|
||||
|
||||
};
|
||||
|
||||
state = {
|
||||
|
@ -63,17 +65,8 @@ import {RkButton,
|
|||
<View style={{flex: 1}}>
|
||||
|
||||
|
||||
<Modal
|
||||
onBackdropPress={this._activate}
|
||||
isVisible={this.state.isModalVisible} style={{backgroundColor:'#E8E8E8', borderRadius:3, marginTop: SCREEN_HEIGHT*0.2, marginBottom: SCREEN_HEIGHT*0.2}}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Text></Text>
|
||||
<Text> Qr code data: {this.state.code}</Text>
|
||||
<Button onPress={this._activate} title="Close" color="#841584" accessibilityLabel="Learn more about this purple button"/>
|
||||
|
||||
</View>
|
||||
</Modal>
|
||||
|
||||
|
||||
|
||||
{ this.state.isRender &&
|
||||
|
||||
<QRCodeScanner
|
||||
|
|
|
@ -11,7 +11,9 @@ import {
|
|||
ImageBackground,
|
||||
ListView,
|
||||
FlatList,
|
||||
ActivityIndicator
|
||||
ActivityIndicator,
|
||||
Linking,
|
||||
Platform
|
||||
} from "react-native";
|
||||
|
||||
import moment from "moment";
|
||||
|
@ -51,7 +53,7 @@ class calendarDetail extends React.Component {
|
|||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
// title={navigation.state.params.info.name}
|
||||
// title={navigation.state.params.info.name}
|
||||
/>
|
||||
)
|
||||
});
|
||||
|
@ -59,7 +61,7 @@ class calendarDetail extends React.Component {
|
|||
state = {};
|
||||
|
||||
componentDidMount() {
|
||||
this.props.getEvents(this.props.user);
|
||||
this.props.getEvents(this.props.user, this.props.careerPath);
|
||||
|
||||
const { navigation } = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
|
@ -82,30 +84,30 @@ class calendarDetail extends React.Component {
|
|||
const { navigation } = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
|
||||
if(this.props.sessionDetail==undefined){
|
||||
return(<View style={{flex:1, alignSelf:'center',margin:SCREEN_HEIGHT*0.45}}>
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
if (this.props.sessionDetail == undefined) {
|
||||
return (<View style={{ flex: 1, alignSelf: 'center', margin: SCREEN_HEIGHT * 0.45 }}>
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
</View>
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
info!=undefined &&
|
||||
info != undefined &&
|
||||
<View style={styles.mainViewStyle}>
|
||||
<ScrollView style={styles.scroll}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.headerContainer}>
|
||||
<View style={styles.headerContainer}>
|
||||
<View style={styles.coverContainer}>
|
||||
<ImageBackground
|
||||
source={{
|
||||
uri: `https://tickets.enei.pt/adminpoint/Content/Images/Uploads/Sessions/${this.props.sessionDetail.Image}`
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.headerContainer}>
|
||||
<View style={styles.coverContainer}>
|
||||
<ImageBackground
|
||||
source={{
|
||||
uri: `https://tickets.enei.pt/adminpoint/Content/Images/Uploads/Sessions/${this.props.sessionDetail.Image}`
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
|
@ -134,18 +136,18 @@ class calendarDetail extends React.Component {
|
|||
>
|
||||
{this.props.sessionDetail.Name}
|
||||
</Text>
|
||||
|
||||
|
||||
</View>
|
||||
|
||||
<View style={{ margin: 10 }}>
|
||||
{this.props.sessionDetail.Enrolled!= 0 && this.props.sessionDetail.MaxAttendees!=0 &&
|
||||
<Progress.Bar
|
||||
color={"#000000"}
|
||||
progress={this.props.sessionDetail.Enrolled / this.props.sessionDetail.MaxAttendees}
|
||||
height={10}
|
||||
unfilledColor={"white"}
|
||||
width={210}
|
||||
/>}
|
||||
{this.props.sessionDetail.Enrolled != 0 && this.props.sessionDetail.MaxAttendees != 0 &&
|
||||
<Progress.Bar
|
||||
color={"#000000"}
|
||||
progress={this.props.sessionDetail.Enrolled / this.props.sessionDetail.MaxAttendees}
|
||||
height={10}
|
||||
unfilledColor={"white"}
|
||||
width={210}
|
||||
/>}
|
||||
<Text>
|
||||
{this.props.sessionDetail.Enrolled} / {this.props.sessionDetail.MaxAttendees}
|
||||
</Text>
|
||||
|
@ -226,18 +228,38 @@ class calendarDetail extends React.Component {
|
|||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.block}>
|
||||
<Text
|
||||
style={{ fontSize: 15, color: "#CC1A17", fontWeight: "bold" }}
|
||||
>
|
||||
Localização
|
||||
{
|
||||
this.props.sessionDetail.LocalRoom != undefined && this.props.sessionDetail.LocalCoordinates != undefined &&
|
||||
|
||||
<View style={styles.block}>
|
||||
<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 }}
|
||||
/>
|
||||
</View>
|
||||
<Divider style={{ backgroundColor: "#000", marginBottom: 10 }} />
|
||||
<Text style={{marginBottom:20}}>{this.props.sessionDetail.LocalRoom}</Text>
|
||||
<Button
|
||||
onPress={() => {
|
||||
|
||||
const scheme = Platform.select({
|
||||
ios: "maps:0,0?q=",
|
||||
android: "geo:0,0?q="
|
||||
});
|
||||
const latLng = this.props.sessionDetail.LocalCoordinates;
|
||||
const label = this.props.sessionDetail.LocalRoom;
|
||||
const url = Platform.select({
|
||||
ios: `${scheme}${label}@${latLng}`,
|
||||
android: `${scheme}${latLng}(${label})`
|
||||
});
|
||||
|
||||
Linking.openURL(url);
|
||||
}}
|
||||
title={"Abrir no Mapa"}
|
||||
color={"#CC1A17"}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
</ScrollView>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
</View>
|
||||
|
|
|
@ -53,7 +53,6 @@ class eventDetail extends React.Component {
|
|||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
// title={navigation.state.params.info.name}
|
||||
/>
|
||||
)
|
||||
});
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
import React, {Component} from 'react';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
AsyncStorage,
|
||||
Button,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import {UtilStyles} from '../assets/styles'
|
||||
|
||||
export default class resetPassword extends Component {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this._bootstrapAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Render Loading
|
||||
render() {
|
||||
return (
|
||||
<View style={UtilStyles.containerLoading}>
|
||||
<Text>Reset Password</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -56,6 +56,7 @@ class teamDetail extends React.Component {
|
|||
|
||||
return (
|
||||
<PTRView onRefresh={this._update}>
|
||||
{this.props.team!= undefined &&
|
||||
<ScrollView style={{ backgroundColor: "#eeeeee" }}>
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
|
@ -88,10 +89,12 @@ class teamDetail extends React.Component {
|
|||
margin: 10,
|
||||
padding: 10,
|
||||
borderRadius: 3,
|
||||
fontSize: 15
|
||||
fontSize: 15,
|
||||
|
||||
}}
|
||||
onChangeText={n => this.setState({ nome: n })}
|
||||
value={this.state.nome}
|
||||
maxLength = {30}
|
||||
/>
|
||||
</View>
|
||||
|
||||
|
@ -103,6 +106,14 @@ class teamDetail extends React.Component {
|
|||
alignContent: "center",
|
||||
alignItems: "center"
|
||||
}}
|
||||
onPress={()=>{
|
||||
this.props.changeTeamName(this.props.internalToken, {
|
||||
TeamID:this.props.team.id,
|
||||
nome:this.state.nome,
|
||||
UserQR:this.props.user.Code,
|
||||
})
|
||||
|
||||
}}
|
||||
>
|
||||
<Text>Guardar</Text>
|
||||
<IconFA name="user-edit" size={22} />
|
||||
|
@ -110,12 +121,12 @@ class teamDetail extends React.Component {
|
|||
</View>
|
||||
)}
|
||||
{this.props.user.Code != this.props.team.cap.qRcode && (
|
||||
<View width={{ width: "100%", padding: 10 }}>
|
||||
<View style={{ width: "100%", padding: 10 }}>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 22,
|
||||
fontWeight: "bold",
|
||||
color: "#CC1A17",
|
||||
color: "white",
|
||||
textAlign: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
|
@ -152,13 +163,6 @@ class teamDetail extends React.Component {
|
|||
style={{ width: 50, height: 50 }}
|
||||
source={require("../assets/logo_black.jpg")}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
color: "#000"
|
||||
}}
|
||||
>
|
||||
{item.fullName}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
|
@ -245,6 +249,7 @@ class teamDetail extends React.Component {
|
|||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
}
|
||||
</PTRView>
|
||||
);
|
||||
}
|
||||
|
@ -367,4 +372,4 @@ function mapDispatchToProps(dispatch) {
|
|||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(teamDetail);
|
||||
)(teamDetail);
|
|
@ -34,6 +34,7 @@ import {
|
|||
LOGIN_INTERNAL,
|
||||
CHANGE_PASSWORD
|
||||
} from "./actionTypes"; //Import the actions types constant we defined in our actions
|
||||
var validator = require("email-validator");
|
||||
|
||||
import moment from "moment";
|
||||
|
||||
|
@ -59,8 +60,8 @@ export function scanQrCode(data, tokenInternal) {
|
|||
axios
|
||||
.post("/api/Scan", data)
|
||||
.then(a => {
|
||||
console.log(a.data);
|
||||
Alert.alert("SUCESSO!", a.data);
|
||||
|
||||
Alert.alert("SUCESSO!", "Cromo adicionado com sucesso!");
|
||||
dispatch({
|
||||
type: SCAN_QR
|
||||
});
|
||||
|
@ -72,13 +73,50 @@ export function scanQrCode(data, tokenInternal) {
|
|||
};
|
||||
}
|
||||
|
||||
export function changeTeamName(){
|
||||
export function changeTeamName(tokenInternal, team) {
|
||||
|
||||
axios.defaults.headers.common = {
|
||||
Authorization: `bearer ${tokenInternal}`
|
||||
};
|
||||
axios.defaults.baseURL = "https://api.enei.pt/api";
|
||||
return dispatch => {
|
||||
axios.post('/Teams/changename', team).then(p => {
|
||||
console.log(p);
|
||||
Alert.alert("Sucesso!!", "Nome alterado com sucesso");
|
||||
axios.defaults.baseURL = "https://api.enei.pt/api";
|
||||
axios.defaults.headers.common = {
|
||||
Authorization: `bearer ${tokenInternal}`
|
||||
};
|
||||
console.log("Token: ")
|
||||
console.log(tokenInternal)
|
||||
axios
|
||||
.get(`/Teams/u/${team.UserQR}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
console.log("cenas aqui")
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: OPEN_MODAL
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
Alert.alert("ERRO!", "Ocorreu um erro a alterar o nome da equipa")
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
export function getEventLocsVisited(teamId, tokenInternal) {
|
||||
axios.defaults.headers.common = {
|
||||
|
@ -91,7 +129,7 @@ export function getEventLocsVisited(teamId, tokenInternal) {
|
|||
axios
|
||||
.get(`/EventLocsVisited/t/${teamId}`)
|
||||
.then(a => {
|
||||
|
||||
|
||||
dispatch({
|
||||
type: GET_LOCS_VISITED,
|
||||
locais: a.data
|
||||
|
@ -99,7 +137,7 @@ export function getEventLocsVisited(teamId, tokenInternal) {
|
|||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
// Alert.alert("ERRO!", "erro a obter os locais visitados");
|
||||
// Alert.alert("ERRO!", "erro a obter os locais visitados");
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -144,26 +182,26 @@ export function deleteTeam(data, tokenInternal) {
|
|||
console.log(a.data);
|
||||
Alert.alert("SUCESSO!", "A equipa foi removida com sucesso");
|
||||
axios
|
||||
.get(`/api/Teams/u/${data.UserQr}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: "none"
|
||||
});
|
||||
});
|
||||
.get(`/api/Teams/u/${data.UserQr}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: "none"
|
||||
});
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: OPEN_MODAL
|
||||
});
|
||||
dispatch({
|
||||
type: OPEN_MODAL
|
||||
});
|
||||
dispatch({
|
||||
type: DELETE_TEAM
|
||||
});
|
||||
|
@ -175,7 +213,7 @@ export function deleteTeam(data, tokenInternal) {
|
|||
};
|
||||
}
|
||||
|
||||
export function createTeam(team, tokenInternal,user) {
|
||||
export function createTeam(team, tokenInternal, user) {
|
||||
axios.defaults.baseURL = "https://api.enei.pt";
|
||||
axios.defaults.headers.common = {
|
||||
Authorization: `bearer ${tokenInternal}`
|
||||
|
@ -188,26 +226,26 @@ export function createTeam(team, tokenInternal,user) {
|
|||
console.log(a.data);
|
||||
Alert.alert("SUCESSO!", "A equipa foi criada com sucesso");
|
||||
axios
|
||||
.get(`/api/Teams/u/${user.Code}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: "none"
|
||||
});
|
||||
});
|
||||
.get(`/api/Teams/u/${user.Code}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: "none"
|
||||
});
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: OPEN_MODAL
|
||||
});
|
||||
dispatch({
|
||||
type: OPEN_MODAL
|
||||
});
|
||||
dispatch({
|
||||
type: CREATE_TEAM
|
||||
});
|
||||
|
@ -262,24 +300,24 @@ export function removeUserTeam(data, tokenInternal) {
|
|||
console.log(a.data);
|
||||
Alert.alert("Sucesso!", "Elemento removido com sucesso!!");
|
||||
axios
|
||||
.get(`/api/Teams/u/${data.UserQR}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: "none"
|
||||
});
|
||||
});
|
||||
.get(`/api/Teams/u/${data.UserQR}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: "none"
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
.catch(p => {
|
||||
|
@ -293,7 +331,7 @@ export function removeUserTeam(data, tokenInternal) {
|
|||
};
|
||||
}
|
||||
|
||||
export function addUserTeam(data, tokenInternal,user) {
|
||||
export function addUserTeam(data, tokenInternal, user) {
|
||||
axios.defaults.headers.common = {
|
||||
Authorization: `bearer ${tokenInternal}`
|
||||
};
|
||||
|
@ -306,25 +344,25 @@ export function addUserTeam(data, tokenInternal,user) {
|
|||
console.log("sucesso!");
|
||||
console.log(a.data);
|
||||
Alert.alert("Sucesso!", "Elemento adicionado com sucesso!!");
|
||||
|
||||
|
||||
}
|
||||
axios
|
||||
.get(`/api/Teams/u/${user.Code}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
//team: "none"
|
||||
});
|
||||
});
|
||||
.get(`/api/Teams/u/${user.Code}`)
|
||||
.then(a => {
|
||||
console.log("sucesso!");
|
||||
console.log(a);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
//team: "none"
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
|
@ -335,7 +373,7 @@ export function addUserTeam(data, tokenInternal,user) {
|
|||
type: OPEN_MODAL
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
export function getUserTeam(user, tokenInternal) {
|
||||
|
@ -354,7 +392,7 @@ export function getUserTeam(user, tokenInternal) {
|
|||
type: GET_TEAM,
|
||||
team: a.data
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
|
@ -378,8 +416,8 @@ export function waitLogin() {
|
|||
};
|
||||
}
|
||||
|
||||
var getEAsync = function(user, careerPath, token) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var getEAsync = function (user, careerPath, token) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
console.log("career path: ");
|
||||
var cenas = [];
|
||||
let events = [];
|
||||
|
@ -397,7 +435,7 @@ var getEAsync = function(user, careerPath, token) {
|
|||
};
|
||||
axios
|
||||
.get("/Attendee/AvailableSessions")
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
// handle success
|
||||
console.log("available");
|
||||
console.log(response);
|
||||
|
@ -535,16 +573,16 @@ var getEAsync = function(user, careerPath, token) {
|
|||
day: result["15"][key].day
|
||||
});
|
||||
}
|
||||
a = _.sortBy(a, function(o) {
|
||||
a = _.sortBy(a, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
b = _.sortBy(b, function(o) {
|
||||
b = _.sortBy(b, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
c = _.sortBy(c, function(o) {
|
||||
c = _.sortBy(c, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
d = _.sortBy(d, function(o) {
|
||||
d = _.sortBy(d, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
|
||||
|
@ -563,7 +601,7 @@ var getEAsync = function(user, careerPath, token) {
|
|||
al: alojamento
|
||||
};
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
alert("Error a obter sessões disponíveis!!");
|
||||
console.log(error);
|
||||
});
|
||||
|
@ -574,8 +612,8 @@ var getEAsync = function(user, careerPath, token) {
|
|||
});
|
||||
};
|
||||
|
||||
var checkAndRefresh = function(token) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var checkAndRefresh = function (token) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
//verificar se já expirou a validade do token
|
||||
if (token == undefined || token.access_token == undefined) {
|
||||
reject("user logged out");
|
||||
|
@ -632,7 +670,7 @@ var checkAndRefresh = function(token) {
|
|||
access_token: parsed.access_token,
|
||||
refresh_token: parsed.refresh_token,
|
||||
expirationDateToken:
|
||||
Math.round(new Date().getTime() / 1000) + 3598
|
||||
Math.round(new Date().getTime() / 1000) + (parsed.expires_in - 2)
|
||||
};
|
||||
|
||||
console.log(parsed);
|
||||
|
@ -642,12 +680,12 @@ var checkAndRefresh = function(token) {
|
|||
} else {
|
||||
console.log(
|
||||
"Tempo restante token: " +
|
||||
Math.round(
|
||||
(token.expirationDateToken -
|
||||
Math.round(new Date().getTime() / 1000)) /
|
||||
60
|
||||
) +
|
||||
" Minutos"
|
||||
Math.round(
|
||||
(token.expirationDateToken -
|
||||
Math.round(new Date().getTime() / 1000)) /
|
||||
60
|
||||
) +
|
||||
" Minutos"
|
||||
);
|
||||
resolve(token);
|
||||
}
|
||||
|
@ -830,28 +868,28 @@ function getCareerPath(sessions) {
|
|||
code = "IA";
|
||||
}
|
||||
if (sessions[key].Name == "IOT") {
|
||||
careerPath = "Internet of Things";
|
||||
careerColor = "green";
|
||||
careerPath = "Internet of things";
|
||||
careerColor = "#4B266A";
|
||||
code = "IOT";
|
||||
}
|
||||
if (sessions[key].Name == "WEB") {
|
||||
careerPath = "Web Development";
|
||||
careerColor = "purple";
|
||||
careerPath = "Web development";
|
||||
careerColor = "#FBB81B";
|
||||
code = "WEB";
|
||||
}
|
||||
if (sessions[key].Name == "NET") {
|
||||
careerPath = "Networking and Security";
|
||||
careerColor = "blue";
|
||||
careerColor = "#055CA0";
|
||||
code = "NET";
|
||||
}
|
||||
if (sessions[key].Name == "MOB") {
|
||||
careerPath = "Mobile Development";
|
||||
careerColor = "orange";
|
||||
careerColor = "#0B7D3C";
|
||||
code = "MOB";
|
||||
}
|
||||
if (sessions[key].Name == "DS") {
|
||||
careerPath = "Data Science";
|
||||
careerColor = "yellow";
|
||||
careerColor = "#ED6B33";
|
||||
code = "DS";
|
||||
}
|
||||
}
|
||||
|
@ -901,7 +939,7 @@ export function removeSession(user, token, idSession) {
|
|||
axios
|
||||
.get("/Attendee/AvailableSessions")
|
||||
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
console.log(response);
|
||||
|
||||
var sessions = response.data;
|
||||
|
@ -940,7 +978,7 @@ export function removeSession(user, token, idSession) {
|
|||
getEvents(user, careerPath, token);
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
alert("Erro a obter sessões disponíveis!!");
|
||||
|
||||
console.log(error);
|
||||
|
@ -994,7 +1032,7 @@ export function signSession(user, token, idSession) {
|
|||
axios
|
||||
.get("/Attendee/AvailableSessions")
|
||||
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
console.log(response);
|
||||
|
||||
var sessions = response.data;
|
||||
|
@ -1039,7 +1077,7 @@ export function signSession(user, token, idSession) {
|
|||
});
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
|
@ -1079,7 +1117,7 @@ export function getSessions(token) {
|
|||
|
||||
axios
|
||||
.get("/Attendee/AvailableSessions")
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
var sessions = response.data;
|
||||
|
||||
var careerPath = getCareerPath(sessions);
|
||||
|
@ -1106,7 +1144,7 @@ export function getSessions(token) {
|
|||
//guests: response.data
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
alert("Error a obter sessões disponíveis!!");
|
||||
console.log(error);
|
||||
});
|
||||
|
@ -1130,7 +1168,7 @@ export function getAvailableGuestlists(token) {
|
|||
};
|
||||
axios
|
||||
.get("/Attendee/AvailableGuestlists")
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
// handle success
|
||||
console.log(response);
|
||||
dispatch({
|
||||
|
@ -1139,11 +1177,11 @@ export function getAvailableGuestlists(token) {
|
|||
token: newToken
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
// handle error
|
||||
console.log(error);
|
||||
})
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
// always executed
|
||||
});
|
||||
})
|
||||
|
@ -1167,6 +1205,7 @@ export function getAvailableGuestlists(token) {
|
|||
*/
|
||||
export function changeGuestList(token, guestID) {
|
||||
axios.defaults.baseURL = "https://tickets.enei.pt/internal/api";
|
||||
console.log("Guest ID: " + guestID)
|
||||
return dispatch => {
|
||||
checkAndRefresh(token)
|
||||
.then(newToken => {
|
||||
|
@ -1178,15 +1217,15 @@ export function changeGuestList(token, guestID) {
|
|||
|
||||
axios
|
||||
.get(full)
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
axios
|
||||
.get("/Attendee/AvailableSessions")
|
||||
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
// handle success
|
||||
|
||||
//console.log(response);
|
||||
|
||||
console.log("SUcesso a trocar para :" + guestID)
|
||||
var cenas = [];
|
||||
c = getCareerPath(response.data);
|
||||
const result = flow(
|
||||
|
@ -1212,18 +1251,18 @@ export function changeGuestList(token, guestID) {
|
|||
//guests: response.data
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
alert("Error a obter sessões disponíveis!!");
|
||||
console.log(error);
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
// handle error
|
||||
console.log(response);
|
||||
console.log(error);
|
||||
alert("Erro a mudar de career path");
|
||||
})
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
// always executed
|
||||
});
|
||||
})
|
||||
|
@ -1266,7 +1305,7 @@ export function getAvailableSessions(token) {
|
|||
};
|
||||
axios
|
||||
.get("/Attendee/AvailableSessions")
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
// handle success
|
||||
console.log(response);
|
||||
|
||||
|
@ -1285,7 +1324,7 @@ export function getAvailableSessions(token) {
|
|||
token: newToken
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
alert("Error a obter sessões disponíveis!!");
|
||||
console.log(error);
|
||||
});
|
||||
|
@ -1374,35 +1413,157 @@ function getE(user, careerPath, token) {
|
|||
d = [];
|
||||
|
||||
//MEU DEUS QUE É ISTO???
|
||||
if (careerPath != undefined && careerPath.code =="IA") {
|
||||
if (careerPath != undefined && careerPath.code == "IA" || careerPath.code == "WEB") {
|
||||
b.push({
|
||||
Id: 22,
|
||||
time: "13:30",
|
||||
description: "Almoço para os career path's de IA e WEB",
|
||||
day: "13",
|
||||
name: "Almoço",
|
||||
place: "Cantina do ISEC"
|
||||
})
|
||||
c.push({
|
||||
Id: 22,
|
||||
time: "13:30",
|
||||
description: "Almoço para os career path's de IA e WEB",
|
||||
day: "14",
|
||||
name: "Almoço",
|
||||
place: "Cantina do ISEC"
|
||||
})
|
||||
d.push({
|
||||
Id: 22,
|
||||
time: "13:30",
|
||||
description: "Almoço para os career path's de IA e WEB",
|
||||
day: "15",
|
||||
name: "Almoço",
|
||||
place: "Cantina do ISEC"
|
||||
})
|
||||
a.push({
|
||||
Id: 22,
|
||||
time: "19:00",
|
||||
description: "Jantar para os career path's de IA",
|
||||
description: "Jantar para os career path's de IA e WEB",
|
||||
day: "12",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
b.push({
|
||||
Id: 22,
|
||||
time: "19:00",
|
||||
description: "Jantar para os career path's de IA e WEB",
|
||||
day: "13",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
c.push({
|
||||
Id: 22,
|
||||
time: "19:00",
|
||||
description: "Jantar para os career path's de IA e WEB",
|
||||
day: "14",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
}
|
||||
if (careerPath != undefined && careerPath.code =="IOT") {
|
||||
if (careerPath != undefined && careerPath.code == "IOT" || careerPath.code == "NET") {
|
||||
b.push({
|
||||
Id: 22,
|
||||
time: "12:15",
|
||||
description: "Almoço para os career path's de IOT e NET",
|
||||
day: "13",
|
||||
name: "Almoço",
|
||||
place: "Cantina do ISEC"
|
||||
})
|
||||
c.push({
|
||||
Id: 22,
|
||||
time: "12:15",
|
||||
description: "Almoço para os career path's de IOT e NET",
|
||||
day: "14",
|
||||
name: "Almoço",
|
||||
place: "Cantina do ISEC"
|
||||
})
|
||||
d.push({
|
||||
Id: 22,
|
||||
time: "12:15",
|
||||
description: "Almoço para os career path's de IOT e NET",
|
||||
day: "15",
|
||||
name: "Almoço",
|
||||
place: "Cantina do ISEC"
|
||||
})
|
||||
a.push({
|
||||
Id: 22,
|
||||
time: "19:30",
|
||||
description: "Jantar ",
|
||||
description: "Jantar para os career path's de IOT e NET ",
|
||||
day: "12",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
b.push({
|
||||
Id: 22,
|
||||
time: "19:30",
|
||||
description: "Jantar para os career path's de IOT e NET",
|
||||
day: "13",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
c.push({
|
||||
Id: 22,
|
||||
time: "19:30",
|
||||
description: "Jantar para os career path de IOT e NET",
|
||||
day: "14",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
}
|
||||
if (careerPath != undefined && careerPath.code =="NET") {
|
||||
if (careerPath != undefined && careerPath.code == "DS" || careerPath.code == "MOB") {
|
||||
b.push({
|
||||
Id: 22,
|
||||
time: "12:45",
|
||||
description: "Almoço para os career paths de DS e MOB ",
|
||||
day: "13",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
c.push({
|
||||
Id: 22,
|
||||
time: "12:45",
|
||||
description: "Almoço para os career paths de DS e MOB ",
|
||||
day: "13",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
d.push({
|
||||
Id: 22,
|
||||
time: "12:45",
|
||||
description: "Almoço para os career paths de DS e MOB ",
|
||||
day: "13",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
a.push({
|
||||
Id: 22,
|
||||
time: "20:00",
|
||||
description: "Jantar ",
|
||||
description: "Jantar para os career paths de DS e MOB ",
|
||||
day: "12",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
b.push({
|
||||
Id: 22,
|
||||
time: "20:00",
|
||||
description: "Jantar para os career paths de DS e MOB ",
|
||||
day: "13",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
c.push({
|
||||
Id: 22,
|
||||
time: "20:00",
|
||||
description: "Jantar para os career paths de DS e MOB ",
|
||||
day: "14",
|
||||
name: "Jantar",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
a.push({
|
||||
Id: 48,
|
||||
time: "21:00",
|
||||
|
@ -1429,9 +1590,9 @@ function getE(user, careerPath, token) {
|
|||
Id: 46,
|
||||
time: "17:30",
|
||||
description:
|
||||
"Sessão de boas vindas ao ENEI'19. Esta sessão conta com a presença do grupo de fados",
|
||||
"A sessão de abertura vai-se realizar no nosso auditório principal. Poderás ver a apresentação das várias atividades que irão decorrer no evento.",
|
||||
name: "Sessão de Abertura",
|
||||
|
||||
|
||||
Enrolled: 700,
|
||||
MaxAttendees: 300,
|
||||
day: "12",
|
||||
|
@ -1439,7 +1600,7 @@ function getE(user, careerPath, token) {
|
|||
});
|
||||
b.push({
|
||||
Id: 49,
|
||||
time: "8:00",
|
||||
time: "08:00",
|
||||
description:
|
||||
"Pronto para começar o dia em grande? Vem tomar o pequeno-almoço!",
|
||||
Enrolled: 700,
|
||||
|
@ -1448,6 +1609,39 @@ function getE(user, careerPath, token) {
|
|||
day: "13",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
c.push({
|
||||
Id: 49,
|
||||
time: "08:00",
|
||||
description:
|
||||
"Pronto para começar o dia em grande? Vem tomar o pequeno-almoço!",
|
||||
Enrolled: 700,
|
||||
MaxAttendees: 300,
|
||||
name: "Pequeno-Almoço",
|
||||
day: "13",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
d.push({
|
||||
Id: 49,
|
||||
time: "08:00",
|
||||
description:
|
||||
"Pronto para começar o dia em grande? Vem tomar o pequeno-almoço!",
|
||||
Enrolled: 700,
|
||||
MaxAttendees: 300,
|
||||
name: "Pequeno-Almoço",
|
||||
day: "13",
|
||||
place: "Cantina do ISEC"
|
||||
});
|
||||
c.push({
|
||||
Id: 95,
|
||||
time: "20:00",
|
||||
description:
|
||||
"Queres ficar a conhecer pessoalmente algumas das empresas líderes de mercado na área de informática? Então o jantar empresarial é a oportunidade perfeita para ti! Manda-nos o teu CV e habilita-te a ganhar um jantar no hotel Quinta das Lágrimas acompanhado pelas tuas empresas favoritas.",
|
||||
Enrolled: 700,
|
||||
MaxAttendees: 300,
|
||||
name: "Jantar Empresarial",
|
||||
day: "14",
|
||||
place: "Hotel Quinta das Lágrimas"
|
||||
});
|
||||
for (let key in result["12"]) {
|
||||
a.push({
|
||||
Id: result["12"][key].Id,
|
||||
|
@ -1459,7 +1653,7 @@ function getE(user, careerPath, token) {
|
|||
Enrolled: result["12"][key].Enrolled,
|
||||
MaxAttendees: result["12"][key].MaxAttendees,
|
||||
day: result["12"][key].day,
|
||||
place:""
|
||||
place: ""
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1474,7 +1668,7 @@ function getE(user, careerPath, token) {
|
|||
Enrolled: result["13"][key].Enrolled,
|
||||
MaxAttendees: result["13"][key].MaxAttendees,
|
||||
day: result["13"][key].day,
|
||||
place:""
|
||||
place: ""
|
||||
});
|
||||
}
|
||||
for (let key in result["14"]) {
|
||||
|
@ -1488,7 +1682,7 @@ function getE(user, careerPath, token) {
|
|||
Enrolled: result["14"][key].Enrolled,
|
||||
MaxAttendees: result["14"][key].MaxAttendees,
|
||||
day: result["14"][key].day,
|
||||
place:""
|
||||
place: ""
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1506,16 +1700,16 @@ function getE(user, careerPath, token) {
|
|||
place: ""
|
||||
});
|
||||
}
|
||||
a = _.sortBy(a, function(o) {
|
||||
a = _.sortBy(a, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
b = _.sortBy(b, function(o) {
|
||||
b = _.sortBy(b, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
c = _.sortBy(c, function(o) {
|
||||
c = _.sortBy(c, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
d = _.sortBy(d, function(o) {
|
||||
d = _.sortBy(d, function (o) {
|
||||
return o.time;
|
||||
});
|
||||
|
||||
|
@ -1549,6 +1743,36 @@ export function getEvents(user, careerPath, token) {
|
|||
};
|
||||
}
|
||||
|
||||
export function resetPassword(token, password) {
|
||||
var type = 0;
|
||||
axios.defaults.baseURL = "https://tickets.enei.pt/internal/api";
|
||||
|
||||
if (validator.validate(password)) {
|
||||
|
||||
type = 0 //
|
||||
|
||||
} else {
|
||||
|
||||
type = 1;
|
||||
|
||||
}
|
||||
|
||||
var type;
|
||||
|
||||
return dispatch => {
|
||||
axios
|
||||
.get(`/User/RecoverPassword?input=${password}+&type=${type}`)
|
||||
.then(function (response) {
|
||||
|
||||
Alert.alert("Sucesso!", "Foi enviado um email com o pedido de recuperação.");
|
||||
})
|
||||
.catch(() => {
|
||||
Alert.alert("Error!!", "Ocorreu um erro.")
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export function login(user, pass) {
|
||||
return dispatch => {
|
||||
console.log("user: " + user + " password: " + pass);
|
||||
|
@ -1581,21 +1805,25 @@ export function login(user, pass) {
|
|||
body: formBody
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
alert("Erro no login!!");
|
||||
|
||||
alert("error");
|
||||
co;
|
||||
|
||||
Alert.alert("Erro", "Não foi possível conectar ao servidor. Verifique se possui conexão à internet e tente novamente." );
|
||||
dispatch({
|
||||
type: API_LOGIN,
|
||||
logged: false,
|
||||
failedAttempt: true,
|
||||
tokenData: "error",
|
||||
user: { Name: "" }
|
||||
loadingLogin: false,
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("error");
|
||||
dispatch({
|
||||
type: API_LOGIN,
|
||||
logged: false,
|
||||
failedAttempt: true,
|
||||
tokenData: "error",
|
||||
loadingLogin: false,
|
||||
});
|
||||
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(parsed => {
|
||||
|
@ -1620,9 +1848,10 @@ export function login(user, pass) {
|
|||
});
|
||||
return;
|
||||
} else {
|
||||
console.log(parsed)
|
||||
var obj = {
|
||||
access_token: parsed.access_token,
|
||||
expirationDateToken: Math.round(new Date().getTime() / 1000) + 3598,
|
||||
expirationDateToken: Math.round(new Date().getTime() / 1000) + (parsed.expires_in - 2),
|
||||
refresh_token: parsed.refresh_token,
|
||||
valid: true
|
||||
};
|
||||
|
@ -1640,6 +1869,15 @@ export function login(user, pass) {
|
|||
userDetails: details
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err=>{
|
||||
dispatch({
|
||||
type: API_LOGIN,
|
||||
logged: false,
|
||||
failedAttempt: true,
|
||||
tokenData: "error",
|
||||
loadingLogin: false,
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -1667,7 +1905,7 @@ export function getUserInfo(token) {
|
|||
};
|
||||
|
||||
fetch("https://tickets.enei.pt/internal/api/Attendee/Detail", obj)
|
||||
.then(function(res) {
|
||||
.then(function (res) {
|
||||
let obj = JSON.parse(res._bodyText);
|
||||
console.log(obj);
|
||||
axios.defaults.baseURL = "https://api.enei.pt";
|
||||
|
@ -1687,7 +1925,7 @@ export function getUserInfo(token) {
|
|||
Authorization: `bearer ${a.data.token}`
|
||||
};
|
||||
|
||||
axios.defaults.baseURL = "https://api.enei.pt";
|
||||
axios.defaults.baseURL = "https://api.enei.pt";
|
||||
|
||||
axios.get(`/api/Teams/u/${obj.Code}`).then(v => {
|
||||
|
||||
|
@ -1698,26 +1936,26 @@ export function getUserInfo(token) {
|
|||
Authorization: `bearer ${a.data.token}`
|
||||
};
|
||||
axios.defaults.baseURL = "https://api.enei.pt";
|
||||
|
||||
|
||||
axios
|
||||
.get(`api/EventLocsVisited/t/${v.data.id}`)
|
||||
.then(c => {
|
||||
.get(`api / EventLocsVisited / t / ${v.data.id}`)
|
||||
.then(c => {
|
||||
|
||||
console.log("sucesso!");
|
||||
console.log("sucesso!");
|
||||
|
||||
console.log(c);
|
||||
|
||||
dispatch({
|
||||
type: GET_LOCS_VISITED,
|
||||
locais: c.data
|
||||
console.log(c);
|
||||
|
||||
dispatch({
|
||||
type: GET_LOCS_VISITED,
|
||||
locais: c.data
|
||||
});
|
||||
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
// Alert.alert("ERRO!", "erro a obter os locais visitados");
|
||||
});
|
||||
|
||||
})
|
||||
.catch(p => {
|
||||
console.log(p);
|
||||
// Alert.alert("ERRO!", "erro a obter os locais visitados");
|
||||
});
|
||||
|
||||
|
||||
dispatch({
|
||||
type: GET_TEAM,
|
||||
team: v.data
|
||||
|
@ -1760,7 +1998,7 @@ export function getUserInfo(token) {
|
|||
token: newToken
|
||||
});
|
||||
})
|
||||
.catch(function(res) {
|
||||
.catch(function (res) {
|
||||
console.log("erro");
|
||||
// dispatch({ type: USER_INFO,onHold:false});
|
||||
alert("Erro a obter a informação pessoal.");
|
||||
|
|
|
@ -29,7 +29,8 @@ export {checkUser,
|
|||
deleteTeam,
|
||||
getCromos,
|
||||
getEventLocsVisited,
|
||||
scanQrCode
|
||||
scanQrCode,
|
||||
changeTeamName
|
||||
|
||||
} from "./api"
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ let apiState = {
|
|||
sessions: {},
|
||||
Blocks: {},
|
||||
onHoldBlocks: true,
|
||||
careerPath: { name: "Sem Career Path", color: "#eeeeee" },
|
||||
careerPath: { name: "Sem Career Path", color: "#eeeeee" , code:''},
|
||||
a: {},
|
||||
b: {},
|
||||
c: {},
|
||||
|
@ -121,7 +121,8 @@ const apiReducer = (state = apiState, action) => {
|
|||
internalToken:"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIxIiwidW5pcXVlX25hbWUiOiJjZW5hIiwicm9sZSI6IkFkbWluIiwibmJmIjoxNTUyODcwODcwLCJleHAiOjE1NTU0NTkyNzAsImlhdCI6MTU1Mjg3MDg3MH0.wkBk-CUDMCaU-K9jI0pTRJ794IGCl-C9md39dMfHqa5zTf-gNpD76xEYea3PhIbW2dnUVgo0m1fxR1sW7k9LMg",
|
||||
cromos: action.payload.apiReducer.cromos,
|
||||
careerPath: action.payload.apiReducer.careerPath,
|
||||
locais: action.payload.apiReducer.locais
|
||||
locais: action.payload.apiReducer.locais,
|
||||
Blocks: action.payload.apiReducer.Blocks
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -171,13 +172,8 @@ const apiReducer = (state = apiState, action) => {
|
|||
//token:action.token,
|
||||
failedAttempt: action.failedAttempt,
|
||||
user: action.user,
|
||||
userDetails: {
|
||||
token: action.token,
|
||||
username: action.userDetails.username,
|
||||
password: action.userDetails.password
|
||||
},
|
||||
loadingLogin: false,
|
||||
onHold: action.onHold,
|
||||
onHold: false,
|
||||
token: action.token
|
||||
});
|
||||
|
||||
|
|
|
@ -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 */; };
|
||||
|
@ -61,9 +62,6 @@
|
|||
BE5EAC3A221B83CF00E92E5B /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BE302B75221B7C3B005626CF /* Ionicons.ttf */; };
|
||||
BE5EAC41221B889900E92E5B /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE5EAC40221B888C00E92E5B /* libReactNativePermissions.a */; };
|
||||
E677346A94D54E90817979B0 /* libRNDeviceInfo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */; };
|
||||
95BB560D0FBE4259815182B3 /* libimageCropPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE0E611CE9446B8B39E61E /* libimageCropPicker.a */; };
|
||||
C4424512325C419A8C59B9B1 /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 75426ED753E94FDF955E27D9 /* libRNImagePicker.a */; };
|
||||
36323C84F40A4AD98ED24867 /* libRNNetworkInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F17AA23BABD64924A34416D0 /* libRNNetworkInfo.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -467,12 +465,6 @@
|
|||
C00CE8A4E3B747F9816B91CF /* libBVLinearGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBVLinearGradient.a; sourceTree = "<group>"; };
|
||||
C0906CC582484A7393F9B1F6 /* libAirMaps.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libAirMaps.a; sourceTree = "<group>"; };
|
||||
EB0A5A258CBE4EEFAD3C358E /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = "<group>"; };
|
||||
560B0A0D61754DCFA99F6FFB /* imageCropPicker.xcodeproj */ = {isa = PBXFileReference; name = "imageCropPicker.xcodeproj"; path = "../node_modules/react-native-image-crop-picker/ios/imageCropPicker.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
6DFE0E611CE9446B8B39E61E /* libimageCropPicker.a */ = {isa = PBXFileReference; name = "libimageCropPicker.a"; path = "libimageCropPicker.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
ED5C7473CD764393A9F1944C /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; name = "RNImagePicker.xcodeproj"; path = "../node_modules/react-native-image-picker-m/ios/RNImagePicker.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
75426ED753E94FDF955E27D9 /* libRNImagePicker.a */ = {isa = PBXFileReference; name = "libRNImagePicker.a"; path = "libRNImagePicker.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
293AF9FDDC2442BDBF3C2FE0 /* RNNetworkInfo.xcodeproj */ = {isa = PBXFileReference; name = "RNNetworkInfo.xcodeproj"; path = "../node_modules/react-native-network-info/ios/RNNetworkInfo.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
F17AA23BABD64924A34416D0 /* libRNNetworkInfo.a */ = {isa = PBXFileReference; name = "libRNNetworkInfo.a"; path = "libRNNetworkInfo.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -507,9 +499,6 @@
|
|||
69E1B84AE0DF486CB1B1D226 /* libBVLinearGradient.a in Frameworks */,
|
||||
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */,
|
||||
A52E07192CD249F7B10FDA66 /* libAirMaps.a in Frameworks */,
|
||||
95BB560D0FBE4259815182B3 /* libimageCropPicker.a in Frameworks */,
|
||||
C4424512325C419A8C59B9B1 /* libRNImagePicker.a in Frameworks */,
|
||||
36323C84F40A4AD98ED24867 /* libRNNetworkInfo.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -705,9 +694,6 @@
|
|||
1908F5E093844AC5A143E888 /* BVLinearGradient.xcodeproj */,
|
||||
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */,
|
||||
A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */,
|
||||
560B0A0D61754DCFA99F6FFB /* imageCropPicker.xcodeproj */,
|
||||
ED5C7473CD764393A9F1944C /* RNImagePicker.xcodeproj */,
|
||||
293AF9FDDC2442BDBF3C2FE0 /* RNNetworkInfo.xcodeproj */,
|
||||
);
|
||||
name = Libraries;
|
||||
sourceTree = "<group>";
|
||||
|
@ -960,6 +946,7 @@
|
|||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
|
@ -1544,9 +1531,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = appTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
|
@ -1559,9 +1543,6 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
|
@ -1585,9 +1566,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = appTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
|
@ -1600,9 +1578,6 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
|
@ -1627,9 +1602,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = app/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1656,9 +1628,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = app/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1692,9 +1661,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1706,9 +1672,6 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
|
@ -1741,9 +1704,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1755,9 +1715,6 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
|
@ -1788,9 +1745,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
|
@ -1802,9 +1756,6 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
|
@ -1835,9 +1786,6 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-image-picker-m/ios",
|
||||
"$(SRCROOT)/../node_modules/react-native-network-info/ios",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
|
@ -1849,9 +1797,6 @@
|
|||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"-ObjC",
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
|
@ -12,20 +15,20 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Henrique Dias" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="app" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="ENEI 2019" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
|
|
|
@ -1,48 +1,57 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "ItunesArtwork@2x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
|
|
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 40 KiB |
|
@ -2,20 +2,8 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string/>
|
||||
<string>FontAwesome5_Solid.ttf</string>
|
||||
<string>FontAwesome5_Regular.ttf</string>
|
||||
<string>FontAwesome5_Brands.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
</array>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string/>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>app</string>
|
||||
<string>ENEI 2019</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@ -27,11 +15,13 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>1.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>12</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string></string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
@ -47,21 +37,47 @@
|
|||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSBluetoothPeripheralUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSCalendarsUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>A camera é usada para ler os QR codes presentes no evento. Facilita o uso da aplicação.</string>
|
||||
<key>NSLocationAlwaysUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string/>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSMotionUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSSpeechRecognitionUsageDescription</key>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>MaterialIcons.ttf</string>
|
||||
<string>FontAwesome5_Solid.ttf</string>
|
||||
<string>FontAwesome5_Regular.ttf</string>
|
||||
<string>FontAwesome5_Brands.ttf</string>
|
||||
<string>FontAwesome.ttf</string>
|
||||
<string>Foundation.ttf</string>
|
||||
<string>Ionicons.ttf</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>$(PRODUCT_NAME) camera use</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
|
|
@ -829,6 +829,46 @@
|
|||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@expo/vector-icons": {
|
||||
"version": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"from": "github:expo/vector-icons#expo-font-fix",
|
||||
"requires": {
|
||||
"lodash": "^4.17.4",
|
||||
"react-native-vector-icons": "6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-native-vector-icons": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.0.0.tgz",
|
||||
"integrity": "sha512-uF3oWb3TV42uXi2apVOZHw9oy9Nr5SXDVwOo1umQWo/yYCrDzXyVfq14DzezgEbJ9jfc/yghBelj0agkXmOKlg==",
|
||||
"requires": {
|
||||
"lodash": "^4.0.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"yargs": "^8.0.2"
|
||||
}
|
||||
},
|
||||
"yargs": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
|
||||
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
|
||||
"requires": {
|
||||
"camelcase": "^4.1.0",
|
||||
"cliui": "^3.2.0",
|
||||
"decamelize": "^1.1.1",
|
||||
"get-caller-file": "^1.0.1",
|
||||
"os-locale": "^2.0.0",
|
||||
"read-pkg-up": "^2.0.0",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^1.0.1",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^2.0.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^3.2.1",
|
||||
"yargs-parser": "^7.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@expo/websql": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@expo/websql/-/websql-1.0.1.tgz",
|
||||
|
@ -2918,6 +2958,7 @@
|
|||
"integrity": "sha512-xo8wZ9/4F3P1xN9nKFSJM3Gb2m0p05aRncjgFF+jxM5XfvKkUrzW0a6FYOY/h/r2r1wyQI7OTBPTiTH/GxuwgA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"@expo/vector-icons": "github:expo/vector-icons#expo-font-fix",
|
||||
"@expo/websql": "^1.0.1",
|
||||
"@types/fbemitter": "^2.0.32",
|
||||
"@types/invariant": "^2.2.29",
|
||||
|
@ -2979,6 +3020,7 @@
|
|||
"qs": "^6.5.0",
|
||||
"react-native-branch": "2.2.5",
|
||||
"react-native-gesture-handler": "~1.0.14",
|
||||
"react-native-maps": "github:expo/react-native-maps#v0.22.1-exp.0",
|
||||
"react-native-reanimated": "1.0.0-alpha.11",
|
||||
"react-native-screens": "1.0.0-alpha.22",
|
||||
"react-native-svg": "8.0.10",
|
||||
|
@ -2988,14 +3030,6 @@
|
|||
"whatwg-fetch": "^2.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/vector-icons": {
|
||||
"version": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"from": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"requires": {
|
||||
"lodash": "^4.17.4",
|
||||
"react-native-vector-icons": "6.0.0"
|
||||
}
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||
|
@ -3032,47 +3066,17 @@
|
|||
},
|
||||
"react-native-maps": {
|
||||
"version": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
|
||||
"from": "github:expo/react-native-maps#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2"
|
||||
"from": "github:expo/react-native-maps#v0.22.1-exp.0"
|
||||
},
|
||||
"react-native-screens": {
|
||||
"version": "1.0.0-alpha.22",
|
||||
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz",
|
||||
"integrity": "sha512-kSyAt0AeVU6N7ZonfV6dP6iZF8B7Bce+tk3eujXhzBGsLg0VSLnU7uE9VqJF0xdQrHR91ZjGgVMieo/8df9KTA=="
|
||||
},
|
||||
"react-native-vector-icons": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.0.0.tgz",
|
||||
"integrity": "sha512-uF3oWb3TV42uXi2apVOZHw9oy9Nr5SXDVwOo1umQWo/yYCrDzXyVfq14DzezgEbJ9jfc/yghBelj0agkXmOKlg==",
|
||||
"requires": {
|
||||
"lodash": "^4.0.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"yargs": "^8.0.2"
|
||||
}
|
||||
},
|
||||
"whatwg-fetch": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
|
||||
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
|
||||
},
|
||||
"yargs": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
|
||||
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
|
||||
"requires": {
|
||||
"camelcase": "^4.1.0",
|
||||
"cliui": "^3.2.0",
|
||||
"decamelize": "^1.1.1",
|
||||
"get-caller-file": "^1.0.1",
|
||||
"os-locale": "^2.0.0",
|
||||
"read-pkg-up": "^2.0.0",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^1.0.1",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^2.0.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^3.2.1",
|
||||
"yargs-parser": "^7.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3742,7 +3746,8 @@
|
|||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
|
@ -3760,11 +3765,13 @@
|
|||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -3777,15 +3784,18 @@
|
|||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -3888,7 +3898,8 @@
|
|||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -3898,6 +3909,7 @@
|
|||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -3910,17 +3922,20 @@
|
|||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -3937,6 +3952,7 @@
|
|||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -4009,7 +4025,8 @@
|
|||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -4019,6 +4036,7 @@
|
|||
"once": {
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -4094,7 +4112,8 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -4124,6 +4143,7 @@
|
|||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
@ -4141,6 +4161,7 @@
|
|||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
@ -4179,11 +4200,13 @@
|
|||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.0.2",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -7938,6 +7961,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
"react-native-image-overlay": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-image-overlay/-/react-native-image-overlay-0.1.2.tgz",
|
||||
|
@ -7946,16 +7970,7 @@
|
|||
"prop-types": "^15.6.1"
|
||||
}
|
||||
},
|
||||
"react-native-image-picker": {
|
||||
"version": "0.28.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-image-picker/-/react-native-image-picker-0.28.0.tgz",
|
||||
"integrity": "sha512-lQfdOyC1mQ/pvfEaUGdoodO1A1clg9kf6YC1WdbWhA6XK+joBd9GQYf8SaCf6/7vM25U4ib+6ux4yvnrS1pOqQ=="
|
||||
},
|
||||
"react-native-image-picker-m": {
|
||||
"version": "0.26.8",
|
||||
"resolved": "https://registry.npmjs.org/react-native-image-picker-m/-/react-native-image-picker-m-0.26.8.tgz",
|
||||
"integrity": "sha512-I9kcz7EL79KfmC+nAiEM5qzC14pj4AqrpqToXp008D0WSwpvzb2XFtwuZQChioK+HT6qkple50Jj8AYskJFIQg=="
|
||||
},
|
||||
|
||||
"react-native-ionicons": {
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/react-native-ionicons/-/react-native-ionicons-4.5.5.tgz",
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
"react-native-elements": "^1.0.0",
|
||||
"react-native-fit-image": "^1.5.4",
|
||||
"react-native-gesture-handler": "^1.0.15",
|
||||
|
||||
"react-native-image-overlay": "^0.1.2",
|
||||
"react-native-image-picker": "^0.28.0",
|
||||
"react-native-image-picker-m": "^0.26.8",
|
||||
|
||||
"react-native-ionicons": "^4.5.5",
|
||||
"react-native-linear-gradient": "^2.5.3",
|
||||
"react-native-loader": "^1.2.1",
|
||||
|
|
|
@ -5596,15 +5596,6 @@ react-native-image-overlay@^0.1.2:
|
|||
dependencies:
|
||||
prop-types "^15.6.1"
|
||||
|
||||
react-native-image-picker-m@^0.26.8:
|
||||
version "0.26.8"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-picker-m/-/react-native-image-picker-m-0.26.8.tgz#ff08bbb4f99f5c1cbb3fa2e2bb7a25ac3565331b"
|
||||
integrity sha512-I9kcz7EL79KfmC+nAiEM5qzC14pj4AqrpqToXp008D0WSwpvzb2XFtwuZQChioK+HT6qkple50Jj8AYskJFIQg==
|
||||
|
||||
react-native-image-picker@^0.28.0:
|
||||
version "0.28.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-image-picker/-/react-native-image-picker-0.28.0.tgz#e3f26df170ea932e9c0404624fbced2f59a300e3"
|
||||
integrity sha512-lQfdOyC1mQ/pvfEaUGdoodO1A1clg9kf6YC1WdbWhA6XK+joBd9GQYf8SaCf6/7vM25U4ib+6ux4yvnrS1pOqQ==
|
||||
|
||||
react-native-ionicons@^4.5.5:
|
||||
version "4.5.5"
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace api.Controllers
|
|||
// PSOT api/scan
|
||||
// POST scan de QR code
|
||||
[HttpPost]
|
||||
public async Task<ScanReturn> doScan(QRToScan ScanData)
|
||||
public async Task<IActionResult> doScan(QRToScan ScanData)
|
||||
{
|
||||
User usr = await context.Users.FirstOrDefaultAsync(b=>b.QRcode == ScanData.UserQR);
|
||||
var allUsers = await context.Users.ToListAsync();
|
||||
|
@ -45,7 +45,7 @@ namespace api.Controllers
|
|||
_mapper.Map(userAProcurar,ru);
|
||||
toReturn.user = ru;
|
||||
toReturn.tipo=1;
|
||||
return toReturn;
|
||||
return Ok(toReturn);
|
||||
}else{
|
||||
allCromos.ForEach(delegate(Cromos c){
|
||||
if(c.QRCode == ScanData.ScanQR){
|
||||
|
@ -58,7 +58,7 @@ namespace api.Controllers
|
|||
}
|
||||
});
|
||||
|
||||
return toReturn;
|
||||
return Ok(toReturn);
|
||||
}
|
||||
|
||||
//return toReturn;
|
||||
|
|
|
@ -32,6 +32,36 @@ namespace api.Controllers
|
|||
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpGet("getProfileImage/{QRcode}")]
|
||||
public async Task<IActionResult> getProfileImage(string QRcode)
|
||||
{
|
||||
|
||||
var user = _repo.getProfileImageAsync(QRcode);
|
||||
|
||||
|
||||
|
||||
if (user.Result != null)
|
||||
{
|
||||
|
||||
|
||||
return Ok(user.Result);
|
||||
}
|
||||
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("changeProfileImage")]
|
||||
public async Task<IActionResult> changeProfileImage(profileImage i)
|
||||
{
|
||||
|
||||
User a = new User();
|
||||
|
||||
var cenas = await _repo.changeProfileImage(i);
|
||||
|
||||
return Ok(cenas);
|
||||
}
|
||||
//
|
||||
[HttpGet("{id}")]
|
||||
public async Task<IActionResult> GetUser(int id)
|
||||
|
@ -57,6 +87,7 @@ namespace api.Controllers
|
|||
}
|
||||
|
||||
|
||||
|
||||
[Authorize(Policy = "RequireAdminRole")]
|
||||
[HttpPost("updateAll")]
|
||||
public async Task<IActionResult> UpdateUsers(updateUsersDTO[] req)
|
||||
|
@ -65,7 +96,7 @@ namespace api.Controllers
|
|||
{
|
||||
foreach (var user in req)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
return Ok(req);
|
||||
|
|
|
@ -31,6 +31,14 @@ namespace api.Controllers
|
|||
return View("Views/Landing/index.cshtml");
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("/app")]
|
||||
[AllowAnonymous]
|
||||
public IActionResult appPage() {
|
||||
|
||||
return View("Views/Landing/app.cshtml");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using api.Dtos;
|
||||
using api.Models;
|
||||
|
||||
namespace api.Data
|
||||
|
@ -12,7 +13,10 @@ namespace api.Data
|
|||
Task<bool> SaveAll();
|
||||
Task<IEnumerable<User>> GetUsers();
|
||||
Task<User> GetUser(int id);
|
||||
|
||||
Task<User> changeProfileImage(profileImage a);
|
||||
|
||||
|
||||
Task<string> getProfileImageAsync(string qrCode);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using api.Dtos;
|
||||
using api.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
@ -14,34 +16,67 @@ namespace api.Data
|
|||
}
|
||||
public void Add<T>(T enity) where T : class
|
||||
{
|
||||
_context.Add(enity);
|
||||
|
||||
_context.Add(enity);
|
||||
|
||||
}
|
||||
|
||||
public async Task<User> changeProfileImage(profileImage a)
|
||||
{
|
||||
|
||||
var utilizador = await _context.Users.FirstOrDefaultAsync(t => t.QRcode == a.QRcode);
|
||||
if (utilizador != null)
|
||||
{
|
||||
utilizador.profileImage = a.base64;
|
||||
|
||||
_context.Users.Update(utilizador);
|
||||
|
||||
var result = _context.SaveChanges();
|
||||
|
||||
if (result >= 1)
|
||||
{
|
||||
return utilizador;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public void Delete<T>(T entity) where T : class
|
||||
{
|
||||
|
||||
|
||||
|
||||
_context.Remove(entity);
|
||||
}
|
||||
|
||||
public Task<string> getProfileImageAsync(string qrCode)
|
||||
{
|
||||
return Task.Run(() =>
|
||||
{
|
||||
return _context.Users.Where(a => a.QRcode == qrCode).Select(u => u.profileImage).SingleOrDefault() ;
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public async Task<User> GetUser(int id)
|
||||
{
|
||||
var user = await _context.Users.Include(p=>p.Photos).FirstOrDefaultAsync(u=>u.Id==id);
|
||||
|
||||
var user = await _context.Users.Include(p => p.Photos).FirstOrDefaultAsync(u => u.Id == id);
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<User>> GetUsers()
|
||||
{
|
||||
var users= await _context.Users.Include(p=>p.Photos).ToListAsync();
|
||||
|
||||
var users = await _context.Users.Include(p => p.Photos).ToListAsync();
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
public async Task<bool> SaveAll()
|
||||
{
|
||||
return await _context.SaveChangesAsync()>0;
|
||||
|
||||
return await _context.SaveChangesAsync() > 0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace api.Dtos
|
||||
{
|
||||
public class getProfileImage
|
||||
{
|
||||
[Required]
|
||||
public string QRcode{get;set;}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace api.Dtos
|
||||
{
|
||||
public class profileImage
|
||||
{
|
||||
public string QRcode{get;set;}
|
||||
|
||||
public string base64{get;set;}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace api.Dtos
|
||||
{
|
||||
public class profileImageToReturn
|
||||
{
|
||||
public string profileBase64{get;set;}
|
||||
}
|
||||
}
|
|
@ -1,502 +0,0 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using api.Data;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20190318183120_completev1")]
|
||||
partial class completev1
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("Value");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DescLocked");
|
||||
|
||||
b.Property<string>("DescMostrar");
|
||||
|
||||
b.Property<string>("DescUnlocked");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("QRCode");
|
||||
|
||||
b.Property<int?>("imgId");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<bool>("unlocked");
|
||||
|
||||
b.Property<string>("websiteCromo");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("imgId");
|
||||
|
||||
b.ToTable("Cromos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Event", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<bool>("aDecorrer");
|
||||
|
||||
b.Property<string>("custo");
|
||||
|
||||
b.Property<string>("horas");
|
||||
|
||||
b.Property<string>("imagem");
|
||||
|
||||
b.Property<string>("localizacao");
|
||||
|
||||
b.Property<string>("notas");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Events");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int?>("ImgId");
|
||||
|
||||
b.Property<float>("Lat");
|
||||
|
||||
b.Property<float>("Long");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImgId");
|
||||
|
||||
b.ToTable("EventLocs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("LocationId");
|
||||
|
||||
b.Property<int?>("TeamId");
|
||||
|
||||
b.Property<bool>("complete");
|
||||
|
||||
b.Property<DateTime>("timestamp");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LocationId");
|
||||
|
||||
b.HasIndex("TeamId");
|
||||
|
||||
b.ToTable("EventLocsVisited");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.Property<int?>("UserId1");
|
||||
|
||||
b.Property<int>("amount");
|
||||
|
||||
b.Property<int>("available");
|
||||
|
||||
b.Property<string>("logType");
|
||||
|
||||
b.Property<int?>("productId");
|
||||
|
||||
b.Property<string>("transactionId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.HasIndex("UserId1");
|
||||
|
||||
b.HasIndex("productId");
|
||||
|
||||
b.ToTable("Logs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<bool>("IsMain");
|
||||
|
||||
b.Property<string>("Url");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("basePrice");
|
||||
|
||||
b.Property<string>("name");
|
||||
|
||||
b.Property<float>("revenue");
|
||||
|
||||
b.Property<int>("sold");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Team", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("CapQR");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int>("NMembros");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<int>("Pontos");
|
||||
|
||||
b.Property<bool>("pagamento");
|
||||
|
||||
b.Property<string>("pagamentoVerifyCode");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Teams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("QRcode");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("cromos");
|
||||
|
||||
b.Property<int>("drinks");
|
||||
|
||||
b.Property<int>("food");
|
||||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasName("UserNameIndex");
|
||||
|
||||
b.HasIndex("teamID");
|
||||
|
||||
b.ToTable("AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Value", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Values");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Photo", "img")
|
||||
.WithMany()
|
||||
.HasForeignKey("imgId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Photo", "Img")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImgId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.HasOne("api.Models.EventLoc", "Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("api.Models.Team", "Team")
|
||||
.WithMany()
|
||||
.HasForeignKey("TeamId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFebrada")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFestarola")
|
||||
.HasForeignKey("UserId1");
|
||||
|
||||
b.HasOne("api.Models.Product", "product")
|
||||
.WithMany()
|
||||
.HasForeignKey("productId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Team", "team")
|
||||
.WithMany()
|
||||
.HasForeignKey("teamID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role", "Role")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class completev1 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,493 +0,0 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using api.Data;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20190319003112_image")]
|
||||
partial class image
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("Value");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DescLocked");
|
||||
|
||||
b.Property<string>("DescMostrar");
|
||||
|
||||
b.Property<string>("DescUnlocked");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("QRCode");
|
||||
|
||||
b.Property<string>("img");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<bool>("unlocked");
|
||||
|
||||
b.Property<string>("websiteCromo");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cromos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Event", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<bool>("aDecorrer");
|
||||
|
||||
b.Property<string>("custo");
|
||||
|
||||
b.Property<string>("horas");
|
||||
|
||||
b.Property<string>("imagem");
|
||||
|
||||
b.Property<string>("localizacao");
|
||||
|
||||
b.Property<string>("notas");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Events");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int?>("ImgId");
|
||||
|
||||
b.Property<float>("Lat");
|
||||
|
||||
b.Property<float>("Long");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImgId");
|
||||
|
||||
b.ToTable("EventLocs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("LocationId");
|
||||
|
||||
b.Property<int?>("TeamId");
|
||||
|
||||
b.Property<bool>("complete");
|
||||
|
||||
b.Property<DateTime>("timestamp");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LocationId");
|
||||
|
||||
b.HasIndex("TeamId");
|
||||
|
||||
b.ToTable("EventLocsVisited");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.Property<int?>("UserId1");
|
||||
|
||||
b.Property<int>("amount");
|
||||
|
||||
b.Property<int>("available");
|
||||
|
||||
b.Property<string>("logType");
|
||||
|
||||
b.Property<int?>("productId");
|
||||
|
||||
b.Property<string>("transactionId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.HasIndex("UserId1");
|
||||
|
||||
b.HasIndex("productId");
|
||||
|
||||
b.ToTable("Logs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<bool>("IsMain");
|
||||
|
||||
b.Property<string>("Url");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("basePrice");
|
||||
|
||||
b.Property<string>("name");
|
||||
|
||||
b.Property<float>("revenue");
|
||||
|
||||
b.Property<int>("sold");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Team", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("CapQR");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int>("NMembros");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<int>("Pontos");
|
||||
|
||||
b.Property<bool>("pagamento");
|
||||
|
||||
b.Property<string>("pagamentoVerifyCode");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Teams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("QRcode");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("cromos");
|
||||
|
||||
b.Property<int>("drinks");
|
||||
|
||||
b.Property<int>("food");
|
||||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasName("UserNameIndex");
|
||||
|
||||
b.HasIndex("teamID");
|
||||
|
||||
b.ToTable("AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Value", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Values");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Photo", "Img")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImgId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.HasOne("api.Models.EventLoc", "Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("api.Models.Team", "Team")
|
||||
.WithMany()
|
||||
.HasForeignKey("TeamId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFebrada")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFestarola")
|
||||
.HasForeignKey("UserId1");
|
||||
|
||||
b.HasOne("api.Models.Product", "product")
|
||||
.WithMany()
|
||||
.HasForeignKey("productId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Team", "team")
|
||||
.WithMany()
|
||||
.HasForeignKey("teamID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role", "Role")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class image : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Cromos_Photos_imgId",
|
||||
table: "Cromos");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Cromos_imgId",
|
||||
table: "Cromos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "imgId",
|
||||
table: "Cromos");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "img",
|
||||
table: "Cromos",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "img",
|
||||
table: "Cromos");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "imgId",
|
||||
table: "Cromos",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Cromos_imgId",
|
||||
table: "Cromos",
|
||||
column: "imgId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Cromos_Photos_imgId",
|
||||
table: "Cromos",
|
||||
column: "imgId",
|
||||
principalTable: "Photos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,495 +0,0 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using api.Data;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20190319005102_imagelogo")]
|
||||
partial class imagelogo
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("Value");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DescLocked");
|
||||
|
||||
b.Property<string>("DescMostrar");
|
||||
|
||||
b.Property<string>("DescUnlocked");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("QRCode");
|
||||
|
||||
b.Property<string>("img");
|
||||
|
||||
b.Property<string>("logo");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<bool>("unlocked");
|
||||
|
||||
b.Property<string>("websiteCromo");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cromos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Event", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<bool>("aDecorrer");
|
||||
|
||||
b.Property<string>("custo");
|
||||
|
||||
b.Property<string>("horas");
|
||||
|
||||
b.Property<string>("imagem");
|
||||
|
||||
b.Property<string>("localizacao");
|
||||
|
||||
b.Property<string>("notas");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Events");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int?>("ImgId");
|
||||
|
||||
b.Property<float>("Lat");
|
||||
|
||||
b.Property<float>("Long");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImgId");
|
||||
|
||||
b.ToTable("EventLocs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("LocationId");
|
||||
|
||||
b.Property<int?>("TeamId");
|
||||
|
||||
b.Property<bool>("complete");
|
||||
|
||||
b.Property<DateTime>("timestamp");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LocationId");
|
||||
|
||||
b.HasIndex("TeamId");
|
||||
|
||||
b.ToTable("EventLocsVisited");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.Property<int?>("UserId1");
|
||||
|
||||
b.Property<int>("amount");
|
||||
|
||||
b.Property<int>("available");
|
||||
|
||||
b.Property<string>("logType");
|
||||
|
||||
b.Property<int?>("productId");
|
||||
|
||||
b.Property<string>("transactionId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.HasIndex("UserId1");
|
||||
|
||||
b.HasIndex("productId");
|
||||
|
||||
b.ToTable("Logs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<bool>("IsMain");
|
||||
|
||||
b.Property<string>("Url");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("basePrice");
|
||||
|
||||
b.Property<string>("name");
|
||||
|
||||
b.Property<float>("revenue");
|
||||
|
||||
b.Property<int>("sold");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Team", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("CapQR");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int>("NMembros");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<int>("Pontos");
|
||||
|
||||
b.Property<bool>("pagamento");
|
||||
|
||||
b.Property<string>("pagamentoVerifyCode");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Teams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("QRcode");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("cromos");
|
||||
|
||||
b.Property<int>("drinks");
|
||||
|
||||
b.Property<int>("food");
|
||||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasName("UserNameIndex");
|
||||
|
||||
b.HasIndex("teamID");
|
||||
|
||||
b.ToTable("AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Value", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Values");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Photo", "Img")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImgId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.HasOne("api.Models.EventLoc", "Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("api.Models.Team", "Team")
|
||||
.WithMany()
|
||||
.HasForeignKey("TeamId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFebrada")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFestarola")
|
||||
.HasForeignKey("UserId1");
|
||||
|
||||
b.HasOne("api.Models.Product", "product")
|
||||
.WithMany()
|
||||
.HasForeignKey("productId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Team", "team")
|
||||
.WithMany()
|
||||
.HasForeignKey("teamID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role", "Role")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class imagelogo : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "logo",
|
||||
table: "Cromos",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "logo",
|
||||
table: "Cromos");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,499 +0,0 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using api.Data;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20190322005225_locs")]
|
||||
partial class locs
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("Value");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DescLocked");
|
||||
|
||||
b.Property<string>("DescMostrar");
|
||||
|
||||
b.Property<string>("DescUnlocked");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("QRCode");
|
||||
|
||||
b.Property<string>("img");
|
||||
|
||||
b.Property<string>("logo");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<bool>("unlocked");
|
||||
|
||||
b.Property<string>("websiteCromo");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cromos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Event", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<bool>("aDecorrer");
|
||||
|
||||
b.Property<string>("custo");
|
||||
|
||||
b.Property<string>("horas");
|
||||
|
||||
b.Property<string>("imagem");
|
||||
|
||||
b.Property<string>("localizacao");
|
||||
|
||||
b.Property<string>("notas");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Events");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int?>("ImgId");
|
||||
|
||||
b.Property<float>("Lat");
|
||||
|
||||
b.Property<float>("Long");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("mainPhoto");
|
||||
|
||||
b.Property<string>("squarePhoto");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImgId");
|
||||
|
||||
b.ToTable("EventLocs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("LocationId");
|
||||
|
||||
b.Property<int?>("TeamId");
|
||||
|
||||
b.Property<bool>("complete");
|
||||
|
||||
b.Property<DateTime>("timestamp");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LocationId");
|
||||
|
||||
b.HasIndex("TeamId");
|
||||
|
||||
b.ToTable("EventLocsVisited");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.Property<int?>("UserId1");
|
||||
|
||||
b.Property<int>("amount");
|
||||
|
||||
b.Property<int>("available");
|
||||
|
||||
b.Property<string>("logType");
|
||||
|
||||
b.Property<int?>("productId");
|
||||
|
||||
b.Property<string>("transactionId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.HasIndex("UserId1");
|
||||
|
||||
b.HasIndex("productId");
|
||||
|
||||
b.ToTable("Logs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<bool>("IsMain");
|
||||
|
||||
b.Property<string>("Url");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("basePrice");
|
||||
|
||||
b.Property<string>("name");
|
||||
|
||||
b.Property<float>("revenue");
|
||||
|
||||
b.Property<int>("sold");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Team", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("CapQR");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int>("NMembros");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<int>("Pontos");
|
||||
|
||||
b.Property<bool>("pagamento");
|
||||
|
||||
b.Property<string>("pagamentoVerifyCode");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Teams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("QRcode");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("cromos");
|
||||
|
||||
b.Property<int>("drinks");
|
||||
|
||||
b.Property<int>("food");
|
||||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasName("UserNameIndex");
|
||||
|
||||
b.HasIndex("teamID");
|
||||
|
||||
b.ToTable("AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Value", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Values");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Photo", "Img")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImgId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.HasOne("api.Models.EventLoc", "Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("api.Models.Team", "Team")
|
||||
.WithMany()
|
||||
.HasForeignKey("TeamId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFebrada")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFestarola")
|
||||
.HasForeignKey("UserId1");
|
||||
|
||||
b.HasOne("api.Models.Product", "product")
|
||||
.WithMany()
|
||||
.HasForeignKey("productId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Team", "team")
|
||||
.WithMany()
|
||||
.HasForeignKey("teamID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role", "Role")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class locs : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "mainPhoto",
|
||||
table: "EventLocs",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "squarePhoto",
|
||||
table: "EventLocs",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "mainPhoto",
|
||||
table: "EventLocs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "squarePhoto",
|
||||
table: "EventLocs");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,503 +0,0 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using api.Data;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20190322014157_eventloc")]
|
||||
partial class eventloc
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("Value");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DescLocked");
|
||||
|
||||
b.Property<string>("DescMostrar");
|
||||
|
||||
b.Property<string>("DescUnlocked");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("QRCode");
|
||||
|
||||
b.Property<string>("img");
|
||||
|
||||
b.Property<string>("logo");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<bool>("unlocked");
|
||||
|
||||
b.Property<string>("websiteCromo");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cromos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Event", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<bool>("aDecorrer");
|
||||
|
||||
b.Property<string>("custo");
|
||||
|
||||
b.Property<string>("horas");
|
||||
|
||||
b.Property<string>("imagem");
|
||||
|
||||
b.Property<string>("localizacao");
|
||||
|
||||
b.Property<string>("notas");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Events");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int?>("ImgId");
|
||||
|
||||
b.Property<float>("Lat");
|
||||
|
||||
b.Property<float>("Long");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("desafio");
|
||||
|
||||
b.Property<string>("mainPhoto");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<string>("squarePhoto");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImgId");
|
||||
|
||||
b.ToTable("EventLocs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("LocationId");
|
||||
|
||||
b.Property<int?>("TeamId");
|
||||
|
||||
b.Property<bool>("complete");
|
||||
|
||||
b.Property<DateTime>("timestamp");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LocationId");
|
||||
|
||||
b.HasIndex("TeamId");
|
||||
|
||||
b.ToTable("EventLocsVisited");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.Property<int?>("UserId1");
|
||||
|
||||
b.Property<int>("amount");
|
||||
|
||||
b.Property<int>("available");
|
||||
|
||||
b.Property<string>("logType");
|
||||
|
||||
b.Property<int?>("productId");
|
||||
|
||||
b.Property<string>("transactionId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.HasIndex("UserId1");
|
||||
|
||||
b.HasIndex("productId");
|
||||
|
||||
b.ToTable("Logs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<bool>("IsMain");
|
||||
|
||||
b.Property<string>("Url");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("basePrice");
|
||||
|
||||
b.Property<string>("name");
|
||||
|
||||
b.Property<float>("revenue");
|
||||
|
||||
b.Property<int>("sold");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Team", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("CapQR");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int>("NMembros");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<int>("Pontos");
|
||||
|
||||
b.Property<bool>("pagamento");
|
||||
|
||||
b.Property<string>("pagamentoVerifyCode");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Teams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("QRcode");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("cromos");
|
||||
|
||||
b.Property<int>("drinks");
|
||||
|
||||
b.Property<int>("food");
|
||||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasName("UserNameIndex");
|
||||
|
||||
b.HasIndex("teamID");
|
||||
|
||||
b.ToTable("AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Value", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Values");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Photo", "Img")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImgId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.HasOne("api.Models.EventLoc", "Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("api.Models.Team", "Team")
|
||||
.WithMany()
|
||||
.HasForeignKey("TeamId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFebrada")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFestarola")
|
||||
.HasForeignKey("UserId1");
|
||||
|
||||
b.HasOne("api.Models.Product", "product")
|
||||
.WithMany()
|
||||
.HasForeignKey("productId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Team", "team")
|
||||
.WithMany()
|
||||
.HasForeignKey("teamID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role", "Role")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class eventloc : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "desafio",
|
||||
table: "EventLocs",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "pontos",
|
||||
table: "EventLocs",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "desafio",
|
||||
table: "EventLocs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "pontos",
|
||||
table: "EventLocs");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,505 +0,0 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using api.Data;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20190322014229_eventlocpos")]
|
||||
partial class eventlocpos
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("Value");
|
||||
|
||||
b.HasKey("UserId", "LoginProvider", "Name");
|
||||
|
||||
b.ToTable("AspNetUserTokens");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Cromos", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DescLocked");
|
||||
|
||||
b.Property<string>("DescMostrar");
|
||||
|
||||
b.Property<string>("DescUnlocked");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("QRCode");
|
||||
|
||||
b.Property<string>("img");
|
||||
|
||||
b.Property<string>("logo");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<bool>("unlocked");
|
||||
|
||||
b.Property<string>("websiteCromo");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cromos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Event", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<bool>("aDecorrer");
|
||||
|
||||
b.Property<string>("custo");
|
||||
|
||||
b.Property<string>("horas");
|
||||
|
||||
b.Property<string>("imagem");
|
||||
|
||||
b.Property<string>("localizacao");
|
||||
|
||||
b.Property<string>("notas");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Events");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Desc");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int?>("ImgId");
|
||||
|
||||
b.Property<float>("Lat");
|
||||
|
||||
b.Property<float>("Long");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<string>("desafio");
|
||||
|
||||
b.Property<string>("localizacao");
|
||||
|
||||
b.Property<string>("mainPhoto");
|
||||
|
||||
b.Property<int>("pontos");
|
||||
|
||||
b.Property<string>("squarePhoto");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ImgId");
|
||||
|
||||
b.ToTable("EventLocs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("LocationId");
|
||||
|
||||
b.Property<int?>("TeamId");
|
||||
|
||||
b.Property<bool>("complete");
|
||||
|
||||
b.Property<DateTime>("timestamp");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("LocationId");
|
||||
|
||||
b.HasIndex("TeamId");
|
||||
|
||||
b.ToTable("EventLocsVisited");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.Property<int?>("UserId1");
|
||||
|
||||
b.Property<int>("amount");
|
||||
|
||||
b.Property<int>("available");
|
||||
|
||||
b.Property<string>("logType");
|
||||
|
||||
b.Property<int?>("productId");
|
||||
|
||||
b.Property<string>("transactionId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.HasIndex("UserId1");
|
||||
|
||||
b.HasIndex("productId");
|
||||
|
||||
b.ToTable("Logs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<bool>("IsMain");
|
||||
|
||||
b.Property<string>("Url");
|
||||
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Product", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("basePrice");
|
||||
|
||||
b.Property<string>("name");
|
||||
|
||||
b.Property<float>("revenue");
|
||||
|
||||
b.Property<int>("sold");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Products");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Role", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.IsUnique()
|
||||
.HasName("RoleNameIndex");
|
||||
|
||||
b.ToTable("AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Team", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("CapQR");
|
||||
|
||||
b.Property<int>("EventId");
|
||||
|
||||
b.Property<int>("NMembros");
|
||||
|
||||
b.Property<string>("Nome");
|
||||
|
||||
b.Property<int>("Pontos");
|
||||
|
||||
b.Property<bool>("pagamento");
|
||||
|
||||
b.Property<string>("pagamentoVerifyCode");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Teams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<string>("QRcode");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasMaxLength(256);
|
||||
|
||||
b.Property<string>("cromos");
|
||||
|
||||
b.Property<int>("drinks");
|
||||
|
||||
b.Property<int>("food");
|
||||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasName("EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.IsUnique()
|
||||
.HasName("UserNameIndex");
|
||||
|
||||
b.HasIndex("teamID");
|
||||
|
||||
b.ToTable("AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.Property<int>("UserId");
|
||||
|
||||
b.Property<int>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Value", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Values");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLoc", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Photo", "Img")
|
||||
.WithMany()
|
||||
.HasForeignKey("ImgId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.EventLocVisited", b =>
|
||||
{
|
||||
b.HasOne("api.Models.EventLoc", "Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("api.Models.Team", "Team")
|
||||
.WithMany()
|
||||
.HasForeignKey("TeamId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Log", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFebrada")
|
||||
.HasForeignKey("UserId");
|
||||
|
||||
b.HasOne("api.Models.User")
|
||||
.WithMany("logsFestarola")
|
||||
.HasForeignKey("UserId1");
|
||||
|
||||
b.HasOne("api.Models.Product", "product")
|
||||
.WithMany()
|
||||
.HasForeignKey("productId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.Photo", b =>
|
||||
{
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.User", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Team", "team")
|
||||
.WithMany()
|
||||
.HasForeignKey("teamID");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("api.Models.UserRole", b =>
|
||||
{
|
||||
b.HasOne("api.Models.Role", "Role")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("api.Models.User", "User")
|
||||
.WithMany("UserRoles")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class eventlocpos : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "localizacao",
|
||||
table: "EventLocs",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "localizacao",
|
||||
table: "EventLocs");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class a : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "Long",
|
||||
table: "EventLocs",
|
||||
nullable: false,
|
||||
oldClrType: typeof(float));
|
||||
|
||||
migrationBuilder.AlterColumn<double>(
|
||||
name: "Lat",
|
||||
table: "EventLocs",
|
||||
nullable: false,
|
||||
oldClrType: typeof(float));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<float>(
|
||||
name: "Long",
|
||||
table: "EventLocs",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double));
|
||||
|
||||
migrationBuilder.AlterColumn<float>(
|
||||
name: "Lat",
|
||||
table: "EventLocs",
|
||||
nullable: false,
|
||||
oldClrType: typeof(double));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,8 +9,8 @@ using api.Data;
|
|||
namespace api.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20190322021203_a")]
|
||||
partial class a
|
||||
[Migration("20190323222043_uo")]
|
||||
partial class uo
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
@ -364,6 +364,8 @@ namespace api.Migrations
|
|||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<string>("profileImage");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
|
@ -0,0 +1,508 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace api.Migrations
|
||||
{
|
||||
public partial class uo : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetRoles",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Cromos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
QRCode = table.Column<string>(nullable: true),
|
||||
Nome = table.Column<string>(nullable: true),
|
||||
DescLocked = table.Column<string>(nullable: true),
|
||||
DescUnlocked = table.Column<string>(nullable: true),
|
||||
DescMostrar = table.Column<string>(nullable: true),
|
||||
img = table.Column<string>(nullable: true),
|
||||
websiteCromo = table.Column<string>(nullable: true),
|
||||
unlocked = table.Column<bool>(nullable: false),
|
||||
logo = table.Column<string>(nullable: true),
|
||||
pontos = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Cromos", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Events",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Nome = table.Column<string>(nullable: true),
|
||||
Desc = table.Column<string>(nullable: true),
|
||||
imagem = table.Column<string>(nullable: true),
|
||||
horas = table.Column<string>(nullable: true),
|
||||
aDecorrer = table.Column<bool>(nullable: false),
|
||||
localizacao = table.Column<string>(nullable: true),
|
||||
notas = table.Column<string>(nullable: true),
|
||||
custo = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Events", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Products",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
name = table.Column<string>(nullable: true),
|
||||
basePrice = table.Column<int>(nullable: false),
|
||||
sold = table.Column<int>(nullable: false),
|
||||
revenue = table.Column<float>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Products", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Teams",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
EventId = table.Column<int>(nullable: false),
|
||||
Nome = table.Column<string>(nullable: true),
|
||||
CapQR = table.Column<string>(nullable: true),
|
||||
NMembros = table.Column<int>(nullable: false),
|
||||
Pontos = table.Column<int>(nullable: false),
|
||||
pagamento = table.Column<bool>(nullable: false),
|
||||
pagamentoVerifyCode = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Teams", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Values",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Values", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetRoleClaims",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
RoleId = table.Column<int>(nullable: false),
|
||||
ClaimType = table.Column<string>(nullable: true),
|
||||
ClaimValue = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
|
||||
column: x => x.RoleId,
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUsers",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
Email = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
|
||||
EmailConfirmed = table.Column<bool>(nullable: false),
|
||||
PasswordHash = table.Column<string>(nullable: true),
|
||||
SecurityStamp = table.Column<string>(nullable: true),
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true),
|
||||
PhoneNumber = table.Column<string>(nullable: true),
|
||||
PhoneNumberConfirmed = table.Column<bool>(nullable: false),
|
||||
TwoFactorEnabled = table.Column<bool>(nullable: false),
|
||||
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
|
||||
LockoutEnabled = table.Column<bool>(nullable: false),
|
||||
AccessFailedCount = table.Column<int>(nullable: false),
|
||||
fullName = table.Column<string>(nullable: true),
|
||||
university = table.Column<string>(nullable: true),
|
||||
QRcode = table.Column<string>(nullable: true),
|
||||
drinks = table.Column<int>(nullable: false),
|
||||
food = table.Column<int>(nullable: false),
|
||||
teamID = table.Column<int>(nullable: true),
|
||||
cromos = table.Column<string>(nullable: true),
|
||||
profileImage = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUsers", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUsers_Teams_teamID",
|
||||
column: x => x.teamID,
|
||||
principalTable: "Teams",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserClaims",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
UserId = table.Column<int>(nullable: false),
|
||||
ClaimType = table.Column<string>(nullable: true),
|
||||
ClaimValue = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserClaims_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserLogins",
|
||||
columns: table => new
|
||||
{
|
||||
LoginProvider = table.Column<string>(nullable: false),
|
||||
ProviderKey = table.Column<string>(nullable: false),
|
||||
ProviderDisplayName = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserLogins_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserRoles",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<int>(nullable: false),
|
||||
RoleId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
|
||||
column: x => x.RoleId,
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserRoles_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AspNetUserTokens",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<int>(nullable: false),
|
||||
LoginProvider = table.Column<string>(nullable: false),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Value = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
|
||||
table.ForeignKey(
|
||||
name: "FK_AspNetUserTokens_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Logs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
amount = table.Column<int>(nullable: false),
|
||||
available = table.Column<int>(nullable: false),
|
||||
productId = table.Column<int>(nullable: true),
|
||||
transactionId = table.Column<string>(nullable: true),
|
||||
logType = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<int>(nullable: true),
|
||||
UserId1 = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Logs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Logs_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Logs_AspNetUsers_UserId1",
|
||||
column: x => x.UserId1,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Logs_Products_productId",
|
||||
column: x => x.productId,
|
||||
principalTable: "Products",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Photos",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Url = table.Column<string>(nullable: true),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
DateAdded = table.Column<DateTime>(nullable: false),
|
||||
IsMain = table.Column<bool>(nullable: false),
|
||||
UserId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Photos", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Photos_AspNetUsers_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EventLocs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
EventId = table.Column<int>(nullable: false),
|
||||
Lat = table.Column<double>(nullable: false),
|
||||
Long = table.Column<double>(nullable: false),
|
||||
Nome = table.Column<string>(nullable: true),
|
||||
Desc = table.Column<string>(nullable: true),
|
||||
ImgId = table.Column<int>(nullable: true),
|
||||
squarePhoto = table.Column<string>(nullable: true),
|
||||
mainPhoto = table.Column<string>(nullable: true),
|
||||
desafio = table.Column<string>(nullable: true),
|
||||
pontos = table.Column<int>(nullable: false),
|
||||
localizacao = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EventLocs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EventLocs_Photos_ImgId",
|
||||
column: x => x.ImgId,
|
||||
principalTable: "Photos",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EventLocsVisited",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
TeamId = table.Column<int>(nullable: true),
|
||||
LocationId = table.Column<int>(nullable: true),
|
||||
timestamp = table.Column<DateTime>(nullable: false),
|
||||
complete = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EventLocsVisited", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EventLocsVisited_EventLocs_LocationId",
|
||||
column: x => x.LocationId,
|
||||
principalTable: "EventLocs",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_EventLocsVisited_Teams_TeamId",
|
||||
column: x => x.TeamId,
|
||||
principalTable: "Teams",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetRoleClaims_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "RoleNameIndex",
|
||||
table: "AspNetRoles",
|
||||
column: "NormalizedName",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUserClaims_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUserLogins_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUserRoles_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "EmailIndex",
|
||||
table: "AspNetUsers",
|
||||
column: "NormalizedEmail");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "UserNameIndex",
|
||||
table: "AspNetUsers",
|
||||
column: "NormalizedUserName",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUsers_teamID",
|
||||
table: "AspNetUsers",
|
||||
column: "teamID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EventLocs_ImgId",
|
||||
table: "EventLocs",
|
||||
column: "ImgId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EventLocsVisited_LocationId",
|
||||
table: "EventLocsVisited",
|
||||
column: "LocationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EventLocsVisited_TeamId",
|
||||
table: "EventLocsVisited",
|
||||
column: "TeamId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Logs_UserId",
|
||||
table: "Logs",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Logs_UserId1",
|
||||
table: "Logs",
|
||||
column: "UserId1");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Logs_productId",
|
||||
table: "Logs",
|
||||
column: "productId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Photos_UserId",
|
||||
table: "Photos",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetRoleClaims");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserClaims");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserLogins");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserRoles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUserTokens");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Cromos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EventLocsVisited");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Events");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Logs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Values");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetRoles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EventLocs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Products");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Photos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AspNetUsers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Teams");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -362,6 +362,8 @@ namespace api.Migrations
|
|||
|
||||
b.Property<string>("fullName");
|
||||
|
||||
b.Property<string>("profileImage");
|
||||
|
||||
b.Property<int?>("teamID");
|
||||
|
||||
b.Property<string>("university");
|
||||
|
|
|
@ -23,6 +23,6 @@ namespace api.Models
|
|||
public Team team{get;set;}
|
||||
|
||||
public string cromos {get;set;}
|
||||
|
||||
public string profileImage{get;set;}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,398 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt" xml:lang="pt">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta content="width=device-width, initial-scale=1, user-scalable=0" name="viewport">
|
||||
<meta content="width" name="MobileOptimized">
|
||||
<meta content="true" name="HandheldFriendly">
|
||||
<!-- Place favicon.ico in the root directory -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||
<link rel="manifest" href="site.webmanifest">
|
||||
<link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<title>ENEI'19</title>
|
||||
<meta name="description"
|
||||
content="Página do Encontro Nacional de Estudantes de Informática 2019, no Instituto Superior de Engenharia de Coimbra (ISEC) a realizar-se entre 12 e 15 de abril de 2019. O ENEI pretende oferecer aos estudantes de todo o país um evento que promove a aprendizagem, a troca de ideias e o convívio, enquanto tenta criar fortes ligações com o mundo empresarial.">
|
||||
<meta property="og:locale" content="pt_PT" />
|
||||
<meta property="og:title" content="ENEI'19" />
|
||||
<meta property="og:description"
|
||||
content="Página do Encontro Nacional de Estudantes de Informática 2019, no Instituto Superior de Engenharia de Coimbra (ISEC) a realizar-se entre 12 e 15 de abril de 2019. O ENEI pretende oferecer aos estudantes de todo o país um evento que promove a aprendizagem, a troca de ideias e o convívio, enquanto tenta criar fortes ligações com o mundo empresarial." />
|
||||
<meta property="og:site_name" content="ENEI'19" />
|
||||
<meta property="og:url" content="http://www.enei.pt/" />
|
||||
<meta property="og:image" content="http://www.enei.pt/imgs/share-image.jpg" />
|
||||
<meta property="og:type" content="Website" />
|
||||
<link rel="canonical" href="http://www.enei.pt/" />
|
||||
<link href="bootstrap-grid.css" rel="stylesheet" type="text/css" />
|
||||
<link href="main.css" rel="stylesheet" type="text/css" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Bai+Jamjuree:400,600,700" rel="stylesheet">
|
||||
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
|
||||
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header id="main-menu">
|
||||
<nav>
|
||||
<a href="#" title="Abrir menu" rel="nofollow" id="open-menu-mobile">Menu</a>
|
||||
<ul>
|
||||
<li><a href="#enei" title="Enei">Enei</a></li>
|
||||
<li class="unavailable">Oradores</li>
|
||||
<li class="unavailable">Programa</li>
|
||||
<li><a href="#precos" title="Preços">Preços</a></li>
|
||||
<li class="unavailable">App</li>
|
||||
<!-- <li><a href="#ctf" title="Faq's">CTF</li> -->
|
||||
<li><a href="#sponsors" title="Sponsors">Sponsors</a></li>
|
||||
<li><a href="#faqs" title="Faq's">Faq's</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<header class="bg-gradient">
|
||||
<div class="container-app">
|
||||
<div class="header-app">
|
||||
<h1>Aplicação ENEI 2019</h1>
|
||||
<h3>Esta aplicação vai-te acompanhar durante todo o evento, melhorando drásticamente a interação com as
|
||||
empresas e atividades.</h3>
|
||||
</div>
|
||||
<div class="image-holder-app">
|
||||
|
||||
<img src="imgs/header.png" alt="phone" class="img-fluid">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="section darker-bg">
|
||||
|
||||
<div class="section-title">
|
||||
<h3>conhece as</h3>
|
||||
<h2>principais funcionalidades</h2>
|
||||
</div>
|
||||
<div class="card-features">
|
||||
<div class="card-body">
|
||||
|
||||
<h3 class="card-title">
|
||||
Jogo do ENEI
|
||||
</h3>
|
||||
|
||||
<p class="card-text">Nesta página podes encontrar as tuas informações pessoais, o que tens direito com o
|
||||
teu bilhete, e ainda as tuas equipas</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<h3 class="card-title">
|
||||
Inscrições em palestras
|
||||
</h3>
|
||||
<p class="card-text">Através da aplicação é ainda possível fazer inscrições nas palestras e workshops
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<h3 class="card-title">
|
||||
Calendário
|
||||
</h3>
|
||||
<p class="card-text">Acompanha todas as palestras e os seus detalhes através da app.</p>
|
||||
<p class="card-text">Possui ainda a localização da palestra no campus.</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<h3 class="card-title">
|
||||
Criar equipas
|
||||
</h3>
|
||||
<p class="card-text">Faz um simples scan e adiciona os teus amigos à tua equipa!!</p>
|
||||
<p class="card-text">Caso sejas o capitão da equipa, podes ainda alterar o nome e remover elementos.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-app">
|
||||
|
||||
<img src="imgs/p.png" alt="phone" class="img-fluid">
|
||||
<div class="container-login">
|
||||
<h1>Como usar a APP?</h1>
|
||||
<div class="text-login">
|
||||
<p>Para utilizares a app deves possuir um bilhete.</p>
|
||||
<p>No momento de compra do bilhete recebeste um email com o bilhete, esse bilhete possuí um QR code.
|
||||
</p>
|
||||
<p>O login na app é feito usando esse QR code</p>
|
||||
<p>Para obteres a password, deves efectuar reset através da APP, ou preenchendo o campo a baixo.</p>
|
||||
<form>
|
||||
|
||||
<input type="email" placeholder="Introduz o teu email">
|
||||
<input type="button" data-bind="click: buy" value="RESET PASSWORD">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container features-app ">
|
||||
|
||||
<h3 class="subtitle">descobre as </h3>
|
||||
<h1>Páginas da aplicação</h1>
|
||||
|
||||
|
||||
<button class="tablink" onclick="openPage('Home', this, 'white')" id="defaultOpen">Home</button>
|
||||
<button class="tablink" onclick="openPage('teams', this, 'white')">Equipas</button>
|
||||
<button class="tablink" onclick="openPage('events', this, 'white')">Eventos</button>
|
||||
<button class="tablink" onclick="openPage('game', this, 'white')">Jogo do ENEI</button>
|
||||
<button class="tablink" onclick="openPage('calendar', this, 'white')">Calendário</button>
|
||||
<button class="tablink" onclick="openPage('sign', this, 'white')">Inscrições </button>
|
||||
|
||||
<div id="Home" class="tabcontent">
|
||||
|
||||
<div class="tabDetails">
|
||||
<img src="imgs/home.png" alt="phone">
|
||||
<div class="tabText">
|
||||
<h2>Home</h2>
|
||||
<h3>Página inicial e de perfil.</h3>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum, urna eu pellentesque
|
||||
pretium, nisi nisi fermentum enim, et sagittis dolor nulla vel sapien. Vestibulum sit amet
|
||||
mattis ante. Ut placerat dui eu nulla congue tincidunt ac a nibh. Mauris accumsan pulvinar lorem
|
||||
placerat volutpat. Praesent quis facilisis elit. Sed condimentum neque quis ex porttitor.</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer rutrum, urna eu pellentesque
|
||||
pretium, nisi nisi fermentum enim, et sagittis dolor nulla vel sapien. Vestibulum sit amet
|
||||
mattis ante. Ut placerat dui eu nulla congue tincidunt ac a nibh. Mauris accumsan pulvinar lorem
|
||||
placerat volutpat. Praesent quis facilisis elit. Sed condimentum neque quis ex porttitor,</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="teams" class="tabcontent">
|
||||
<h3>Equipas</h3>
|
||||
<p>equipas!</p>
|
||||
</div>
|
||||
|
||||
<div id="events" class="tabcontent">
|
||||
<h3>Eventos</h3>
|
||||
<p>Eventos.</p>
|
||||
</div>
|
||||
|
||||
<div id="game" class="tabcontent">
|
||||
<h3>Jogo do enei</h3>
|
||||
<p>Jogo.</p>
|
||||
</div>
|
||||
<div id="calendar" class="tabcontent">
|
||||
<h3>Calendário</h3>
|
||||
<p>calendar.</p>
|
||||
</div>
|
||||
<div id="sign" class="tabcontent">
|
||||
<h3>Inscrições</h3>
|
||||
<p>Inscrições</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="download-app">
|
||||
<div class="left">
|
||||
<h1>Faz já o download da aplicação</h1>
|
||||
<h3>Aplicação disponível nas típicas lojas de aplicações.</h3>
|
||||
|
||||
<div class="buttons">
|
||||
<a href="#">
|
||||
<div class="button-app">
|
||||
<div class="button-logo">
|
||||
<i class="fab fa-apple"></i>
|
||||
</div>
|
||||
<div class="button-text">
|
||||
<h3>Available on the</h3>
|
||||
<h2>App Store</h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
<a href="#">
|
||||
<div class="button-app">
|
||||
<div class="button-logo">
|
||||
<i class="fab fa-google-play"></i>
|
||||
</div>
|
||||
<div class="button-text">
|
||||
<h3>Available on the</h3>
|
||||
<h2>Play Store</h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- faqs section -->
|
||||
<section id="faqs">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
<div class="pre-h1">Perguntas Frequentes</div>
|
||||
<h1>Faq</h1>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<ul id="accordion">
|
||||
<li>
|
||||
<a href="#" title="O que é o ENEI?" rel="nofollow" class="toggle">O que é o ENEI?</a>
|
||||
<div class="content-accordion">
|
||||
<p>O Encontro Nacional de Estudantes de Informática (ENEI) é um evento que pretende
|
||||
oferecer aos estudantes de todo o país um evento que promove a aprendizagem, a troca
|
||||
de
|
||||
ideias e o convívio, enquanto tenta criar fortes ligações com o mundo empresarial.
|
||||
</p>
|
||||
|
||||
<p>Esta versão do evento também incluirá os tradicionais momentos de diversão noturnos
|
||||
que
|
||||
muito apelam a todos os participantes das antigas edições e são uma excelente via de
|
||||
networking e transferência de conhecimento!</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Onde me posso inscrever?" rel="nofollow" class="toggle">Onde me posso
|
||||
inscrever?</a>
|
||||
<div class="content-accordion">
|
||||
<p>Podes adquirir o teu bilhete <a href="https://tickets.enei.pt" title="Aqui">AQUI</a>.
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Quando é que o programa vai estar disponível?" rel="nofollow"
|
||||
class="toggle">Quando é que o programa vai estar disponível?</a>
|
||||
<div class="content-accordion">
|
||||
<p>O programa vai sendo lançado nas próximas semanas de forma iterativa.</p>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Quem pode participar no evento?" rel="nofollow" class="toggle">Quem pode
|
||||
participar no evento?</a>
|
||||
<div class="content-accordion">
|
||||
<p>Podem participar no ENEI'19 todos os estudantes do Ensino Superior ou Secundário.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Tenho acesso a todas as sessões?" rel="nofollow" class="toggle">Tenho
|
||||
acesso a todas as sessões?</a>
|
||||
<div class="content-accordion">
|
||||
<p>Não, as palestras e workshops necessitam de inscrições visto que têm lugares
|
||||
limitados.</p>
|
||||
<p>Brevemente poderás te inscrever na aplicação móvel do ENEI'19!</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<ul id="accordion">
|
||||
<li>
|
||||
<a href="#" title="O que é o ENEI?" rel="nofollow" class="toggle">O que é o ENEI?</a>
|
||||
<div class="content-accordion">
|
||||
<p>O Encontro Nacional de Estudantes de Informática (ENEI) é um evento que pretende
|
||||
oferecer aos estudantes de todo o país um evento que promove a aprendizagem, a troca
|
||||
de
|
||||
ideias e o convívio, enquanto tenta criar fortes ligações com o mundo empresarial.
|
||||
</p>
|
||||
|
||||
<p>Esta versão do evento também incluirá os tradicionais momentos de diversão noturnos
|
||||
que
|
||||
muito apelam a todos os participantes das antigas edições e são uma excelente via de
|
||||
networking e transferência de conhecimento!</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Onde me posso inscrever?" rel="nofollow" class="toggle">Onde me posso
|
||||
inscrever?</a>
|
||||
<div class="content-accordion">
|
||||
<p>Podes adquirir o teu bilhete <a href="https://tickets.enei.pt" title="Aqui">AQUI</a>.
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Quando é que o programa vai estar disponível?" rel="nofollow"
|
||||
class="toggle">Quando é que o programa vai estar disponível?</a>
|
||||
<div class="content-accordion">
|
||||
<p>O programa vai sendo lançado nas próximas semanas de forma iterativa.</p>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Quem pode participar no evento?" rel="nofollow" class="toggle">Quem pode
|
||||
participar no evento?</a>
|
||||
<div class="content-accordion">
|
||||
<p>Podem participar no ENEI'19 todos os estudantes do Ensino Superior ou Secundário.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" title="Tenho acesso a todas as sessões?" rel="nofollow" class="toggle">Tenho
|
||||
acesso a todas as sessões?</a>
|
||||
<div class="content-accordion">
|
||||
<p>Não, as palestras e workshops necessitam de inscrições visto que têm lugares
|
||||
limitados.</p>
|
||||
<p>Brevemente poderás te inscrever na aplicação móvel do ENEI'19!</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- social network section -->
|
||||
<aside id="social-network">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<h2>Segue-nos</h2>
|
||||
<ul>
|
||||
<li><a href="https://www.facebook.com/ENEIConf/" title="Facebook" target="_blank"
|
||||
class="icon-facebook"></a></li>
|
||||
<li><a href="https://www.instagram.com/eneiconf/" title="Instagram" target="_blank"
|
||||
class="icon-instagram"></a></li>
|
||||
<li><a href="https://www.linkedin.com/company/enei/" title="Linkedin" target="_blank"
|
||||
class="icon-linkedin"></a></li>
|
||||
<li><a href="mailto:geral@enei.pt" title="Email" target="_blank" class="icon-email"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
<!-- footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<p>© 2019 ENEI . Todos os direitos reservados</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/scripts.js"></script>
|
||||
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-130588243-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() { dataLayer.push(arguments); }
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-130588243-1');
|
||||
</script>
|
||||
<script>
|
||||
AOS.init();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|