Commit d16364c7 by tungnq

TODO: Tiến hành chỉnh sửa giao diện

parent b891c912
...@@ -23,7 +23,7 @@ const styles = StyleSheet.create({ ...@@ -23,7 +23,7 @@ const styles = StyleSheet.create({
flexDirection:'row', flexDirection:'row',
alignItems:'center', alignItems:'center',
justifyContent:'center', justifyContent:'center',
marginBottom:15, marginBottom:5,
}, },
containerTextItemLeft:{ containerTextItemLeft:{
flex:3, flex:3,
...@@ -32,9 +32,13 @@ const styles = StyleSheet.create({ ...@@ -32,9 +32,13 @@ const styles = StyleSheet.create({
}, },
containerTextItemRight:{ containerTextItemRight:{
flex:3, flex:3,
flexDirection:'row',
alignItems:'center',
justifyContent:'center',
marginRight:15
}, },
sizedBox:{ sizedBox:{
flex:1 flex:3
}, },
text:{ text:{
......
...@@ -9,13 +9,20 @@ import { ...@@ -9,13 +9,20 @@ import {
import Header from '../../../../components/Header/Header'; import Header from '../../../../components/Header/Header';
import R from '../../../../assets/R'; import R from '../../../../assets/R';
import styles from './style'; import styles from './style';
import * as SCREENNAME from '../../../../routers/ScreenNames';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import VersionCheck from '../../../../components/VersionCheck';
import CheckBox from '../../../../components/CheckBox'; import CheckBox from '../../../../components/CheckBox';
const DetailStudentView = props => { const DetailStudentView = props => {
const {student, onCheckboxChange} = props; const {student, onCheckboxChange} = props;
const navigate = useNavigation(); const navigate = useNavigation();
const getStatusColor = status => {
const statusColors = {
'Đang học': '#4CAF50',
'Cảnh cáo': '#FF9800',
'Thôi học': '#F44336',
};
return statusColors[status] || '#9E9E9E';
};
const statusColor = getStatusColor(student.status);
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<Header title={'Nguyễn Minh Đức - 2598671'} isBack /> <Header title={'Nguyễn Minh Đức - 2598671'} isBack />
...@@ -27,7 +34,10 @@ const DetailStudentView = props => { ...@@ -27,7 +34,10 @@ const DetailStudentView = props => {
</View> </View>
<View style={styles.sizedBox}></View> <View style={styles.sizedBox}></View>
<View style={styles.containerTextItemRight}> <View style={styles.containerTextItemRight}>
<Text style={styles.text}>Tình trng: Đang hc</Text> <Text style={[styles.text]}>
Tình trng:
</Text>
<Text style={[styles.text,{color:statusColor}]}>{student.status}</Text>
</View> </View>
</View> </View>
{/*Row 2*/} {/*Row 2*/}
...@@ -156,7 +166,7 @@ const DetailStudentView = props => { ...@@ -156,7 +166,7 @@ const DetailStudentView = props => {
</Text> </Text>
</View> </View>
<View style={{flex: 3}}> <View style={{flex: 3, flexDirection:'row'}}>
<Text <Text
style={[ style={[
{ {
...@@ -166,8 +176,9 @@ const DetailStudentView = props => { ...@@ -166,8 +176,9 @@ const DetailStudentView = props => {
color: R.colors.black, color: R.colors.black,
}, },
]}> ]}>
Tình trng: Đang hc Tình trng:
</Text> </Text>
<Text style={[styles.text,{color:statusColor}]}>{student.status}</Text>
</View> </View>
</View> </View>
......
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