This commit is contained in:
João Borges 2019-03-13 01:08:13 +00:00
commit e0d01a6a11
11 changed files with 144 additions and 37 deletions

View File

@ -132,6 +132,13 @@ class App extends Component {
_toggle=()=>{
this.setState({modalResetPassword:false})
}
//faz call
_reset=()=>{
//fecha modal
this.props.resetPassword(this.props.userDetails.token,this.state.resetText),
this.setState({modalResetPassword:false})
//faz call
}
_keyboardDidShow() {
//alert('Keyboard Shown');
@ -187,10 +194,12 @@ class App extends Component {
/>
</View>
</Modal>
<Modal
<Modal
isVisible={this.state.modalResetPassword}
onBackdropPress={this._toggle}
onBackButtonPress={this._toggle}
animationInTiming={1100}
animationOutTiming={1100}
>
<View style={{ backgroundColor: "white" , padding:20,paddingBottom:0, alignItems:'center'}}>
<View>
@ -199,23 +208,23 @@ class App extends Component {
<TextInput
style={styles.resetPassword}
onFocus={this._print}
maxLength={10}
maxLength={50}
blurOnSubmit={true}
secureTextEntry={true}
onChangeText={r => this.setState({ resetText })}
onChangeText={r => this.setState({ resetText:r })}
clearButtonMode="always"
value={this.state.resetText}
clearTextOnFocus={true}
onSubmitEditing={Keyboard.dismiss}
placeholder="geral@enei.pt"
placeholder="Email ou Qr code"
/>
<Button
onPress={this._toggle}
onPress={this._reset}
title={"Enviar"}
color={"#CC1A17"}
></Button>
<Text style={{textAlign:'center', fontSize:12, margin:10,marginBottom:0}}> Caso tenhas problemas com este processo deves contactar a comissão atravês do email geral.</Text>
<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>
@ -225,7 +234,8 @@ class App extends Component {
width: "100%",
justifyContent: "center",
alignItems: "center"
alignItems: "center",
margin:20
}}
>
<Image
@ -249,10 +259,10 @@ class App extends Component {
<Icon
style={styles.searchIcon}
name="ios-qr-scanner"
size={30}
size={40}
color="#000"
/>
<Text>Scan QR</Text>
</View>
</TouchableOpacity>
</View>
@ -271,13 +281,11 @@ class App extends Component {
placeholder="Password"
/>
{ !this.props.loadingLogin &&
<RkButton
rkType="dark"
style={styles.loginBtn}
onPress={this._tryLogin}
>
Entrar
</RkButton>
<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>
}
{this.props.alignItems &&
<ActivityIndicator size="large" color="#0000ff" />
@ -300,8 +308,8 @@ class App extends Component {
<RkText rkType="primary3">Não sabes a password?</RkText>
<RkButton rkType="clear" onPress={this.onSignUpButtonPressed}>
<TouchableOpacity onPress={() => {this.setState({modalResetPassword:true})}}>
<RkText style={{ color: "red" }} kType="header6">
Recuperar Password
<RkText style={{ color: "#CC1A17", fontWeight:'bold' }} kType="header6">
Reset Password
</RkText>
</TouchableOpacity>
</RkButton>
@ -332,7 +340,7 @@ const styles = {
},
resetPassword:{
borderRadius: 90,
borderColor: "#bfbdbd",
borderWidth: 1,
@ -344,14 +352,14 @@ const styles = {
backgroundColor: "white",
borderRadius: 90,
borderRadius: 3,
height: SCREEN_HEIGHT * 0.08,
borderColor: "#bfbdbd",
borderWidth: 1,
paddingLeft: SCREEN_WIDTH * 0.05
},
passwordInput: {
borderRadius: 90,
borderColor: "#bfbdbd",
borderWidth: 1,
@ -361,7 +369,7 @@ const styles = {
backgroundColor: "white",
borderRadius: 90,
borderRadius: 3,
height: SCREEN_HEIGHT * 0.08,
borderColor: "#bfbdbd",
borderWidth: 1,
@ -373,15 +381,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",
@ -389,7 +401,7 @@ const styles = {
backgroundColor: "white",
borderRadius: 90,
borderRadius: 3,
height: SCREEN_HEIGHT * 0.08,
borderColor: "#bfbdbd",
borderWidth: 1
@ -448,7 +460,8 @@ const styles = {
justifyContent: "center",
alignItems: "center",
marginTop: 200
marginTop: 200,
},
logo2: {

View File

@ -10,7 +10,7 @@ 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'
//API BLUETREND CALENDÁRIO
export const GET_CAREERS='GET_CAREERS' //GET GEST LISTS

View File

@ -22,8 +22,11 @@ import {
OPEN_MODAL,
LOADINGLOGIN,
REMOVE_SESSION,
UPDATE_USER
UPDATE_USER,
UI_LOGIN_RESET_PASSWORD,
RESET_PASSWORD
} from "./actionTypes"; //Import the actions types constant we defined in our actions
var validator = require("email-validator");
import moment from "moment";
@ -49,6 +52,37 @@ export function waitLogin() {
};
}
export function resetPassword( data){
axios.defaults.baseURL = "http://enei2019.uingress.com/internal/api";
return dispatch=>{
console.log(data)
http://enei2019.uingress.com/internal/api/User/RecoverPassword?input=TNQHZ3DQMM&type=1
var inputType=1;
if( validator.validate(data))
inputType=0
axios.get(`/User/RecoverPassword?input=${data}&type=${inputType}`).then(p=>{
Alert.alert("Sucesso!","O pedido de recuperação de password foi enviado para o email." )
}).catch(err=>{
if(inputType==1){
Alert.alert("Erro!", "O QR code intruzido não é válido.")
}
else{
Alert.alert("Erro!", "O email introduzido não é válido.")
}
s
})
dispatch({
type:RESET_PASSWORD
})
}
}
export function changePassword(token, old, new1, new2) {
axios.defaults.headers.common = {
Authorization: `bearer ${token.access_token}`

View File

@ -18,7 +18,8 @@ export {checkUser,
loginInternal,
waitLogin,
removeSession,
changePassword
changePassword,
resetPassword
} from "./api"

5
App/package-lock.json generated
View File

@ -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",

View File

@ -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",

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

View File

@ -150,7 +150,8 @@
<div class="label">Individual</div>
<span class="options">*Alimentação incluída</span>
</div>
<a href="https://tickets.enei.pt/pontual" title="Comprar" target="_blank" class="buy-button">Comprar</a>
<a href="https://tickets.enei.pt/pontual" title="Comprar" target="_blank"
class="buy-button">Comprar</a>
</div>
</div>
</div>
@ -173,6 +174,20 @@
</div>
</div>
</div>
<div class="container gold">
<div class="row">
<div class="col-lg-4 col-lg-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1">
<h1>Gold Sponsor</h1>
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-10 col-lg-offset-1 col-sm-8 col-sm-offset-2 col-xs-10 col-xs-offset-1">
<a href="http://www.novabase.pt/pt" title="Novabase" target="_blank"
class="sponsor-image"><img src="imgs/novaBase-sponsor.jpg" alt="Novabase Image"></a>
</div>
</div>
</div>
</section>
<!-- faqs section -->

View File

@ -1169,6 +1169,28 @@ hr::after {
transform: scale(1.03);
}
#sponsors .gold h1 {
font-size: 30px;
line-height: 26px;
margin-top: 75px;
}
@media (max-width: 1024px) {
#sponsors .gold h1 {
font-size: 27px;
}
}
@media (max-width: 769px) {
#sponsors .gold h1 {
font-size: 23px;
}
}
#sponsors .gold .sponsor-image {
max-width: 135px;
}
#social-network {
text-align: center;
background-color: #000000;

File diff suppressed because one or more lines are too long

View File

@ -971,6 +971,22 @@ hr {
transform: scale(1.03);
}
}
.gold {
h1 {
font-size: 30px;
line-height: 26px;
margin-top: 75px;
@include portable{
font-size: 27px;
}
@include mobile{
font-size: 23px;
}
}
.sponsor-image {
max-width: 135px;
}
}
}
#social-network {