Commit c8f3c23a authored by Trisno's avatar Trisno
parents 784de36c 06b84cb9
import { Alert } from 'react-native';
export default function session(response,error_status, navigation) {
import { Alert,ToastAndroid } from 'react-native';
export default function session(response, error_status, navigation) {
if (response.code === "WRONG_SESSION_ID") {
Alert.alert(
'Session',
'Session Anda Sudah Habis Silahkan Logout Terlebih Dahulu ! ',
[
{ text: 'OK', onPress: () => navigation.replace('Login') }
]
)
} else if (error_status == 500) {
if (error_status != 500) {
if (response.code == "WRONG_SESSION_ID") {
Alert.alert('',response_data.msg);
} else {
Alert.alert('',response_data.msg);
}
} else {
Alert.alert(
'Server',
'Server Error ',
......@@ -23,7 +18,5 @@ export default function session(response,error_status, navigation) {
]
)
}else{
Alert.alert(response_data.msg);
}
}
\ No newline at end of file
......@@ -297,7 +297,7 @@ class Home extends React.Component {
<ActivityIndicator size="small" color="#c9af6d" />
) : (
<Text style={{ textAlign: "center", fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: '#838383' }}>
Excelso {this.props.name_outlet}
{this.props.name_outlet}
</Text>
)}
{/* <TouchableOpacity style={styles.submitOrder} activeOpacity={.5} onPress={() => this._orderNow()}>
......
......@@ -205,6 +205,7 @@ class Login extends React.Component {
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address'
removeClippedSubviews={false}
/>
</View>
<View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
......@@ -214,6 +215,7 @@ class Login extends React.Component {
onChangeText={password => this.setState({ password })}
value={this.state.password}
secureTextEntry={true}
removeClippedSubviews={false}
/>
</View>
<View style={{ flex: 1, height: 40, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment