This commit is contained in:
parent
1b994bbbee
commit
c7c0764170
|
@ -81,7 +81,7 @@ class App extends Component {
|
|||
logged: false,
|
||||
isModalVisible: false,
|
||||
state: { text: "" },
|
||||
username: "ZV4ZWJXTVV",
|
||||
username: "",
|
||||
failedAttempt: false,
|
||||
push: 4,
|
||||
UI_loginScannerActive: false,
|
||||
|
@ -255,18 +255,19 @@ class App extends Component {
|
|||
|
||||
underlineColorAndroid="transparent"
|
||||
|
||||
onFocus={this._print}
|
||||
//onFocus={this._print}
|
||||
maxLength={15}
|
||||
blurOnSubmit={true}
|
||||
secureTextEntry={true}
|
||||
onChangeText={searchString => {
|
||||
this.setState({ username: searchString });
|
||||
// secureTextEntry={true}
|
||||
onChangeText={user => {
|
||||
this.setState({ username:user });
|
||||
}}
|
||||
clearButtonMode="always"
|
||||
placeholder={this.state.username}
|
||||
|
||||
clearTextOnFocus={true}
|
||||
onSubmitEditing={Keyboard.dismiss}
|
||||
placeholder={this.state.username}
|
||||
value={this.state.username}
|
||||
placeholder="QR code"
|
||||
|
||||
/>
|
||||
<TouchableOpacity onPress={this._scanQr}>
|
||||
|
|
|
@ -1805,21 +1805,25 @@ export function login(user, pass) {
|
|||
body: formBody
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
alert("Erro no login!!");
|
||||
|
||||
alert("error");
|
||||
co;
|
||||
|
||||
Alert.alert("Erro", "Não foi possível conectar ao servidor. Verifique se possui conexão à internet e tente novamente." );
|
||||
dispatch({
|
||||
type: API_LOGIN,
|
||||
logged: false,
|
||||
failedAttempt: true,
|
||||
tokenData: "error",
|
||||
user: { Name: "" }
|
||||
loadingLogin: false,
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("error");
|
||||
dispatch({
|
||||
type: API_LOGIN,
|
||||
logged: false,
|
||||
failedAttempt: true,
|
||||
tokenData: "error",
|
||||
loadingLogin: false,
|
||||
});
|
||||
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(parsed => {
|
||||
|
@ -1865,6 +1869,15 @@ export function login(user, pass) {
|
|||
userDetails: details
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err=>{
|
||||
dispatch({
|
||||
type: API_LOGIN,
|
||||
logged: false,
|
||||
failedAttempt: true,
|
||||
tokenData: "error",
|
||||
loadingLogin: false,
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -172,13 +172,8 @@ const apiReducer = (state = apiState, action) => {
|
|||
//token:action.token,
|
||||
failedAttempt: action.failedAttempt,
|
||||
user: action.user,
|
||||
userDetails: {
|
||||
token: action.token,
|
||||
username: action.userDetails.username,
|
||||
password: action.userDetails.password
|
||||
},
|
||||
loadingLogin: false,
|
||||
onHold: action.onHold,
|
||||
onHold: false,
|
||||
token: action.token
|
||||
});
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<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>Not used, just added this key because i used react-native and needed this keys for approval.</string>
|
||||
<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>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue