Commit e87affda by Giang Tran

update api service

parent efc12cf4
......@@ -4,23 +4,25 @@ import R from '../../assets/R';
import AppText from '../../components/AppText';
import TextMulti from '../../components/Input/TextMulti';
import I18n from '../../helper/i18/i18n';
import {connect} from 'react-redux';
import HeaderBack from '../../components/Header/HeaderBack';
import {getFontXD, HEIGHTXD, WIDTHXD} from '../../Config/Functions';
import {TouchableOpacity} from 'react-native-gesture-handler';
const ServiceCustomerView = (props) => {
const [content, setContent] = useState('');
const [data, setData] = useState({
company: 'CÔNG TY CP TƯ VẤN ĐẦU TƯ DCV.',
address:
'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',
email: 'sale@dcv.vn',
website: 'https://dcvinvest.com',
hotline: '024.9999.8669',
time:
'Thứ 2 - Thứ 6: 08:00 - 18:00 \nThứ 7: 10:00 - 14:00 \nChủ nhật: 09:00 - 12:00',
});
const {
name,
email,
website,
hotline,
office_day,
office_hours,
office_sat_time,
office_sun_time,
address,
} = props.user.company_info;
return (
<View style={{flex: 1}}>
<HeaderBack title={'CustomerCare'} />
......@@ -31,25 +33,45 @@ const ServiceCustomerView = (props) => {
paddingTop: 10,
}}>
<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} />
<Text style={styles.txtContent}>{data.address}</Text>
<Text style={styles.txtContent}>{address}</Text>
<View style={styles.row}>
<AppText i18nKey={'Email'} style={styles.title} />
<Text style={styles.txtContent}> {data.email}</Text>
<Text style={styles.title}>Email:</Text>
<Text style={styles.txtContent}> {email}</Text>
</View>
<View style={styles.row}>
<Text style={styles.title}>Website: </Text>
<Text style={styles.txtContent}>{data.website}</Text>
<Text style={styles.txtContent}>{website}</Text>
</View>
<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} />
<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}}>
<TextMulti
......@@ -98,6 +120,19 @@ const styles = StyleSheet.create({
color: R.colors.white,
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 {
UnitsQuotedFloor: 'Units quoted in the floor',
ConversionPrice: 'Conversion price',
ConvertUSD: 'Convert USD/Ton',
Saturday: 'Saturday',
Sunday: 'Sunday',
};
......@@ -255,4 +255,6 @@ export default {
UnitsQuotedFloor: 'Đơn vị yết giá trên sàn',
ConversionPrice: 'Giá quy đổi',
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