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
47aca987
Commit
47aca987
authored
Aug 27, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã hoàn thiện giao diện danh sách văn bản đến
parent
147aac61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
177 additions
and
12 deletions
+177
-12
Dropdown.js
src/components/DropdownAlert/Dropdown.js
+3
-3
index.js
src/screens/incoming_document/index.js
+2
-2
style.js
src/screens/incoming_document/style.js
+42
-0
view.js
src/screens/incoming_document/view.js
+130
-7
No files found.
src/components/DropdownAlert/Dropdown.js
View file @
47aca987
...
@@ -9,7 +9,7 @@ import {
...
@@ -9,7 +9,7 @@ import {
ScrollView
,
ScrollView
,
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
const
Dropdown
=
({
items
,
placeholder
=
'Chọn...'
,
onSelect
})
=>
{
const
Dropdown
=
({
items
,
placeholder
=
'Chọn...'
,
onSelect
,
height
})
=>
{
const
[
isOpen
,
setIsOpen
]
=
useState
(
false
);
const
[
isOpen
,
setIsOpen
]
=
useState
(
false
);
const
[
selected
,
setSelected
]
=
useState
(
null
);
const
[
selected
,
setSelected
]
=
useState
(
null
);
...
@@ -20,10 +20,10 @@ const Dropdown = ({items, placeholder = 'Chọn...', onSelect}) => {
...
@@ -20,10 +20,10 @@ const Dropdown = ({items, placeholder = 'Chọn...', onSelect}) => {
};
};
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
[
styles
.
container
]
}
>
{
/* Nút hiển thị */
}
{
/* Nút hiển thị */
}
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
dropdownHeader
}
style
=
{
[
styles
.
dropdownHeader
,{
height
:
height
}]
}
onPress
=
{()
=>
setIsOpen
(
!
isOpen
)}
>
onPress
=
{()
=>
setIsOpen
(
!
isOpen
)}
>
<
Text
style
=
{
styles
.
dropdownHeaderText
}
>
<
Text
style
=
{
styles
.
dropdownHeaderText
}
>
{
selected
?
selected
.
label
:
placeholder
}
{
selected
?
selected
.
label
:
placeholder
}
...
...
src/screens/incoming_document/index.js
View file @
47aca987
...
@@ -30,7 +30,7 @@ const IncomingDocument = (props) => {
...
@@ -30,7 +30,7 @@ const IncomingDocument = (props) => {
symbol_number
:
'123456789'
,
symbol_number
:
'123456789'
,
term
:
'29/07/2025'
,
term
:
'29/07/2025'
,
number_entry_book
:
'12493-fh544'
,
number_entry_book
:
'12493-fh544'
,
status
:
'
restrict
'
,
status
:
'
Hạn chế
'
,
total_head_of_work
:
'12'
,
total_head_of_work
:
'12'
,
},
},
{
{
...
@@ -39,7 +39,7 @@ const IncomingDocument = (props) => {
...
@@ -39,7 +39,7 @@ const IncomingDocument = (props) => {
symbol_number
:
'123456789'
,
symbol_number
:
'123456789'
,
term
:
'29/07/2025'
,
term
:
'29/07/2025'
,
number_entry_book
:
'12493-fh544'
,
number_entry_book
:
'12493-fh544'
,
status
:
'
public
'
,
status
:
'
Công khai
'
,
},
},
])
])
...
...
src/screens/incoming_document/style.js
View file @
47aca987
...
@@ -72,5 +72,46 @@ const styles = StyleSheet.create({
...
@@ -72,5 +72,46 @@ const styles = StyleSheet.create({
fontFamily
:
R
.
fonts
.
fontRegular
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontWeight
:
'400'
,
fontWeight
:
'400'
,
},
},
box_3
:{
flexDirection
:
'row'
,
marginHorizontal
:
15
,
alignItems
:
'center'
,
},
searchBox
:{
flex
:
1
,
borderWidth
:
1
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderRadius
:
20
,
alignItems
:
'center'
,
justifyContent
:
'flex-start'
,
paddingLeft
:
15
,
flexDirection
:
'row'
,
height
:
42
},
boxFilter
:{
flex
:
1
,
},
cardIncomingDocument
:{
borderRadius
:
10
,
padding
:
10
,
marginHorizontal
:
15
,
marginVertical
:
7.5
,
backgroundColor
:
R
.
colors
.
white
,
shadowColor
:
R
.
colors
.
black
,
shadowOffset
:{
width
:
0.5
,
height
:
2
},
shadowOpacity
:
Platform
.
OS
===
'ios'
?
0.25
:
1
,
elevation
:
Platform
.
OS
===
'ios'
?
1
:
2
,
},
textSubTitle
:{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontWeight
:
'500'
,
fontFamily
:
R
.
fonts
.
fontSemiBold
,
color
:
R
.
colors
.
black
,
},
text
:{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontWeight
:
'400'
,
fontFamily
:
R
.
fonts
.
fontRegular
,
}
})
})
export
default
styles
export
default
styles
\ No newline at end of file
src/screens/incoming_document/view.js
View file @
47aca987
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
,
FlatList
}
from
'react-native'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
,
FlatList
,
Image
,
TextInput
,
}
from
'react-native'
;
import
styles
from
'./style'
;
import
styles
from
'./style'
;
import
Header
from
'../../components/Header/Header'
;
import
Header
from
'../../components/Header/Header'
;
import
Dropdown
from
'../../components/DropdownAlert/Dropdown'
;
import
TextField
from
'../../components/Input/TextField'
;
import
R
from
'../../assets/R'
;
import
Button
from
'../../components/Button'
;
const
IncomingDocumentView
=
props
=>
{
const
IncomingDocumentView
=
props
=>
{
const
{
const
{
activeTab
,
activeTab
,
...
@@ -11,6 +23,17 @@ const IncomingDocumentView = props => {
...
@@ -11,6 +23,17 @@ const IncomingDocumentView = props => {
setSearchQuery
,
setSearchQuery
,
handleTabKey
,
handleTabKey
,
}
=
props
;
}
=
props
;
const
getColor
=
status
=>
{
switch
(
status
)
{
case
'Hạn chế'
:
return
R
.
colors
.
brown
;
case
'Công khai'
:
return
R
.
colors
.
blue
;
}
};
const
hasRelatedWork
=
n
=>
Number
(
n
)
>
0
;
const
getHiddenButton
=
n
=>
(
hasRelatedWork
(
n
)
?
true
:
false
);
const
itemTabView
=
({
item
,
index
})
=>
{
const
itemTabView
=
({
item
,
index
})
=>
{
const
isActive
=
item
.
key
===
activeTab
;
const
isActive
=
item
.
key
===
activeTab
;
...
@@ -26,7 +49,81 @@ const IncomingDocumentView = props => {
...
@@ -26,7 +49,81 @@ const IncomingDocumentView = props => {
);
);
};
};
const
renderItemIncomingDocument
=
({
item
})
=>
{
const
showRelatedWork
=
getHiddenButton
(
item
?.
total_head_of_work
);
return
(
<
View
style
=
{
styles
.
cardIncomingDocument
}
>
<
Text
style
=
{
styles
.
textSubTitle
}
>
{
item
.
title
}
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
Text
style
=
{
styles
.
textSubTitle
}
>
S
ố
k
ý
hi
ệ
u
:{
" "
}
<
Text
style
=
{
styles
.
text
}
>
{
item
.
symbol_number
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
textSubTitle
}
>
S
ố
v
à
o
s
ổ
:{
" "
}
<
Text
style
=
{
styles
.
text
}
>
{
item
.
number_entry_book
}
<
/Text
>
<
/Text
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
Text
style
=
{
styles
.
textSubTitle
}
>
Ng
à
y
đế
n
:{
" "
}
<
Text
style
=
{
styles
.
text
}
>
{
item
.
term
}
<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
textSubTitle
}
>
Ch
ế
độ
:{
" "
}
<
Text
style
=
{[{
color
:
getColor
(
item
.
status
)}]}
>
{
item
.
status
}
<
/Text
>
<
/Text
>
<
/View
>
<
Text
style
=
{{
alignSelf
:
'flex-start'
,
color
:
R
.
colors
.
blue
}}
>
V
ă
n
b
ả
n
hi
ệ
n
c
ó
{
item
.
total_head_of_work
||
0
}
c
ô
ng
vi
ệ
c
li
ê
n
quan
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
,
alignSelf
:
'flex-end'
,
marginVertical
:
5
,
}}
>
{
showRelatedWork
&&
(
<
Button
title
=
"Công việc"
onPress
=
{()
=>
{}}
backgroundColor
=
{
R
.
colors
.
brown
}
textColor
=
{
R
.
colors
.
white
}
height
=
{
25
}
borderRadius
=
{
15
}
fontSize
=
{
11
}
fontWeight
=
{
'600'
}
fontFamily
=
{
R
.
fonts
.
fontMedium
}
paddingHorizontal
=
{
15
}
/
>
)}
<
View
style
=
{{
flex
:
0.1
}}
><
/View
>
<
Button
title
=
"Chi tiết"
onPress
=
{()
=>
{}}
backgroundColor
=
{
R
.
colors
.
blue
}
textColor
=
{
R
.
colors
.
white
}
height
=
{
25
}
width
=
{
90
}
borderRadius
=
{
15
}
fontSize
=
{
11
}
fontWeight
=
{
'600'
}
fontFamily
=
{
R
.
fonts
.
fontMedium
}
paddingHorizontal
=
{
15
}
/
>
<
/View
>
<
/View
>
);
};
const
renderListIncomingDocument
=
()
=>
{
return
(
<
FlatList
data
=
{
dataList
}
renderItem
=
{
renderItemIncomingDocument
}
keyExtractor
=
{
item
=>
item
.
id
.
toString
()}
showsVerticalScrollIndicator
=
{
false
}
/
>
);
};
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
...
@@ -43,13 +140,39 @@ const IncomingDocumentView = props => {
...
@@ -43,13 +140,39 @@ const IncomingDocumentView = props => {
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
card
}
>
<
View
style
=
{{
marginBottom
:
15
}}
>
<
TouchableOpacity
style
=
{
styles
.
btnCard
}
>
<
View
style
=
{
styles
.
card
}
>
<
Text
style
=
{
styles
.
text
}
>
Kho
á
2024
<
/Text
>
<
TouchableOpacity
style
=
{
styles
.
btnCard
}
>
<
/TouchableOpacity
>
<
Text
style
=
{
styles
.
text
}
>
H
ọ
c
k
ỳ
2
,
N
ă
m
2025
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
box_3
}
>
<
View
style
=
{
styles
.
searchBox
}
>
<
Image
source
=
{
R
.
images
.
icSearch
}
style
=
{{
width
:
20
,
height
:
20
}}
/
>
<
View
style
=
{{
flex
:
1
}}
>
<
TextInput
placeholder
=
"Tìm kiếm"
style
=
{
styles
.
text
}
value
=
{
searchQuery
}
onChangeText
=
{
setSearchQuery
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.1
}}
><
/View
>
<
View
style
=
{
styles
.
boxFilter
}
>
<
Dropdown
title
=
{
'Tìm kiếm'
}
height
=
{
40
}
/
>
<
/View
>
<
/View
>
<
/View
>
{
renderListIncomingDocument
()}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
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