Commit c8f3c23a authored by Trisno's avatar Trisno
parents 784de36c 06b84cb9
import { Alert } from 'react-native'; import { Alert,ToastAndroid } from 'react-native';
export default function session(response,error_status, navigation) { export default function session(response, error_status, navigation) {
if (response.code === "WRONG_SESSION_ID") { if (error_status != 500) {
if (response.code == "WRONG_SESSION_ID") {
Alert.alert( Alert.alert('',response_data.msg);
'Session', } else {
'Session Anda Sudah Habis Silahkan Logout Terlebih Dahulu ! ', Alert.alert('',response_data.msg);
[ }
} else {
{ text: 'OK', onPress: () => navigation.replace('Login') }
]
)
} else if (error_status == 500) {
Alert.alert( Alert.alert(
'Server', 'Server',
'Server Error ', 'Server Error ',
...@@ -23,7 +18,5 @@ export default function session(response,error_status, navigation) { ...@@ -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 { ...@@ -297,7 +297,7 @@ class Home extends React.Component {
<ActivityIndicator size="small" color="#c9af6d" /> <ActivityIndicator size="small" color="#c9af6d" />
) : ( ) : (
<Text style={{ textAlign: "center", fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: '#838383' }}> <Text style={{ textAlign: "center", fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: '#838383' }}>
Excelso {this.props.name_outlet} {this.props.name_outlet}
</Text> </Text>
)} )}
{/* <TouchableOpacity style={styles.submitOrder} activeOpacity={.5} onPress={() => this._orderNow()}> {/* <TouchableOpacity style={styles.submitOrder} activeOpacity={.5} onPress={() => this._orderNow()}>
......
...@@ -205,6 +205,7 @@ class Login extends React.Component { ...@@ -205,6 +205,7 @@ class Login extends React.Component {
autoCapitalize="none" autoCapitalize="none"
value={this.state.email} value={this.state.email}
keyboardType='email-address' keyboardType='email-address'
removeClippedSubviews={false}
/> />
</View> </View>
<View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}> <View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
...@@ -214,6 +215,7 @@ class Login extends React.Component { ...@@ -214,6 +215,7 @@ class Login extends React.Component {
onChangeText={password => this.setState({ password })} onChangeText={password => this.setState({ password })}
value={this.state.password} value={this.state.password}
secureTextEntry={true} secureTextEntry={true}
removeClippedSubviews={false}
/> />
</View> </View>
<View style={{ flex: 1, height: 40, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}> <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