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