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
c3e40a85
Commit
c3e40a85
authored
Sep 16, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã làm xong modal của list work với role là người giám sát
parent
cddbcdf2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
71 deletions
+70
-71
view.js
src/screens/home/view.js
+6
-0
style.js
src/screens/list_work/modal_add_monitoring/style.js
+16
-11
view.js
src/screens/list_work/modal_add_monitoring/view.js
+48
-60
No files found.
src/screens/home/view.js
View file @
c3e40a85
...
...
@@ -16,6 +16,7 @@ import ItemGrid from './item';
import
styles
from
'./style'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
*
as
SCREENNAME
from
'../../routers/ScreenNames'
;
import
{
LogBox
}
from
'react-native'
;
const
HomeView
=
({
menuActivity
,
...
...
@@ -27,6 +28,11 @@ const HomeView = ({
onSearchChange
,
})
=>
{
const
navigate
=
useNavigation
();
LogBox
.
ignoreLogs
([
'VirtualizedLists should never be nested'
,
'Bottom Tab Navigator'
,
'Stack Navigator'
,
]);
const
renderMenuItem
=
({
item
})
=>
{
return
<
ItemGrid
item
=
{
item
}
onPress
=
{()
=>
onMenuItemPress
(
item
)}
/>
;
...
...
src/screens/list_work/modal_add_monitoring/style.js
View file @
c3e40a85
...
...
@@ -33,6 +33,10 @@ const styles = StyleSheet.create({
color
:
R
.
colors
.
black
,
marginBottom
:
5
,
},
flatListSelect
:
{
flexDirection
:
'row'
,
flexWrap
:
'wrap'
,
},
required
:
{
color
:
R
.
colors
.
red
,
},
...
...
@@ -49,15 +53,16 @@ const styles = StyleSheet.create({
paddingHorizontal
:
5
,
},
chip
:
{
backgroundColor
:
R
.
colors
.
grayLight
,
borderRadius
:
20
,
paddingHorizontal
:
15
,
paddingVertical
:
8
,
margin
:
5
,
borderWidth
:
1
,
borderColor
:
R
.
colors
.
gray
,
flex
:
0.48
,
flexDirection
:
'row'
,
alignItems
:
'center'
,
// position: 'relative',
paddingLeft
:
10
,
paddingRight
:
10
,
height
:
25
,
borderRadius
:
10
,
marginBottom
:
10
,
marginRight
:
5
,
backgroundColor
:
R
.
colors
.
blue2
,
},
chipSelected
:
{
backgroundColor
:
R
.
colors
.
blue1
,
...
...
@@ -77,9 +82,9 @@ const styles = StyleSheet.create({
},
textChip
:
{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
color
:
R
.
colors
.
black
,
textAlign
:
'center'
,
flex
:
1
,
fontWeight
:
'400'
,
fontFamily
:
R
.
fonts
.
fontRegular
,
color
:
R
.
colors
.
blueTextChip
,
},
textChipSelected
:
{
color
:
R
.
colors
.
blue
,
...
...
src/screens/list_work/modal_add_monitoring/view.js
View file @
c3e40a85
...
...
@@ -28,25 +28,10 @@ const AddMonitoringModalView = props => {
handleRemoveItem
,
}
=
props
;
const
renderItem
=
({
item
})
=>
{
const
isSelected
=
selectedItems
.
some
(
selected
=>
selected
.
id
===
item
.
id
);
const
renderItem_1
=
({
item
,
onPress
})
=>
{
return
(
<
TouchableOpacity
style
=
{[
styles
.
chip
,
isSelected
&&
styles
.
chipSelected
]}
onPress
=
{()
=>
handleSelectItem
(
item
)}
>
<
Text
style
=
{[
styles
.
textChip
,
isSelected
&&
styles
.
textChipSelected
]}
>
{
item
.
name
}
<
/Text
>
<
/TouchableOpacity
>
);
};
const
renderSelectedItem
=
({
item
})
=>
{
return
(
<
View
style
=
{
styles
.
selectedChip
}
>
<
TouchableOpacity
style
=
{
styles
.
containerIcon
}
onPress
=
{()
=>
handleRemoveItem
(
item
.
id
)}
>
<
View
style
=
{
styles
.
chip
}
>
<
TouchableOpacity
style
=
{
styles
.
containerIcon
}
onPress
=
{
onPress
}
>
<
Image
resizeMode
=
"cover"
source
=
{
R
.
images
.
icCancel
}
...
...
@@ -54,7 +39,7 @@ const AddMonitoringModalView = props => {
tintColor
=
{
R
.
colors
.
blue
}
/
>
<
/TouchableOpacity
>
<
Text
style
=
{
styles
.
textChip
}
>
{
item
.
name
}
<
/Text
>
<
Text
style
=
{
styles
.
textChip
}
>
{
`
${
item
.
id
}
,
${
item
.
name
}
`
}
<
/Text
>
<
/View
>
);
};
...
...
@@ -68,53 +53,42 @@ const AddMonitoringModalView = props => {
<
View
style
=
{
styles
.
overlay
}
>
<
View
style
=
{
styles
.
modalContainer
}
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
Text
style
=
{
styles
.
title
}
>
T
ạ
o
c
ô
ng
vi
ệ
c
gi
á
m
s
á
t
<
/Text
>
<
Text
style
=
{
styles
.
title
}
>
T
h
ê
m
c
ô
ng
vi
ệ
c
<
/Text
>
<
TextField
title
=
"Tiêu đề công việc"
placeholder
=
"Nhập tiêu đề công việc"
title
=
"Tiêu đề"
required
=
{
true
}
value
=
{
formData
.
title
}
onChangeText
=
{
value
=>
updateFormData
(
'title'
,
value
)}
containerMarginBottom
=
{
1
5
}
containerMarginBottom
=
{
1
0
}
/
>
<
View
style
=
{
styles
.
containerDropdown
}
>
<
Text
style
=
{
styles
.
label
}
>
Lo
ạ
i
c
ô
ng
vi
ệ
c
<
Text
style
=
{
styles
.
required
}
>*<
/Text
>
<
/Text
>
<
Dropdown
height
=
{
35
}
placeholder
=
"Chọn loại công việc"
onSelect
=
{
item
=>
updateFormData
(
'category'
,
item
)}
<
TextMulti
title
=
"Nội dung công việc"
required
=
{
true
}
value
=
{
formData
.
content
}
onChangeText
=
{
value
=>
updateFormData
(
'content'
,
value
)}
containerMarginBottom
=
{
10
}
/
>
<
/View
>
<
View
style
=
{
styles
.
containerDropdown
}
>
<
Text
style
=
{
styles
.
label
}
>
Ng
ườ
i
ch
ị
u
tr
á
ch
nhi
ệ
m
<
Text
style
=
{
styles
.
required
}
>*<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
label
}
>
Th
ẻ
<
/Text
>
<
Dropdown
height
=
{
35
}
placeholder
=
"Chọn người chịu trách nhiệm"
onSelect
=
{
item
=>
updateFormData
(
'responsible'
,
item
)}
/
>
<
/View
>
<
View
style
=
{
styles
.
containerDropdown
}
>
<
Text
style
=
{
styles
.
label
}
>
Th
ờ
i
h
ạ
n
ho
à
n
th
à
nh
<
Text
style
=
{
styles
.
required
}
>*<
/Text
>
<
/Text
>
<
Text
style
=
{
styles
.
label
}
>
V
ă
n
b
ả
n
li
ê
n
quan
<
/Text
>
<
Dropdown
height
=
{
35
}
placeholder
=
"Chọn thời hạn"
onSelect
=
{
item
=>
updateFormData
(
'deadline'
,
item
)}
/
>
<
/View
>
<
TextMulti
title
=
"Nội dung công việc"
placeholder
=
"Nhập nội dung chi tiết công việc cần giám sát"
<
TextField
title
=
"Ngày đến hạn"
required
=
{
true
}
value
=
{
formData
.
content
}
onChangeText
=
{
value
=>
updateFormData
(
'content'
,
value
)}
...
...
@@ -123,39 +97,53 @@ const AddMonitoringModalView = props => {
<
View
style
=
{
styles
.
containerDropdown
}
>
<
Text
style
=
{
styles
.
label
}
>
Ng
ườ
i
th
ự
c
hi
ệ
n
<
Text
style
=
{
styles
.
required
}
>*<
/Text
>
Ng
ườ
i
th
eo
d
õ
i
<
Text
style
=
{
styles
.
required
}
>*<
/Text
>
<
/Text
>
<
Dropdown
height
=
{
35
}
placeholder
=
"Chọn người thực hiện"
onSelect
=
{
item
=>
updateFormData
(
'implementer'
,
item
)}
/
>
<
/View
>
<
Text
style
=
{
styles
.
label
}
>
Danh
s
á
ch
ng
ườ
i
th
ự
c
hi
ệ
n
:
<
/Text
>
<
Text
style
=
{
styles
.
label
}
>
Danh
s
á
ch
ng
ườ
i
th
eo
d
õ
i
:
<
/Text
>
<
FlatList
data
=
{
dataList
}
renderItem
=
{
renderItem
}
keyExtractor
=
{
item
=>
item
.
id
.
toString
()}
renderItem
=
{({
item
})
=>
renderItem_1
({
item
,
onPress
:
()
=>
{}})}
keyExtractor
=
{(
item
,
index
)
=>
item
.
id
?.
toString
()
||
index
.
toString
()
}
numColumns
=
{
2
}
style
=
{
styles
.
flatList
}
showsVerticalScrollIndicator
=
{
fals
e
}
columnWrapperStyle
=
{
styles
.
flatList
Row
}
style
=
{
{
maxHeight
:
150
,
marginBottom
:
10
}
}
showsVerticalScrollIndicator
=
{
tru
e
}
columnWrapperStyle
=
{
styles
.
flatList
Select
}
nestedScrollEnabled
=
{
true
}
scrollEnabled
=
{
fals
e
}
scrollEnabled
=
{
tru
e
}
/
>
<
Text
style
=
{
styles
.
label
}
>
Đã
ch
ọ
n
:
<
/Text
>
<
View
style
=
{
styles
.
containerDropdown
}
>
<
Text
style
=
{
styles
.
label
}
>
Ng
ườ
i
th
ự
c
hi
ệ
n
c
ô
ng
vi
ệ
c
<
Text
style
=
{
styles
.
required
}
>*<
/Text
>
<
/Text
>
<
Dropdown
height
=
{
35
}
onSelect
=
{
item
=>
updateFormData
(
'implementer'
,
item
)}
/
>
<
/View
>
<
Text
style
=
{
styles
.
label
}
>
Danh
s
á
ch
ng
ườ
i
th
ự
c
hi
ệ
n
c
ô
ng
vi
ệ
c
:
<
/Text
>
<
FlatList
data
=
{
selectedItems
}
renderItem
=
{
renderSelectedItem
}
keyExtractor
=
{
item
=>
item
.
id
.
toString
()}
data
=
{
dataList
}
renderItem
=
{({
item
})
=>
renderItem_1
({
item
,
onPress
:
()
=>
{}})}
keyExtractor
=
{(
item
,
index
)
=>
item
.
id
?.
toString
()
||
index
.
toString
()
}
numColumns
=
{
2
}
style
=
{
styles
.
selectedFlatList
}
showsVerticalScrollIndicator
=
{
fals
e
}
columnWrapperStyle
=
{
styles
.
flatList
Row
}
style
=
{
{
maxHeight
:
150
,
marginBottom
:
10
}
}
showsVerticalScrollIndicator
=
{
tru
e
}
columnWrapperStyle
=
{
styles
.
flatList
Select
}
nestedScrollEnabled
=
{
true
}
scrollEnabled
=
{
fals
e
}
scrollEnabled
=
{
tru
e
}
/
>
<
Text
style
=
{
styles
.
label
}
>
T
à
i
li
ệ
u
đí
nh
k
è
m
<
/Text
>
...
...
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