Commit dabc2997 by tungnq

TODO: Chỉnh sửa giao diện danh sách công việc

parent 7e09ce25
...@@ -245,7 +245,7 @@ const styles = StyleSheet.create({ ...@@ -245,7 +245,7 @@ const styles = StyleSheet.create({
}, },
// Style cơ bản cho mỗi tab // Style cơ bản cho mỗi tab
tab: { tab: {
minHeight: 40, // Chiều cao tối thiểu 40px minHeight: 30, // Chiều cao tối thiểu 40px
justifyContent: 'center', // Căn giữa theo chiều dọc justifyContent: 'center', // Căn giữa theo chiều dọc
alignItems: 'center', // Căn giữa theo chiều ngang alignItems: 'center', // Căn giữa theo chiều ngang
position: 'relative', // Để có thể đặt activeIndicator absolute position: 'relative', // Để có thể đặt activeIndicator absolute
......
...@@ -194,8 +194,15 @@ const ListWork = props => { ...@@ -194,8 +194,15 @@ const ListWork = props => {
]; ];
}; };
const [tabView, setTabView] = useState([
{key: 'all', label: 'Tất cả'},
{key: 'public', label: 'Giao cho tôi'},
{key: 'private', label: 'Đang giám sát'},
]);
// ==================== RENDER ==================== // ==================== RENDER ====================
return ( return (
<ListWorkView <ListWorkView
// Props dữ liệu // Props dữ liệu
...@@ -212,6 +219,7 @@ const ListWork = props => { ...@@ -212,6 +219,7 @@ const ListWork = props => {
onViewDetail={handleViewDetail} onViewDetail={handleViewDetail}
onReportAction={handleReportAction} onReportAction={handleReportAction}
onApprovalAction={handleApprovalAction} onApprovalAction={handleApprovalAction}
tabView={tabView}
// Props utility functions // Props utility functions
getStatusColor={getStatusColor} getStatusColor={getStatusColor}
......
...@@ -17,7 +17,6 @@ const styles = StyleSheet.create({ ...@@ -17,7 +17,6 @@ const styles = StyleSheet.create({
}, },
header: { header: {
alignItems: 'center', alignItems: 'center',
paddingBottom: 20,
marginHorizontal: 20, marginHorizontal: 20,
}, },
headerTitle: { headerTitle: {
...@@ -117,7 +116,6 @@ const styles = StyleSheet.create({ ...@@ -117,7 +116,6 @@ const styles = StyleSheet.create({
buttonContainer: { buttonContainer: {
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'flex-end', justifyContent: 'flex-end',
paddingHorizontal: 20,
paddingTop: 20, paddingTop: 20,
gap: 10, gap: 10,
}, },
......
...@@ -318,7 +318,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => { ...@@ -318,7 +318,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
fontFamily={R.fonts.fontMedium} fontFamily={R.fonts.fontMedium}
height={35} height={35}
width={100} width={100}
containerStyle={{paddingHorizontal: 15, borderRadius: 30}} containerStyle={{ borderRadius: 30}}
/> />
</View> </View>
</View> </View>
......
...@@ -32,23 +32,18 @@ const ListWorkView = props => { ...@@ -32,23 +32,18 @@ const ListWorkView = props => {
onApprovalAction, onApprovalAction,
getStatusColor, getStatusColor,
getButtonsForStatus, getButtonsForStatus,
tabView
} = props; } = props;
const renderTabView = () => { const renderTabView = () => {
return ( return (
<TabViewComponent <TabViewComponent
data={[ data={tabView}
{key: 'all', label: 'Tất cả'},
{key: 'public', label: 'Công khai'},
{key: 'private', label: 'Hạn chế'},
{key: 'draft', label: 'Nháp'},
]}
tabStyle={{ tabStyle={{
backgroundColor: R.colors.gray, backgroundColor: R.colors.gray,
marginHorizontal: 5, marginHorizontal: 5,
borderRadius: 10, borderRadius: 10,
width: 100, width: 107,
height: 35,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
}} }}
...@@ -90,7 +85,7 @@ const ListWorkView = props => { ...@@ -90,7 +85,7 @@ const ListWorkView = props => {
backgroundColor={button.backgroundColor} backgroundColor={button.backgroundColor}
textColor={R.colors.white} textColor={R.colors.white}
fontSize={R.fontsize.fontSizeContent} fontSize={R.fontsize.fontSizeContent}
height={35} height={30}
width={120} width={120}
containerStyle={{marginRight: 10, borderRadius: 20}} containerStyle={{marginRight: 10, borderRadius: 20}}
/> />
......
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