Commit e87affda by Giang Tran

update api service

parent efc12cf4
...@@ -4,23 +4,25 @@ import R from '../../assets/R'; ...@@ -4,23 +4,25 @@ import R from '../../assets/R';
import AppText from '../../components/AppText'; import AppText from '../../components/AppText';
import TextMulti from '../../components/Input/TextMulti'; import TextMulti from '../../components/Input/TextMulti';
import I18n from '../../helper/i18/i18n'; import I18n from '../../helper/i18/i18n';
import {connect} from 'react-redux';
import HeaderBack from '../../components/Header/HeaderBack'; import HeaderBack from '../../components/Header/HeaderBack';
import {getFontXD, HEIGHTXD, WIDTHXD} from '../../Config/Functions'; import {getFontXD, HEIGHTXD, WIDTHXD} from '../../Config/Functions';
import {TouchableOpacity} from 'react-native-gesture-handler'; import {TouchableOpacity} from 'react-native-gesture-handler';
const ServiceCustomerView = (props) => { const ServiceCustomerView = (props) => {
const [content, setContent] = useState(''); const [content, setContent] = useState('');
const [data, setData] = useState({ const {
company: 'CÔNG TY CP TƯ VẤN ĐẦU TƯ DCV.', name,
address: email,
'Tầng L2, Tòa Nhà Mỹ Sơn, Số 62 Nguyễn Huy Tưởng, Phường Thanh Xuân Trung, Quận Thanh Xuân, Thành Phố Hà Nội', website,
email: 'sale@dcv.vn', hotline,
website: 'https://dcvinvest.com', office_day,
hotline: '024.9999.8669', office_hours,
time: office_sat_time,
'Thứ 2 - Thứ 6: 08:00 - 18:00 \nThứ 7: 10:00 - 14:00 \nChủ nhật: 09:00 - 12:00', office_sun_time,
}); address,
} = props.user.company_info;
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'CustomerCare'} /> <HeaderBack title={'CustomerCare'} />
...@@ -31,25 +33,45 @@ const ServiceCustomerView = (props) => { ...@@ -31,25 +33,45 @@ const ServiceCustomerView = (props) => {
paddingTop: 10, paddingTop: 10,
}}> }}>
<AppText i18nKey={'HaNoiOffice'} style={styles.title} /> <AppText i18nKey={'HaNoiOffice'} style={styles.title} />
<Text style={styles.txtContent}>{data.company}</Text> <Text style={styles.txtContent}>{name}</Text>
<AppText i18nKey={'Address'} style={styles.title} /> <AppText i18nKey={'Address'} style={styles.title} />
<Text style={styles.txtContent}>{data.address}</Text> <Text style={styles.txtContent}>{address}</Text>
<View style={styles.row}> <View style={styles.row}>
<AppText i18nKey={'Email'} style={styles.title} /> <Text style={styles.title}>Email:</Text>
<Text style={styles.txtContent}> {data.email}</Text> <Text style={styles.txtContent}> {email}</Text>
</View> </View>
<View style={styles.row}> <View style={styles.row}>
<Text style={styles.title}>Website: </Text> <Text style={styles.title}>Website: </Text>
<Text style={styles.txtContent}>{data.website}</Text> <Text style={styles.txtContent}>{website}</Text>
</View> </View>
<AppText i18nKey={'HotLine'} style={styles.title} /> <AppText i18nKey={'HotLine'} style={styles.title} />
<Text style={styles.txtContent}>{data.hotline}</Text> <Text style={styles.txtContent}>{hotline}</Text>
<AppText i18nKey={'WorkingTime'} style={styles.title} /> <AppText i18nKey={'WorkingTime'} style={styles.title} />
<Text style={styles.txtContent}>{data.time}</Text> <View style={{flexDirection: 'row'}}>
<View style={styles.wrapLeft}>
<Text style={styles.txtContent}>{office_day}</Text>
</View>
<Text style={styles.txtRight}>{office_hours}</Text>
</View>
<View style={{flexDirection: 'row'}}>
<View style={styles.wrapLeft}>
<AppText i18nKey={'Saturday'} style={styles.txtContent} />
</View>
<Text style={styles.txtRight}>{office_sat_time}</Text>
</View>
<View style={{flexDirection: 'row'}}>
<View style={styles.wrapLeft}>
<AppText i18nKey={'Sunday'} style={styles.txtContent} />
</View>
<Text style={styles.txtRight}>{office_sun_time}</Text>
</View>
<View style={{marginTop: 20, flex: 1}}> <View style={{marginTop: 20, flex: 1}}>
<TextMulti <TextMulti
...@@ -98,6 +120,19 @@ const styles = StyleSheet.create({ ...@@ -98,6 +120,19 @@ const styles = StyleSheet.create({
color: R.colors.white, color: R.colors.white,
fontWeight: 'bold', fontWeight: 'bold',
}, },
txtRight: {
marginLeft: 20,
fontSize: getFontXD(42),
marginTop: 5,
},
wrapLeft: {
width: WIDTHXD(400),
},
}); });
export default ServiceCustomerView; const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {})(ServiceCustomerView);
...@@ -256,4 +256,7 @@ export default { ...@@ -256,4 +256,7 @@ export default {
UnitsQuotedFloor: 'Units quoted in the floor', UnitsQuotedFloor: 'Units quoted in the floor',
ConversionPrice: 'Conversion price', ConversionPrice: 'Conversion price',
ConvertUSD: 'Convert USD/Ton', ConvertUSD: 'Convert USD/Ton',
Saturday: 'Saturday',
Sunday: 'Sunday',
}; };
...@@ -255,4 +255,6 @@ export default { ...@@ -255,4 +255,6 @@ export default {
UnitsQuotedFloor: 'Đơn vị yết giá trên sàn', UnitsQuotedFloor: 'Đơn vị yết giá trên sàn',
ConversionPrice: 'Giá quy đổi', ConversionPrice: 'Giá quy đổi',
ConvertUSD: 'Quy đổi USD/Tấn', ConvertUSD: 'Quy đổi USD/Tấn',
Saturday: 'Thứ 7',
Sunday: 'Chủ nhật',
}; };
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