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 => {
value,
editable,
placeholder,
fontSizePlaceHolder,
fontSizePlaceHolder = R.fontsize.fontSizeContent,
containerMarginVertical,
containerMarginHorizontal,
containerMarginBottom,
......
......@@ -236,7 +236,7 @@ const AddSendDocumentView = props => {
};
return (
<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>
</View>
);
......
......@@ -30,7 +30,6 @@ const DetailSendDocumentView = props => {
const [taskDeadline, setTaskDeadline] = useState('');
const [taskFollower, setTaskFollower] = useState('859256, Nguyễn Minh Đức');
const [taskExecutor, setTaskExecutor] = useState('859256, Nguyễn Minh Đức');
console.log(props);
const getColor = status => {
switch (status) {
case 'Hạn chế':
......@@ -96,7 +95,7 @@ const DetailSendDocumentView = props => {
<Text style={styles.text}>
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>
</View>
<View
......
......@@ -10,13 +10,14 @@ const ListSendDocument = (props) => {
title_status:"Tất cả",
},
{
key:"restrict",
title_status:"Đã hạn chế",
key:"Hạn chế",
title_status:"Hạn chế",
},
{
key:"public",
key:"Công khai",
title_status:"Công khai"
}
},
])
const handleTabKey = (tabKey) =>{
......@@ -35,37 +36,57 @@ const ListSendDocument = (props) => {
},
{
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',
symbol_number:'123456789',
term:'29/07/2025',
number_entry_book:'12493-fh544',
title:'Thông báo về quy định thi cuối kì học kì 2 năm 2025',
symbol_number:'987654321',
term:'15/08/2025',
number_entry_book:'12494-gh678',
status:'Cần chỉnh sửa',
regime:'Hạn chế',
},
{
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',
symbol_number:'123456789',
term:'29/07/2025',
number_entry_book:'12493-fh544',
title:'Quyết định về việc nghỉ lễ Tết Nguyên Đán 2025',
symbol_number:'456789123',
term:'20/01/2025',
number_entry_book:'12495-jk901',
status:'Đã phê duyệt',
regime:'Hạn chế',
regime:'Công khai',
},
{
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',
symbol_number:'123456789',
term:'29/07/2025',
number_entry_book:'12493-fh544',
title:'Dự thảo quy chế đánh giá sinh viên mới',
symbol_number:'789123456',
term:'10/09/2025',
number_entry_book:'12496-mn234',
status:'Dự thảo',
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 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());
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