Commit f2ad7a77 by Giang Tran

update code

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