Commit 127b4bc6 by Giang Tran

update moment

parent bc25cc28
...@@ -7,6 +7,10 @@ import { ...@@ -7,6 +7,10 @@ import {
Dimensions, Dimensions,
TouchableOpacity, TouchableOpacity,
Alert, Alert,
KeyboardAvoidingView,
TouchableWithoutFeedback,
Keyboard,
Platform,
} from 'react-native'; } from 'react-native';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import R from '../../assets/R'; import R from '../../assets/R';
...@@ -90,53 +94,64 @@ const MethodPayDetail = (props) => { ...@@ -90,53 +94,64 @@ const MethodPayDetail = (props) => {
}; };
return ( return (
<View style={{flex: 1}}> <KeyboardAvoidingView
<HeaderBack title={'Chi tiết phương thức'} /> behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
<View style={styles.container}> style={{flex: 1}}
<BankInfor keyboardVerticalOffset={-50}>
linkImg={params.bank.logo} <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
title={'Chọn ngân hàng'} <View style={{flex: 1}}>
value={params.bank.name} <HeaderBack title={'Chi tiết phương thức'} />
/> <View style={{flex: 1}}>
<TextField <View style={styles.container}>
onChangeText={(val) => setBankName(val)} <BankInfor
title={'Chi nhánh'} linkImg={params.bank.logo}
value={branch_name} title={'Chọn ngân hàng'}
/> value={params.bank.name}
/>
<TextField
onChangeText={(val) => setBankName(val)}
title={'Chi nhánh'}
value={branch_name}
/>
<TextField <TextField
onChangeText={(val) => setAccountName(val)} onChangeText={(val) => setAccountName(val)}
title={'Tên chủ tài khoản'} title={'Tên chủ tài khoản'}
value={account_name} value={account_name}
/> />
<TextField <TextField
onChangeText={(val) => setAccountNo(val)} onChangeText={(val) => setAccountNo(val)}
title={'Số tài khoản ngân hàng'} title={'Số tài khoản ngân hàng'}
isNumber={true} isNumber={true}
value={account_no} value={account_no}
/> />
</View> </View>
<TouchableOpacity onPress={onUpdate} style={styles.btnLeft}> </View>
<Text style={styles.txtAdd}>Cp nht</Text> <View style={styles.footer}>
</TouchableOpacity> <TouchableOpacity onPress={onUpdate} style={styles.btnLeft}>
<TouchableOpacity <Text style={styles.txtAdd}>Cp nht</Text>
onPress={() => { </TouchableOpacity>
Alert.alert( <TouchableOpacity
'Thông báo!', onPress={() => {
'Bạn có chắc chắn muốn xoá phương thức thanh toán', Alert.alert(
[ 'Thông báo!',
{ 'Bạn có chắc chắn muốn xoá phương thức thanh toán',
text: 'Từ chối', [
style: 'cancel', {
}, text: 'Từ chối',
{text: 'Đồng ý', onPress: () => onRemove()}, style: 'cancel',
], },
); {text: 'Đồng ý', onPress: () => onRemove()},
}} ],
style={styles.btnRight}> );
<Text style={styles.txtAdd}>Xoá</Text> }}
</TouchableOpacity> style={styles.btnRight}>
</View> <Text style={styles.txtAdd}>Xoá</Text>
</TouchableOpacity>
</View>
</View>
</TouchableWithoutFeedback>
</KeyboardAvoidingView>
); );
}; };
...@@ -145,6 +160,13 @@ const styles = StyleSheet.create({ ...@@ -145,6 +160,13 @@ const styles = StyleSheet.create({
paddingHorizontal: 20, paddingHorizontal: 20,
paddingTop: 10, paddingTop: 10,
}, },
footer: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: 10,
paddingHorizontal: 20,
},
btnLeft: { btnLeft: {
width: 150, width: 150,
height: 40, height: 40,
...@@ -152,9 +174,6 @@ const styles = StyleSheet.create({ ...@@ -152,9 +174,6 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
backgroundColor: R.colors.main, backgroundColor: R.colors.main,
borderRadius: 5, borderRadius: 5,
position: 'absolute',
bottom: 30,
left: 20,
}, },
btnRight: { btnRight: {
width: 150, width: 150,
...@@ -163,9 +182,6 @@ const styles = StyleSheet.create({ ...@@ -163,9 +182,6 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
backgroundColor: R.colors.main, backgroundColor: R.colors.main,
borderRadius: 5, borderRadius: 5,
position: 'absolute',
bottom: 30,
right: 20,
}, },
txtAdd: { txtAdd: {
color: R.colors.white, color: R.colors.white,
......
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