Compare commits
229 Commits
Author | SHA1 | Date |
---|---|---|
ZMiguel Alves | 9579b2ba18 | |
Henrique Dias | 59e63c5bfc | |
Filipe | 72621ab623 | |
henrydays | 3bb87d3da8 | |
henrydays | c749252792 | |
henrydays | c54769e678 | |
henrydays | f86c9676d9 | |
henrydays | ed6899e507 | |
henrydays | 104f803d9f | |
henrydays | bd481082e2 | |
henrydays | eabce75cde | |
henrydays | a6a0975fda | |
Filipe | 8079b316ce | |
ZMiguel Alves | 03d69448ed | |
José Valdiviesso | b7e89ad93a | |
José Valdiviesso | c744ad3f78 | |
José Valdiviesso | 6e40d6e622 | |
Filipe | c1b58761d4 | |
Filipe | 5d1fb0449a | |
henrydays | 230ec88eb4 | |
Henrique Dias | 9f4ceebb51 | |
José Valdiviesso | d4bb3b6ba9 | |
José Valdiviesso | 2238f284d3 | |
José Valdiviesso | 32cfed9cea | |
henrydays | 7d70cc531d | |
henrydays | 198061d095 | |
henrydays | 9ef91cb7b6 | |
henrydays | ec89c33656 | |
henrydays | d30b355450 | |
henrydays | a003b6dc1d | |
henrydays | 4cd495d3f0 | |
José Valdiviesso | 604ac6d77b | |
José Valdiviesso | 480f04eafe | |
henrydays | dccd6e97c2 | |
henrydays | 20cedc1891 | |
henrydays | 95cc2bb77b | |
henrydays | 72c24148ee | |
henrydays | 54aa34648e | |
Filipe Pinho | 59b76647b0 | |
henrydays | 7a7c509907 | |
henrydays | 91e86146d0 | |
José Valdiviesso | d58588cbbd | |
henrydays | 8a8fda42e8 | |
José Valdiviesso | cc4b0e0063 | |
Filipe | 21cc13287d | |
José Valdiviesso | 1b5bcc62a3 | |
henrydays | 811c4eea70 | |
henrydays | 63227faa9b | |
henrydays | e1c2e8c2e1 | |
henrydays | eaf79af65f | |
henrydays | 18d64775f2 | |
Filipe | f133f0d5bd | |
Henrique Dias | a5852ba203 | |
Filipe | b7935bd9d4 | |
henrydays | 1f4622e179 | |
Filipe | c519c73310 | |
Filipe | 6099baa870 | |
henrydays | 06f420fbc2 | |
henrydays | 7bcb58614f | |
henrydays | 8fea345905 | |
henrydays | ac9cf77236 | |
henrydays | d6699f19a1 | |
henrydays | fa117ecbc4 | |
henrydays | 244eb07598 | |
henrydays | 99e9c904b4 | |
henrydays | e88c05524b | |
henrydays | 9b17cbf6d5 | |
henrydays | e8174e2571 | |
henrydays | 2f508c87ac | |
henrydays | 75fc88904f | |
henrydays | 52be11e520 | |
henrydays | 0d8be1dae3 | |
henrydays | 4f6fac7f6b | |
henrydays | 7bd5f58389 | |
henrydays | 4c98287ff7 | |
henrydays | 3ac56f42c4 | |
henrydays | cb1e556e27 | |
henrydays | 94c56d0c87 | |
José Valdiviesso | 90b34f9e03 | |
José Valdiviesso | 72f702d22c | |
Filipe | 2543807b53 | |
Filipe | f78337788c | |
Filipe | edc0974545 | |
Henrique Dias | 4cb8e6ed0d | |
Filipe | 553eac0586 | |
henrydays | c7d084f529 | |
Filipe | 113552c918 | |
henrydays | 9e0a6cb635 | |
henrydays | dc8ceeb788 | |
henrydays | 7773447913 | |
henrydays | 835a169a02 | |
henrydays | 42df84dc4f | |
henrydays | 66e4c1cdc0 | |
henrydays | e4a320fe9d | |
henrydays | d81c0f5a26 | |
henrydays | d0dd3b9358 | |
henrydays | acc8b17bab | |
henrydays | 2340f49830 | |
henrydays | 09999c8aa0 | |
henrydays | 79e8137e26 | |
henrydays | 595c5a8b85 | |
henrydays | c786723bee | |
Filipe | 7952a7d5f9 | |
Filipe | 145bb96257 | |
henrydays | dfc9615007 | |
henrydays | 0d8393ebc6 | |
henrydays | b2cceee40b | |
henrydays | bbc1eb6c74 | |
henrydays | ad6b41db7e | |
henrydays | 569991c7d0 | |
henrydays | f2ba735e16 | |
henrydays | 91cbb99bea | |
henrydays | cd75973040 | |
Filipe | 3d20fc6e69 | |
Henrique Dias | 8a280a98e7 | |
Filipe | b59ab8e757 | |
Filipe | d05f9a008b | |
henrydays | df6b9ad68e | |
henrydays | 6ec9b5e835 | |
henrydays | 8bf918f7a5 | |
Filipe | 32dde030cc | |
Filipe | 20f808268b | |
Filipe | f2627c8227 | |
henrydays | d29f0ba2cb | |
henrydays | 78431372b8 | |
henrydays | 0b435c394c | |
henrydays | af45872968 | |
henrydays | c7c0764170 | |
henrydays | 1b994bbbee | |
Filipe | 826b6156b6 | |
Henrique Dias | 565ec4f408 | |
Henrique Dias | 267080d993 | |
henrydays | 4af6c77536 | |
henrydays | 5f80816f16 | |
henrydays | 20111b9caf | |
henrydays | 6431f9afef | |
Filipe | ce66de1783 | |
Filipe | 4f5060a8ad | |
henrydays | befcb8b736 | |
henrydays | c7d3f7cde3 | |
henrydays | 18ab36a06f | |
henrydays | 71e37564f4 | |
Filipe Pinho | a39e2c6e20 | |
henrydays | b156bb6518 | |
henrydays | 40a2b1199d | |
henrydays | a41029a4f8 | |
henrydays | 599477f602 | |
henrydays | 7eb1ef3f36 | |
henrydays | d267b10a7b | |
henrydays | e412781e67 | |
henrydays | 43490cbe56 | |
henrydays | 5f3cce5f3a | |
João Borges | 9b505c172d | |
João Borges | a91654ba1c | |
henrydays | 2b90ed32a6 | |
henrydays | 2897fccb1c | |
henrydays | f0ad6d210e | |
henrydays | 4b30a430cd | |
henrydays | 2fe6014025 | |
henrydays | 7ec314be33 | |
henrydays | 9db3fa2471 | |
henrydays | 1ca2695c3f | |
henrydays | bd37518d76 | |
henrydays | 92a9fb8a2c | |
henrydays | 391dd17799 | |
henrydays | 312aafcca1 | |
henrydays | 95b6cd2cfb | |
henrydays | bfe760d51b | |
João Borges | fee3567d42 | |
João Borges | c60753a4a1 | |
henrydays | 916535b4ce | |
João Borges | 850b3be493 | |
João Borges | cfec25fc5a | |
henrydays | 116ae6c196 | |
henrydays | 9cd9a49c9b | |
henrydays | fbce4c801f | |
João Borges | d92771d25d | |
João Borges | 302d527e71 | |
henrydays | 3b95a78f2e | |
henrydays | 5637b43db9 | |
henrydays | 58d9444bbb | |
João Borges | 4428506244 | |
henrydays | eb543397a2 | |
Filipe Pinho | 2bb9a38a11 | |
henrydays | 5af35dcce3 | |
henrydays | a810aa52ca | |
henrydays | f4ccb246b2 | |
Henrique Dias | 435975feda | |
henrydays | c962779aea | |
José Valdiviesso | c3c3aeca45 | |
José Valdiviesso | bc576de930 | |
José Valdiviesso | a6eed722c7 | |
henrydays | d51f6f4478 | |
henrydays | 71b9ce7a51 | |
Filipe Pinho | 8a2f187022 | |
henrydays | c476e7bbf5 | |
henrydays | 6214aea437 | |
henrydays | d0fa3d3823 | |
Henrique Dias | c874205feb | |
Henrique Dias | aa2d8773a5 | |
João Borges | c2b7539e2f | |
José Valdiviesso | 89d8bb5585 | |
José Valdiviesso | 3bedefafb7 | |
José Valdiviesso | 1ccc5d6ad3 | |
José Valdiviesso | 166384ee7f | |
henrydays | 353130461a | |
henrydays | 0961498860 | |
henrydays | d43a5befc2 | |
João Borges | f6ed1f7675 | |
João Borges | e0d01a6a11 | |
João Borges | 09e8180b54 | |
Filipe Pinho | ffa5f3ec14 | |
Filipe Pinho | 596958c835 | |
henrydays | adef17b12e | |
henrydays | c20718bfba | |
henrydays | 3d2f5bb1cc | |
João Borges | e24d3c3391 | |
henrydays | 2239ad99db | |
henrydays | 46751679e5 | |
henrydays | 116fc1b3a9 | |
João Borges | 7b35f5c3ff | |
henrydays | 4b7909da4c | |
henrydays | 1d71783892 | |
henrydays | 295123e5ed | |
Henrique Dias | a017e03285 | |
João Borges | 2c50d1eb6a | |
henrydays | 4c1b2c5c02 | |
henrydays | 1e09446709 | |
Henrique Dias | eef29b10ab |
|
@ -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 6
|
||||
versionName "6"
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
}
|
||||
|
@ -149,6 +149,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
compile project(':react-native-maps')
|
||||
compile project(':react-native-device-info')
|
||||
compile project(':react-native-material-shadows')
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.app;
|
|||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactApplication;
|
||||
|
||||
import com.airbnb.android.react.maps.MapsPackage;
|
||||
import com.learnium.RNDeviceInfo.RNDeviceInfo;
|
||||
import ui.materialshadows.RNMaterialShadowsPackage;
|
||||
|
@ -30,6 +31,7 @@ public class MainApplication extends Application implements ReactApplication {
|
|||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage(),
|
||||
|
||||
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,4 +1,5 @@
|
|||
rootProject.name = 'app'
|
||||
|
||||
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'
|
||||
|
|
346
App/app/App.js
|
@ -16,7 +16,7 @@ import {
|
|||
TouchableOpacity,
|
||||
TextInput,
|
||||
NetInfo,
|
||||
Animated
|
||||
Animated, Linking,
|
||||
} from "react-native";
|
||||
|
||||
import { bindActionCreators } from "redux";
|
||||
|
@ -34,11 +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";
|
||||
var TimerMixin = require("react-timer-mixin");
|
||||
|
||||
function handleConnectivityChange() {
|
||||
|
@ -46,6 +47,9 @@ function handleConnectivityChange() {
|
|||
}
|
||||
|
||||
class App extends Component {
|
||||
|
||||
|
||||
|
||||
handleConnectivityChange = isConnected => {
|
||||
this.setState({ isConnected });
|
||||
};
|
||||
|
@ -77,13 +81,15 @@ class App extends Component {
|
|||
logged: false,
|
||||
isModalVisible: false,
|
||||
state: { text: "" },
|
||||
username: "QR code",
|
||||
username: "",
|
||||
failedAttempt: false,
|
||||
push: 4,
|
||||
UI_loginScannerActive: false,
|
||||
userDetails: { username: "", password: "" },
|
||||
isConnected: true,
|
||||
modalOpen: false
|
||||
modalOpen: false,
|
||||
modalResetPassword: false,
|
||||
resetText: ''
|
||||
};
|
||||
}
|
||||
_print = () => {
|
||||
|
@ -99,23 +105,13 @@ class App extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
//this.props.hold();
|
||||
this.props.loginInternal();
|
||||
NetInfo.isConnected.addEventListener(
|
||||
"connectionChange",
|
||||
this.handleConnectivityChange
|
||||
);
|
||||
|
||||
|
||||
|
||||
this.setState({ isModalVisible: false });
|
||||
//verifica se o utilizador tem token guardado
|
||||
this.props.checkUser(this.props.userDetails);
|
||||
this.keyboardDidShowListener = Keyboard.addListener(
|
||||
"keyboardDidShow",
|
||||
this._keyboardDidShow
|
||||
);
|
||||
this.keyboardDidHideListener = Keyboard.addListener(
|
||||
"keyboardDidHide",
|
||||
this._keyboardDidHide
|
||||
);
|
||||
this.props.checkUser(this.props.token);
|
||||
|
||||
}
|
||||
componentWillUnmount() {
|
||||
NetInfo.isConnected.removeEventListener(
|
||||
|
@ -123,6 +119,16 @@ class App extends Component {
|
|||
this.handleConnectivityChange
|
||||
);
|
||||
}
|
||||
_toggle = () => {
|
||||
this.setState({ modalResetPassword: false })
|
||||
}
|
||||
//faz call
|
||||
_reset = () => {
|
||||
//fecha modal
|
||||
this.props.resetPassword(this.props.token, this.state.resetText),
|
||||
this.setState({ modalResetPassword: false })
|
||||
//faz call
|
||||
}
|
||||
|
||||
_keyboardDidShow() {
|
||||
//alert('Keyboard Shown');
|
||||
|
@ -142,11 +148,14 @@ class App extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!this.props.logged && this.props.onHold) {
|
||||
return (
|
||||
<View style={UtilStyles.containerLoading}>
|
||||
<ActivityIndicator size="large" color="red" />
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
|
@ -158,20 +167,70 @@ class App extends Component {
|
|||
return <Router />;
|
||||
}
|
||||
return (
|
||||
<View style={styles.slide2}>
|
||||
<Modal isVisible={this.props.UI_loginScannerActive}>
|
||||
<View style={{ flex: 1, backgroundColor: "white" }}>
|
||||
<Button
|
||||
onPress={this.props.closeLoginQRScan}
|
||||
title={"Fechar scanner"}
|
||||
>
|
||||
{" "}
|
||||
</Button>
|
||||
|
||||
<QRCodeScanner
|
||||
onRead={this.onSuccess}
|
||||
cameraStyle={styles.cameraContainer}
|
||||
/>
|
||||
<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!
|
||||
</Text>
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
</View>
|
||||
</Modal>
|
||||
<View
|
||||
|
@ -179,7 +238,8 @@ class App extends Component {
|
|||
width: "100%",
|
||||
|
||||
justifyContent: "center",
|
||||
alignItems: "center"
|
||||
alignItems: "center",
|
||||
margin: 20
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
|
@ -187,81 +247,118 @@ class App extends Component {
|
|||
source={require("./assets/img/logo2.png")}
|
||||
/>
|
||||
</View>
|
||||
<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({ 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={30}
|
||||
color="#000"
|
||||
/>
|
||||
<Text>Scan QR</Text>
|
||||
{!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 &&
|
||||
<RkButton
|
||||
rkType="dark"
|
||||
style={styles.loginBtn}
|
||||
onPress={this._tryLogin}
|
||||
>
|
||||
Entrar
|
||||
</RkButton>
|
||||
}
|
||||
{this.props.alignItems &&
|
||||
<ActivityIndicator size="large" color="#0000ff" />
|
||||
}
|
||||
</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>
|
||||
<RkText style={{ color: "red" }} kType="header6">
|
||||
Recuperar 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 >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -282,10 +379,30 @@ const overlayColor = "rgba(0,0,0,0.30)";
|
|||
|
||||
const styles = {
|
||||
cameraContainer: {
|
||||
// height: Dimensions.get('window').height ,
|
||||
height: Dimensions.get('window').height,
|
||||
},
|
||||
resetPassword: {
|
||||
|
||||
|
||||
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
margin: 20,
|
||||
marginTop: 60,
|
||||
marginBottom: 60,
|
||||
|
||||
width: SCREEN_WIDTH * 0.8,
|
||||
|
||||
backgroundColor: "white",
|
||||
|
||||
borderRadius: 3,
|
||||
height: SCREEN_HEIGHT * 0.08,
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
paddingLeft: SCREEN_WIDTH * 0.05
|
||||
},
|
||||
passwordInput: {
|
||||
borderRadius: 90,
|
||||
|
||||
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
|
@ -295,7 +412,7 @@ const styles = {
|
|||
|
||||
backgroundColor: "white",
|
||||
|
||||
borderRadius: 90,
|
||||
borderRadius: 3,
|
||||
height: SCREEN_HEIGHT * 0.08,
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1,
|
||||
|
@ -307,15 +424,19 @@ const styles = {
|
|||
},
|
||||
scanQR: {
|
||||
//flexDirection: 'row',
|
||||
paddingTop: 5,
|
||||
flex: 1,
|
||||
//paddingTop: 5,
|
||||
backgroundColor: 10,
|
||||
alignItems: 'center',
|
||||
padding: 5,
|
||||
paddingRight: 15,
|
||||
|
||||
width: 80,
|
||||
paddingLeft: 10,
|
||||
backgroundColor: "#f24b4b",
|
||||
borderBottomRightRadius: 90,
|
||||
borderTopRightRadius: 90,
|
||||
height: "100%"
|
||||
//width: 80,
|
||||
// paddingLeft: 10,
|
||||
backgroundColor: "#CC1A17",
|
||||
borderBottomRightRadius: 3,
|
||||
borderTopRightRadius: 3,
|
||||
// height: "100%"
|
||||
},
|
||||
inputSection: {
|
||||
flexDirection: "row",
|
||||
|
@ -323,7 +444,7 @@ const styles = {
|
|||
|
||||
backgroundColor: "white",
|
||||
|
||||
borderRadius: 90,
|
||||
borderRadius: 3,
|
||||
height: SCREEN_HEIGHT * 0.08,
|
||||
borderColor: "#bfbdbd",
|
||||
borderWidth: 1
|
||||
|
@ -382,7 +503,8 @@ const styles = {
|
|||
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
marginTop: 200
|
||||
marginTop: 200,
|
||||
|
||||
},
|
||||
|
||||
logo2: {
|
||||
|
@ -491,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,6 +37,16 @@ import editCalendar from './screens/editCalendar';
|
|||
import choosePath from './screens/choosePath';
|
||||
import calendarDetail from './screens/calendarDetail';
|
||||
|
||||
//import resetPassword from './screens/resetPassword';
|
||||
|
||||
import eventDetail from './screens/eventDetail';
|
||||
|
||||
import teamDetail from './screens/teamDetail';
|
||||
|
||||
import event from './screens/event';
|
||||
|
||||
import map from './screens/map'
|
||||
|
||||
|
||||
const navigationOptions = ({navigation}) => ({
|
||||
headerLeft: <HeaderBackButton onPress={() => navigation.goBack(null)}/>,
|
||||
|
@ -44,6 +54,7 @@ const navigationOptions = ({navigation}) => ({
|
|||
|
||||
});
|
||||
|
||||
|
||||
const AppStack = createBottomTabNavigator(
|
||||
{
|
||||
Calendário: {
|
||||
|
@ -56,8 +67,17 @@ const AppStack = createBottomTabNavigator(
|
|||
)
|
||||
},
|
||||
},
|
||||
Mapa:{
|
||||
screen: map,
|
||||
navigationOptions: {
|
||||
|
||||
'Jogo do...': {
|
||||
tabBarIcon: ({tintColor}) => (
|
||||
<IconF name="map" color={tintColor} size={25}/>
|
||||
)
|
||||
},
|
||||
},
|
||||
|
||||
'Jogo': {
|
||||
screen: Jogo,
|
||||
|
||||
navigationOptions: {
|
||||
|
@ -80,7 +100,7 @@ const AppStack = createBottomTabNavigator(
|
|||
},
|
||||
|
||||
|
||||
Eventos: {
|
||||
Atividades: {
|
||||
screen: Eventos,
|
||||
|
||||
navigationOptions: {
|
||||
|
@ -90,7 +110,7 @@ const AppStack = createBottomTabNavigator(
|
|||
)
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Home: {
|
||||
screen: Home,
|
||||
navigationOptions: {
|
||||
|
@ -106,6 +126,7 @@ const AppStack = createBottomTabNavigator(
|
|||
{
|
||||
initialRouteName: 'Home',
|
||||
|
||||
|
||||
tabBarOptions: {
|
||||
showLabel: true, // hide labels
|
||||
activeTintColor: '#CC1A17', // active icon color
|
||||
|
@ -122,7 +143,8 @@ const Stack = createStackNavigator({
|
|||
screen: AppStack,
|
||||
navigationOptions: ({navigation}) => {
|
||||
const index = navigation.state.index;
|
||||
|
||||
|
||||
|
||||
if (navigation.state.routes[index].routeName == 'Home') {
|
||||
return {
|
||||
headerTitle: `${navigation.state.routes[index].routeName}`,
|
||||
|
@ -130,28 +152,42 @@ const Stack = createStackNavigator({
|
|||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('Profile')}>
|
||||
|
||||
<Text>editar</Text>
|
||||
<Text style={{marginRight:5}}>Editar dados</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (navigation.state.routes[index].routeName == 'Jogo') {
|
||||
return {
|
||||
headerTitle: (<Text style={{
|
||||
textAlign:'center',
|
||||
color:'#CC1A17',
|
||||
width:'100%',
|
||||
fontWeight:'bold',
|
||||
fontSize:25,
|
||||
|
||||
|
||||
}}>Jogo do ENEI'19</Text>)
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else if (navigation.state.routes[index].routeName == 'Calendário') {
|
||||
return {
|
||||
headerTitle: 'Calendário',
|
||||
headerRight: (
|
||||
<View style={{flex: 1, flexDirection: 'row'}}>
|
||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('Edit')}>
|
||||
<Text>FAQ</Text>
|
||||
|
||||
</TouchableOpacity>
|
||||
|
||||
|
||||
|
||||
<TouchableOpacity style={{marginRight: 20, flex: 1, flexDirection: 'row'}}
|
||||
onPress={() => navigation.navigate('choosePath')}>
|
||||
<Text>Escolher</Text>
|
||||
<IconFA name="user-edit" size={22}/>
|
||||
<Text style={{color:'#CC1A17', marginRight:5}}>Inscrições</Text>
|
||||
<IconFA name="user-edit" size={22} color={'#CC1A17'}/>
|
||||
</TouchableOpacity></View>
|
||||
|
||||
)
|
||||
|
@ -177,6 +213,18 @@ const Stack = createStackNavigator({
|
|||
)
|
||||
}
|
||||
}
|
||||
else if (navigation.state.routes[index].routeName == 'Atividades') {
|
||||
return {
|
||||
headerTitle: 'Atividades',
|
||||
}
|
||||
|
||||
}
|
||||
else if (navigation.state.routes[index].routeName == 'Mapa') {
|
||||
return {
|
||||
headerTitle: 'Mapa do Evento',
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
return {
|
||||
header: null
|
||||
|
@ -196,7 +244,17 @@ const Stack = createStackNavigator({
|
|||
calendarDetail: {
|
||||
screen: calendarDetail,
|
||||
},
|
||||
eventDetail: {
|
||||
screen: eventDetail,
|
||||
},
|
||||
teamDetail:{
|
||||
screen: teamDetail,
|
||||
},
|
||||
|
||||
|
||||
event:{
|
||||
screen: event
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
After Width: | Height: | Size: 297 KiB |
After Width: | Height: | Size: 8.6 KiB |
|
@ -19,7 +19,7 @@ import * as Progress from "react-native-progress";
|
|||
import { connect } from "react-redux";
|
||||
|
||||
import { bindActionCreators } from "redux";
|
||||
|
||||
import PTRView from 'react-native-pull-to-refresh';
|
||||
import * as Actions from "../store/actions"; //Import your actionss
|
||||
|
||||
const formatObj = obj => {
|
||||
|
@ -29,7 +29,8 @@ const formatObj = obj => {
|
|||
|
||||
return a;
|
||||
};
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
class Calendar extends React.Component {
|
||||
state = {
|
||||
index: 0,
|
||||
|
@ -45,9 +46,12 @@ class Calendar extends React.Component {
|
|||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.props.getEvents(this.props.user);
|
||||
|
||||
this.props.getSessions(this.props.userDetails.token);
|
||||
|
||||
// this.props.getSessions(this.props.token);
|
||||
|
||||
// this.props.getEvents(this.props.user,this.props.careerPath);
|
||||
|
||||
}
|
||||
|
||||
_openDetails = () => {
|
||||
|
@ -64,22 +68,11 @@ class Calendar extends React.Component {
|
|||
<View style={styles.event}>
|
||||
<View style={styles.titleContainer}>
|
||||
<Text style={[styles.title]}>{item.name}</Text>
|
||||
<Text style={{ color: "black" }}>Local: 1</Text>
|
||||
<Text style={{ color: "black" }}>{item.place}</Text>
|
||||
</View>
|
||||
|
||||
<View>
|
||||
<Text style={styles.description}>{item.description}</Text>
|
||||
<View style={styles.details}>
|
||||
<Progress.Bar
|
||||
color={"#000000"}
|
||||
progress={item.Enrolled / item.MaxAttendees}
|
||||
unfilledColor={"white"}
|
||||
width={210}
|
||||
/>
|
||||
<Text>
|
||||
{item.Enrolled} / {item.MaxAttendees}
|
||||
</Text>
|
||||
</View>
|
||||
<Text style={styles.description} numberOfLines={8}>{item.description}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
@ -140,9 +133,15 @@ class Calendar extends React.Component {
|
|||
constructor() {
|
||||
super();
|
||||
}
|
||||
_refresh=()=>{
|
||||
this.props.getEvents(this.props.user,this.props.careerPath, this.props.token);
|
||||
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const ThirdRoute = () => (
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
{this.props.events != undefined && (
|
||||
<Timeline
|
||||
|
@ -210,6 +209,7 @@ class Calendar extends React.Component {
|
|||
</ScrollView>
|
||||
);
|
||||
const FirstRoute = () => (
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
{this.props.events != undefined && (
|
||||
<Timeline
|
||||
|
@ -238,6 +238,7 @@ class Calendar extends React.Component {
|
|||
/>
|
||||
)}
|
||||
</ScrollView>
|
||||
|
||||
);
|
||||
const SecondRoute = () => (
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
|
@ -275,7 +276,9 @@ class Calendar extends React.Component {
|
|||
);
|
||||
|
||||
return (
|
||||
|
||||
<View style={{ flex: 1 }}>
|
||||
|
||||
<View>
|
||||
{this.props.careerPath != undefined && (
|
||||
<Text
|
||||
|
@ -292,6 +295,7 @@ class Calendar extends React.Component {
|
|||
</Text>
|
||||
)}
|
||||
</View>
|
||||
|
||||
<TabView
|
||||
navigationState={this.state}
|
||||
renderScene={SceneMap({
|
||||
|
@ -308,9 +312,14 @@ class Calendar extends React.Component {
|
|||
height: Dimensions.get("window").height
|
||||
}}
|
||||
style={{ backgroundColor: "#F2F2F2" }}
|
||||
indicatorStyle={{ backgroundColor: "pink" }}
|
||||
/>
|
||||
indicatorStyle={{ backgroundColor: "pink"}}
|
||||
/><View style={{ alignContent:'center', alignItems:'center', backgroundColor:'transparent',position: 'absolute',marginTop:SCREEN_HEIGHT*0.72,marginLeft:10}}><Button onPress={this._refresh} title="Refresh" color="#CC1A17"
|
||||
/></View>
|
||||
|
||||
</View>
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -346,7 +355,8 @@ const styles = StyleSheet.create({
|
|||
description: {
|
||||
padding: 10,
|
||||
paddingLeft: 0,
|
||||
paddingTop: 0
|
||||
paddingTop: 0,
|
||||
textAlign:"justify"
|
||||
},
|
||||
title: {
|
||||
color: "#212121",
|
||||
|
@ -412,4 +422,4 @@ function mapDispatchToProps(dispatch) {
|
|||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Calendar);
|
||||
)(Calendar);
|
|
@ -1,23 +1,40 @@
|
|||
import * as React from "react";
|
||||
import { View, StyleSheet, Dimensions, Text, Button } from "react-native";
|
||||
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Text,
|
||||
Button,
|
||||
ScrollView,
|
||||
Image,
|
||||
TouchableOpacity,
|
||||
FlatList,
|
||||
ActivityIndicator
|
||||
} from "react-native";
|
||||
import IconFA from "react-native-vector-icons/FontAwesome5";
|
||||
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
|
||||
|
||||
const FirstRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: "#ff4081" }]} />
|
||||
);
|
||||
const SecondRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: "#673ab7" }]} />
|
||||
);
|
||||
import rallyImg from "../assets/rallyTascas.jpg";
|
||||
|
||||
const ThirdRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: "#673ab7" }]} />
|
||||
);
|
||||
import { connect } from "react-redux";
|
||||
|
||||
const FourthRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: "#673ab7" }]} />
|
||||
);
|
||||
import { bindActionCreators } from "redux";
|
||||
|
||||
export default class Eventos extends React.Component {
|
||||
import * as Actions from "../store/actions"; //Import your actionss
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
import PTRView from "react-native-pull-to-refresh";
|
||||
|
||||
class Eventos extends React.Component {
|
||||
_update = () => {
|
||||
this.props.getAllEvents(this.props.internalToken);
|
||||
this.props.getEventLocsVisited(
|
||||
this.props.team.id,
|
||||
this.props.internalToken
|
||||
);
|
||||
};
|
||||
state = {
|
||||
index: 0,
|
||||
routes: [
|
||||
|
@ -28,20 +45,162 @@ export default class Eventos extends React.Component {
|
|||
]
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.props.getAllEvents(this.props.internalToken);
|
||||
this.props.getEventLocsVisited(
|
||||
this.props.team.id,
|
||||
this.props.internalToken
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { navigate } = this.props.navigation;
|
||||
return (
|
||||
<View>
|
||||
<Button
|
||||
title="Febrada"
|
||||
onPress={() => this.props.navigation.navigate("febrada")}
|
||||
/>
|
||||
</View>
|
||||
<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,
|
||||
backgroundColor: "white"
|
||||
}}
|
||||
>
|
||||
<Text style={{ fontSize: 12, margin: 15, textAlign: "center" }}>
|
||||
Se estiver a demorar muito, arrasta para atualizar
|
||||
</Text>
|
||||
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
</View>
|
||||
)}
|
||||
<ScrollView styles={styles.scroll}>
|
||||
<FlatList
|
||||
data={this.props.eventsInternal}
|
||||
renderItem={({ item }) => (
|
||||
<View>
|
||||
<TouchableOpacity
|
||||
onPress={() => navigate("event", { info: item })}
|
||||
>
|
||||
<View style={styles.cardContainer}>
|
||||
<Image
|
||||
style={{
|
||||
flex: 1,
|
||||
width: undefined,
|
||||
height: undefined
|
||||
}}
|
||||
resizeMode="contain"
|
||||
source={{ uri: item.imagem }}
|
||||
/>
|
||||
<View style={styles.cardDesc}>
|
||||
<Text style={styles.cardDescText}>{item.nome}</Text>
|
||||
<Text style={styles.cardHours}>{item.horas}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
</ScrollView>
|
||||
</View>
|
||||
</PTRView>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
cardHours: {
|
||||
textAlign: "center",
|
||||
color: "white",
|
||||
margin: 10,
|
||||
width:'45%'
|
||||
},
|
||||
|
||||
cardDesc: {
|
||||
//alignSelf:'center',
|
||||
backgroundColor: "#CC1A17",
|
||||
// flex:1,
|
||||
flexDirection: "row"
|
||||
},
|
||||
cardDescText: {
|
||||
fontWeight: "bold",
|
||||
color: "white",
|
||||
fontSize: 18,
|
||||
|
||||
width: "45%",
|
||||
margin: 10
|
||||
},
|
||||
container: {
|
||||
backgroundColor: "white",
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: "column",
|
||||
paddingBottom: 20
|
||||
},
|
||||
|
||||
scroll: {
|
||||
flex: 1
|
||||
},
|
||||
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
//flexDirection: 'row',
|
||||
//padding: 10,
|
||||
margin: 20,
|
||||
marginBottom: 0,
|
||||
backgroundColor: "#fff",
|
||||
height: SCREEN_WIDTH * 0.62,
|
||||
borderRadius: 5
|
||||
//borderWidth: 2,
|
||||
},
|
||||
|
||||
scene: {
|
||||
flex: 1
|
||||
}
|
||||
});
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
onHold: state.apiReducer.onHold,
|
||||
bilhete: state.apiReducer.bilhete,
|
||||
alimentacao: state.apiReducer.alimentacao,
|
||||
alojamento: state.apiReducer.alojamento,
|
||||
acesso: state.apiReducer.acesso,
|
||||
team: state.apiReducer.team,
|
||||
internalToken: state.apiReducer.internalToken,
|
||||
eventsInternal: state.apiReducer.eventsInternal
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Eventos);
|
||||
|
|
|
@ -1,374 +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,
|
||||
} 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 Icon from "react-native-vector-icons/Ionicons";
|
||||
|
||||
|
||||
var options = {
|
||||
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,
|
||||
|
||||
constructor(props) {
|
||||
formValid: true,
|
||||
|
||||
super(props);
|
||||
jobs: this.props.user.Company,
|
||||
jobsError: false,
|
||||
jobsErrorMessage: "",
|
||||
|
||||
this.state = {
|
||||
name:this.props.user.Name,
|
||||
userDetails:{},
|
||||
token: false,
|
||||
tokenData: '',
|
||||
loggedIn: false,
|
||||
onHold: true,
|
||||
user: {},
|
||||
cenas: {Name: 'as'},
|
||||
text: '',
|
||||
email: this.props.user.Email,
|
||||
emailError: false,
|
||||
emailErrorMessage: "",
|
||||
|
||||
phone: this.props.user.Mobile,
|
||||
phoneError: false,
|
||||
phoneErrorMessage: "",
|
||||
|
||||
formValid: true,
|
||||
address: this.props.user.Address,
|
||||
addressError: false,
|
||||
addressErrorMessage: "",
|
||||
|
||||
jobs: this.props.user.Company,
|
||||
jobsError: false,
|
||||
jobsErrorMessage: '',
|
||||
city: this.props.user.City,
|
||||
cityError: false,
|
||||
cityErrorMessage: "",
|
||||
|
||||
email: this.props.user.Email,
|
||||
emailError: false,
|
||||
emailErrorMessage: '',
|
||||
oldPass: "",
|
||||
new1: "",
|
||||
new2: "",
|
||||
|
||||
phone: this.props.user.Mobile,
|
||||
phoneError: false,
|
||||
phoneErrorMessage: '',
|
||||
|
||||
address: this.props.user.Address,
|
||||
addressError: false,
|
||||
addressErrorMessage: '',
|
||||
|
||||
city: this.props.user.City,
|
||||
cityError: false,
|
||||
cityErrorMessage: '',
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
_logout = () => {
|
||||
|
||||
this.props.logoutUser();
|
||||
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;
|
||||
_validateData = (name, jobs, email, phone, address, city) => {
|
||||
let valid = null;
|
||||
|
||||
v = Validate('name',name );
|
||||
v = Validate("name", name);
|
||||
|
||||
let v = Validate("email", email);
|
||||
this.setState({ emailError: v[0], emailErrorMessage: v[1] });
|
||||
|
||||
let v = Validate('email', email);
|
||||
this.setState({emailError: v[0], emailErrorMessage: v[1]});
|
||||
v = Validate("jobs", jobs);
|
||||
|
||||
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
|
||||
);
|
||||
});
|
||||
|
||||
// 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]}, () => {
|
||||
v = Validate("city", city);
|
||||
|
||||
console.log('email error: ' + this.state.emailError + ' job Error: ' + this.state.jobsError);
|
||||
});
|
||||
// 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);
|
||||
|
||||
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({ addressError: v[0], addressErrorMessage: v[1] });
|
||||
|
||||
// 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("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);
|
||||
|
||||
v = Validate('address', address);
|
||||
if (
|
||||
this.state.emailError ||
|
||||
this.state.jobsError ||
|
||||
this.state.phoneError ||
|
||||
this.state.addressError ||
|
||||
this.state.cityError
|
||||
)
|
||||
this.setState({ formValid: false });
|
||||
});
|
||||
};
|
||||
|
||||
// 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]});
|
||||
saveData() {
|
||||
const {
|
||||
name,
|
||||
jobs,
|
||||
email,
|
||||
phone,
|
||||
address,
|
||||
city,
|
||||
formValid,
|
||||
url,
|
||||
curso,
|
||||
profileIcon
|
||||
} = this.state;
|
||||
|
||||
// this._validateData(name, jobs, email, phone, address, city,curso);
|
||||
|
||||
v = Validate('city', city);
|
||||
console.log(formValid);
|
||||
|
||||
// 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);
|
||||
this.props.hold();
|
||||
if (formValid) {
|
||||
console.log("data valid");
|
||||
|
||||
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} = this.state;
|
||||
|
||||
this._validateData(name,jobs, email, phone, address, city);
|
||||
|
||||
console.log(formValid);
|
||||
|
||||
if (formValid){
|
||||
console.log("data valid");
|
||||
|
||||
this.props.updateUser(this.props.userDetails.token,{
|
||||
Name: this.state.name,
|
||||
// LastName: "Último",
|
||||
Company: jobs,
|
||||
// Job: jobs,
|
||||
Address: address,
|
||||
City: city,
|
||||
// PostalCode: "3000-010",
|
||||
|
||||
Mobile: phone,
|
||||
Avatar: "base64"
|
||||
} ); this.props.getUserInfo(this.props.userDetails.token);
|
||||
}
|
||||
|
||||
|
||||
|
||||
else
|
||||
console.log("data not 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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
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}}>User Bio</Text>
|
||||
</View>
|
||||
<View>
|
||||
<TouchableOpacity onPress={() => this.saveData()}>
|
||||
<Icon name="ios-save" size={30}/><Text>Save</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.userBio}>
|
||||
<View style={styles.userBioRow}>
|
||||
<Icon name="ios-person" style={styles.userBioLogo} size={25}/>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(n) => {
|
||||
this.setState({name:n })
|
||||
}}
|
||||
value={this.state.name}/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
<View style={styles.userBioRow}>
|
||||
<Icon name="ios-laptop" style={styles.userBioLogo} size={25}/>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(job) => {
|
||||
this.setState({jobs: job})
|
||||
}}
|
||||
value={this.state.jobs}/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Icon name="ios-phone-portrait" style={styles.userBioLogo} size={25}/>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(phone) => {
|
||||
this.setState({phone: phone})
|
||||
}}
|
||||
value={this.state.phone}/>
|
||||
</View>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Icon name="ios-map" style={styles.userBioLogo} size={25}/>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(add) => {
|
||||
this.setState({address: add})
|
||||
}}
|
||||
value={this.state.address}/>
|
||||
</View>
|
||||
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
|
||||
<View style={styles.userBioRow}>
|
||||
<Icon name="ios-map" style={styles.userBioLogo} size={25}/>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
onChangeText={(city) => {
|
||||
this.setState({city: city})
|
||||
}}
|
||||
value={this.state.city}/>
|
||||
</View>
|
||||
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
<View style={styles.userBioRow}>
|
||||
<Icon name="ios-person" style={styles.userBioLogo} size={25}/>
|
||||
<TouchableOpacity>
|
||||
<Text style={styles.userCurriculum}>O meu Curriculo</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/*PassWord Edit*/}
|
||||
<View style={styles.container}>
|
||||
<View style={styles.userBioRowHeader}>
|
||||
<View style={styles.userBioRowTitle}>
|
||||
<Text style={{color: '#CC1A17', fontWeight: 'bold', fontSize: 20}}>Nova Password:</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.userBio}>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userPassText} size={25}>
|
||||
Old Password:
|
||||
</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
placeholder='Antiga Password' secureTextEntry={true}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userPassText} size={25}>
|
||||
Nova Password:
|
||||
</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
placeholder='Nova Password' secureTextEntry={true}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.userBioRow}>
|
||||
<Text style={styles.userPassText} size={25}>
|
||||
Repetir Password:
|
||||
</Text>
|
||||
|
||||
<TextInput style={styles.userBioText}
|
||||
placeholder='Repetir Password' secureTextEntry={true}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
<TouchableOpacity onPress={this._logout} style={{ height: 50, justifyContent: 'center', alignItems: 'center', backgroundColor: '#CC1A17'}}>
|
||||
<Text style={{color:"#fff", fontWeight: 'bold'}}>Logout</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
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>
|
||||
<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: 20,
|
||||
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
|
||||
|
||||
},
|
||||
userBioText: {
|
||||
width: SCREEN_WIDTH * 0.50,
|
||||
},
|
||||
|
||||
userPassText: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
},
|
||||
|
||||
userBioLogo: {
|
||||
marginLeft: SCREEN_WIDTH * 0.05,
|
||||
width: SCREEN_WIDTH * 0.15,
|
||||
|
||||
},
|
||||
|
||||
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,
|
||||
}
|
||||
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);
|
||||
|
|
|
@ -1,174 +1,109 @@
|
|||
import React from 'react';
|
||||
import {View, Image, Vibration, Dimensions, Text, Button, TouchableOpacity, ActivityIndicator} from 'react-native';
|
||||
import { View, Image, Vibration, Dimensions,Text ,Button ,TouchableOpacity } from 'react-native';
|
||||
import QRCodeScanner from 'react-native-qrcode-scanner';
|
||||
import {UtilStyles} from '../assets/styles'
|
||||
import CodeInput from 'react-native-confirmation-code-input';
|
||||
|
||||
import Modal from "react-native-modal";
|
||||
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
|
||||
|
||||
import {
|
||||
RkButton,
|
||||
RkTheme, RkText
|
||||
} from 'react-native-ui-kitten';
|
||||
|
||||
|
||||
import IconMI from "react-native-vector-icons/MaterialIcons"
|
||||
import { bindActionCreators } from "redux";
|
||||
import PTRView from "react-native-pull-to-refresh";
|
||||
import * as Actions from "../store/actions";
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import {RkButton,
|
||||
RkTheme , RkText} from 'react-native-ui-kitten';
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
|
||||
export default class Scan extends React.Component {
|
||||
class Scan extends React.Component {
|
||||
|
||||
_toggleModal = () =>
|
||||
this.setState({isModalVisible: !this.state.isModalVisible});
|
||||
this.setState({ isModalVisible: !this.state.isModalVisible });
|
||||
|
||||
_activate = () => {
|
||||
_activate=()=>{
|
||||
|
||||
this.setState({isModalVisible: !this.state.isModalVisible, reactivate: true});
|
||||
this.setState({ isModalVisible: !this.state.isModalVisible ,reactivate:true});
|
||||
this.scanner.reactivate();
|
||||
}
|
||||
|
||||
onSuccess = (e) => {
|
||||
|
||||
this.setState({isModalVisible: !this.state.isModalVisible, isActive: false});
|
||||
this.setState({code: e.data});
|
||||
};
|
||||
|
||||
this.setState({code:e.data});
|
||||
this.props.scanQrCode({UserQR:this.props.user.Code, ScanQR: e.data},this.props.internalToken);
|
||||
|
||||
setTimeout(()=> {
|
||||
if(this.scanner!=null)
|
||||
this.scanner.reactivate()
|
||||
},
|
||||
2000
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
state = {
|
||||
isActive: true,
|
||||
isRender: true,
|
||||
reactivate: false,
|
||||
isModalVisible: false,
|
||||
code: '',
|
||||
|
||||
index: 0,
|
||||
routes: [
|
||||
{key: 'scan', title: 'Scan', icon: ''},
|
||||
{key: 'history', title: 'Histórico', icon: 'history'},
|
||||
{key: 'fav', title: 'Favoritos', icon: 'favorite'},
|
||||
],
|
||||
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
state = {
|
||||
isActive:true,
|
||||
isRender: true,
|
||||
reactivate:false,
|
||||
isModalVisible: false,
|
||||
code:''
|
||||
|
||||
}
|
||||
componentDidMount() {
|
||||
this.props.navigation.addListener('willFocus', (route) => {
|
||||
this.setState({isRender: true})
|
||||
this.setState({ isRender: true })
|
||||
});
|
||||
this.props.navigation.addListener('willBlur', (route) => {
|
||||
this.setState({isRender: false})
|
||||
this.setState({ isRender: false })
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
/*Screen SCAN*/
|
||||
const scanScreen = () => (
|
||||
<QRCodeScanner
|
||||
showMarker
|
||||
ref={(node) => {
|
||||
this.scanner = node
|
||||
}}
|
||||
reactivate={false}
|
||||
cameraProps={{captureAudio: false}}
|
||||
onRead={this.onSuccess.bind(this)}
|
||||
showMarker={true}
|
||||
cameraStyle={{height: SCREEN_HEIGHT}}
|
||||
fadeIn={true}
|
||||
customMarker={
|
||||
<View style={{flex: 1}}>
|
||||
<Modal isVisible={this.state.isModalVisible}
|
||||
style={{backgroundColor: '#E8E8E8', borderRadius: 30, height: 100}}>
|
||||
<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>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
const historyScreen = () => (
|
||||
<View style={{backgroundColor: '#ff4081'}}>
|
||||
</View>
|
||||
);
|
||||
|
||||
const favScreen = () => (
|
||||
<View style={{backgroundColor: '#a95'}}>
|
||||
</View>
|
||||
|
||||
);
|
||||
|
||||
|
||||
_renderLazyPlaceholder = () => {
|
||||
return (
|
||||
<ActivityIndicator size="large" color="red" />
|
||||
);
|
||||
};
|
||||
|
||||
{
|
||||
|
||||
return (
|
||||
|
||||
<View style={{flex: 1}}>
|
||||
|
||||
{this.state.isRender &&
|
||||
<TabView
|
||||
lazy
|
||||
navigationState={this.state}
|
||||
renderScene={SceneMap({
|
||||
scan: scanScreen,
|
||||
history: historyScreen,
|
||||
fav: favScreen,
|
||||
})}
|
||||
renderLazyPlaceholder={this._renderLazyPlaceholder}
|
||||
onIndexChange={(index) => this.setState({index})}
|
||||
initialLayout={{width: SCREEN_WIDTH, height: SCREEN_HEIGHT}}
|
||||
renderIcon={({route}) => (
|
||||
<IconMI
|
||||
name={route.icon}
|
||||
size={15}
|
||||
color={'white'}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
{
|
||||
|
||||
return (
|
||||
<View style={{flex: 1}}>
|
||||
<TouchableOpacity onPress={this._toggleModal}>
|
||||
<Text>Show Modal</Text>
|
||||
</TouchableOpacity>
|
||||
<Modal isVisible={this.state.isModalVisible}>
|
||||
<View style={{flex: 1}}>
|
||||
<Text>Hello!</Text>
|
||||
<TouchableOpacity onPress={this._toggleModal}>
|
||||
<Text>Hide me!</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</Modal>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
<View style={{flex: 1}}>
|
||||
|
||||
|
||||
|
||||
|
||||
{ this.state.isRender &&
|
||||
|
||||
<QRCodeScanner
|
||||
showMarker
|
||||
ref={(node) => { this.scanner = node }}
|
||||
reactivate={false}
|
||||
|
||||
onRead={this.onSuccess.bind(this)}
|
||||
|
||||
showMarker={true}
|
||||
|
||||
cameraStyle={{ height: SCREEN_HEIGHT }}
|
||||
|
||||
fadeIn={true}
|
||||
|
||||
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
)}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
RkTheme.setType('RkButton', 'dark', {
|
||||
container: {
|
||||
paddingTop: 10,
|
||||
backgroundColor: 'gray',
|
||||
|
||||
borderRadius: 90,
|
||||
paddingTop:10,
|
||||
backgroundColor: 'gray',
|
||||
|
||||
borderRadius: 90,
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a 393 device width
|
||||
|
@ -176,31 +111,35 @@ const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a
|
|||
const overlayColor = 'rgba(0,0,0,0.30)';
|
||||
|
||||
const styles = {
|
||||
|
||||
recover: {
|
||||
paddingTop: 10,
|
||||
|
||||
recover:{
|
||||
paddingTop:10,
|
||||
color: "red",
|
||||
paddingBottom: 10
|
||||
paddingBottom:10
|
||||
},
|
||||
manual: {},
|
||||
manual:{
|
||||
|
||||
|
||||
|
||||
logo: {
|
||||
},
|
||||
|
||||
logo:{
|
||||
|
||||
height: SCREEN_HEIGHT * 0.35,
|
||||
width: SCREEN_WIDTH,
|
||||
height:SCREEN_HEIGHT*0.35,
|
||||
width:SCREEN_WIDTH,
|
||||
backgroundColor: overlayColor,
|
||||
},
|
||||
rectangleContainer: {
|
||||
|
||||
|
||||
flex: 1,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
backgroundColor: "transparent",
|
||||
|
||||
|
||||
},
|
||||
|
||||
rectangle: {
|
||||
|
||||
|
||||
height: rectDimensions,
|
||||
width: rectDimensions,
|
||||
alignItems: "center",
|
||||
|
@ -228,4 +167,24 @@ const styles = {
|
|||
width: SCREEN_WIDTH,
|
||||
backgroundColor: overlayColor
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
|
||||
internalToken: state.apiReducer.internalToken,
|
||||
cromos: state.apiReducer.cromos
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Scan);
|
||||
|
|
@ -1,414 +1,485 @@
|
|||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Image,
|
||||
ScrollView,
|
||||
Text,
|
||||
Button,
|
||||
TouchableOpacity,
|
||||
ImageBackground
|
||||
} from 'react-native';
|
||||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Image,
|
||||
ScrollView,
|
||||
Text,
|
||||
Button,
|
||||
TouchableOpacity,
|
||||
ImageBackground,
|
||||
ListView,
|
||||
FlatList,
|
||||
ActivityIndicator,
|
||||
Linking,
|
||||
Platform
|
||||
} from "react-native";
|
||||
|
||||
import {Divider, Icon, Avatar} from 'react-native-elements'
|
||||
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
|
||||
import {
|
||||
RkButton, RkCard, RkText,
|
||||
RkTheme
|
||||
} from 'react-native-ui-kitten';
|
||||
import Timeline from 'react-native-timeline-feed'
|
||||
import moment from "moment";
|
||||
import { Divider, Icon, Avatar } from "react-native-elements";
|
||||
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
|
||||
import { RkButton, RkCard, RkText, RkTheme } from "react-native-ui-kitten";
|
||||
import Timeline from "react-native-timeline-feed";
|
||||
|
||||
import * as Progress from 'react-native-progress';
|
||||
import * as Progress from "react-native-progress";
|
||||
|
||||
import NavAbsolute from '../components/Nav';
|
||||
import NavAbsolute from "../components/Nav";
|
||||
|
||||
import {connect} from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import {bindActionCreators} from 'redux';
|
||||
import { bindActionCreators } from "redux";
|
||||
|
||||
import * as Actions from '../store/actions'; //Import your actionss
|
||||
import Swiper from 'react-native-swiper';
|
||||
import * as Actions from "../store/actions"; //Import your actionss
|
||||
import Swiper from "react-native-swiper";
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
import FitImage from 'react-native-fit-image';
|
||||
import MapView, {PROVIDER_GOOGLE} from 'react-native-maps';
|
||||
|
||||
const formatObj = (obj) => {
|
||||
import FitImage from "react-native-fit-image";
|
||||
|
||||
let a = {};
|
||||
import MapView, { PROVIDER_GOOGLE } from "react-native-maps";
|
||||
|
||||
a.push({})
|
||||
const formatObj = obj => {
|
||||
let a = {};
|
||||
|
||||
return a
|
||||
a.push({});
|
||||
|
||||
return a;
|
||||
};
|
||||
|
||||
|
||||
class calendarDetail extends React.Component {
|
||||
|
||||
static navigationOptions = ({navigation}) => ({
|
||||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
title={navigation.state.params.info.name}
|
||||
/>
|
||||
),
|
||||
});
|
||||
static navigationOptions = ({ navigation }) => ({
|
||||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
// title={navigation.state.params.info.name}
|
||||
/>
|
||||
)
|
||||
});
|
||||
|
||||
state = {};
|
||||
|
||||
componentDidMount() {
|
||||
this.props.getEvents(this.props.user, this.props.careerPath);
|
||||
|
||||
const { navigation } = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
this.props.getSessionDetails(this.props.token, info.Id);
|
||||
}
|
||||
|
||||
_update = () => {
|
||||
this.setState({ user: this.props.user });
|
||||
console.log(this.props.events);
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.data = [];
|
||||
}
|
||||
|
||||
|
||||
state = {};
|
||||
render() {
|
||||
const { navigation } = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.sessionDetail == undefined) {
|
||||
return (<View style={{ flex: 1, alignSelf: 'center', margin: SCREEN_HEIGHT * 0.45 }}>
|
||||
<ActivityIndicator size="large" color="#CC1A17" />
|
||||
</View>
|
||||
|
||||
this.props.getEvents(this.props.user);
|
||||
console.log('didMount');
|
||||
console.log(this.props.events);
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
_update = () => {
|
||||
this.setState({user: this.props.user});
|
||||
console.log(this.props.events);
|
||||
};
|
||||
|
||||
|
||||
constructor(props) {
|
||||
|
||||
super(props)
|
||||
|
||||
|
||||
this.data = []
|
||||
}
|
||||
|
||||
renderHeader = (info) => {
|
||||
return (
|
||||
return (
|
||||
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: info.imageUrl,
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
>
|
||||
</ImageBackground>
|
||||
<ImageBackground
|
||||
source={{
|
||||
uri: `https://tickets.enei.pt/adminpoint/Content/Images/Uploads/Sessions/${this.props.sessionDetail.Image}`
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
};
|
||||
|
||||
renderDescription = (info) => {
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.infoRow}>
|
||||
<View style={{flexDirection: "row"}}>
|
||||
<Text style={styles.ramoText}>Onde está o ramo? xD </Text>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{color: "#CC1A17", fontSize: 20,}}>
|
||||
{info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}
|
||||
<View style={styles.header}>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{ color: "#CC1A17", fontSize: 15 }}>
|
||||
{`${moment(this.props.sessionDetail.SessionStart).format("HH:mm")}H - ${moment(this.props.sessionDetail.SessionEnd).format("HH:mm")}H`}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
margin: 10,
|
||||
marginBottom: 0,
|
||||
marginTop: 0,
|
||||
fontSize: 20,
|
||||
color: "#CC1A17"
|
||||
}}
|
||||
>
|
||||
{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}
|
||||
/>}
|
||||
<Text>
|
||||
{this.props.sessionDetail.Enrolled} / {this.props.sessionDetail.MaxAttendees}
|
||||
</Text>
|
||||
</View>
|
||||
{this.props.sessionDetail != undefined && (
|
||||
<FlatList
|
||||
data={this.props.sessionDetail.Speakers}
|
||||
renderItem={({ item }) => (
|
||||
<View>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
marginTop: 10
|
||||
}}
|
||||
>
|
||||
<View style={{ width: 100, height: 100, padding: 5 }}>
|
||||
<FitImage
|
||||
source={{
|
||||
uri:
|
||||
`https://tickets.enei.pt/adminpoint/Content/Images/Uploads/Speakers/${item.Photo}`
|
||||
}}
|
||||
style={{ padding: 5 }}
|
||||
/>
|
||||
</View>
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
fontWeight: "bold",
|
||||
fontSize: 20,
|
||||
margin: 10
|
||||
}}
|
||||
>
|
||||
{item.Name}
|
||||
</Text>
|
||||
<Text style={{ marginLeft: 10 , textAlign:'justify'}}>
|
||||
{item.MoreInfo}
|
||||
</Text>
|
||||
<TouchableOpacity>
|
||||
<Text
|
||||
style={{ color: "#CC1A17", marginLeft: 10 }}
|
||||
>
|
||||
{item.Title}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.details}>
|
||||
<Text style={styles.nameAttendee}>Attendee Name</Text>
|
||||
<Progress.Bar color={'#000000'} progress={info.Enrolled / info.MaxAttendees} height={10}
|
||||
unfilledColor={'white'} width={210}/>
|
||||
<Text style={{alignSelf: "center"}}>{info.Enrolled} / {info.MaxAttendees}</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.infoRow}>
|
||||
<Text style={{fontSize: 30, color: "#CC1A17"}}>Descrição</Text>
|
||||
<Divider style={{backgroundColor: '#000'}}/>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text style={{fontSize: 15}}>
|
||||
{info.description}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
renderMap = () => {
|
||||
return (
|
||||
<MapView
|
||||
provider={PROVIDER_GOOGLE}
|
||||
style={{flex: 2}}
|
||||
region={{
|
||||
latitude: 40.19092111672049,
|
||||
latitudeDelta: 0.007664297080957283,
|
||||
longitude: -8.410662319511175,
|
||||
longitudeDelta: 0.007551424205303192
|
||||
}}
|
||||
onRegionChangeComplete={(region) => {
|
||||
|
||||
console.log(region);
|
||||
|
||||
}}
|
||||
|
||||
/>
|
||||
)
|
||||
};
|
||||
|
||||
renderAttendee = () => {
|
||||
return (
|
||||
<View style={{backgroundColor: '#fff', height: SCREEN_HEIGHT * 0.1}}>
|
||||
<View style={styles.AttendeeContainer}>
|
||||
<View style={styles.leftRow}>
|
||||
<Avatar
|
||||
rounded
|
||||
size="medium"
|
||||
source={{
|
||||
uri: "https://cdn3.iconfinder.com/data/icons/vector-icons-6/96/256-512.png",
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
fontWeight: "bold",
|
||||
color: "#CC1A17",
|
||||
margin: 10,
|
||||
marginBottom: 0,
|
||||
fontSize: 15
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.centerRow}>
|
||||
<Text style={styles.titleText} numberOfLines={1}>
|
||||
Nome do gajo
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.rightRow}>
|
||||
<Icon
|
||||
size={24}
|
||||
name="visibility"
|
||||
type="material-icon"
|
||||
onPress={() => navigation.goBack(null)}
|
||||
color='#000'
|
||||
iconStyle={styles.icon}
|
||||
underlayColor="transparent"
|
||||
underlineColorAndroid="transparent"
|
||||
containerStyle={styles.iconContainer}
|
||||
hitSlop={{top: 15, bottom: 15, left: 15, right: 15}}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const {navigation} = this.props;
|
||||
const info = navigation.getParam('info', 'error');
|
||||
console.log(info);
|
||||
|
||||
return (
|
||||
|
||||
<View style={styles.mainViewStyle}>
|
||||
<ScrollView style={styles.scroll}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.cardContainer}>
|
||||
{this.renderHeader(info)}
|
||||
>
|
||||
Descrição do orador:
|
||||
</Text>
|
||||
<Text style={{ margin: 10, textAlign:"justify" }}>{item.Description}</Text>
|
||||
</View>
|
||||
{this.renderDescription(info)}
|
||||
</View>
|
||||
<View style={styles.infoRow}>
|
||||
<Text style={{fontSize: 30, color: "#CC1A17"}}>Localização</Text>
|
||||
<Divider style={{backgroundColor: '#000', marginBottom: 10}}/>
|
||||
{this.renderMap()}
|
||||
</View>
|
||||
</ScrollView>
|
||||
<Divider style={{backgroundColor: 'black'}}/>
|
||||
{this.renderAttendee()}
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
|
||||
<View style={styles.block}>
|
||||
<Text
|
||||
style={{ fontSize: 15, color: "#CC1A17", fontWeight: "bold" }}
|
||||
>
|
||||
Descrição da palestra/workshop
|
||||
</Text>
|
||||
<Divider style={{ backgroundColor: "#000" }} />
|
||||
<View style={{ marginTop: 10 }}>
|
||||
<Text style={{textAlign:'justify'}}>{this.props.sessionDetail.Description}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{
|
||||
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 }} />
|
||||
<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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
block: {
|
||||
marginTop: 15,
|
||||
|
||||
AttendeeContainer: {
|
||||
flexDirection: 'row',
|
||||
height: 55,
|
||||
justifyContent: 'center',
|
||||
marginLeft: 10,
|
||||
marginRight: 10,
|
||||
backgroundColor: "white",
|
||||
padding: 20,
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
centerRow: {
|
||||
alignItems: 'flex-start',
|
||||
backgroundColor: 'transparent',
|
||||
flex: 3,
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
elevation: 3
|
||||
},
|
||||
AttendeeContainer: {
|
||||
flexDirection: "row",
|
||||
height: 55,
|
||||
justifyContent: "center",
|
||||
marginLeft: 10,
|
||||
marginRight: 10
|
||||
},
|
||||
|
||||
leftRow: {
|
||||
backgroundColor: 'transparent',
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
alignSelf: 'center'
|
||||
},
|
||||
rightRow: {
|
||||
alignItems: 'flex-end',
|
||||
backgroundColor: 'transparent',
|
||||
flex: 2,
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-end',
|
||||
marginRight: 4,
|
||||
alignSelf: 'center'
|
||||
},
|
||||
centerRow: {
|
||||
alignItems: "center",
|
||||
backgroundColor: "transparent",
|
||||
flex: 3,
|
||||
flexDirection: "column",
|
||||
justifyContent: "center"
|
||||
},
|
||||
|
||||
icon: {
|
||||
justifyContent: 'flex-start',
|
||||
marginTop: 2.8,
|
||||
},
|
||||
leftRow: {
|
||||
backgroundColor: "transparent",
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
alignSelf: "center"
|
||||
},
|
||||
rightRow: {
|
||||
alignItems: "flex-end",
|
||||
backgroundColor: "transparent",
|
||||
flex: 2,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-end",
|
||||
marginRight: 4,
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
nameAttendee: {
|
||||
alignSelf: 'center',
|
||||
fontSize: 20,
|
||||
fontWeight: '400',
|
||||
color: '#000',
|
||||
marginBottom: 10,
|
||||
},
|
||||
icon: {
|
||||
justifyContent: "flex-start",
|
||||
marginTop: 2.8
|
||||
},
|
||||
|
||||
details: {
|
||||
marginTop: 20,
|
||||
flex: 1,
|
||||
alignSelf: 'center',
|
||||
},
|
||||
nameAttendee: {
|
||||
alignSelf: "center",
|
||||
fontSize: 20,
|
||||
fontWeight: "400",
|
||||
color: "#000",
|
||||
marginBottom: 10
|
||||
},
|
||||
|
||||
infoRow: {
|
||||
margin: 25,
|
||||
},
|
||||
details: {
|
||||
marginTop: 20,
|
||||
flex: 1,
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
ramoText: {
|
||||
alignSelf: 'flex-start',
|
||||
marginBottom: 5,
|
||||
color: '#000',
|
||||
fontSize: 20,
|
||||
fontWeight: '400',
|
||||
},
|
||||
infoRow: {
|
||||
margin: 25
|
||||
},
|
||||
|
||||
timeText: {
|
||||
alignItems: 'flex-end',
|
||||
flex: 2,
|
||||
marginBottom: 5,
|
||||
marginRight: 4,
|
||||
},
|
||||
ramoText: {
|
||||
alignSelf: "flex-start",
|
||||
marginBottom: 5,
|
||||
color: "white",
|
||||
fontSize: 17,
|
||||
fontWeight: "400"
|
||||
},
|
||||
|
||||
mainViewStyle: {
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: 'column',
|
||||
},
|
||||
timeText: {
|
||||
alignItems: "flex-end",
|
||||
flex: 2,
|
||||
lineHeight: 10,
|
||||
marginRight: 20
|
||||
},
|
||||
|
||||
scroll: {
|
||||
backgroundColor: '#FFF',
|
||||
flex: 1,
|
||||
//marginBottom: 55,
|
||||
},
|
||||
mainViewStyle: {
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
scroll: {
|
||||
backgroundColor: "#eee",
|
||||
flex: 1
|
||||
//marginBottom: 55,
|
||||
},
|
||||
|
||||
header: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 0,
|
||||
shadowColor: "#000",
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: 'column',
|
||||
},
|
||||
coverContainer: {
|
||||
position: 'relative',
|
||||
},
|
||||
coverImage: {
|
||||
height: Dimensions.get('window').width * (2 / 4),
|
||||
width: Dimensions.get('window').width,
|
||||
},
|
||||
headerContainer: {
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 3
|
||||
},
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
// margin: 20,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 5
|
||||
},
|
||||
|
||||
headerContainer: {
|
||||
flex: 1
|
||||
},
|
||||
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
coverContainer: {
|
||||
position: "relative"
|
||||
},
|
||||
coverImage: {
|
||||
height: Dimensions.get("window").width * (2 / 4),
|
||||
width: Dimensions.get("window").width
|
||||
},
|
||||
/*headerContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#FFF',
|
||||
},
|
||||
},*/
|
||||
|
||||
carreerPathContainer: {
|
||||
backgroundColor: "#CC1A17",
|
||||
height: 50,
|
||||
flex: 1,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
paddingTop: 15
|
||||
},
|
||||
carreerPathText: {
|
||||
height: 50,
|
||||
color: "white",
|
||||
fontWeight: "bold",
|
||||
fontSize: 20
|
||||
},
|
||||
companyHeader: {
|
||||
backgroundColor: "#dddddd",
|
||||
// height:150,
|
||||
borderRadius: 5,
|
||||
margin: 10,
|
||||
padding: 10
|
||||
},
|
||||
companyTitle: {
|
||||
paddingBottom: 5,
|
||||
fontWeight: "bold",
|
||||
color: "#777777",
|
||||
fontSize: 17
|
||||
|
||||
carreerPathContainer: {
|
||||
backgroundColor: '#CC1A17',
|
||||
height: 50,
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingTop: 15,
|
||||
},
|
||||
carreerPathText: {
|
||||
|
||||
height: 50,
|
||||
color: 'white',
|
||||
fontWeight: 'bold',
|
||||
fontSize: 20,
|
||||
|
||||
},
|
||||
companyHeader: {
|
||||
backgroundColor: '#dddddd',
|
||||
// height:150,
|
||||
borderRadius: 5,
|
||||
margin: 10,
|
||||
padding: 10
|
||||
|
||||
|
||||
},
|
||||
companyTitle: {
|
||||
paddingBottom: 5,
|
||||
fontWeight: 'bold',
|
||||
color: '#777777',
|
||||
fontSize: 17,
|
||||
|
||||
// padding:20
|
||||
},
|
||||
companyLogo: {
|
||||
borderRadius: 20,
|
||||
|
||||
},
|
||||
|
||||
wrapper: {},
|
||||
company: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
// backgroundColor:'red',
|
||||
color: 'black'
|
||||
},
|
||||
|
||||
companyLogoContainer: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
width: '60%',
|
||||
// backgroundColor:'white',
|
||||
margin: 20,
|
||||
|
||||
|
||||
},
|
||||
aboutCompany: {
|
||||
width: SCREEN_WIDTH,
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}
|
||||
// padding:20
|
||||
},
|
||||
companyLogo: {
|
||||
borderRadius: 20
|
||||
},
|
||||
|
||||
wrapper: {},
|
||||
company: {
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
// backgroundColor:'red',
|
||||
color: "black"
|
||||
},
|
||||
|
||||
companyLogoContainer: {
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
width: "60%",
|
||||
// backgroundColor:'white',
|
||||
margin: 20
|
||||
},
|
||||
aboutCompany: {
|
||||
width: SCREEN_WIDTH,
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
alignItems: "center"
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
|
||||
return {
|
||||
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
events: state.apiReducer.events
|
||||
|
||||
}
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
events: state.apiReducer.events,
|
||||
careerPath: state.apiReducer.careerPath,
|
||||
sessionDetail: state.apiReducer.sessionDetail
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(calendarDetail);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(calendarDetail);
|
||||
|
|
|
@ -28,23 +28,24 @@ import Email from '../components/Email';
|
|||
|
||||
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 Swiper from 'react-native-swiper';
|
||||
|
||||
class editCalendar extends Component {
|
||||
|
||||
static navigationOptions = ({ navigation }) => ({
|
||||
static navigationOptions = ({navigation}) => ({
|
||||
title: 'Editar Calendário',
|
||||
headerTitleStyle : {textAlign: 'center',alignSelf:'center'},
|
||||
headerStyle:{
|
||||
backgroundColor:'white',
|
||||
},
|
||||
});
|
||||
headerTitleStyle: {textAlign: 'center', alignSelf: 'center'},
|
||||
headerStyle: {
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
});
|
||||
|
||||
constructor(props) {
|
||||
|
||||
super(props);
|
||||
|
@ -55,89 +56,88 @@ class editCalendar extends Component {
|
|||
loggedIn: false,
|
||||
onHold: true,
|
||||
user: {},
|
||||
cenas:{Name:'as'},
|
||||
text:'',
|
||||
cenas: {Name: 'as'},
|
||||
text: '',
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ScrollView>
|
||||
<View styles={styles.header}>
|
||||
<View style={styles.carreerPath}>
|
||||
<View style={styles.carreerPath}>
|
||||
<Text style={styles.carreerPathText}>Carreer Paths</Text>
|
||||
</View>
|
||||
<View style={styles.carreerPathDescription}>
|
||||
<Text >Nesta edição do enei vai ser possível aos participantes ecolherem uma área</Text>
|
||||
|
||||
<Text>Nesta edição do enei vai ser possível aos participantes ecolherem uma área</Text>
|
||||
|
||||
</View>
|
||||
<TouchableOpacity style={{marginRight: 20}} onPress={() => navigation.navigate('Profile')}>
|
||||
<Text>Escolher path</Text>
|
||||
</TouchableOpacity>
|
||||
<Text>Escolher path</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
|
||||
</View>
|
||||
<View>
|
||||
|
||||
</View>
|
||||
|
||||
</View>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
||||
header:{
|
||||
flex:1,
|
||||
height: SCREEN_HEIGHT*0.1,
|
||||
backgroundColor:'red'
|
||||
header: {
|
||||
flex: 1,
|
||||
height: SCREEN_HEIGHT * 0.1,
|
||||
backgroundColor: 'red'
|
||||
},
|
||||
carreerPath:{
|
||||
flex:1,
|
||||
carreerPath: {
|
||||
flex: 1,
|
||||
|
||||
backgroundColor:'#CC1A17',
|
||||
height:SCREEN_HEIGHT*0.1,
|
||||
backgroundColor: '#CC1A17',
|
||||
height: SCREEN_HEIGHT * 0.1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
|
||||
|
||||
},
|
||||
carreerPathText:{
|
||||
fontSize:20,
|
||||
carreerPathText: {
|
||||
fontSize: 20,
|
||||
fontWeight: 'bold',
|
||||
color:'white'
|
||||
|
||||
color: 'white'
|
||||
|
||||
},
|
||||
carreerPathDescription:{
|
||||
padding:10,
|
||||
marginBottom:100
|
||||
},
|
||||
wrapper: {
|
||||
carreerPathDescription: {
|
||||
padding: 10,
|
||||
marginBottom: 100
|
||||
},
|
||||
wrapper: {},
|
||||
slide1: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#9DD6EB',
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#9DD6EB',
|
||||
},
|
||||
slide2: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#97CAE5',
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#97CAE5',
|
||||
},
|
||||
slide3: {
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#92BBD9',
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#92BBD9',
|
||||
},
|
||||
text: {
|
||||
color: '#fff',
|
||||
fontSize: 30,
|
||||
fontWeight: 'bold',
|
||||
color: '#fff',
|
||||
fontSize: 30,
|
||||
fontWeight: 'bold',
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,461 @@
|
|||
import * as React from "react";
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Image,
|
||||
ScrollView,
|
||||
Text,
|
||||
Button,
|
||||
TouchableOpacity,
|
||||
ImageBackground,
|
||||
ListView,
|
||||
FlatList,
|
||||
ActivityIndicator
|
||||
} from "react-native";
|
||||
|
||||
import moment from "moment";
|
||||
import {Divider, Icon, Avatar} from "react-native-elements";
|
||||
import {TabView, TabBar, SceneMap} from "react-native-tab-view";
|
||||
import {RkButton, RkCard, RkText, RkTheme} from "react-native-ui-kitten";
|
||||
import Timeline from "react-native-timeline-feed";
|
||||
|
||||
import * as Progress from "react-native-progress";
|
||||
|
||||
import NavAbsolute from "../components/Nav";
|
||||
|
||||
import {connect} from "react-redux";
|
||||
|
||||
import {bindActionCreators} from "redux";
|
||||
|
||||
import * as Actions from "../store/actions"; //Import your actionss
|
||||
import Swiper from "react-native-swiper";
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
import FitImage from "react-native-fit-image";
|
||||
|
||||
import MapView, {PROVIDER_GOOGLE} from "react-native-maps";
|
||||
|
||||
const formatObj = obj => {
|
||||
let a = {};
|
||||
|
||||
a.push({});
|
||||
|
||||
return a;
|
||||
};
|
||||
|
||||
class event extends React.Component {
|
||||
static navigationOptions = ({navigation}) => ({
|
||||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
// title={navigation.state.params.info.name}
|
||||
/>
|
||||
)
|
||||
});
|
||||
|
||||
state = {};
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
|
||||
const {navigation} = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
|
||||
|
||||
}
|
||||
|
||||
_update = () => {
|
||||
this.setState({user: this.props.user});
|
||||
|
||||
};
|
||||
|
||||
|
||||
_renderRally = (info) => {
|
||||
console.log(info)
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<View style={styles.leftRow}>
|
||||
<Text style={{
|
||||
margin: 10,
|
||||
marginTop: 0,
|
||||
marginBottom: 10,
|
||||
fontSize: 20,
|
||||
color: "#CC1A17" }}>
|
||||
{info.location.nome}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{color: "#CC1A17", fontSize: 15}}>
|
||||
{info.hora}
|
||||
</Text>
|
||||
<Text>{info.horas}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View>
|
||||
<View style={{margin: 10}}>
|
||||
<Text
|
||||
style={{fontSize: 15, color: "#CC1A17", fontWeight: "bold"}}
|
||||
>
|
||||
Descrição:
|
||||
</Text>
|
||||
<Divider style={{backgroundColor: "#000"}}/>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text>{info.location.desc}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
_renderEventDetail = (info) => {
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{color: "#CC1A17", fontSize: 15}}>
|
||||
{info.hora}
|
||||
</Text>
|
||||
<Text>{info.horas}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
margin: 10,
|
||||
marginTop: 0,
|
||||
marginBottom: 10,
|
||||
fontSize: 20,
|
||||
color: "#CC1A17"
|
||||
|
||||
}}
|
||||
>
|
||||
{info.nome}
|
||||
</Text>
|
||||
<View style={{margin: 10}}>
|
||||
<Text
|
||||
style={{fontSize: 15, color: "#CC1A17", fontWeight: "bold"}}
|
||||
>
|
||||
Descrição:
|
||||
</Text>
|
||||
<Divider style={{backgroundColor: "#000"}}/>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text>{info.desc}</Text>
|
||||
</View>
|
||||
<Text
|
||||
style={{fontSize: 15, color: "#CC1A17", fontWeight: "bold", marginTop: 10}}
|
||||
>
|
||||
Como posso participar?
|
||||
</Text>
|
||||
<Divider style={{backgroundColor: "#000"}}/>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text>{info.notas}</Text>
|
||||
</View>
|
||||
<Text
|
||||
style={{fontSize: 15, color: "#CC1A17", fontWeight: "bold", marginTop: 10}}
|
||||
>
|
||||
Qual é o custo de participação?
|
||||
</Text>
|
||||
<Divider style={{backgroundColor: "#000"}}/>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text>{info.custo}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
_renderContainer = (info, eventType) => {
|
||||
console.log("Estou aqui " + eventType)
|
||||
if (eventType === "rally") {
|
||||
return this._renderRally(info);
|
||||
}
|
||||
else if (eventType === undefined) {
|
||||
return this._renderEventDetail(info);
|
||||
}
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.data = [];
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const {navigation} = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
const eventType = navigation.getParam("type");
|
||||
|
||||
return (
|
||||
<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: info.imagem
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{this._renderContainer(info, eventType)}
|
||||
</View>
|
||||
<View style={styles.block}>
|
||||
<Text
|
||||
style={{fontSize: 15, color: "#CC1A17", fontWeight: "bold"}}
|
||||
>
|
||||
Localização
|
||||
</Text>
|
||||
<Divider style={{backgroundColor: "#000", marginBottom: 10}}/>
|
||||
<Text>{info.localizacao}</Text>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<Divider style={{backgroundColor: "black"}}/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
block: {
|
||||
marginTop: 15,
|
||||
|
||||
backgroundColor: "white",
|
||||
padding: 20,
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 3
|
||||
},
|
||||
AttendeeContainer: {
|
||||
flexDirection: "row",
|
||||
height: 55,
|
||||
justifyContent: "center",
|
||||
marginLeft: 10,
|
||||
marginRight: 10
|
||||
},
|
||||
|
||||
centerRow: {
|
||||
alignItems: "center",
|
||||
backgroundColor: "transparent",
|
||||
flex: 3,
|
||||
flexDirection: "column",
|
||||
justifyContent: "center"
|
||||
},
|
||||
|
||||
leftRow: {
|
||||
backgroundColor: "transparent",
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
alignSelf: "center"
|
||||
},
|
||||
rightRow: {
|
||||
alignItems: "flex-end",
|
||||
backgroundColor: "transparent",
|
||||
flex: 2,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-end",
|
||||
marginRight: 4,
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
icon: {
|
||||
justifyContent: "flex-start",
|
||||
marginTop: 2.8
|
||||
},
|
||||
|
||||
nameAttendee: {
|
||||
alignSelf: "center",
|
||||
fontSize: 20,
|
||||
fontWeight: "400",
|
||||
color: "#000",
|
||||
marginBottom: 10
|
||||
},
|
||||
|
||||
details: {
|
||||
marginTop: 20,
|
||||
flex: 1,
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
infoRow: {
|
||||
margin: 25
|
||||
},
|
||||
|
||||
ramoText: {
|
||||
alignSelf: "flex-start",
|
||||
marginBottom: 5,
|
||||
color: "white",
|
||||
fontSize: 17,
|
||||
fontWeight: "400"
|
||||
},
|
||||
|
||||
timeText: {
|
||||
alignItems: "flex-end",
|
||||
flex: 2,
|
||||
lineHeight: 10,
|
||||
marginRight: 20
|
||||
},
|
||||
|
||||
mainViewStyle: {
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
|
||||
scroll: {
|
||||
backgroundColor: "#eee",
|
||||
flex: 1
|
||||
//marginBottom: 55,
|
||||
},
|
||||
|
||||
header: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 0,
|
||||
shadowColor: "#000",
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 3
|
||||
},
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
// margin: 20,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 5
|
||||
},
|
||||
|
||||
headerContainer: {
|
||||
flex: 1
|
||||
},
|
||||
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
coverContainer: {
|
||||
position: "relative"
|
||||
},
|
||||
coverImage: {
|
||||
height: Dimensions.get("window").width * (2 / 4),
|
||||
width: Dimensions.get("window").width
|
||||
},
|
||||
/*headerContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#FFF',
|
||||
},*/
|
||||
|
||||
carreerPathContainer: {
|
||||
backgroundColor: "#CC1A17",
|
||||
height: 50,
|
||||
flex: 1,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
paddingTop: 15
|
||||
},
|
||||
carreerPathText: {
|
||||
height: 50,
|
||||
color: "white",
|
||||
fontWeight: "bold",
|
||||
fontSize: 20
|
||||
},
|
||||
companyHeader: {
|
||||
backgroundColor: "#dddddd",
|
||||
// height:150,
|
||||
borderRadius: 5,
|
||||
margin: 10,
|
||||
padding: 10
|
||||
},
|
||||
companyTitle: {
|
||||
paddingBottom: 5,
|
||||
fontWeight: "bold",
|
||||
color: "#777777",
|
||||
fontSize: 17
|
||||
|
||||
// padding:20
|
||||
},
|
||||
companyLogo: {
|
||||
borderRadius: 20
|
||||
},
|
||||
|
||||
wrapper: {},
|
||||
company: {
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
// backgroundColor:'red',
|
||||
color: "black"
|
||||
},
|
||||
|
||||
companyLogoContainer: {
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
width: "60%",
|
||||
// backgroundColor:'white',
|
||||
margin: 20
|
||||
},
|
||||
aboutCompany: {
|
||||
width: SCREEN_WIDTH,
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
alignItems: "center"
|
||||
}
|
||||
});
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
careerPath: state.apiReducer.careerPath,
|
||||
sessionDetail: state.apiReducer.sessionDetail
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(event);
|
|
@ -0,0 +1,499 @@
|
|||
import * as React from "react";
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Image,
|
||||
ScrollView,
|
||||
Text,
|
||||
Button,
|
||||
TouchableOpacity,
|
||||
ImageBackground,
|
||||
ListView,
|
||||
FlatList,
|
||||
ActivityIndicator,
|
||||
Linking,
|
||||
Platform
|
||||
} from "react-native";
|
||||
|
||||
import moment from "moment";
|
||||
import { Divider, Icon, Avatar } from "react-native-elements";
|
||||
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
|
||||
import { RkButton, RkCard, RkText, RkTheme } from "react-native-ui-kitten";
|
||||
import Timeline from "react-native-timeline-feed";
|
||||
|
||||
import * as Progress from "react-native-progress";
|
||||
|
||||
import NavAbsolute from "../components/Nav";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { bindActionCreators } from "redux";
|
||||
|
||||
import * as Actions from "../store/actions"; //Import your actionss
|
||||
import Swiper from "react-native-swiper";
|
||||
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
import FitImage from "react-native-fit-image";
|
||||
|
||||
import MapView, { PROVIDER_GOOGLE } from "react-native-maps";
|
||||
|
||||
const formatObj = obj => {
|
||||
let a = {};
|
||||
|
||||
a.push({});
|
||||
|
||||
return a;
|
||||
};
|
||||
|
||||
class eventDetail extends React.Component {
|
||||
static navigationOptions = ({ navigation }) => ({
|
||||
header: (
|
||||
<NavAbsolute
|
||||
navigation={navigation}
|
||||
/>
|
||||
)
|
||||
});
|
||||
|
||||
state = {};
|
||||
|
||||
openMaps = () => {};
|
||||
componentDidMount() {
|
||||
const { navigation } = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
}
|
||||
|
||||
_update = () => {
|
||||
this.setState({ user: this.props.user });
|
||||
};
|
||||
|
||||
_renderRally = info => {
|
||||
console.log(info);
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
margin: 10,
|
||||
marginTop: 0,
|
||||
marginBottom: 10,
|
||||
fontSize: 20,
|
||||
color: "#CC1A17",
|
||||
|
||||
width:'100%'
|
||||
}}
|
||||
>
|
||||
{info.location.nome}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{ color: "#CC1A17", fontSize: 15 }}>
|
||||
{info.hora}
|
||||
</Text>
|
||||
<Text>{info.horas}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View>
|
||||
<View style={{ margin: 10 }}>
|
||||
<Text
|
||||
style={{ fontSize: 15, color: "#CC1A17", fontWeight: "bold" }}
|
||||
>
|
||||
Descrição:
|
||||
</Text>
|
||||
<Divider style={{ backgroundColor: "#000" }} />
|
||||
<View style={{ marginTop: 10 }}>
|
||||
<Text style={{textAlign:'justify'}}>{info.location.desc}</Text>
|
||||
</View>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 15,
|
||||
color: "#CC1A17",
|
||||
fontWeight: "bold",
|
||||
marginTop: 20
|
||||
}}
|
||||
>
|
||||
Desafio:
|
||||
</Text>
|
||||
<Divider style={{ backgroundColor: "#000" }} />
|
||||
<View style={{ marginTop: 10 }}>
|
||||
<Text style={{textAlign:"justify"}}>{info.location.desafio}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
_renderEventDetail = info => {
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
<View style={styles.timeText}>
|
||||
<Text style={{ color: "#CC1A17", fontSize: 15 }}>
|
||||
{info.hora}
|
||||
</Text>
|
||||
<Text>{info.horas}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View>
|
||||
<Text
|
||||
style={{
|
||||
margin: 10,
|
||||
marginTop: 0,
|
||||
marginBottom: 10,
|
||||
fontSize: 20,
|
||||
color: "#CC1A17"
|
||||
}}
|
||||
>
|
||||
{info.nome}
|
||||
</Text>
|
||||
<View style={{ margin: 10 }}>
|
||||
<Text
|
||||
style={{ fontSize: 15, color: "#CC1A17", fontWeight: "bold" }}
|
||||
>
|
||||
Descrição:
|
||||
</Text>
|
||||
<Divider style={{ backgroundColor: "#000" }} />
|
||||
<View style={{ marginTop: 10 }}>
|
||||
<Text style={{textAlign:'justify'}}>{info.desc}</Text>
|
||||
</View>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 15,
|
||||
color: "#CC1A17",
|
||||
fontWeight: "bold",
|
||||
marginTop: 10
|
||||
}}
|
||||
>
|
||||
Como posso participar?
|
||||
</Text>
|
||||
<Divider style={{ backgroundColor: "#000" }} />
|
||||
<View style={{ marginTop: 10 }}>
|
||||
<Text>{info.notas}</Text>
|
||||
</View>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 15,
|
||||
color: "#CC1A17",
|
||||
fontWeight: "bold",
|
||||
marginTop: 10
|
||||
}}
|
||||
>
|
||||
Qual é o custo de participação?
|
||||
</Text>
|
||||
<Divider style={{ backgroundColor: "#000" }} />
|
||||
<View style={{ marginTop: 10 }}>
|
||||
<Text>{info.custo}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
_renderContainer = (info, eventType) => {
|
||||
console.log("Estou aqui " + eventType);
|
||||
if (eventType === "rally") {
|
||||
return this._renderRally(info);
|
||||
} else if (eventType === undefined) {
|
||||
return this._renderEventDetail(info);
|
||||
}
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.data = [];
|
||||
}
|
||||
|
||||
render() {
|
||||
const { navigation } = this.props;
|
||||
const info = navigation.getParam("info", "error");
|
||||
const eventType = navigation.getParam("type");
|
||||
console.log(info)
|
||||
if(info!= undefined)
|
||||
return (
|
||||
<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: info.location.mainPhoto
|
||||
}}
|
||||
style={styles.coverImage}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{this._renderContainer(info, eventType)}
|
||||
</View>
|
||||
<View>
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
console.log(info.location.lat)
|
||||
console.log(info.location.long)
|
||||
const scheme = Platform.select({
|
||||
ios: "maps:0,0?q=",
|
||||
android: "geo:0,0?q="
|
||||
});
|
||||
const latLng = `${info.location.lat},${info.location.long}`;
|
||||
const label = info.location.nome;
|
||||
const url = Platform.select({
|
||||
ios: `${scheme}${label}@${latLng}`,
|
||||
android: `${scheme}${latLng}(${label})`
|
||||
});
|
||||
|
||||
Linking.openURL(url);
|
||||
}}
|
||||
>
|
||||
<FitImage
|
||||
source={{
|
||||
uri: info.location.localizacao
|
||||
}}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<Divider style={{ backgroundColor: "black" }} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
block: {
|
||||
marginTop: 15,
|
||||
|
||||
backgroundColor: "white",
|
||||
padding: 20,
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 3
|
||||
},
|
||||
AttendeeContainer: {
|
||||
flexDirection: "row",
|
||||
height: 55,
|
||||
justifyContent: "center",
|
||||
marginLeft: 10,
|
||||
marginRight: 10
|
||||
},
|
||||
|
||||
centerRow: {
|
||||
alignItems: "center",
|
||||
backgroundColor: "transparent",
|
||||
flex: 3,
|
||||
flexDirection: "column",
|
||||
justifyContent: "center"
|
||||
},
|
||||
|
||||
leftRow: {
|
||||
backgroundColor: "transparent",
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
alignSelf: "center"
|
||||
},
|
||||
rightRow: {
|
||||
alignItems: "flex-end",
|
||||
backgroundColor: "transparent",
|
||||
flex: 2,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-end",
|
||||
marginRight: 4,
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
icon: {
|
||||
justifyContent: "flex-start",
|
||||
marginTop: 2.8
|
||||
},
|
||||
|
||||
nameAttendee: {
|
||||
alignSelf: "center",
|
||||
fontSize: 20,
|
||||
fontWeight: "400",
|
||||
color: "#000",
|
||||
marginBottom: 10
|
||||
},
|
||||
|
||||
details: {
|
||||
marginTop: 20,
|
||||
flex: 1,
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
infoRow: {
|
||||
margin: 25
|
||||
},
|
||||
|
||||
ramoText: {
|
||||
alignSelf: "flex-start",
|
||||
marginBottom: 5,
|
||||
color: "white",
|
||||
fontSize: 17,
|
||||
fontWeight: "400"
|
||||
},
|
||||
|
||||
timeText: {
|
||||
alignItems: "flex-end",
|
||||
flex: 2,
|
||||
lineHeight: 10,
|
||||
marginRight: 20
|
||||
},
|
||||
|
||||
mainViewStyle: {
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
|
||||
scroll: {
|
||||
backgroundColor: "#eee",
|
||||
flex: 1
|
||||
//marginBottom: 55,
|
||||
},
|
||||
|
||||
header: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 0,
|
||||
shadowColor: "#000",
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 3
|
||||
},
|
||||
cardContainer: {
|
||||
flex: 1,
|
||||
padding: 10,
|
||||
// margin: 20,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 5
|
||||
},
|
||||
|
||||
headerContainer: {
|
||||
flex: 1
|
||||
},
|
||||
|
||||
container: {
|
||||
flex: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
coverContainer: {
|
||||
position: "relative"
|
||||
},
|
||||
coverImage: {
|
||||
height: Dimensions.get("window").width * (2 / 4),
|
||||
width: Dimensions.get("window").width
|
||||
},
|
||||
/*headerContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#FFF',
|
||||
},*/
|
||||
|
||||
carreerPathContainer: {
|
||||
backgroundColor: "#CC1A17",
|
||||
height: 50,
|
||||
flex: 1,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
paddingTop: 15
|
||||
},
|
||||
carreerPathText: {
|
||||
height: 50,
|
||||
color: "white",
|
||||
fontWeight: "bold",
|
||||
fontSize: 20
|
||||
},
|
||||
companyHeader: {
|
||||
backgroundColor: "#dddddd",
|
||||
// height:150,
|
||||
borderRadius: 5,
|
||||
margin: 10,
|
||||
padding: 10
|
||||
},
|
||||
companyTitle: {
|
||||
paddingBottom: 5,
|
||||
fontWeight: "bold",
|
||||
color: "#777777",
|
||||
fontSize: 17
|
||||
|
||||
// padding:20
|
||||
},
|
||||
companyLogo: {
|
||||
borderRadius: 20
|
||||
},
|
||||
|
||||
wrapper: {},
|
||||
company: {
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
// backgroundColor:'red',
|
||||
color: "black"
|
||||
},
|
||||
|
||||
companyLogoContainer: {
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
width: "60%",
|
||||
// backgroundColor:'white',
|
||||
margin: 20
|
||||
},
|
||||
aboutCompany: {
|
||||
width: SCREEN_WIDTH,
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
alignItems: "center"
|
||||
}
|
||||
});
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
careerPath: state.apiReducer.careerPath,
|
||||
sessionDetail: state.apiReducer.sessionDetail
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(eventDetail);
|
|
@ -0,0 +1,89 @@
|
|||
import * as React from "react";
|
||||
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Text,
|
||||
Button,
|
||||
ScrollView,
|
||||
Image,
|
||||
TouchableOpacity,
|
||||
FlatList,
|
||||
ActivityIndicator,
|
||||
Modal
|
||||
} 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";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
|
||||
import { bindActionCreators } from "redux";
|
||||
|
||||
import * as Actions from "../store/actions"; //Import your actionss
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
import ImageViewer from 'react-native-image-zoom-viewer';
|
||||
import PTRView from "react-native-pull-to-refresh";
|
||||
|
||||
const images = [{
|
||||
url: 'https://enei.pt/imgs/mapa.png'
|
||||
},]
|
||||
|
||||
class map extends React.Component {
|
||||
_update = () => {
|
||||
this.props.getAllEvents(this.props.internalToken);
|
||||
this.props.getEventLocsVisited(
|
||||
this.props.team.id,
|
||||
this.props.internalToken
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const { navigate } = this.props.navigation;
|
||||
return (
|
||||
|
||||
<ImageViewer imageUrls={images}/>
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
|
||||
});
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
logged: state.apiReducer.logged,
|
||||
userDetails: state.apiReducer.userDetails,
|
||||
onHold: state.apiReducer.onHold,
|
||||
bilhete: state.apiReducer.bilhete,
|
||||
alimentacao: state.apiReducer.alimentacao,
|
||||
alojamento: state.apiReducer.alojamento,
|
||||
acesso: state.apiReducer.acesso,
|
||||
team: state.apiReducer.team,
|
||||
internalToken: state.apiReducer.internalToken,
|
||||
eventsInternal: state.apiReducer.eventsInternal
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(map);
|
|
@ -0,0 +1,375 @@
|
|||
/*
|
||||
/*
|
||||
/*
|
||||
/*Esta página só está disponivel a 1 hora do rally..
|
||||
*/
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
import {
|
||||
View,
|
||||
StyleSheet,
|
||||
Dimensions,
|
||||
Text,
|
||||
Button,
|
||||
ScrollView,
|
||||
FlatList,
|
||||
TouchableOpacity,
|
||||
Image,
|
||||
TextInput
|
||||
} from "react-native";
|
||||
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
|
||||
import { Icon } from "react-native-elements";
|
||||
|
||||
import * as Actions from "../store/actions";
|
||||
import { connect } from "react-redux";
|
||||
import { bindActionCreators } from "redux";
|
||||
import FitImage from "react-native-fit-image";
|
||||
import PTRView from "react-native-pull-to-refresh";
|
||||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
||||
import IconFA from "react-native-vector-icons/FontAwesome5";
|
||||
class teamDetail extends React.Component {
|
||||
componentDidMount() {
|
||||
/* this.props.getEventLocsVisited(
|
||||
this.props.team.id,
|
||||
this.props.internalToken
|
||||
);*/
|
||||
|
||||
console.log(this.props.locais);
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
nome: this.props.team.nome
|
||||
};
|
||||
}
|
||||
_update = () => {
|
||||
this.props.getEventLocsVisited(this.props.team.id, this.props.internalToken)
|
||||
};
|
||||
_alterTeamName = () => {};
|
||||
|
||||
render() {
|
||||
const { navigate } = this.props.navigation;
|
||||
|
||||
return (
|
||||
<PTRView onRefresh={this._update}>
|
||||
{this.props.team!= undefined &&
|
||||
<ScrollView style={{ backgroundColor: "#eeeeee" }}>
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "#CC1A17",
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignContent: "center"
|
||||
}}
|
||||
>
|
||||
{this.props.user.Code == this.props.team.cap.qRcode && (
|
||||
<View
|
||||
style={{
|
||||
alignItems: "center",
|
||||
alignSelf: "center",
|
||||
width: "100%",
|
||||
flex: 1,
|
||||
flexDirection: "row"
|
||||
}}
|
||||
>
|
||||
<View style={{ width: "80%" }}>
|
||||
<TextInput
|
||||
style={{
|
||||
height: 40,
|
||||
borderColor: "white",
|
||||
borderWidth: 1,
|
||||
color: "white",
|
||||
margin: 10,
|
||||
padding: 10,
|
||||
borderRadius: 3,
|
||||
fontSize: 15,
|
||||
|
||||
}}
|
||||
onChangeText={n => this.setState({ nome: n })}
|
||||
value={this.state.nome}
|
||||
maxLength = {30}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<TouchableOpacity
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
width: "20%",
|
||||
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} />
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
)}
|
||||
{this.props.user.Code != this.props.team.cap.qRcode && (
|
||||
<View style={{ width: "100%", padding: 10 }}>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 22,
|
||||
fontWeight: "bold",
|
||||
color: "white",
|
||||
textAlign: "center",
|
||||
alignSelf: "center"
|
||||
}}
|
||||
>
|
||||
{this.props.team.nome}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
<View>
|
||||
<Icon
|
||||
name="md-trophy"
|
||||
type="ionicon"
|
||||
color="#CC1A17"
|
||||
style={{
|
||||
alignSelf: "center",
|
||||
alignContent: "center"
|
||||
}}
|
||||
/>
|
||||
<Text style={styles.headerText}>
|
||||
{this.props.team.pontos}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={{ paddingBottom: 10 }}>
|
||||
<View style={styles.row}>
|
||||
{this.props.team.membros && (
|
||||
<FlatList
|
||||
data={this.props.team.membros}
|
||||
numColumns={6} // Número de colunas
|
||||
renderItem={({ item }) => (
|
||||
<View style={styles.memberImage}>
|
||||
<Image
|
||||
style={{ width: 50, height: 50 }}
|
||||
source={require("../assets/logo_black.jpg")}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.container}>
|
||||
<View style={{ flex: 1, width: "100%" }}>
|
||||
{this.props.locais && (
|
||||
<FlatList
|
||||
data={this.props.locais}
|
||||
renderItem={({ item }) => (
|
||||
<TouchableOpacity
|
||||
onPress={() =>
|
||||
navigate("eventDetail", { info: item, type: "rally" })
|
||||
}
|
||||
>
|
||||
<View style={{ margin: 10 }}>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "white",
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
padding: 15
|
||||
}}
|
||||
>
|
||||
{/*Se bar estiver concluido, mostrar backgroundColor verde no container..*/}
|
||||
|
||||
<View style={{ height: 120, width: 120 }}>
|
||||
<FitImage
|
||||
source={{
|
||||
uri: item.location.squarePhoto
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
<View style={{ width: "65%" }}>
|
||||
<Text
|
||||
style={{
|
||||
color: "#CC1A17",
|
||||
fontWeight: "bold",
|
||||
fontSize: 20,
|
||||
marginLeft: 15
|
||||
}}
|
||||
>
|
||||
{item.location.nome}
|
||||
</Text>
|
||||
<Text style={{ fontSize: 12, padding: 15 }} numberOfLines={5}>
|
||||
{item.location.desc}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
{item.complete && (
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "#CC1A17",
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
alignSelf: "center",
|
||||
width: "100%",
|
||||
paddingLeft: 15
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{
|
||||
color: "white",
|
||||
margin: 3,
|
||||
textAlign: "center"
|
||||
}}
|
||||
>
|
||||
Done
|
||||
</Text>
|
||||
<IconFA name="check" size={12} color={"white"} />
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
}
|
||||
</PTRView>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
triangleLeft: {
|
||||
width: 0,
|
||||
height: 0,
|
||||
backgroundColor: "#CC1A17",
|
||||
borderStyle: "solid",
|
||||
borderLeftWidth: 25,
|
||||
borderRightWidth: 25,
|
||||
borderBottomWidth: 50,
|
||||
borderLeftColor: "transparent",
|
||||
borderRightColor: "transparent",
|
||||
borderBottomColor: "white",
|
||||
backgroundColor: "#CC1A17",
|
||||
transform: [{ rotate: "90deg" }]
|
||||
},
|
||||
triangleRight: {
|
||||
width: 0,
|
||||
height: 0,
|
||||
backgroundColor: "#CC1A17",
|
||||
borderStyle: "solid",
|
||||
borderLeftWidth: 25,
|
||||
borderRightWidth: 25,
|
||||
borderBottomWidth: 50,
|
||||
borderLeftColor: "transparent",
|
||||
borderRightColor: "transparent",
|
||||
borderBottomColor: "white",
|
||||
backgroundColor: "#CC1A17",
|
||||
transform: [{ rotate: "-90deg" }],
|
||||
alignSelf: "flex-end"
|
||||
},
|
||||
header: {
|
||||
margin: 0,
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
container: {
|
||||
margin: 10,
|
||||
flex: 1,
|
||||
flexGrow: 1,
|
||||
flexDirection: "column"
|
||||
},
|
||||
|
||||
row: {
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
padding: 10,
|
||||
backgroundColor: "white",
|
||||
borderRadius: 0,
|
||||
shadowColor: "#000",
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
elevation: 3
|
||||
},
|
||||
|
||||
headerText: {
|
||||
fontSize: 18,
|
||||
color: "#CC1A17",
|
||||
fontWeight: "bold"
|
||||
},
|
||||
|
||||
centerRow: {
|
||||
alignItems: "center",
|
||||
backgroundColor: "transparent",
|
||||
flex: 3,
|
||||
flexDirection: "column",
|
||||
justifyContent: "center"
|
||||
},
|
||||
|
||||
leftRow: {
|
||||
backgroundColor: "transparent",
|
||||
flex: 1,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-start",
|
||||
alignSelf: "center"
|
||||
},
|
||||
rightRow: {
|
||||
alignItems: "flex-end",
|
||||
backgroundColor: "transparent",
|
||||
flex: 2,
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-end",
|
||||
marginRight: 4,
|
||||
alignSelf: "center"
|
||||
},
|
||||
|
||||
memberImage: {
|
||||
flex: 1,
|
||||
marginRight: 4,
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
backgroundColor: "transparent"
|
||||
}
|
||||
});
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
return {
|
||||
token: state.apiReducer.token,
|
||||
user: state.apiReducer.user,
|
||||
team: state.apiReducer.team,
|
||||
internalToken: state.apiReducer.internalToken,
|
||||
eventsInternal: state.apiReducer.eventsInternal,
|
||||
locais: state.apiReducer.locais
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(teamDetail);
|
|
@ -1,3 +1,14 @@
|
|||
//MINHA API
|
||||
|
||||
export const GET_TEAM='GET_TEAM'
|
||||
export const GET_INTERNAL_EVENTS ='GET_INTERNAL_EVENTS'
|
||||
export const CREATE_TEAM='CREATE_TEAM'
|
||||
export const DELETE_TEAM='DELETE_TEAM'
|
||||
export const GET_CROMOS='GET_CROMOS'
|
||||
export const GET_LOCS_VISITED= 'GET_LOCS_VISITED'
|
||||
export const SCAN_QR = 'SCAN_QR'
|
||||
export const LOGIN_INTERNAL ='LOGIN_INTERNAL'
|
||||
export const CHANGE_PASSWORD='CHANGE_PASSWORD'
|
||||
|
||||
|
||||
//API BLUETREND
|
||||
|
@ -9,6 +20,12 @@ export const LOGOUT_USER= 'LOGOUT_USER';
|
|||
export const USER_INFO= 'USER_INFO'
|
||||
export const HOLD='HOLD'
|
||||
export const GET_EVENTS='GET_EVENTS'
|
||||
export const UPDATE_USER='UPDATE_USER'
|
||||
export const RESET_PASSWORD='RESET_PASSWORD'
|
||||
export const CHECK_AND_RENEW='CHECK_AND_RENEW'
|
||||
export const SESSION_DETAIL='SESSION_DETAIL'
|
||||
|
||||
|
||||
|
||||
|
||||
//API BLUETREND CALENDÁRIO
|
||||
|
@ -17,7 +34,7 @@ export const CHANGE_GUEST = 'CHANGE_GUEST'
|
|||
export const GET_SESSIONS= 'GET_SESSIONS'
|
||||
export const SIGN_SESSION= 'SIGN_SESSION'
|
||||
export const WAIT_CHANGE='WAIT_CHANGE'
|
||||
|
||||
export const REMOVE_SESSION = 'REMOVE_SESSION'
|
||||
|
||||
//UI
|
||||
|
||||
|
@ -29,7 +46,7 @@ export const UI_LOGIN_PASSWORD_INPUT_LOADING='UI_LOGIN_PASSWORD_INPUT_LOADING'
|
|||
export const UI_LOGIN_PASSWORD_INPUT_INVALID='UI_LOGIN_PASSWORD_INPUT_INVALID'
|
||||
export const UI_LOGIN_NOINTERNET='UI_LOGIN_NOINTERNET'
|
||||
export const UI_LOGIN_OPEN_SCANNER='UI_LOIN_OPEN_SCANNER'
|
||||
|
||||
export const LOADINGLOGIN = 'LOADINGLOGIN'
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,24 @@ export {checkUser,
|
|||
getSessions,
|
||||
signSession,
|
||||
openModal,
|
||||
closeModal
|
||||
closeModal,
|
||||
loginInternal,
|
||||
waitLogin,
|
||||
removeSession,
|
||||
changePassword,
|
||||
resetPassword,
|
||||
getSessionDetails,
|
||||
getUserTeam,
|
||||
addUserTeam,
|
||||
removeUserTeam,
|
||||
getAllEvents,
|
||||
createTeam,
|
||||
deleteTeam,
|
||||
getCromos,
|
||||
getEventLocsVisited,
|
||||
scanQrCode,
|
||||
changeTeamName
|
||||
|
||||
} from "./api"
|
||||
|
||||
export {
|
||||
|
|
|
@ -15,8 +15,18 @@ import {
|
|||
SIGN_SESSION,
|
||||
OPEN_MODAL,
|
||||
CLOSE_MODAL,
|
||||
LOADINGLOGIN
|
||||
|
||||
LOADINGLOGIN,
|
||||
REMOVE_SESSION,
|
||||
UPDATE_USER,
|
||||
SESSION_DETAIL,
|
||||
GET_TEAM,
|
||||
GET_INTERNAL_EVENTS,
|
||||
CREATE_TEAM,
|
||||
GET_CROMOS,
|
||||
GET_LOCS_VISITED,
|
||||
SCAN_QR,
|
||||
LOGIN_INTERNAL,
|
||||
CHANGE_PASSWORD
|
||||
} from "../actions/actionTypes"; //Import the actions types constant we defined in our actions
|
||||
|
||||
import { REHYDRATE } from "redux-persist";
|
||||
|
@ -24,17 +34,19 @@ import { REHYDRATE } from "redux-persist";
|
|||
let apiState = {
|
||||
isConnected: false,
|
||||
logged: false,
|
||||
onHold: true,
|
||||
onHold: false,
|
||||
user: {},
|
||||
events: [],
|
||||
showAlert: true,
|
||||
failedAttempt: false,
|
||||
token:'',
|
||||
userDetails: {
|
||||
username: "",
|
||||
password: "",
|
||||
token: {
|
||||
expirationDateToken: 0,
|
||||
access_token: ""
|
||||
access_token: "",
|
||||
refresh_token: ""
|
||||
}
|
||||
},
|
||||
calendar: {},
|
||||
|
@ -42,13 +54,21 @@ let apiState = {
|
|||
sessions: {},
|
||||
Blocks: {},
|
||||
onHoldBlocks: true,
|
||||
careerPath:{name:'Sem Career Path', color:'#eeeeee'},
|
||||
a:{},
|
||||
b:{},
|
||||
c:{},
|
||||
d:{},
|
||||
loadingLogin:false,
|
||||
|
||||
careerPath: { name: "Sem Career Path", color: "#eeeeee" , code:''},
|
||||
a: {},
|
||||
b: {},
|
||||
c: {},
|
||||
d: {},
|
||||
loadingLogin: false,
|
||||
alimentacao: [],
|
||||
acesso: [],
|
||||
alojamento: [],
|
||||
sessionDetail:{},
|
||||
team:undefined,
|
||||
internalToken:"",
|
||||
eventsInternal:[],
|
||||
cromos:[],
|
||||
locais:[],
|
||||
};
|
||||
|
||||
const apiReducer = (state = apiState, action) => {
|
||||
|
@ -60,22 +80,21 @@ const apiReducer = (state = apiState, action) => {
|
|||
|
||||
var expirationDateTokenA = 0;
|
||||
var access_tokenA = "";
|
||||
var refresh_tokenA = "puta";
|
||||
|
||||
if (action.payload.apiReducer.userDetails.token != undefined) {
|
||||
if (action.payload.apiReducer.token != undefined) {
|
||||
if (
|
||||
action.payload.apiReducer.userDetails.token.expirationDateToken !=
|
||||
undefined
|
||||
action.payload.apiReducer.token.expirationDateToken != undefined
|
||||
) {
|
||||
expirationDateTokenA =
|
||||
action.payload.apiReducer.userDetails.token.expirationDateToken;
|
||||
action.payload.apiReducer.token.expirationDateToken;
|
||||
}
|
||||
|
||||
if (
|
||||
action.payload.apiReducer.userDetails.token.access_token !=
|
||||
undefined
|
||||
) {
|
||||
access_tokenA =
|
||||
action.payload.apiReducer.userDetails.token.access_token;
|
||||
if (action.payload.apiReducer.token.access_token != undefined) {
|
||||
access_tokenA = action.payload.apiReducer.token.access_token;
|
||||
}
|
||||
if (action.payload.apiReducer.token.refresh_token != undefined) {
|
||||
refresh_tokenA = action.payload.apiReducer.token.refresh_token;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,22 +106,62 @@ const apiReducer = (state = apiState, action) => {
|
|||
userDetails: {
|
||||
token: {
|
||||
expirationDateToken: expirationDateTokenA,
|
||||
access_token: access_tokenA
|
||||
access_token: access_tokenA,
|
||||
refresh_token: refresh_tokenA
|
||||
},
|
||||
username: action.payload.apiReducer.userDetails.username,
|
||||
password: action.payload.apiReducer.userDetails.password
|
||||
}
|
||||
},
|
||||
token: action.payload.apiReducer.token,
|
||||
team: action.payload.apiReducer.team,
|
||||
eventsInternal: action.payload.apiReducer.eventsInternal,
|
||||
alimentacao: action.payload.apiReducer.alimentacao,
|
||||
acesso: action.payload.apiReducer.acesso,
|
||||
alojamento: action.payload.apiReducer.alojamento,
|
||||
internalToken:"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIxIiwidW5pcXVlX25hbWUiOiJjZW5hIiwicm9sZSI6IkFkbWluIiwibmJmIjoxNTUyODcwODcwLCJleHAiOjE1NTU0NTkyNzAsImlhdCI6MTU1Mjg3MDg3MH0.wkBk-CUDMCaU-K9jI0pTRJ794IGCl-C9md39dMfHqa5zTf-gNpD76xEYea3PhIbW2dnUVgo0m1fxR1sW7k9LMg",
|
||||
cromos: action.payload.apiReducer.cromos,
|
||||
careerPath: action.payload.apiReducer.careerPath,
|
||||
locais: action.payload.apiReducer.locais,
|
||||
Blocks: action.payload.apiReducer.Blocks
|
||||
};
|
||||
}
|
||||
|
||||
case GET_CROMOS:
|
||||
return Object.assign({}, state, {
|
||||
cromos: action.cromos
|
||||
});
|
||||
|
||||
case LOGIN_INTERNAL:
|
||||
return Object.assign({}, state, {
|
||||
internalToken: action.internalToken
|
||||
});
|
||||
case GET_LOCS_VISITED:
|
||||
return Object.assign({}, state, {
|
||||
locais: action.locais
|
||||
});
|
||||
|
||||
case CHANGE_PASSWORD:
|
||||
return Object.assign({}, state, {
|
||||
onHold: false
|
||||
});
|
||||
case "CHANGE_CONNECTION_STATUS":
|
||||
return Object.assign({}, state, {
|
||||
isConnected: action.isConnected
|
||||
});
|
||||
|
||||
case LOADINGLOGIN:
|
||||
state= Object.assign({}, state, {loadingLogin:true});
|
||||
case SESSION_DETAIL:
|
||||
state = Object.assign({}, state, {
|
||||
token: action.token,
|
||||
sessionDetail: action.sessionDetail
|
||||
});
|
||||
return state;
|
||||
|
||||
case UPDATE_USER:
|
||||
state = Object.assign({}, state, { user: action.user , toke: action.token, onHold:false});
|
||||
return state;
|
||||
case LOADINGLOGIN:
|
||||
state = Object.assign({}, state, { loadingLogin: true });
|
||||
return state;
|
||||
case HOLD:
|
||||
state = Object.assign({}, state, { onHold: true });
|
||||
return state;
|
||||
|
@ -113,31 +172,43 @@ 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
|
||||
loadingLogin: false,
|
||||
onHold: false,
|
||||
token: action.token
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
case CHECK_USER:
|
||||
var u = action.userDetails;
|
||||
if (action.token != undefined) u.token = action.token;
|
||||
case GET_TEAM:
|
||||
state = Object.assign({}, state, {
|
||||
|
||||
|
||||
team: action.team
|
||||
});
|
||||
case GET_INTERNAL_EVENTS:
|
||||
return Object.assign({}, state, {
|
||||
eventsInternal: action.eventsInternal
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
case CHECK_USER:
|
||||
state = Object.assign({}, state, {
|
||||
logged: action.logged,
|
||||
onHold: action.onHold,
|
||||
userDetails: u
|
||||
onHold: false,
|
||||
// userDetails: u,
|
||||
token: action.token
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
case LOGOUT_USER:
|
||||
state = Object.assign({}, state, { user:{}, userDetails:{}, logged:false});
|
||||
state = Object.assign({}, state, {
|
||||
user: {},
|
||||
userDetails: {},
|
||||
token: {},
|
||||
logged: false
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
|
@ -145,18 +216,41 @@ const apiReducer = (state = apiState, action) => {
|
|||
state = Object.assign({}, state, {
|
||||
user: action.user,
|
||||
loggedIn: action.loggedIn,
|
||||
onHold: action.onHold
|
||||
onHold: action.onHold,
|
||||
token: action.token
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
case GET_EVENTS:
|
||||
state = Object.assign({}, state, { events: action.events , a:action.day1, b:action.day2, c:action.day3, d:action.day4});
|
||||
console.log("aaaaaaqqquii")
|
||||
console.log(action)
|
||||
state = Object.assign({}, state, {
|
||||
events: action.events,
|
||||
a: action.day1,
|
||||
b: action.day2,
|
||||
c: action.day3,
|
||||
d: action.day4,
|
||||
alimentacao: action.alimentacao,
|
||||
alojamento: action.alojamento,
|
||||
acesso: action.acesso
|
||||
});
|
||||
|
||||
return state;
|
||||
|
||||
case REMOVE_SESSION:
|
||||
state = Object.assign({}, state, {
|
||||
sessions: action.sessions,
|
||||
Blocks: action.Blocks,
|
||||
careerPath: action.careerPath,
|
||||
changingGuest: action.changingGuest,
|
||||
user: action.user,
|
||||
token: action.token
|
||||
});
|
||||
return state;
|
||||
|
||||
case OPEN_MODAL:
|
||||
console.log("open modal")
|
||||
console.log("open modal");
|
||||
state = Object.assign({}, state, {
|
||||
modalOpen: true,
|
||||
modalInfo: action.modalInfo,
|
||||
|
@ -173,13 +267,29 @@ const apiReducer = (state = apiState, action) => {
|
|||
return state;
|
||||
|
||||
case SIGN_SESSION:
|
||||
state = Object.assign({}, state, {
|
||||
sessions: action.sessions,
|
||||
Blocks: action.Blocks,
|
||||
careerPath: action.careerPath,
|
||||
changingGuest: action.changingGuest,
|
||||
user:action.user
|
||||
});
|
||||
if (
|
||||
action.sessions == undefined ||
|
||||
action.Blocks == undefined ||
|
||||
action.user == undefined
|
||||
) {
|
||||
state = Object.assign({}, state, {
|
||||
changingGuest: false
|
||||
});
|
||||
} else {
|
||||
state = Object.assign({}, state, {
|
||||
sessions: action.sessions,
|
||||
Blocks: action.Blocks,
|
||||
careerPath: action.careerPath,
|
||||
changingGuest: false,
|
||||
user: action.user,
|
||||
a: action.day1,
|
||||
b: action.day2,
|
||||
c: action.day3,
|
||||
d: action.day4,
|
||||
token: action.token
|
||||
});
|
||||
}
|
||||
|
||||
return state;
|
||||
|
||||
case SESSION_BLOCKS:
|
||||
|
@ -194,7 +304,7 @@ const apiReducer = (state = apiState, action) => {
|
|||
var c = {
|
||||
guests: action.guests
|
||||
};
|
||||
state = Object.assign({}, state, { calendar: c });
|
||||
state = Object.assign({}, state, { calendar: c, token: action.token });
|
||||
|
||||
return state;
|
||||
|
||||
|
@ -203,7 +313,8 @@ const apiReducer = (state = apiState, action) => {
|
|||
changingGuest: false,
|
||||
sessions: action.sessions,
|
||||
Blocks: action.Blocks,
|
||||
careerPath: action.careerPath
|
||||
careerPath: action.careerPath,
|
||||
token: action.token
|
||||
});
|
||||
return state;
|
||||
|
||||
|
@ -214,11 +325,13 @@ const apiReducer = (state = apiState, action) => {
|
|||
case TIMERWAIT_CHANGE:
|
||||
state = Object.assign({}, state, { Blocks: true });
|
||||
return state;
|
||||
|
||||
case GET_SESSIONS:
|
||||
state = Object.assign({}, state, {
|
||||
sessions: action.sessions,
|
||||
Blocks: action.Blocks,
|
||||
careerPath: action.careerPath
|
||||
careerPath: action.careerPath,
|
||||
token: action.token
|
||||
});
|
||||
return state;
|
||||
default:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
|
||||
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
|
||||
|
@ -35,9 +36,11 @@
|
|||
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
|
||||
2DCD954D1E0B4F2C00145EB5 /* appTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* appTests.m */; };
|
||||
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
|
||||
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F42241E0235464C91B24049 /* libRNDeviceInfo.a */; };
|
||||
514DB1DF2E3B452F9EF272E3 /* libRNVectorIcons-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 95B0A42B6CD8441E904E6EB9 /* libRNVectorIcons-tvOS.a */; };
|
||||
69E1B84AE0DF486CB1B1D226 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C00CE8A4E3B747F9816B91CF /* libBVLinearGradient.a */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
A52E07192CD249F7B10FDA66 /* libAirMaps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C0906CC582484A7393F9B1F6 /* libAirMaps.a */; };
|
||||
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
|
||||
BE104176D74E47E9A369B15A /* libRNVectorIcons.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EB0A5A258CBE4EEFAD3C358E /* libRNVectorIcons.a */; };
|
||||
BE302B6D221B7875005626CF /* libRNCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE302B6C221B7860005626CF /* libRNCamera.a */; };
|
||||
|
@ -58,9 +61,7 @@
|
|||
BE5EAB86221B7D5400E92E5B /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BE5EAB77221B7D5400E92E5B /* Zocial.ttf */; };
|
||||
BE5EAC3A221B83CF00E92E5B /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BE302B75221B7C3B005626CF /* Ionicons.ttf */; };
|
||||
BE5EAC41221B889900E92E5B /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE5EAC40221B888C00E92E5B /* libReactNativePermissions.a */; };
|
||||
4EBB88037B054A508BF35245 /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F42241E0235464C91B24049 /* libRNDeviceInfo.a */; };
|
||||
E677346A94D54E90817979B0 /* libRNDeviceInfo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */; };
|
||||
A52E07192CD249F7B10FDA66 /* libAirMaps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C0906CC582484A7393F9B1F6 /* libAirMaps.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -386,6 +387,27 @@
|
|||
remoteGlobalIDString = 9D23B34F1C767B80008B4819;
|
||||
remoteInfo = ReactNativePermissions;
|
||||
};
|
||||
BE7C0E9A223D9A43009CAF95 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = DA5891D81BA9A9FC002B4DB2;
|
||||
remoteInfo = RNDeviceInfo;
|
||||
};
|
||||
BE7C0E9C223D9A43009CAF95 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E72EC1401F7ABB5A0001BC90;
|
||||
remoteInfo = "RNDeviceInfo-tvOS";
|
||||
};
|
||||
BE7C0EA1223D9A43009CAF95 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 11FA5C511C4A1296003AC2EE;
|
||||
remoteInfo = AirMaps;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
|
@ -398,6 +420,7 @@
|
|||
00E356EE1AD99517003FC87E /* appTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = appTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
00E356F21AD99517003FC87E /* appTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = appTests.m; sourceTree = "<group>"; };
|
||||
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNDeviceInfo.a; sourceTree = "<group>"; };
|
||||
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
|
||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
|
||||
13B07F961A680F5B00A75B9A /* app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = app.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -412,11 +435,14 @@
|
|||
2D02E47B1E0B4A5D006451C7 /* app-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "app-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D02E4901E0B4A5D006451C7 /* app-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "app-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNDeviceInfo-tvOS.a"; sourceTree = "<group>"; };
|
||||
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNDeviceInfo.xcodeproj; path = "../node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj"; sourceTree = "<group>"; };
|
||||
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
|
||||
664970B9D10A41A18B44727F /* RNVectorIcons.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNVectorIcons.xcodeproj; path = "../node_modules/react-native-vector-icons/RNVectorIcons.xcodeproj"; sourceTree = "<group>"; };
|
||||
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
|
||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
|
||||
95B0A42B6CD8441E904E6EB9 /* libRNVectorIcons-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNVectorIcons-tvOS.a"; sourceTree = "<group>"; };
|
||||
A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = AirMaps.xcodeproj; path = "../node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj"; sourceTree = "<group>"; };
|
||||
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
|
||||
BE302B67221B7860005626CF /* RNCamera.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNCamera.xcodeproj; path = "../node_modules/react-native-camera/ios/RNCamera.xcodeproj"; sourceTree = "<group>"; };
|
||||
BE302B6E221B7AC7005626CF /* RNGestureHandler.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNGestureHandler.xcodeproj; path = "../node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj"; sourceTree = "<group>"; };
|
||||
|
@ -437,12 +463,8 @@
|
|||
BE5EAB77221B7D5400E92E5B /* Zocial.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Zocial.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = "<group>"; };
|
||||
BE5EAC3B221B888C00E92E5B /* ReactNativePermissions.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativePermissions.xcodeproj; path = "../node_modules/react-native-permissions/ios/ReactNativePermissions.xcodeproj"; sourceTree = "<group>"; };
|
||||
C00CE8A4E3B747F9816B91CF /* libBVLinearGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBVLinearGradient.a; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; name = "RNDeviceInfo.xcodeproj"; path = "../node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo.a"; path = "libRNDeviceInfo.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */ = {isa = PBXFileReference; name = "libRNDeviceInfo-tvOS.a"; path = "libRNDeviceInfo-tvOS.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */ = {isa = PBXFileReference; name = "AirMaps.xcodeproj"; path = "../node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
C0906CC582484A7393F9B1F6 /* libAirMaps.a */ = {isa = PBXFileReference; name = "libAirMaps.a"; path = "libAirMaps.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -765,6 +787,9 @@
|
|||
EB0A5A258CBE4EEFAD3C358E /* libRNVectorIcons.a */,
|
||||
95B0A42B6CD8441E904E6EB9 /* libRNVectorIcons-tvOS.a */,
|
||||
C00CE8A4E3B747F9816B91CF /* libBVLinearGradient.a */,
|
||||
0F42241E0235464C91B24049 /* libRNDeviceInfo.a */,
|
||||
C0906CC582484A7393F9B1F6 /* libAirMaps.a */,
|
||||
3C4D43A092A4408B91B32E76 /* libRNDeviceInfo-tvOS.a */,
|
||||
);
|
||||
name = "Recovered References";
|
||||
sourceTree = "<group>";
|
||||
|
@ -795,6 +820,23 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BE7C0E96223D9A42009CAF95 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BE7C0E9B223D9A43009CAF95 /* libRNDeviceInfo.a */,
|
||||
BE7C0E9D223D9A43009CAF95 /* libRNDeviceInfo-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BE7C0E9E223D9A43009CAF95 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BE7C0EA2223D9A43009CAF95 /* libAirMaps.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
@ -881,6 +923,7 @@
|
|||
TargetAttributes = {
|
||||
00E356ED1AD99517003FC87E = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
DevelopmentTeam = HLA62A6826;
|
||||
TestTargetID = 13B07F861A680F5B00A75B9A;
|
||||
};
|
||||
13B07F861A680F5B00A75B9A = {
|
||||
|
@ -888,6 +931,7 @@
|
|||
};
|
||||
2D02E47A1E0B4A5D006451C7 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
DevelopmentTeam = HLA62A6826;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
2D02E48F1E0B4A5D006451C7 = {
|
||||
|
@ -902,6 +946,7 @@
|
|||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
|
@ -909,6 +954,10 @@
|
|||
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = BE7C0E9E223D9A43009CAF95 /* Products */;
|
||||
ProjectRef = A97F1617782E42EC83467F41 /* AirMaps.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = BE5EAC32221B835A00E92E5B /* Products */;
|
||||
ProjectRef = 1908F5E093844AC5A143E888 /* BVLinearGradient.xcodeproj */;
|
||||
|
@ -969,6 +1018,10 @@
|
|||
ProductGroup = BE302B68221B7860005626CF /* Products */;
|
||||
ProjectRef = BE302B67221B7860005626CF /* RNCamera.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = BE7C0E96223D9A42009CAF95 /* Products */;
|
||||
ProjectRef = 5BA133418E6F4967BC5BC234 /* RNDeviceInfo.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = BE302B6F221B7AC7005626CF /* Products */;
|
||||
ProjectRef = BE302B6E221B7AC7005626CF /* RNGestureHandler.xcodeproj */;
|
||||
|
@ -1297,6 +1350,27 @@
|
|||
remoteRef = BE5EAC3F221B888C00E92E5B /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
BE7C0E9B223D9A43009CAF95 /* libRNDeviceInfo.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNDeviceInfo.a;
|
||||
remoteRef = BE7C0E9A223D9A43009CAF95 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
BE7C0E9D223D9A43009CAF95 /* libRNDeviceInfo-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRNDeviceInfo-tvOS.a";
|
||||
remoteRef = BE7C0E9C223D9A43009CAF95 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
BE7C0EA2223D9A43009CAF95 /* libAirMaps.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libAirMaps.a;
|
||||
remoteRef = BE7C0EA1223D9A43009CAF95 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
|
@ -1446,6 +1520,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
DEVELOPMENT_TEAM = HLA62A6826;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
|
@ -1455,7 +1530,7 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = appTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
|
@ -1484,12 +1559,13 @@
|
|||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEVELOPMENT_TEAM = HLA62A6826;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = appTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
|
@ -1525,7 +1601,7 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = app/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1551,7 +1627,7 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = app/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1576,6 +1652,7 @@
|
|||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = HLA62A6826;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
|
@ -1583,7 +1660,7 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1619,13 +1696,14 @@
|
|||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = HLA62A6826;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOS/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -1666,7 +1744,7 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
|
@ -1707,7 +1785,7 @@
|
|||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
|
||||
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
|
||||
"$(SRCROOT)\..\node_modules\react-native-maps\lib\ios/**",
|
||||
"$(SRCROOT)..\node_modules\neact-native-mapslibios/**",
|
||||
);
|
||||
INFOPLIST_FILE = "app-tvOSTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
|
|
|
@ -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>
|
||||
<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></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>2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<string>16</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</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>
|
||||
<string>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>O microfone não é usado, no entanto o package que uso para ler o QR code pede a permissão do microfone.</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/>
|
||||
|
|
|
@ -2745,6 +2745,11 @@
|
|||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
||||
},
|
||||
"email-validator": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/email-validator/-/email-validator-2.0.4.tgz",
|
||||
"integrity": "sha512-gYCwo7kh5S3IDyZPLZf6hSS0MnZT8QmJFqYvbqlDZSbwdZlY6QZWxJ4i/6UhITOJ4XzyI647Bm2MXKCLqnJ4nQ=="
|
||||
},
|
||||
"emojis-list": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
|
||||
|
@ -2953,7 +2958,7 @@
|
|||
"integrity": "sha512-xo8wZ9/4F3P1xN9nKFSJM3Gb2m0p05aRncjgFF+jxM5XfvKkUrzW0a6FYOY/h/r2r1wyQI7OTBPTiTH/GxuwgA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"@expo/vector-icons": "github:expo/vector-icons#d0fb774a001b047d223cfa5e9537220b20591efd",
|
||||
"@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",
|
||||
|
@ -3015,7 +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#e6f98ff7272e5d0a7fe974a41f28593af2d77bb2",
|
||||
"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",
|
||||
|
@ -3741,7 +3746,8 @@
|
|||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
|
@ -3759,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"
|
||||
|
@ -3776,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",
|
||||
|
@ -3887,7 +3898,8 @@
|
|||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -3897,6 +3909,7 @@
|
|||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -3909,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"
|
||||
|
@ -3936,6 +3952,7 @@
|
|||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -4008,7 +4025,8 @@
|
|||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -4018,6 +4036,7 @@
|
|||
"once": {
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -4093,7 +4112,8 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -4123,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",
|
||||
|
@ -4140,6 +4161,7 @@
|
|||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
@ -4178,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
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -7945,6 +7969,19 @@
|
|||
"prop-types": "^15.6.1"
|
||||
}
|
||||
},
|
||||
"react-native-image-pan-zoom": {
|
||||
"version": "2.1.11",
|
||||
"resolved": "https://registry.npmjs.org/react-native-image-pan-zoom/-/react-native-image-pan-zoom-2.1.11.tgz",
|
||||
"integrity": "sha512-ZCisGUFpPchHXsjT7ZI0anlSLPgcTmjRKXqpVnPu3RDWFXfKjuL4zpY57DX4Y8YgGZCpbf9fApN7KjVYody2Mw=="
|
||||
},
|
||||
"react-native-image-zoom-viewer": {
|
||||
"version": "2.2.25",
|
||||
"resolved": "https://registry.npmjs.org/react-native-image-zoom-viewer/-/react-native-image-zoom-viewer-2.2.25.tgz",
|
||||
"integrity": "sha512-/w3GsUD9F5c6ZE+3GC1UmE0I9yCAfTf/5Jjz5bDCvIQFp2MoMod3BQzRnZ1PjZbCq6a90eZ5rnB2Zvm1rFOgeQ==",
|
||||
"requires": {
|
||||
"react-native-image-pan-zoom": "^2.1.9"
|
||||
}
|
||||
},
|
||||
"react-native-ionicons": {
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/react-native-ionicons/-/react-native-ionicons-4.5.5.tgz",
|
||||
|
@ -8165,6 +8202,14 @@
|
|||
"prop-types": "^15.5.10"
|
||||
}
|
||||
},
|
||||
"react-native-switch": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-switch/-/react-native-switch-1.5.0.tgz",
|
||||
"integrity": "sha1-pcjnL4fe9knRyd4CfFrifiA36kA=",
|
||||
"requires": {
|
||||
"prop-types": "^15.6.0"
|
||||
}
|
||||
},
|
||||
"react-native-tab-view": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-1.3.1.tgz",
|
||||
|
@ -9820,6 +9865,14 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"toggle-switch-react-native": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/toggle-switch-react-native/-/toggle-switch-react-native-2.0.2.tgz",
|
||||
"integrity": "sha512-Q7bGEkcPgFsLIa9Io/ZSXA4LIvIxBqothaiUU6b9ay8XXQoKqsgvoPehLVYBvfpnQOmyfZ5NHOdOKiV8ewI6fQ==",
|
||||
"requires": {
|
||||
"prop-types": "^15.5.7"
|
||||
}
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"dependencies": {
|
||||
"@redux-offline/redux-offline": "^2.5.1",
|
||||
"axios": "^0.18.0",
|
||||
"email-validator": "^2.0.4",
|
||||
"expo": "^32.0.5",
|
||||
"material-icons-react": "^1.0.4",
|
||||
"moment": "^2.24.0",
|
||||
|
@ -27,6 +28,7 @@
|
|||
"react-native-fit-image": "^1.5.4",
|
||||
"react-native-gesture-handler": "^1.0.15",
|
||||
"react-native-image-overlay": "^0.1.2",
|
||||
"react-native-image-zoom-viewer": "^2.2.25",
|
||||
"react-native-ionicons": "^4.5.5",
|
||||
"react-native-linear-gradient": "^2.5.3",
|
||||
"react-native-loader": "^1.2.1",
|
||||
|
@ -43,6 +45,7 @@
|
|||
"react-native-qrcode-scanner": "^1.1.2",
|
||||
"react-native-shadow": "^1.2.2",
|
||||
"react-native-swiper": "^1.5.14",
|
||||
"react-native-switch": "^1.5.0",
|
||||
"react-native-timeline-feed": "^1.0.1",
|
||||
"react-native-timeline-listview": "^0.2.3",
|
||||
"react-native-ui-kitten": "^3.1.2",
|
||||
|
@ -53,7 +56,8 @@
|
|||
"redux": "^4.0.1",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-persist": "^5.10.0",
|
||||
"redux-thunk": "^2.3.0"
|
||||
"redux-thunk": "^2.3.0",
|
||||
"toggle-switch-react-native": "^2.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "23.6.0",
|
||||
|
|
227
App/yarn.lock
|
@ -1032,6 +1032,11 @@ async-limiter@~1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
|
||||
integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==
|
||||
|
||||
async@0.2.x, async@~0.2.9:
|
||||
version "0.2.10"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
|
||||
integrity sha1-trvgsGdLnXGXCMo43owjfLUmw9E=
|
||||
|
||||
async@^2.1.4, async@^2.4.0, async@^2.5.0:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381"
|
||||
|
@ -1622,6 +1627,11 @@ color@^3.1.0:
|
|||
color-convert "^1.9.1"
|
||||
color-string "^1.5.2"
|
||||
|
||||
colors@0.6.x:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc"
|
||||
integrity sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=
|
||||
|
||||
combined-stream@^1.0.6, combined-stream@~1.0.6:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828"
|
||||
|
@ -1791,6 +1801,11 @@ cssstyle@^1.0.0:
|
|||
dependencies:
|
||||
cssom "0.3.x"
|
||||
|
||||
cycle@1.0.x:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2"
|
||||
integrity sha1-IegLK+hYD5i0aPN5QwZisEbDStI=
|
||||
|
||||
dashdash@^1.12.0:
|
||||
version "1.14.1"
|
||||
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
|
||||
|
@ -1848,6 +1863,11 @@ deep-diff@^0.3.5:
|
|||
resolved "https://registry.yarnpkg.com/deep-diff/-/deep-diff-0.3.8.tgz#c01de63efb0eec9798801d40c7e0dae25b582c84"
|
||||
integrity sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=
|
||||
|
||||
deep-equal@*:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
|
||||
integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=
|
||||
|
||||
deep-extend@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
||||
|
@ -1966,6 +1986,11 @@ ee-first@1.1.1:
|
|||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||
|
||||
email-validator@^2.0.4:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/email-validator/-/email-validator-2.0.4.tgz#b8dfaa5d0dae28f1b03c95881d904d4e40bfe7ed"
|
||||
integrity sha512-gYCwo7kh5S3IDyZPLZf6hSS0MnZT8QmJFqYvbqlDZSbwdZlY6QZWxJ4i/6UhITOJ4XzyI647Bm2MXKCLqnJ4nQ==
|
||||
|
||||
emojis-list@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
|
||||
|
@ -2589,6 +2614,11 @@ extsprintf@^1.2.0:
|
|||
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
|
||||
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
|
||||
|
||||
eyes@0.1.x:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
|
||||
integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=
|
||||
|
||||
fancy-log@^1.3.2:
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7"
|
||||
|
@ -3093,6 +3123,11 @@ http-signature@~1.2.0:
|
|||
jsprim "^1.2.2"
|
||||
sshpk "^1.7.0"
|
||||
|
||||
i@0.3.x:
|
||||
version "0.3.6"
|
||||
resolved "https://registry.yarnpkg.com/i/-/i-0.3.6.tgz#d96c92732076f072711b6b10fd7d4f65ad8ee23d"
|
||||
integrity sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=
|
||||
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
|
@ -3446,7 +3481,7 @@ isomorphic-fetch@^2.1.1:
|
|||
node-fetch "^1.0.1"
|
||||
whatwg-fetch ">=0.10.0"
|
||||
|
||||
isstream@~0.1.2:
|
||||
isstream@0.1.x, isstream@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
||||
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
|
||||
|
@ -4679,7 +4714,7 @@ mixin-deep@^1.2.0:
|
|||
for-in "^1.0.2"
|
||||
is-extendable "^1.0.1"
|
||||
|
||||
mkdirp@^0.5.0, mkdirp@^0.5.1:
|
||||
mkdirp@0.x.x, mkdirp@^0.5.0, mkdirp@^0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
|
||||
|
@ -4724,6 +4759,11 @@ mute-stream@0.0.7:
|
|||
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
|
||||
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
|
||||
|
||||
mute-stream@~0.0.4:
|
||||
version "0.0.8"
|
||||
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
|
||||
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
|
||||
|
||||
nan@^2.9.2:
|
||||
version "2.12.1"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552"
|
||||
|
@ -4751,6 +4791,11 @@ natural-compare@^1.4.0:
|
|||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||
|
||||
ncp@0.4.x:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/ncp/-/ncp-0.4.2.tgz#abcc6cbd3ec2ed2a729ff6e7c1fa8f01784a8574"
|
||||
integrity sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=
|
||||
|
||||
needle@^2.2.1:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e"
|
||||
|
@ -5220,6 +5265,16 @@ pkg-up@^2.0.0:
|
|||
dependencies:
|
||||
find-up "^2.1.0"
|
||||
|
||||
pkginfo@0.3.x:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21"
|
||||
integrity sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=
|
||||
|
||||
pkginfo@0.x.x:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff"
|
||||
integrity sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=
|
||||
|
||||
plist@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/plist/-/plist-2.0.1.tgz#0a32ca9481b1c364e92e18dc55c876de9d01da8b"
|
||||
|
@ -5309,6 +5364,17 @@ promise@^7.1.1:
|
|||
dependencies:
|
||||
asap "~2.0.3"
|
||||
|
||||
prompt@^0.2.14:
|
||||
version "0.2.14"
|
||||
resolved "https://registry.yarnpkg.com/prompt/-/prompt-0.2.14.tgz#57754f64f543fd7b0845707c818ece618f05ffdc"
|
||||
integrity sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=
|
||||
dependencies:
|
||||
pkginfo "0.x.x"
|
||||
read "1.0.x"
|
||||
revalidator "0.1.x"
|
||||
utile "0.2.x"
|
||||
winston "0.8.x"
|
||||
|
||||
prompts@^0.1.9:
|
||||
version "0.1.14"
|
||||
resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2"
|
||||
|
@ -5317,7 +5383,7 @@ prompts@^0.1.9:
|
|||
kleur "^2.0.1"
|
||||
sisteransi "^0.1.1"
|
||||
|
||||
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
|
||||
prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.5.9, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
|
||||
version "15.7.2"
|
||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
|
||||
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
|
||||
|
@ -5445,6 +5511,13 @@ react-native-app-intro-slider@^1.0.1:
|
|||
resolved "https://registry.yarnpkg.com/react-native-app-intro-slider/-/react-native-app-intro-slider-1.0.1.tgz#712bf3dc1d66b3432bf4092971db4dfc01b916bd"
|
||||
integrity sha512-5Gzg5FG2uP/RHkSDFB5+2df4vQ2FpyUJ5PGYd23lLEISsEOJe0Zredh1hHMJj+fB5D9B7ZoL0IlR+SNn8iFxHg==
|
||||
|
||||
react-native-awesome-alerts@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-awesome-alerts/-/react-native-awesome-alerts-1.2.0.tgz#a19b105d5133e92712d865795d532cd3f1e4de2d"
|
||||
integrity sha512-ouxDGJ/porNkuaeqpgxIJA4jAPqHC9bJIsxLA21NA6eZhnEhbqWOprjsNqwI0/7bJxXm9baTzXESCMzwAy3eZw==
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-native-branch@2.2.5:
|
||||
version "2.2.5"
|
||||
resolved "https://registry.yarnpkg.com/react-native-branch/-/react-native-branch-2.2.5.tgz#4074dd63b4973e6397d9ce50e97b57c77a518e9d"
|
||||
|
@ -5457,6 +5530,23 @@ react-native-camera@^1.9.2:
|
|||
dependencies:
|
||||
prop-types "^15.6.2"
|
||||
|
||||
react-native-check-box@^2.1.7:
|
||||
version "2.1.7"
|
||||
resolved "https://registry.yarnpkg.com/react-native-check-box/-/react-native-check-box-2.1.7.tgz#f349d3505a13c15d19949ec4cec40c7adc4f3626"
|
||||
integrity sha512-dPVOoz4jKs2je2HSHp7+XJXNyZFq8Kij7IHutigrQKzB550Dko6ZAQu/1mG1FzdUMFxxkZ2nX59KmbR0Co0T8Q==
|
||||
dependencies:
|
||||
prop-types "^15.5.7"
|
||||
|
||||
react-native-cli@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-cli/-/react-native-cli-2.0.1.tgz#f2cd3c7aa1b83828cdfba630e2dfd817df766d54"
|
||||
integrity sha1-8s08eqG4OCjN+6Yw4t/YF992bVQ=
|
||||
dependencies:
|
||||
chalk "^1.1.1"
|
||||
minimist "^1.2.0"
|
||||
prompt "^0.2.14"
|
||||
semver "^5.0.3"
|
||||
|
||||
react-native-confirmation-code-input@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/react-native-confirmation-code-input/-/react-native-confirmation-code-input-1.0.4.tgz#f5c2cced66f26b61050fea8bfd17473af1ad5ff9"
|
||||
|
@ -5465,6 +5555,11 @@ react-native-confirmation-code-input@^1.0.4:
|
|||
lodash "^4.17.4"
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-native-device-info@^0.26.4:
|
||||
version "0.26.5"
|
||||
resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-0.26.5.tgz#7c63f047894e4cf2d4d9bfa1832444fb37e53569"
|
||||
integrity sha512-Z3/Ue8A0VPtchT/NLykA+sKuOSE6FPNGQMKFqLea+urvYimmzfs1hAVbJ3my+ijnJXpuebu5c4xbYEqaRhuV6w==
|
||||
|
||||
react-native-elements@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-elements/-/react-native-elements-1.0.0.tgz#95bc194f61ec4658d8dbd977524f8c4fd3ada136"
|
||||
|
@ -5501,6 +5596,7 @@ react-native-image-overlay@^0.1.2:
|
|||
dependencies:
|
||||
prop-types "^15.6.1"
|
||||
|
||||
|
||||
react-native-ionicons@^4.5.5:
|
||||
version "4.5.5"
|
||||
resolved "https://registry.yarnpkg.com/react-native-ionicons/-/react-native-ionicons-4.5.5.tgz#4657ce742e39f0443b0960f20b946269fa0b90b5"
|
||||
|
@ -5516,15 +5612,66 @@ react-native-loader@^1.2.1:
|
|||
resolved "https://registry.yarnpkg.com/react-native-loader/-/react-native-loader-1.2.1.tgz#e08589a89cfcd076595b9301c1d618f54da73329"
|
||||
integrity sha1-4IWJqJz80HZZW5MBwdYY9U2nMyk=
|
||||
|
||||
"react-native-maps@github:expo/react-native-maps#v0.22.1-exp.0":
|
||||
react-native-loading-spinner-overlay@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-loading-spinner-overlay/-/react-native-loading-spinner-overlay-1.0.1.tgz#07f85a072b6f7d05b8749668cd626df4cc330347"
|
||||
integrity sha512-njZZWs+cgyq6Ni7tkYEowMmuAuHVljuH4CqTWA0plNOfSzZhEcrW209y7WcgHjRWz0RvvEYF5oWGT8DWtTq8bA==
|
||||
dependencies:
|
||||
prop-types "^15.6.2"
|
||||
|
||||
react-native-maps@^0.23.0:
|
||||
version "0.23.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.23.0.tgz#edbfdcad0e42190627eb1c8067eaba5965c8f81e"
|
||||
integrity sha512-qxOIQGsDtQXQlSJdXMW1wg8pvLaVYdbiIolB7tZTTgTGgIA/hDxXwZbQZ08c4KDD6/VTk8krfd1APaHkqvh6og==
|
||||
|
||||
react-native-maps@expo/react-native-maps#v0.22.1-exp.0:
|
||||
version "0.22.1"
|
||||
resolved "https://codeload.github.com/expo/react-native-maps/tar.gz/e6f98ff7272e5d0a7fe974a41f28593af2d77bb2"
|
||||
|
||||
react-native-material-buttons@^0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-material-buttons/-/react-native-material-buttons-0.5.0.tgz#ab2b3e3fc3f500ca713f51e9d75978aff602152a"
|
||||
integrity sha1-qys+P8P1AMpxP1Hp11l4r/YCFSo=
|
||||
dependencies:
|
||||
prop-types "^15.5.9"
|
||||
react-native-material-ripple "^0.7.0"
|
||||
|
||||
react-native-material-dropdown@^0.11.1:
|
||||
version "0.11.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-material-dropdown/-/react-native-material-dropdown-0.11.1.tgz#c0fe434a8e617941ef910ba44d2f07c8f37584fe"
|
||||
integrity sha1-wP5DSo5heUHvkQukTS8HyPN1hP4=
|
||||
dependencies:
|
||||
prop-types "^15.5.9"
|
||||
react-native-material-buttons "^0.5.0"
|
||||
react-native-material-ripple "^0.8.0"
|
||||
react-native-material-textfield "^0.12.0"
|
||||
|
||||
react-native-material-ripple@^0.7.0:
|
||||
version "0.7.5"
|
||||
resolved "https://registry.yarnpkg.com/react-native-material-ripple/-/react-native-material-ripple-0.7.5.tgz#e2af5110680532f14aea3c3a438247be2ffef659"
|
||||
integrity sha1-4q9REGgFMvFK6jw6Q4JHvi/+9lk=
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-native-material-ripple@^0.8.0:
|
||||
version "0.8.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-material-ripple/-/react-native-material-ripple-0.8.0.tgz#b8c24e6fdea2af2a21e8468b1f40b35483019e2f"
|
||||
integrity sha1-uMJOb96iryoh6EaLH0CzVIMBni8=
|
||||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-native-material-shadows@0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-material-shadows/-/react-native-material-shadows-0.0.2.tgz#024a50b097423325c6e51f93298c4ab1b226e7f5"
|
||||
integrity sha512-igZWUvc9qCHk6vN0sR4bktBixrSHMwmy8n/sNQC9EqxoOcp0ChWF82hujPp9XqbVii7ZX0E3FGiYCWFtGfPHVA==
|
||||
|
||||
react-native-material-textfield@^0.12.0:
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-material-textfield/-/react-native-material-textfield-0.12.0.tgz#3fba19d76ab89f67052c81e082152fc243d82a3f"
|
||||
integrity sha1-P7oZ12q4n2cFLIHgghUvwkPYKj8=
|
||||
dependencies:
|
||||
prop-types "^15.5.9"
|
||||
|
||||
react-native-modal@^7.0.2:
|
||||
version "7.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-modal/-/react-native-modal-7.0.2.tgz#6048217807e03cd585204dace2e1ca1726c0b647"
|
||||
|
@ -5533,6 +5680,11 @@ react-native-modal@^7.0.2:
|
|||
prop-types "^15.6.1"
|
||||
react-native-animatable "^1.2.4"
|
||||
|
||||
react-native-network-info@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-network-info/-/react-native-network-info-4.0.1.tgz#e0242cfec0d9c0e1c6c32b8df596bb4c3223a5a3"
|
||||
integrity sha512-ZeSkeBL/fHsFR6sAOVHMd4oMknCwsbEeL+Zewec1/3ielg8k9YcddK3wymXS7kvwV0mTB2ji4X5tI0b7XY0sDA==
|
||||
|
||||
react-native-offline@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-offline/-/react-native-offline-4.3.0.tgz#6877e4a4b961e230e0a198bce2d0611ca8af9d89"
|
||||
|
@ -5548,6 +5700,13 @@ react-native-permissions@^1.1.1:
|
|||
resolved "https://registry.yarnpkg.com/react-native-permissions/-/react-native-permissions-1.1.1.tgz#4876004681ff8556454613d85249b01baff9b35b"
|
||||
integrity sha512-t0Ujm177bagjUOSzhpmkSz+LqFW04HnY9TeZFavDCmV521fQvFz82aD+POXqWsAdsJVOK3umJYBNNqCjC3g0hQ==
|
||||
|
||||
react-native-progress-bar-animated@^1.0.6:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/react-native-progress-bar-animated/-/react-native-progress-bar-animated-1.0.6.tgz#18de003ababb8222c84299ef2f20d0eab549dc19"
|
||||
integrity sha512-UPAAwxtBVV+sPwhgVd78SA7QybPshV5CydaV0GJyM+eZ89ikkZQSasAUAgIQwVVCW1Tj6XNrgizimXM9JdczeA==
|
||||
dependencies:
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-native-progress@^3.5.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-progress/-/react-native-progress-3.5.0.tgz#d1ccc7f96dc17c609aedb43b2e6695d67deae0ec"
|
||||
|
@ -5626,6 +5785,13 @@ react-native-swiper@^1.5.14:
|
|||
dependencies:
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-native-switch@^1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-switch/-/react-native-switch-1.5.0.tgz#a5c8e72f87def649d1c9de027c5ae27e2037ea40"
|
||||
integrity sha1-pcjnL4fe9knRyd4CfFrifiA36kA=
|
||||
dependencies:
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-native-tab-view@^1.0.0, react-native-tab-view@^1.2.0:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.3.2.tgz#c4e43a538dcacce151938745cea09176beeccbc3"
|
||||
|
@ -5796,7 +5962,7 @@ react-test-renderer@16.6.3:
|
|||
react-is "^16.6.3"
|
||||
scheduler "^0.11.2"
|
||||
|
||||
react-timer-mixin@^0.13.2:
|
||||
react-timer-mixin@^0.13.2, react-timer-mixin@^0.13.4:
|
||||
version "0.13.4"
|
||||
resolved "https://registry.yarnpkg.com/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz#75a00c3c94c13abe29b43d63b4c65a88fc8264d3"
|
||||
integrity sha512-4+ow23tp/Tv7hBM5Az5/Be/eKKF7DIvJ09voz5LyHGQaqqz9WV8YMs31eFvcYQs7d451LSg7kDJV70XYN/Ug/Q==
|
||||
|
@ -5864,6 +6030,13 @@ read-pkg@^2.0.0:
|
|||
normalize-package-data "^2.3.2"
|
||||
path-type "^2.0.0"
|
||||
|
||||
read@1.0.x:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4"
|
||||
integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=
|
||||
dependencies:
|
||||
mute-stream "~0.0.4"
|
||||
|
||||
readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@~2.3.6:
|
||||
version "2.3.6"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
|
||||
|
@ -6112,7 +6285,12 @@ ret@~0.1.10:
|
|||
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
||||
integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
|
||||
|
||||
rimraf@^2.5.4, rimraf@^2.6.1:
|
||||
revalidator@0.1.x:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b"
|
||||
integrity sha1-/s5hv6DBtSoga9axgZgYS91SOjs=
|
||||
|
||||
rimraf@2.x.x, rimraf@^2.5.4, rimraf@^2.6.1:
|
||||
version "2.6.3"
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
|
||||
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
|
||||
|
@ -6474,6 +6652,11 @@ sshpk@^1.7.0:
|
|||
safer-buffer "^2.0.2"
|
||||
tweetnacl "~0.14.0"
|
||||
|
||||
stack-trace@0.0.x:
|
||||
version "0.0.10"
|
||||
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
|
||||
integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=
|
||||
|
||||
stack-utils@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8"
|
||||
|
@ -6726,6 +6909,13 @@ to-regex@^3.0.1, to-regex@^3.0.2:
|
|||
regex-not "^1.0.2"
|
||||
safe-regex "^1.1.0"
|
||||
|
||||
toggle-switch-react-native@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/toggle-switch-react-native/-/toggle-switch-react-native-2.0.2.tgz#3979bb41343a8bbc45735246d138a93e3d0917a1"
|
||||
integrity sha512-Q7bGEkcPgFsLIa9Io/ZSXA4LIvIxBqothaiUU6b9ay8XXQoKqsgvoPehLVYBvfpnQOmyfZ5NHOdOKiV8ewI6fQ==
|
||||
dependencies:
|
||||
prop-types "^15.5.7"
|
||||
|
||||
tough-cookie@^2.3.3, tough-cookie@^2.3.4:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
|
||||
|
@ -6904,6 +7094,18 @@ util.promisify@^1.0.0:
|
|||
define-properties "^1.1.2"
|
||||
object.getownpropertydescriptors "^2.0.3"
|
||||
|
||||
utile@0.2.x:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/utile/-/utile-0.2.1.tgz#930c88e99098d6220834c356cbd9a770522d90d7"
|
||||
integrity sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=
|
||||
dependencies:
|
||||
async "~0.2.9"
|
||||
deep-equal "*"
|
||||
i "0.3.x"
|
||||
mkdirp "0.x.x"
|
||||
ncp "0.4.x"
|
||||
rimraf "2.x.x"
|
||||
|
||||
utils-merge@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
|
||||
|
@ -7032,6 +7234,19 @@ wide-align@^1.1.0:
|
|||
dependencies:
|
||||
string-width "^1.0.2 || 2"
|
||||
|
||||
winston@0.8.x:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/winston/-/winston-0.8.3.tgz#64b6abf4cd01adcaefd5009393b1d8e8bec19db0"
|
||||
integrity sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=
|
||||
dependencies:
|
||||
async "0.2.x"
|
||||
colors "0.6.x"
|
||||
cycle "1.0.x"
|
||||
eyes "0.1.x"
|
||||
isstream "0.1.x"
|
||||
pkginfo "0.3.x"
|
||||
stack-trace "0.0.x"
|
||||
|
||||
wordwrap@^1.0.0, wordwrap@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- [Henrique Dias]()
|
||||
- [Filipe Pinho]()
|
||||
- [João Borges]()
|
||||
- [Zé Valdeviesso]
|
||||
- [Zé Valdiviesso](https://github.com/zmiguel)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,205 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ENEI QR Scanner</title>
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.4.0.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script src="./jsQR.js"></script>
|
||||
<script src="./send.js"></script>
|
||||
<link href="https://fonts.googleapis.com/css?family=Ropa+Sans" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||
<meta name="author" content="ZMiguel Valdiviesso">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Ropa Sans', sans-serif;
|
||||
font-size: 3pc !important;
|
||||
color: #333;
|
||||
max-width: 95%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
input, select{
|
||||
font-size: 3pc !important;
|
||||
}
|
||||
|
||||
#githubLink {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 12px;
|
||||
color: #2D99FF;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 10px 0;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
#loadingMessage {
|
||||
text-align: center;
|
||||
padding: 40px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#videocanvas{
|
||||
width: 100% !important;
|
||||
flex: 1;
|
||||
align-self: center !important;
|
||||
align-content: center !important;
|
||||
align-items: center !important;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
#canvas {
|
||||
max-width: 75%;
|
||||
max-height: 50%;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#output {
|
||||
margin-top: 20px;
|
||||
background: #eee;
|
||||
padding: 10px;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#output div {
|
||||
padding-bottom: 10px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#noQRFound {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>ENEI QR Scanner</h1>
|
||||
<div id="loadingMessage">🎥 Unable to access video stream (please make sure you have a webcam enabled)</div>
|
||||
<div id="videocanvas">
|
||||
<canvas id="canvas" hidden></canvas>
|
||||
</div>
|
||||
<br>
|
||||
<div id="output">
|
||||
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="pontos">Pontos a adicionar</label>
|
||||
<input id="pontos" name="sQR" autocomplete="off" type="number" placeholder="AABBCC112233" value="5" class="form-control" required="">
|
||||
</div>
|
||||
|
||||
<!-- Select Basic -->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="location">Localização</label>
|
||||
<select id="location" name="location" class="form-control form-control-sm">
|
||||
<option value="1">[RT] Moelas</option>
|
||||
<option value="2">[RT] 24 Bar</option>
|
||||
<option value="3">[RT] What's Up Doc Bar</option>
|
||||
<option value="5">[RT] Nk Noites Karaoke</option>
|
||||
<option value="6">[RT] RS Café Bar</option>
|
||||
<option value="7">[RT] O Guitarras</option>
|
||||
<option value="8">[RT] Cabido Bar</option>
|
||||
<option value="9">[RT] 4ever Bar</option>
|
||||
<option value="10">[RT] Pintos</option>
|
||||
<option value="12">[PP] Praça da República</option>
|
||||
<option value="13">[PP] Associação Académica</option>
|
||||
<option value="14">[PP] Arco Torre Almedina</option>
|
||||
<option value="15">[PP] Jardim Botânico</option>
|
||||
<option value="16">[PP] Escadas Monumentais</option>
|
||||
<option value="17">[PP] Sé Nova</option>
|
||||
<option value="18">[PP] Sé Velha</option>
|
||||
<option value="19">[PP] Porta Férrea</option>
|
||||
<option value="20">[PP] Jardim da Sereia</option>
|
||||
<option value="21">[PP] Quebra Costas</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Text input-->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="userQR">Scanned QR</label>
|
||||
<input id="userQR" name="userQR" autocomplete="off" type="text" placeholder="sendQR" class="form-control input-lg" required="">
|
||||
</div>
|
||||
|
||||
<!-- Button -->
|
||||
<div class="form-group">
|
||||
<button id="send" name="send" class="btn btn-lg btn-block btn-primary" onclick="sendData()">Enviar info</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<div id="LoginDiv">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="username">QR Login</label>
|
||||
<input id="LoginQR" name="LoginQR" autocomplete="off" type="text" placeholder="username" class="form-control form-control-sm input-lg" required="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="password">Password</label>
|
||||
<input id="LoginPassword" name="LoginPassword" autocomplete="off" type="password" placeholder="password" class="form-control form-control-sm input-lg" required="">
|
||||
</div>
|
||||
|
||||
<!-- Button -->
|
||||
<div class="form-group">
|
||||
<button id="loginbtn" name="login" class="btn btn-lg btn-block btn-primary" onclick="doLogin()">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var video = document.createElement("video");
|
||||
var canvasElement = document.getElementById("canvas");
|
||||
var canvas = canvasElement.getContext("2d");
|
||||
var loadingMessage = document.getElementById("loadingMessage");
|
||||
var outputContainer = document.getElementById("output");
|
||||
var outputData = document.getElementById("userQR");
|
||||
var LQR = document.getElementById("LoginQR");
|
||||
|
||||
function drawLine(begin, end, color) {
|
||||
canvas.beginPath();
|
||||
canvas.moveTo(begin.x, begin.y);
|
||||
canvas.lineTo(end.x, end.y);
|
||||
canvas.lineWidth = 4;
|
||||
canvas.strokeStyle = color;
|
||||
canvas.stroke();
|
||||
}
|
||||
|
||||
// Use facingMode: environment to attemt to get the front camera on phones
|
||||
navigator.mediaDevices.getUserMedia({ video: { facingMode: "environment" } }).then(function(stream) {
|
||||
video.srcObject = stream;
|
||||
video.setAttribute("playsinline", true); // required to tell iOS safari we don't want fullscreen
|
||||
video.play();
|
||||
requestAnimationFrame(tick);
|
||||
});
|
||||
|
||||
function tick() {
|
||||
if (video.readyState === video.HAVE_ENOUGH_DATA) {
|
||||
loadingMessage.hidden = true;
|
||||
canvasElement.hidden = false;
|
||||
outputContainer.hidden = false;
|
||||
|
||||
canvasElement.height = video.videoHeight;
|
||||
canvasElement.width = video.videoWidth;
|
||||
canvas.drawImage(video, 0, 0, canvasElement.width, canvasElement.height);
|
||||
var imageData = canvas.getImageData(0, 0, canvasElement.width, canvasElement.height);
|
||||
var code = jsQR(imageData.data, imageData.width, imageData.height, {
|
||||
inversionAttempts: "dontInvert",
|
||||
});
|
||||
if (code) {
|
||||
drawLine(code.location.topLeftCorner, code.location.topRightCorner, "#FF3B58");
|
||||
drawLine(code.location.topRightCorner, code.location.bottomRightCorner, "#FF3B58");
|
||||
drawLine(code.location.bottomRightCorner, code.location.bottomLeftCorner, "#FF3B58");
|
||||
drawLine(code.location.bottomLeftCorner, code.location.topLeftCorner, "#FF3B58");
|
||||
outputData.setAttribute("value", code.data);
|
||||
LQR.setAttribute("value", code.data);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
requestAnimationFrame(tick);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,101 @@
|
|||
function sendData(){
|
||||
var LocIDbox = document.getElementById("location")
|
||||
|
||||
var uQR = document.getElementById("userQR").value;
|
||||
var LocID = LocIDbox.options[LocIDbox.selectedIndex].value;
|
||||
var Pontos = document.getElementById("pontos").value;
|
||||
|
||||
axios.defaults.headers.common = {
|
||||
Authorization: "bearer " + Cookies.get().token
|
||||
};
|
||||
axios.post('https://enei.pt/api/EventLocsVisited/add', {
|
||||
UserQR: uQR,
|
||||
EventLocID: LocID,
|
||||
pontos:Pontos
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.status === 201){
|
||||
window.alert("Adicionado com sucesso!!");
|
||||
}else if(response.status === 400){
|
||||
window.alert("Erro na API!\nProvavelmente esta equipa já esteve aqui!!");
|
||||
} else{
|
||||
window.alert("Erro!");
|
||||
console.log(response);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
window.alert("erro");
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
function doLogin(){
|
||||
var loginQR = document.getElementById("LoginQR").value;
|
||||
var loginpassword = document.getElementById("LoginPassword").value;
|
||||
|
||||
//login ticket
|
||||
|
||||
var details = {
|
||||
username: loginQR,
|
||||
password: loginpassword,
|
||||
grant_type: "password"
|
||||
};
|
||||
|
||||
var formBody = [];
|
||||
|
||||
for (var property in details) {
|
||||
var encodedKey = encodeURIComponent(property);
|
||||
|
||||
var encodedValue = encodeURIComponent(details[property]);
|
||||
|
||||
formBody.push(encodedKey + "=" + encodedValue);
|
||||
}
|
||||
|
||||
formBody = formBody.join("&");
|
||||
|
||||
fetch("https://tickets.enei.pt/internal/api/token", {
|
||||
method: "POST",
|
||||
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
|
||||
body: formBody
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(parsed => {
|
||||
var tokenext = parsed.access_token;
|
||||
//login api enei
|
||||
axios.post('https://enei.pt/api/loginQR', {
|
||||
QRcode: loginQR,
|
||||
token: tokenext
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.status === 200){
|
||||
window.alert("Login Feito!!");
|
||||
console.log(response.data);
|
||||
Cookies.set('token',response.data.token);
|
||||
location.reload();
|
||||
}else if(response.status === 401){
|
||||
window.alert("Unauthorized!! ");
|
||||
} else{
|
||||
window.alert("Erro!");
|
||||
console.log(response);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
window.alert("erro");
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
console.log(Cookies.get().token);
|
||||
if(Cookies.get().token){
|
||||
console.log("token ja existe");
|
||||
$('#LoginDiv').hide();
|
||||
}else{
|
||||
$('#LoginDiv').show();
|
||||
}
|
||||
})
|
|
@ -0,0 +1,29 @@
|
|||
<Properties StartupConfiguration="{267E0FFE-8259-43AC-A7D0-9CBC628F07A9}|Default">
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="../../../../usr/local/share/dotnet/sdk/2.2.105/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets">
|
||||
<Files>
|
||||
<File FileName="Startup.cs" Line="1" Column="1" />
|
||||
<File FileName="../../../../usr/local/share/dotnet/sdk/2.2.105/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets" Line="153" Column="5" />
|
||||
</Files>
|
||||
<Pads>
|
||||
<Pad Id="ProjectPad">
|
||||
<State name="__root__">
|
||||
<Node name="api" expanded="True">
|
||||
<Node name="api" expanded="True">
|
||||
<Node name="Startup.cs" selected="True" />
|
||||
</Node>
|
||||
</Node>
|
||||
</State>
|
||||
</Pad>
|
||||
<Pad Id="MonoDevelop.Debugger.WatchPad">
|
||||
<State />
|
||||
</Pad>
|
||||
</Pads>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.ItemProperties.api PreferredExecutionTarget="MonoDevelop.Default" />
|
||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<MultiItemStartupConfigurations />
|
||||
</Properties>
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Net.Http;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -14,6 +15,7 @@ using Microsoft.AspNetCore.Mvc;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace api.Controllers
|
||||
{
|
||||
|
@ -23,24 +25,28 @@ namespace api.Controllers
|
|||
|
||||
public class AuthController : ControllerBase
|
||||
{
|
||||
|
||||
private readonly DataContext context;
|
||||
private readonly IConfiguration config;
|
||||
public UserManager<User> _userManager { get; }
|
||||
public SignInManager<User> _signInManager { get; }
|
||||
public IUsersRepository _repo { get; }
|
||||
private readonly IMapper _mapper;
|
||||
private readonly RoleManager<Role> _roleManager;
|
||||
private readonly System.Net.Http.IHttpClientFactory clientFactory;
|
||||
|
||||
public AuthController(IConfiguration config, UserManager<User> UserManager, SignInManager<User> SignInManager, IMapper mapper, RoleManager<Role> roleManager, IUsersRepository repo)
|
||||
public AuthController(DataContext context, IConfiguration config, UserManager<User> UserManager, SignInManager<User> SignInManager, IMapper mapper, RoleManager<Role> roleManager, IUsersRepository repo, System.Net.Http.IHttpClientFactory clientFactory)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_mapper = mapper;
|
||||
_roleManager = roleManager;
|
||||
_repo = repo;
|
||||
this.clientFactory = clientFactory;
|
||||
this.config = config;
|
||||
_userManager = UserManager;
|
||||
_signInManager = SignInManager;
|
||||
this.context = context;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost("register")]
|
||||
public async Task<IActionResult> Register(UserForRegisterDto userToRegister)
|
||||
|
@ -48,7 +54,7 @@ namespace api.Controllers
|
|||
var userToCreate = _mapper.Map<User>(userToRegister);
|
||||
|
||||
var result = await _userManager.CreateAsync(userToCreate, userToRegister.password);
|
||||
|
||||
|
||||
if (result.Succeeded)
|
||||
{
|
||||
return StatusCode(201);
|
||||
|
@ -56,6 +62,9 @@ namespace api.Controllers
|
|||
return BadRequest(result.Errors);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost("login")]
|
||||
public async Task<IActionResult> Login(UserForLoginDto UserForLoginDto)
|
||||
{
|
||||
|
@ -80,6 +89,52 @@ namespace api.Controllers
|
|||
|
||||
}
|
||||
|
||||
[HttpPost("loginQR")]
|
||||
public async Task<IActionResult> loginQr(loginQr a)
|
||||
{
|
||||
|
||||
var u = await _userManager.FindByNameAsync(a.QRcode);
|
||||
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var url = "https://tickets.enei.pt/internal/api/Attendee/Detail";
|
||||
|
||||
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + a.token);
|
||||
|
||||
|
||||
var response = await client.GetStringAsync(url);
|
||||
|
||||
// Console.WriteLine(response);
|
||||
|
||||
//var resource = JObject.Parse(response);
|
||||
var appUser = await _userManager.Users.FirstOrDefaultAsync(SU => SU.NormalizedUserName == a.QRcode.ToUpper());
|
||||
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
|
||||
token = GenerateJwtToken(appUser).Result
|
||||
});
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Console.WriteLine(e);
|
||||
|
||||
return Unauthorized();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return Unauthorized();
|
||||
}
|
||||
|
||||
|
||||
private async Task<string> GenerateJwtToken(User user)
|
||||
{
|
||||
var claims = new List<Claim>
|
||||
|
@ -90,8 +145,9 @@ namespace api.Controllers
|
|||
|
||||
var roles = await _userManager.GetRolesAsync(user);
|
||||
|
||||
foreach(var role in roles) {
|
||||
claims.Add(new Claim(ClaimTypes.Role,role));
|
||||
foreach (var role in roles)
|
||||
{
|
||||
claims.Add(new Claim(ClaimTypes.Role, role));
|
||||
}
|
||||
|
||||
//obtem a key na app settings
|
||||
|
@ -103,9 +159,9 @@ namespace api.Controllers
|
|||
//criamos um token
|
||||
var tokenDescriptor = new SecurityTokenDescriptor
|
||||
{
|
||||
Subject = new ClaimsIdentity(claims),
|
||||
Subject = new ClaimsIdentity(claims),
|
||||
//data de expiração (atual + 24 horas)
|
||||
Expires = DateTime.Now.AddDays(1),
|
||||
Expires = DateTime.Now.AddDays(30),
|
||||
|
||||
//passa as signing credentials definidas em cima
|
||||
SigningCredentials = creds
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using api.Data;
|
||||
using api.Dtos;
|
||||
using api.Models;
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace api.Controllers
|
||||
{
|
||||
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class CromosController : ControllerBase
|
||||
{ private readonly IUsersRepository _repo;
|
||||
private readonly DataContext context;
|
||||
private readonly IMapper _mapper;
|
||||
public CromosController(IUsersRepository repo,DataContext context, IMapper mapper)
|
||||
{
|
||||
this.context = context;
|
||||
_mapper = mapper;
|
||||
_repo = repo;
|
||||
}
|
||||
|
||||
// GET api/cromos/QR
|
||||
// GET cromos do user QR
|
||||
|
||||
[HttpGet("{QR}")]
|
||||
|
||||
public async Task<IActionResult> GetCromos(string QR)
|
||||
{
|
||||
int soma = 0;
|
||||
int somaCTF=0;
|
||||
var usr = await context.Users.FirstOrDefaultAsync(u => u.QRcode == QR);
|
||||
string[] usrCromos = usr.cromos.Substring(1).Split(",");
|
||||
Console.WriteLine(usrCromos[0]);
|
||||
var allCromos = await context.Cromos.ToListAsync();
|
||||
|
||||
List<Cromos> rList = new List<Cromos>();
|
||||
|
||||
allCromos.ForEach(delegate (Cromos c)
|
||||
{
|
||||
Boolean found = false;
|
||||
for (int i = 0; i < usrCromos.Length; i++)
|
||||
{
|
||||
|
||||
|
||||
if (Int32.Parse(usrCromos[i]) == c.Id)
|
||||
{
|
||||
|
||||
Cromos toAdd = new Cromos { Id = c.Id, Nome = c.Nome, DescMostrar = c.DescUnlocked, QRCode = c.QRCode, img = c.img, unlocked = true, websiteCromo = c.websiteCromo, pontos = c.pontos, logo = c.logo };
|
||||
|
||||
var d = rList.Find(x => x.Id == c.Id);
|
||||
|
||||
if (d != null)
|
||||
continue;
|
||||
else
|
||||
{
|
||||
if(c.Id == 4 || c.Id==5 || c.Id==6 || c.Id==7 || c.Id==8 || c.Id==9 || c.Id==10 || c.Id==11 || c.Id==12 || c.Id==13 || c.Id==14 || c.Id==16){
|
||||
somaCTF += c.pontos;
|
||||
}
|
||||
soma += c.pontos;
|
||||
rList.Add(toAdd);
|
||||
found = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
|
||||
|
||||
Cromos toAdd = new Cromos { Id = c.Id, Nome = c.Nome, DescMostrar = c.DescLocked, QRCode = c.QRCode, img = c.img, unlocked = false, websiteCromo = c.websiteCromo, pontos = c.pontos };
|
||||
rList.Add(toAdd);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
cromosToReturn a = new cromosToReturn();
|
||||
a.cromos = rList;
|
||||
a.pontuacao = soma;
|
||||
|
||||
|
||||
var userFromRepo = await _repo.GetUser(usr.Id);
|
||||
|
||||
userFromRepo.food = somaCTF;
|
||||
userFromRepo.drinks = soma;
|
||||
|
||||
|
||||
if (await _repo.SaveAll()){}
|
||||
|
||||
|
||||
return Ok(a);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -50,7 +50,7 @@ namespace api.Controllers
|
|||
return Ok(Teams);
|
||||
}
|
||||
|
||||
// GET api/EventLocs/[id]
|
||||
// GET api/EventLocs/e/[id]
|
||||
[HttpGet("e/{id}")]
|
||||
public async Task<IActionResult> GetEventLocEvent(int id)
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace api.Controllers
|
|||
public async Task<IActionResult> AddEventLoc(EventLocVisitedAdd EventLocVisitedData)
|
||||
{
|
||||
EventLoc Loc = await context.EventLocs.FirstOrDefaultAsync(a=>a.Id == EventLocVisitedData.EventLocID);
|
||||
var userT = await context.Users.FirstOrDefaultAsync(u=>u.QRcode==EventLocVisitedData.USerQR);
|
||||
var userT = await context.Users.Include(a=>a.team).FirstOrDefaultAsync(u=>u.QRcode==EventLocVisitedData.UserQR);
|
||||
|
||||
if(userT.team == null){
|
||||
return StatusCode(403);
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace api.Controllers
|
|||
|
||||
// GET api/events
|
||||
// GET all events
|
||||
[AllowAnonymous]
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GetEvents()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using api.Data;
|
||||
using api.Dtos;
|
||||
using api.Models;
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace api.Controllers
|
||||
{
|
||||
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ScanController : ControllerBase
|
||||
{
|
||||
private readonly DataContext context;
|
||||
private readonly IMapper _mapper;
|
||||
public ScanController(DataContext context, IMapper mapper)
|
||||
{
|
||||
this.context = context;
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
// PSOT api/scan
|
||||
// POST scan de QR code
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> doScan(QRToScan ScanData)
|
||||
{
|
||||
User usr = await context.Users.FirstOrDefaultAsync(b => b.QRcode == ScanData.UserQR);
|
||||
var allUsers = await context.Users.ToListAsync();
|
||||
var allCromos = await context.Cromos.ToListAsync();
|
||||
|
||||
var userAProcurar = await context.Users.FirstOrDefaultAsync(c => c.QRcode == ScanData.ScanQR);
|
||||
|
||||
ScanReturn toReturn = new ScanReturn { tipo = -1 };
|
||||
|
||||
if (userAProcurar != null)
|
||||
{
|
||||
|
||||
UserForListDto ru = new UserForListDto();
|
||||
_mapper.Map(userAProcurar, ru);
|
||||
toReturn.user = ru;
|
||||
toReturn.tipo = 1;
|
||||
return Ok(toReturn);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
bool repetido = false;
|
||||
|
||||
allCromos.ForEach(delegate (Cromos c)
|
||||
{
|
||||
|
||||
if (c.QRCode == ScanData.ScanQR)
|
||||
{
|
||||
toReturn.tipo = 0;
|
||||
|
||||
string[] usrCromos = usr.cromos.Substring(1).Split(",");
|
||||
|
||||
foreach (string cromo in usrCromos)
|
||||
{
|
||||
Console.WriteLine("cromo: "+cromo);
|
||||
if (c.Id == Int32.Parse(cromo))
|
||||
{
|
||||
repetido = true;
|
||||
Console.WriteLine("cromo repetido");
|
||||
}
|
||||
}
|
||||
|
||||
if (!repetido)
|
||||
{
|
||||
usr.cromos = usr.cromos + "," + c.Id;
|
||||
context.Users.Update(usr);
|
||||
context.SaveChanges();
|
||||
toReturn.resp = "Cromo Adicionado!";
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if (repetido)
|
||||
{
|
||||
return Unauthorized();
|
||||
}
|
||||
return Ok(toReturn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|