Commit f2ad7a77 by Giang Tran

update code

parent 6d942be1
...@@ -8,6 +8,7 @@ import { ...@@ -8,6 +8,7 @@ import {
TouchableWithoutFeedback, TouchableWithoutFeedback,
Platform, Platform,
DeviceEventEmitter, DeviceEventEmitter,
Dimensions,
} from 'react-native'; } from 'react-native';
import R from '../../../assets/R'; import R from '../../../assets/R';
import { import {
...@@ -28,13 +29,47 @@ import TextField from '../../../components/Input/TextField'; ...@@ -28,13 +29,47 @@ import TextField from '../../../components/Input/TextField';
import IconClose from 'react-native-vector-icons/AntDesign'; import IconClose from 'react-native-vector-icons/AntDesign';
const {width} = Dimensions.get('window');
const ListLevels = [
{
value: 'all',
name: I18n.t('All'),
},
{
value: 'level1',
name: I18n.t('level1'),
},
{
value: 'level2',
name: I18n.t('level2'),
},
{
value: 'level3',
name: I18n.t('level3'),
},
];
const ListStatus = [
{
value: 'all',
name: I18n.t('All'),
},
{
value: 'Open',
name: I18n.t('Opened'),
},
{
value: 'Unopen',
name: I18n.t('Unopen'),
},
];
const SearchProductCodeModal = (props) => { const SearchProductCodeModal = (props) => {
const navigate = useNavigation(); const navigate = useNavigation();
const [textSearch, setTextSearch] = useState('');
const [product, setProduct] = useState(null); const [level, setLevel] = useState(null);
const [period, setPeriod] = useState(new Date()); const [open, setOpen] = useState(new Date());
const [dataProduct, setDataProduct] = useState([]);
const [dataProductFilter, setDataProductFilter] = useState([]);
return ( return (
<Modal <Modal
...@@ -74,17 +109,34 @@ const SearchProductCodeModal = (props) => { ...@@ -74,17 +109,34 @@ const SearchProductCodeModal = (props) => {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<TextField title={I18n.t('NamePartner')} /> <TextField
onChangeText={(val) => setTextSearch(val)}
title={I18n.t('NamePartner')}
/>
<AppText <AppText
style={[styles.txtTitle, {marginTop: HEIGHTXD(40)}]} style={[styles.txtTitle, {marginTop: HEIGHTXD(40)}]}
i18nKey={'level'} i18nKey={'level'}
/> />
<PickerItem
width={width - 40}
data={ListLevels}
onValueChange={(value, items) => {
setLevel(items);
}}
/>
<AppText <AppText
style={[styles.txtTitle, {marginTop: HEIGHTXD(40)}]} style={[styles.txtTitle, {marginTop: HEIGHTXD(40)}]}
i18nKey={'OpenAccountCQG'} i18nKey={'OpenAccountCQG'}
/> />
<PickerItem
width={width - 40}
data={ListStatus}
onValueChange={(value, items) => {
setOpen(items);
}}
/>
<View <View
style={{ style={{
...@@ -94,6 +146,7 @@ const SearchProductCodeModal = (props) => { ...@@ -94,6 +146,7 @@ const SearchProductCodeModal = (props) => {
}}> }}>
<TouchableOpacity <TouchableOpacity
onPress={() => { onPress={() => {
console.log(level, open, textSearch);
props.toggleModal(); props.toggleModal();
navigate.navigate(SEARCHPARTNER); navigate.navigate(SEARCHPARTNER);
}} }}
......
...@@ -345,4 +345,6 @@ export default { ...@@ -345,4 +345,6 @@ export default {
SearchPartner: 'Search partner', SearchPartner: 'Search partner',
level: 'Level', level: 'Level',
NamePartner: 'Name partner', NamePartner: 'Name partner',
Opened: 'Opened',
Unopen: 'Unopene',
}; };
...@@ -343,4 +343,6 @@ export default { ...@@ -343,4 +343,6 @@ export default {
SearchPartner: 'Tìm kiếm đối tác', SearchPartner: 'Tìm kiếm đối tác',
level: 'Cấp', level: 'Cấp',
NamePartner: 'Tên đối tác', NamePartner: 'Tên đối tác',
Opened: 'Đã mở',
Unopen: 'Chưa mở',
}; };
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