Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AppUms_Lecturer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tungnq
AppUms_Lecturer
Commits
147aac61
Commit
147aac61
authored
Aug 25, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã hoàn thiện giao diện tab_view
parent
3b355966
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
17 deletions
+184
-17
index.js
src/screens/incoming_document/index.js
+62
-2
style.js
src/screens/incoming_document/style.js
+73
-1
view.js
src/screens/incoming_document/view.js
+49
-14
No files found.
src/screens/incoming_document/index.js
View file @
147aac61
import
React
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Text
,
View
,
StyleSheet
}
from
'react-native'
;
import
{
Text
,
View
,
StyleSheet
}
from
'react-native'
;
import
IncomingDocumentView
from
'./view'
;
import
IncomingDocumentView
from
'./view'
;
const
IncomingDocument
=
(
props
)
=>
{
const
IncomingDocument
=
(
props
)
=>
{
const
[
activeTab
,
setActiveTab
]
=
useState
(
"all"
)
const
[
dataListTabView
,
setDataListTabView
]
=
useState
([
{
key
:
"all"
,
title_status
:
"Tất cả"
,
},
{
key
:
"restrict"
,
title_status
:
"Đã hạn chế"
,
},
{
key
:
"public"
,
title_status
:
"Công khai"
}
])
const
handleTabKey
=
(
tabKey
)
=>
{
setActiveTab
(
tabKey
)
}
const
[
dataList
,
setDataList
]
=
useState
([
{
id
:
'1'
,
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'
,
status
:
'restrict'
,
total_head_of_work
:
'12'
,
},
{
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'
,
status
:
'public'
,
},
])
const
[
searchQuery
,
setSearchQuery
]
=
useState
(
""
)
const
filterData
=
dataList
.
filter
((
item
)
=>
{
const
matchTab
=
activeTab
==
'all'
||
item
.
status
==
activeTab
;
const
matchSearch
=
item
.
title
.
toLowerCase
().
includes
(
searchQuery
.
toLowerCase
());
return
matchTab
&&
matchSearch
;
})
return
(
return
(
<
IncomingDocumentView
/>
<
IncomingDocumentView
activeTab
=
{
activeTab
}
dataListTabView
=
{
dataListTabView
}
dataList
=
{
filterData
}
searchQuery
=
{
searchQuery
}
setSearchQuery
=
{
setSearchQuery
}
handleTabKey
=
{
handleTabKey
}
/
>
);
);
};
};
...
...
src/screens/incoming_document/style.js
View file @
147aac61
import
{
StyleSheet
,
Text
,
View
}
from
'react-native'
import
{
StyleSheet
,
Text
,
View
}
from
'react-native'
import
React
from
'react'
import
React
from
'react'
import
R
from
'../../assets/R'
const
styles
=
StyleSheet
.
create
({})
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
R
.
colors
.
white
,
},
body
:{
flex
:
1
,
backgroundColor
:
R
.
colors
.
white
},
cardTabView
:{
},
itemTabView
:{
width
:
110
,
height
:
35
,
borderRadius
:
10
,
marginTop
:
10
,
backgroundColor
:
R
.
colors
.
gray
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
marginLeft
:
15
,
},
textTabView
:{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontWeight
:
'400'
,
color
:
R
.
colors
.
black
,
fontFamily
:
R
.
fonts
.
fontRegular
,
},
activeTab
:{
backgroundColor
:
R
.
colors
.
blue
,
},
activeTabText
:{
color
:
R
.
colors
.
white
,
fontWeight
:
'500'
,
},
contentContainerStyle
:{
},
card
:{
borderWidth
:
1
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderRadius
:
10
,
padding
:
5
,
marginTop
:
15
,
marginBottom
:
15
,
marginHorizontal
:
15
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
backgroundColor
:
R
.
colors
.
white
,
shadowColor
:
R
.
colors
.
black
,
shadowOffset
:{
width
:
0.5
,
height
:
2
},
shadowOpacity
:
Platform
.
OS
===
'ios'
?
0.25
:
1
,
shadowRadius
:
5
,
elevation
:
Platform
.
OS
===
'ios'
?
1
:
2
,
},
btnCard
:{
borderRadius
:
10
,
borderWidth
:
1
,
padding
:
5
,
width
:
'100%'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
},
text
:{
fontSize
:
R
.
sizes
.
sm
,
color
:
R
.
colors
.
black
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontWeight
:
'400'
,
},
})
export
default
styles
export
default
styles
\ No newline at end of file
src/screens/incoming_document/view.js
View file @
147aac61
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
}
from
'react-native'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
,
FlatList
}
from
'react-native'
;
import
styles
from
'./style'
;
import
Header
from
'../../components/Header/Header'
;
const
IncomingDocumentView
=
props
=>
{
const
{
activeTab
,
dataListTabView
,
dataList
,
searchQuery
,
setSearchQuery
,
handleTabKey
,
}
=
props
;
const
IncomingDocumentView
=
(
props
)
=>
{
const
itemTabView
=
({
item
,
index
}
)
=>
{
const
{
}
=
props
;
const
isActive
=
item
.
key
===
activeTab
;
return
(
return
(
<
View
<
TouchableOpacity
style
=
{{
style
=
{[
styles
.
itemTabView
,
isActive
?
styles
.
activeTab
:
null
]}
flex
:
1
,
onPress
=
{()
=>
handleTabKey
&&
handleTabKey
(
item
.
key
)}
>
justifyContent
:
'center'
,
<
Text
alignItems
:
'center'
,
style
=
{[
styles
.
textTabView
,
isActive
?
styles
.
activeTabText
:
null
]}
>
}}
>
{
item
.
title_status
}
<
TouchableOpacity
>
<
/Text
>
<
Text
>
IncomingDocument
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
);
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
Header
title
=
{
'Danh sách văn bản đến'
}
isBack
/>
<
View
style
=
{
styles
.
body
}
>
<
View
style
=
{
styles
.
cardTabView
}
>
<
FlatList
data
=
{
dataListTabView
}
renderItem
=
{
itemTabView
}
keyExtractor
=
{
item
=>
item
.
key
}
horizontal
contentContainerStyle
=
{
styles
.
contentContainerStyle
}
showsHorizontalScrollIndicator
=
{
false
}
/
>
<
/View
>
<
View
style
=
{
styles
.
card
}
>
<
TouchableOpacity
style
=
{
styles
.
btnCard
}
>
<
Text
style
=
{
styles
.
text
}
>
Kho
á
2024
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
};
};
export
default
IncomingDocumentView
;
export
default
IncomingDocumentView
;
const
styles
=
StyleSheet
.
create
({})
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment