Commit 2b8c3aa1 by tungnq

TODO: Đã hoàn thiện giao diện hồ sơ

parent 3a37bd9f
...@@ -25,6 +25,7 @@ const TextField = props => { ...@@ -25,6 +25,7 @@ const TextField = props => {
containerMarginHorizontal, containerMarginHorizontal,
containerMarginBottom, containerMarginBottom,
containerBackgroundColor, containerBackgroundColor,
width,
} = props; } = props;
const renderMess = () => { const renderMess = () => {
if (value && value.trim().length > 0) return `${title} không hợp lệ`; if (value && value.trim().length > 0) return `${title} không hợp lệ`;
...@@ -32,7 +33,7 @@ const TextField = props => { ...@@ -32,7 +33,7 @@ const TextField = props => {
}; };
return ( return (
<View style={{marginVertical: containerMarginVertical, marginHorizontal: containerMarginHorizontal, marginBottom: containerMarginBottom , backgroundColor: containerBackgroundColor, marginTop: containerMarginTop}}> <View style={{width:width,marginVertical: containerMarginVertical, marginHorizontal: containerMarginHorizontal, marginBottom: containerMarginBottom , backgroundColor: containerBackgroundColor, marginTop: containerMarginTop}}>
<Text <Text
style={{ style={{
fontSize: fontSizeTitle, fontSize: fontSizeTitle,
......
...@@ -18,7 +18,9 @@ const RadioGroup = ({ ...@@ -18,7 +18,9 @@ const RadioGroup = ({
containerMarginVertical, containerMarginVertical,
containerMarginBottom, containerMarginBottom,
backgroundBoxColor, backgroundBoxColor,
containerBoxColor,
borderBoxColor, borderBoxColor,
containerWidth,
editable = false, editable = false,
}) => { }) => {
return ( return (
...@@ -29,6 +31,8 @@ const RadioGroup = ({ ...@@ -29,6 +31,8 @@ const RadioGroup = ({
marginHorizontal: containerMarginHorizontal, marginHorizontal: containerMarginHorizontal,
marginVertical: containerMarginVertical, marginVertical: containerMarginVertical,
marginBottom: containerMarginBottom, marginBottom: containerMarginBottom,
backgroundColor: containerBoxColor,
width:containerWidth
} }
]}> ]}>
{options.map((option, index) => ( {options.map((option, index) => (
......
import React from 'react'; import React, { useState } from 'react';
import {Text, View, StyleSheet} from 'react-native'; import {Text, View, StyleSheet} from 'react-native';
import ProfileView from './view'; import ProfileView from './view';
const Profile = (props) => { const Profile = (props) => {
const [user, setUser] = useState(
{
name:'Phạm Minh Quân',
role:'Trợ lý bộ môn thuộc trường',
code:'80578',
email:'quan.pm@uit.edu.vn',
authCredential:'quanpm',
department:'Khoa học máy tính',
teachingUnit:'Trí tuệ nhân tạo',
workPlace:'Trường Cao Đẳng FPT',
extraDuty: 'Vị trí kiêm nhiệm',
employmentType:[
'Quyền trưởng phòng',
'Trợ lý bộ môn thuộc trường'
],
appointmentDecision: 'QĐ/UIT/2025',
appointmentDate:'20/03/2025',
allowanceSeniorityDate:'10/03/2025',
teacherType:'CBGV trường',
academicUnit:'Khoa Công nghệ phần mềm',
subjectDepartment:'Bộ môn Phát triển phần mềm',
employmentStatus:'Đang công tác',
workCommencementDate:'20/03/2025',
}
)
const [selectedValue2, setSelectedValue2] = useState('1');
const options2 = [
{label: 'Cơ chế', value: '1'},
{label: 'Biên hữu', value: '2'},
];
const onValueChange2 = value => {
setSelectedValue2(value);
};
return ( return (
<ProfileView /> <ProfileView dataProfile={user} selectedValue2={selectedValue2} options2={options2} onValueChange2={onValueChange2}/>
); );
}; };
......
...@@ -7,8 +7,60 @@ const styles = StyleSheet.create({ ...@@ -7,8 +7,60 @@ const styles = StyleSheet.create({
}, },
body:{ body:{
flex:1, flex:1,
backgroundColor:R.colors.white backgroundColor:R.colors.white,
padding:15
},
headerBody:{
flexDirection:'row',
marginBottom:15,
},
headerLeft:{
// backgroundColor:'red'
},
boxCamera:{
alignItems:'center',
justifyContent:'center',
maxWidth:120,
},
containerImage:{
backgroundColor:R.colors.grayBorderInputTextHeader,
width:100,
height:150,
justifyContent:'center',
alignItems:'center',
borderRadius:10,
},
image:{
width:25,
height:25,
tintColor:R.colors.gray2
},
containerButton:{
marginTop:10,
},
headerRight:{
flex:1,
marginLeft:15,
justifyContent:'flex-start',
},
text:{
fontSize:R.sizes.sm,
fontFamily:R.fonts.fontRegular,
fontWeight:'400',
color:R.colors.black,
},
bodyProfile:{
},
containerInput:{
flexDirection:'row',
marginBottom:15,
justifyContent:'space-between',
},
sizedBox:{
width:15,
} }
}) })
export default styles export default styles;
\ No newline at end of file \ No newline at end of file
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