Commit 7fa12700 by tungnq

TODO: Bổ sung lọc dữ liệu theo tab view danh sách văn bản đi

parent 7aaec7c7
...@@ -14,7 +14,7 @@ const TextField = props => { ...@@ -14,7 +14,7 @@ const TextField = props => {
value, value,
editable, editable,
placeholder, placeholder,
fontSizePlaceHolder, fontSizePlaceHolder = R.fontsize.fontSizeContent,
containerMarginVertical, containerMarginVertical,
containerMarginHorizontal, containerMarginHorizontal,
containerMarginBottom, containerMarginBottom,
......
...@@ -236,7 +236,7 @@ const AddSendDocumentView = props => { ...@@ -236,7 +236,7 @@ const AddSendDocumentView = props => {
}; };
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Header title={'Soạn văn bản đi'} isBack /> <Header title={'Tạo mới văn bản đi'} isBack />
<ScrollView showsVerticalScrollIndicator={false}>{body()}</ScrollView> <ScrollView showsVerticalScrollIndicator={false}>{body()}</ScrollView>
</View> </View>
); );
......
...@@ -30,7 +30,6 @@ const DetailSendDocumentView = props => { ...@@ -30,7 +30,6 @@ const DetailSendDocumentView = props => {
const [taskDeadline, setTaskDeadline] = useState(''); const [taskDeadline, setTaskDeadline] = useState('');
const [taskFollower, setTaskFollower] = useState('859256, Nguyễn Minh Đức'); const [taskFollower, setTaskFollower] = useState('859256, Nguyễn Minh Đức');
const [taskExecutor, setTaskExecutor] = useState('859256, Nguyễn Minh Đức'); const [taskExecutor, setTaskExecutor] = useState('859256, Nguyễn Minh Đức');
console.log(props);
const getColor = status => { const getColor = status => {
switch (status) { switch (status) {
case 'Hạn chế': case 'Hạn chế':
...@@ -96,7 +95,7 @@ const DetailSendDocumentView = props => { ...@@ -96,7 +95,7 @@ const DetailSendDocumentView = props => {
<Text style={styles.text}> <Text style={styles.text}>
Trng thái:{" "} Trng thái:{" "}
<Text style={[styles.text_2 , {color: getColorRegime(icomingDocument.regime)}]}>{icomingDocument.regime}</Text> <Text style={[styles.text_2 , {color:R.colors.green}]}>{icomingDocument.regime}</Text>
</Text> </Text>
</View> </View>
<View <View
......
...@@ -10,13 +10,14 @@ const ListSendDocument = (props) => { ...@@ -10,13 +10,14 @@ const ListSendDocument = (props) => {
title_status:"Tất cả", title_status:"Tất cả",
}, },
{ {
key:"restrict", key:"Hạn chế",
title_status:"Đã hạn chế", title_status:"Hạn chế",
}, },
{ {
key:"public", key:"Công khai",
title_status:"Công khai" title_status:"Công khai"
} },
]) ])
const handleTabKey = (tabKey) =>{ const handleTabKey = (tabKey) =>{
...@@ -35,37 +36,57 @@ const ListSendDocument = (props) => { ...@@ -35,37 +36,57 @@ const ListSendDocument = (props) => {
}, },
{ {
id:'2', id:'2',
title:'Văn bản thông báo lịch nộp thời khoá biểu của học kì 2 năm 2025', title:'Thông báo về quy định thi cuối kì học kì 2 năm 2025',
symbol_number:'123456789', symbol_number:'987654321',
term:'29/07/2025', term:'15/08/2025',
number_entry_book:'12493-fh544', number_entry_book:'12494-gh678',
status:'Cần chỉnh sửa', status:'Cần chỉnh sửa',
regime:'Hạn chế', regime:'Hạn chế',
}, },
{ {
id:'3', id:'3',
title:'Văn bản thông báo lịch nộp thời khoá biểu của học kì 2 năm 2025', title:'Quyết định về việc nghỉ lễ Tết Nguyên Đán 2025',
symbol_number:'123456789', symbol_number:'456789123',
term:'29/07/2025', term:'20/01/2025',
number_entry_book:'12493-fh544', number_entry_book:'12495-jk901',
status:'Đã phê duyệt', status:'Đã phê duyệt',
regime:'Hạn chế', regime:'Công khai',
}, },
{ {
id:'4', id:'4',
title:'Văn bản thông báo lịch nộp thời khoá biểu của học kì 2 năm 2025', title:'Dự thảo quy chế đánh giá sinh viên mới',
symbol_number:'123456789', symbol_number:'789123456',
term:'29/07/2025', term:'10/09/2025',
number_entry_book:'12493-fh544', number_entry_book:'12496-mn234',
status:'Dự thảo', status:'Dự thảo',
regime:'Công khai', regime:'Công khai',
}, },
{
id:'5',
title:'Thông báo tuyển sinh đại học năm 2025',
symbol_number:'321654987',
term:'05/06/2025',
number_entry_book:'12497-pq567',
status:'Đã phê duyệt',
regime:'Công khai',
},
{
id:'6',
title:'Văn bản hướng dẫn thực hiện công tác an toàn trường học',
symbol_number:'654987321',
term:'12/03/2025',
number_entry_book:'12498-rs890',
status:'Chờ xét duyệt',
regime:'Hạn chế',
},
]) ])
const [searchQuery, setSearchQuery] = useState("") const [searchQuery, setSearchQuery] = useState("")
const filterData = dataList.filter((item) =>{ const filterData = dataList.filter((item) =>{
const matchTab = activeTab == 'all' || item.status == activeTab; const matchTab = activeTab === 'all' ||
item.regime === activeTab ||
item.status === activeTab;
const matchSearch = item.title.toLowerCase().includes(searchQuery.toLowerCase()); const matchSearch = item.title.toLowerCase().includes(searchQuery.toLowerCase());
return matchTab && matchSearch; return matchTab && matchSearch;
}) })
......
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