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
9fce00aa
Commit
9fce00aa
authored
Sep 04, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã hoàn thiện giao diện tạo công việc
parent
6a213b97
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
354 additions
and
362 deletions
+354
-362
index.js
src/screens/list_work/index.js
+2
-4
style.js
src/screens/list_work/modal_add/style.js
+160
-0
view.js
src/screens/list_work/modal_add/view.js
+54
-216
style.js
src/screens/list_work/style.js
+60
-61
view.js
src/screens/list_work/view.js
+78
-81
No files found.
src/screens/list_work/index.js
View file @
9fce00aa
...
@@ -2,10 +2,8 @@ import React from 'react';
...
@@ -2,10 +2,8 @@ import React from 'react';
import
{
Text
,
View
,
StyleSheet
}
from
'react-native'
;
import
{
Text
,
View
,
StyleSheet
}
from
'react-native'
;
import
ListWorkView
from
'./view'
;
import
ListWorkView
from
'./view'
;
const
ListWork
=
(
props
)
=>
{
const
ListWork
=
props
=>
{
return
(
return
<
ListWorkView
/>
;
<
ListWorkView
/>
);
};
};
export
default
ListWork
;
export
default
ListWork
;
src/screens/list_work/modal_add/style.js
0 → 100644
View file @
9fce00aa
import
{
StyleSheet
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
const
styles
=
StyleSheet
.
create
({
overlay
:
{
flex
:
1
,
backgroundColor
:
R
.
colors
.
blackShadow
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
modalContainer
:
{
backgroundColor
:
'white'
,
borderRadius
:
15
,
maxHeight
:
'70%'
,
paddingVertical
:
20
,
marginHorizontal
:
15
,
},
header
:
{
alignItems
:
'center'
,
paddingBottom
:
20
,
marginHorizontal
:
20
,
},
headerTitle
:
{
fontSize
:
R
.
fontsize
.
fontsSizeTitle
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontWeight
:
'600'
,
color
:
R
.
colors
.
blue
,
},
formContainer
:
{
paddingHorizontal
:
20
,
},
fieldContainer
:
{
marginBottom
:
20
,
},
containerDropDown
:
{
marginBottom
:
10
,
},
imageIcon
:
{
width
:
15
,
height
:
15
,
},
label
:
{
fontSize
:
R
.
fontsize
.
fontSizeLabel
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontWeight
:
'600'
,
color
:
R
.
colors
.
black
,
},
required
:
{
color
:
'red'
,
},
textInput
:
{
borderWidth
:
1
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderRadius
:
10
,
paddingHorizontal
:
10
,
paddingVertical
:
5
,
},
textArea
:
{
height
:
80
,
textAlignVertical
:
'top'
,
},
flatListSelect
:
{
flexDirection
:
'row'
,
flexWrap
:
'wrap'
,
},
textChip
:
{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontWeight
:
'400'
,
fontFamily
:
R
.
fonts
.
fontRegular
,
color
:
R
.
colors
.
blueTextChip
,
},
text_2
:
{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontWeight
:
'600'
,
color
:
R
.
colors
.
black
,
},
pickerContainer
:
{
borderWidth
:
1
,
borderColor
:
'#ddd'
,
borderRadius
:
8
,
backgroundColor
:
'white'
,
},
datePickerContainer
:
{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
,
borderWidth
:
1
,
borderColor
:
'#ddd'
,
borderRadius
:
8
,
paddingHorizontal
:
12
,
paddingVertical
:
12
,
backgroundColor
:
'white'
,
},
datePickerText
:
{
fontSize
:
14
,
color
:
'#666'
,
},
containerIcon
:
{
marginRight
:
2
,
},
fileUploadContainer
:
{
borderWidth
:
2
,
borderColor
:
'#ddd'
,
borderStyle
:
'dashed'
,
borderRadius
:
8
,
paddingVertical
:
30
,
alignItems
:
'center'
,
backgroundColor
:
'#f9f9f9'
,
},
fileUploadText
:
{
marginTop
:
8
,
fontSize
:
14
,
color
:
R
.
colors
.
blue
,
fontWeight
:
'500'
,
},
buttonContainer
:
{
flexDirection
:
'row'
,
justifyContent
:
'flex-end'
,
paddingHorizontal
:
20
,
paddingTop
:
20
,
gap
:
10
,
},
cancelButton
:
{
flex
:
1
,
justifyContent
:
'center'
,
backgroundColor
:
R
.
colors
.
orange
,
alignItems
:
'center'
,
},
cancelButtonText
:
{
fontSize
:
16
,
color
:
'#666'
,
fontWeight
:
'500'
,
},
saveButton
:
{
flex
:
1
,
paddingVertical
:
12
,
borderRadius
:
8
,
backgroundColor
:
R
.
colors
.
blue
,
alignItems
:
'center'
,
},
saveButtonText
:
{
fontSize
:
16
,
color
:
'white'
,
fontWeight
:
'500'
,
},
chip
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
paddingLeft
:
10
,
paddingRight
:
10
,
height
:
25
,
borderRadius
:
10
,
marginBottom
:
10
,
marginRight
:
5
,
backgroundColor
:
R
.
colors
.
blue2
,
alignSelf
:
'flex-start'
,
},
});
export
default
styles
;
src/screens/list_work/modal_add/view.js
View file @
9fce00aa
...
@@ -11,8 +11,7 @@ import {
...
@@ -11,8 +11,7 @@ import {
FlatList
,
FlatList
,
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
styles
from
'./style'
;
import
Icon
from
'react-native-vector-icons/MaterialIcons'
;
import
TextField
from
'../../../components/Input/TextField'
;
import
TextField
from
'../../../components/Input/TextField'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
Dropdown
from
'../../../components/DropdownAlert/Dropdown'
;
import
Dropdown
from
'../../../components/DropdownAlert/Dropdown'
;
...
@@ -30,37 +29,37 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
...
@@ -30,37 +29,37 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
attachments
:
[],
attachments
:
[],
});
});
const
[
dataList
,
setDataList
]
=
useState
([
const
[
dataList
,
setDataList
]
=
useState
([
{
id
:
1
,
name
:
'Nguyễn Minh Đức'
},
{
id
:
1
,
name
:
'Nguyễn Minh Đức'
},
{
id
:
2
,
name
:
'Trần Văn Hùng'
},
{
id
:
2
,
name
:
'Trần Văn Hùng'
},
{
id
:
3
,
name
:
'Lê Thị Mai'
},
{
id
:
3
,
name
:
'Lê Thị Mai'
},
{
id
:
4
,
name
:
'Phạm Quốc Khánh'
},
{
id
:
4
,
name
:
'Phạm Quốc Khánh'
},
{
id
:
5
,
name
:
'Hoàng Anh Tuấn'
},
{
id
:
5
,
name
:
'Hoàng Anh Tuấn'
},
{
id
:
6
,
name
:
'Vũ Thị Hằng'
},
{
id
:
6
,
name
:
'Vũ Thị Hằng'
},
{
id
:
7
,
name
:
'Ngô Văn Nam'
},
{
id
:
7
,
name
:
'Ngô Văn Nam'
},
{
id
:
8
,
name
:
'Đinh Thị Lan'
},
{
id
:
8
,
name
:
'Đinh Thị Lan'
},
{
id
:
9
,
name
:
'Bùi Văn Phúc'
},
{
id
:
9
,
name
:
'Bùi Văn Phúc'
},
{
id
:
10
,
name
:
'Lý Thị Hoa'
},
{
id
:
10
,
name
:
'Lý Thị Hoa'
},
{
id
:
11
,
name
:
'Phan Minh Hoàng'
},
{
id
:
11
,
name
:
'Phan Minh Hoàng'
},
{
id
:
12
,
name
:
'Tạ Thị Hương'
},
{
id
:
12
,
name
:
'Tạ Thị Hương'
},
{
id
:
13
,
name
:
'Đoàn Văn Dũng'
},
{
id
:
13
,
name
:
'Đoàn Văn Dũng'
},
{
id
:
14
,
name
:
'Nguyễn Thị Vân'
},
{
id
:
14
,
name
:
'Nguyễn Thị Vân'
},
{
id
:
15
,
name
:
'Trương Văn Long'
},
{
id
:
15
,
name
:
'Trương Văn Long'
},
{
id
:
16
,
name
:
'Mai Thị Ngọc'
},
{
id
:
16
,
name
:
'Mai Thị Ngọc'
},
{
id
:
17
,
name
:
'Huỳnh Quốc Việt'
},
{
id
:
17
,
name
:
'Huỳnh Quốc Việt'
},
{
id
:
18
,
name
:
'Lâm Thị Thu'
},
{
id
:
18
,
name
:
'Lâm Thị Thu'
},
{
id
:
19
,
name
:
'Nguyễn Hữu Tài'
},
{
id
:
19
,
name
:
'Nguyễn Hữu Tài'
},
{
id
:
20
,
name
:
'Phạm Thị Kim'
}
{
id
:
20
,
name
:
'Phạm Thị Kim'
},
]);
]);
const
categoryData
=
[
const
categoryData
=
[
{
name
:
'Công việc theo văn bản'
,
value
:
'document'
},
{
name
:
'Công việc theo văn bản'
,
value
:
'document'
},
{
name
:
'Công việc khác'
,
value
:
'other'
},
{
name
:
'Công việc khác'
,
value
:
'other'
},
];
];
const
items
=
[
const
items
=
[
{
id
:
1
,
label
:
'Option 1'
},
{
id
:
1
,
label
:
'Option 1'
},
{
id
:
2
,
label
:
'Option 2'
},
{
id
:
2
,
label
:
'Option 2'
},
{
id
:
3
,
label
:
'Option 3'
},
{
id
:
3
,
label
:
'Option 3'
},
];
];
const
responsibleData
=
[
const
responsibleData
=
[
...
@@ -179,7 +178,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
...
@@ -179,7 +178,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
scrollEnabled
=
{
true
}
scrollEnabled
=
{
true
}
/
>
/
>
<
View
style
=
{
styles
.
containerDropDown
}
>
<
View
style
=
{
styles
.
containerDropDown
}
>
<
Text
<
Text
style
=
{[
style
=
{[
styles
.
text
,
styles
.
text
,
...
@@ -217,14 +216,14 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
...
@@ -217,14 +216,14 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
scrollEnabled
=
{
true
}
scrollEnabled
=
{
true
}
/
>
/
>
<
TextField
<
TextField
title
=
"Ngày đến hạn"
title
=
"Ngày đến hạn"
required
required
value
=
{
formData
.
title
}
value
=
{
formData
.
title
}
containerMarginBottom
=
{
10
}
containerMarginBottom
=
{
10
}
/
>
/
>
<
View
style
=
{
styles
.
containerDropDown
}
>
<
View
style
=
{
styles
.
containerDropDown
}
>
<
Text
<
Text
style
=
{[
style
=
{[
styles
.
text
,
styles
.
text
,
...
@@ -261,7 +260,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
...
@@ -261,7 +260,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
scrollEnabled
=
{
true
}
scrollEnabled
=
{
true
}
/
>
/
>
<
View
style
=
{
styles
.
containerDropDown
}
>
<
View
style
=
{
styles
.
containerDropDown
}
>
<
Text
<
Text
style
=
{[
style
=
{[
styles
.
text
,
styles
.
text
,
...
@@ -282,7 +281,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
...
@@ -282,7 +281,7 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
/
>
/
>
<
/View
>
<
/View
>
<
Text
style
=
{[
styles
.
text_2
,
{
marginBottom
:
3
}]}
>
<
Text
style
=
{[
styles
.
text_2
,
{
marginBottom
:
3
}]}
>
Danh
s
á
ch
ng
ườ
i
th
ự
c
hi
ệ
n
c
ô
ng
vi
ệ
c
Danh
s
á
ch
ng
ườ
i
th
ự
c
hi
ệ
n
c
ô
ng
vi
ệ
c
<
/Text
>
<
/Text
>
<
FlatList
<
FlatList
data
=
{
dataList
}
data
=
{
dataList
}
...
@@ -298,34 +297,31 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
...
@@ -298,34 +297,31 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
scrollEnabled
=
{
true
}
scrollEnabled
=
{
true
}
/
>
/
>
{
/* Action Buttons */
}
<
View
style
=
{
styles
.
buttonContainer
}
>
<
View
style
=
{
styles
.
buttonContainer
}
>
<
Button
title
=
"Hủy"
textColor
=
{
R
.
colors
.
white
}
onPress
=
{
handleCancel
}
backgroundColor
=
{
R
.
colors
.
orange
}
fontSize
=
{
R
.
sizes
.
sm
}
fontFamily
=
{
R
.
fonts
.
fontMedium
}
height
=
{
35
}
width
=
{
100
}
containerStyle
=
{{
paddingHorizontal
:
15
,
borderRadius
:
30
}}
/
>
<
Button
<
Button
title
=
"Thêm mới"
title
=
"Hủy"
textColor
=
{
R
.
colors
.
white
}
textColor
=
{
R
.
colors
.
white
}
onPress
=
{
handleSave
}
onPress
=
{
handleCancel
}
backgroundColor
=
{
R
.
colors
.
blue
}
backgroundColor
=
{
R
.
colors
.
orange
}
fontSize
=
{
R
.
sizes
.
sm
}
fontSize
=
{
R
.
sizes
.
sm
}
fontFamily
=
{
R
.
fonts
.
fontMedium
}
fontFamily
=
{
R
.
fonts
.
fontMedium
}
height
=
{
35
}
height
=
{
35
}
width
=
{
100
}
width
=
{
100
}
containerStyle
=
{{
paddingHorizontal
:
15
,
borderRadius
:
30
}}
containerStyle
=
{{
paddingHorizontal
:
15
,
borderRadius
:
30
}}
/
>
/
>
<
/View
>
<
Button
title
=
"Thêm mới"
textColor
=
{
R
.
colors
.
white
}
onPress
=
{
handleSave
}
backgroundColor
=
{
R
.
colors
.
blue
}
fontSize
=
{
R
.
sizes
.
sm
}
fontFamily
=
{
R
.
fonts
.
fontMedium
}
height
=
{
35
}
width
=
{
100
}
containerStyle
=
{{
paddingHorizontal
:
15
,
borderRadius
:
30
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -333,162 +329,4 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
...
@@ -333,162 +329,4 @@ const AddWorkModal = ({visible, onClose, onSave}) => {
);
);
};
};
const
styles
=
StyleSheet
.
create
({
overlay
:
{
flex
:
1
,
backgroundColor
:
R
.
colors
.
blackShadow
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
modalContainer
:
{
backgroundColor
:
'white'
,
borderRadius
:
15
,
maxHeight
:
'70%'
,
paddingVertical
:
20
,
marginHorizontal
:
15
,
},
header
:
{
alignItems
:
'center'
,
paddingBottom
:
20
,
marginHorizontal
:
20
,
},
headerTitle
:
{
fontSize
:
R
.
fontsize
.
fontsSizeTitle
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontWeight
:
'600'
,
color
:
R
.
colors
.
blue
,
},
formContainer
:
{
paddingHorizontal
:
20
,
},
fieldContainer
:
{
marginBottom
:
20
,
},
containerDropDown
:{
marginBottom
:
10
},
imageIcon
:{
width
:
15
,
height
:
15
,
},
label
:
{
fontSize
:
R
.
fontsize
.
fontSizeLabel
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontWeight
:
'600'
,
color
:
R
.
colors
.
black
,
},
required
:
{
color
:
'red'
,
},
textInput
:
{
borderWidth
:
1
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderRadius
:
10
,
paddingHorizontal
:
10
,
paddingVertical
:
5
,
},
textArea
:
{
height
:
80
,
textAlignVertical
:
'top'
,
},
flatListSelect
:{
flexDirection
:
'row'
,
flexWrap
:
'wrap'
,
},
textChip
:{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontWeight
:
'400'
,
fontFamily
:
R
.
fonts
.
fontRegular
,
color
:
R
.
colors
.
blueTextChip
,
},
text_2
:{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontWeight
:
'600'
,
color
:
R
.
colors
.
black
,
},
pickerContainer
:
{
borderWidth
:
1
,
borderColor
:
'#ddd'
,
borderRadius
:
8
,
backgroundColor
:
'white'
,
},
datePickerContainer
:
{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
,
borderWidth
:
1
,
borderColor
:
'#ddd'
,
borderRadius
:
8
,
paddingHorizontal
:
12
,
paddingVertical
:
12
,
backgroundColor
:
'white'
,
},
datePickerText
:
{
fontSize
:
14
,
color
:
'#666'
,
},
containerIcon
:{
marginRight
:
2
},
fileUploadContainer
:
{
borderWidth
:
2
,
borderColor
:
'#ddd'
,
borderStyle
:
'dashed'
,
borderRadius
:
8
,
paddingVertical
:
30
,
alignItems
:
'center'
,
backgroundColor
:
'#f9f9f9'
,
},
fileUploadText
:
{
marginTop
:
8
,
fontSize
:
14
,
color
:
R
.
colors
.
blue
,
fontWeight
:
'500'
,
},
buttonContainer
:
{
flexDirection
:
'row'
,
justifyContent
:
'flex-end'
,
paddingHorizontal
:
20
,
paddingTop
:
20
,
gap
:
10
,
},
cancelButton
:
{
flex
:
1
,
justifyContent
:
'center'
,
backgroundColor
:
R
.
colors
.
orange
,
alignItems
:
'center'
,
},
cancelButtonText
:
{
fontSize
:
16
,
color
:
'#666'
,
fontWeight
:
'500'
,
},
saveButton
:
{
flex
:
1
,
paddingVertical
:
12
,
borderRadius
:
8
,
backgroundColor
:
R
.
colors
.
blue
,
alignItems
:
'center'
,
},
saveButtonText
:
{
fontSize
:
16
,
color
:
'white'
,
fontWeight
:
'500'
,
},
chip
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
// position: 'relative',
paddingLeft
:
10
,
paddingRight
:
10
,
height
:
25
,
borderRadius
:
10
,
marginBottom
:
10
,
marginRight
:
5
,
backgroundColor
:
R
.
colors
.
blue2
,
alignSelf
:
'flex-start'
},
});
export
default
AddWorkModal
;
export
default
AddWorkModal
;
src/screens/list_work/style.js
View file @
9fce00aa
import
{
StyleSheet
,
Text
,
View
}
from
'react-native'
import
{
StyleSheet
,
Text
,
View
}
from
'react-native'
;
import
R
from
'../../assets/R'
import
R
from
'../../assets/R'
;
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{
container
:
{
flex
:
1
,
flex
:
1
,
backgroundColor
:
R
.
colors
.
white
backgroundColor
:
R
.
colors
.
white
,
},
},
body
:
{
body
:
{
flex
:
1
,
flex
:
1
,
backgroundColor
:
R
.
colors
.
white
backgroundColor
:
R
.
colors
.
white
,
},
},
card
:
{
card
:
{
borderWidth
:
1
,
borderWidth
:
1
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderRadius
:
10
,
borderRadius
:
10
,
padding
:
5
,
padding
:
5
,
marginTop
:
15
,
marginTop
:
15
,
marginBottom
:
15
,
marginBottom
:
15
,
marginHorizontal
:
15
,
marginHorizontal
:
15
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
shadowColor
:
R
.
colors
.
black
,
shadowColor
:
R
.
colors
.
black
,
shadowOffset
:{
width
:
0.5
,
height
:
2
},
shadowOffset
:
{
width
:
0.5
,
height
:
2
},
shadowOpacity
:
Platform
.
OS
===
'ios'
?
0.25
:
1
,
shadowOpacity
:
Platform
.
OS
===
'ios'
?
0.25
:
1
,
shadowRadius
:
5
,
shadowRadius
:
5
,
elevation
:
Platform
.
OS
===
'ios'
?
1
:
2
,
elevation
:
Platform
.
OS
===
'ios'
?
1
:
2
,
},
},
btnCard
:
{
btnCard
:
{
borderRadius
:
10
,
borderRadius
:
10
,
borderWidth
:
1
,
borderWidth
:
1
,
padding
:
5
,
padding
:
5
,
width
:
'100%'
,
width
:
'100%'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
},
},
text
:
{
text
:
{
fontSize
:
R
.
sizes
.
sm
,
fontSize
:
R
.
sizes
.
sm
,
color
:
R
.
colors
.
black
,
color
:
R
.
colors
.
black
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontWeight
:
'400'
,
fontWeight
:
'400'
,
},
},
searchBox
:
{
searchBox
:
{
flex
:
1
,
flex
:
1
,
borderWidth
:
1
,
borderWidth
:
1
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderRadius
:
20
,
borderRadius
:
20
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'flex-start'
,
justifyContent
:
'flex-start'
,
paddingLeft
:
15
,
paddingLeft
:
15
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
height
:
42
height
:
42
,
},
},
box_3
:
{
box_3
:
{
flexDirection
:
'row'
,
flexDirection
:
'row'
,
marginHorizontal
:
15
,
marginHorizontal
:
15
,
alignItems
:
'center'
,
alignItems
:
'center'
,
},
},
})
})
;
export
default
styles
export
default
styles
;
\ No newline at end of file
src/screens/list_work/view.js
View file @
9fce00aa
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
,
Image
,
TextInput
}
from
'react-native'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
,
Image
,
TextInput
,
}
from
'react-native'
;
import
styles
from
'./style'
;
import
styles
from
'./style'
;
import
FAB
from
'../../components/FAB/fab'
;
import
FAB
from
'../../components/FAB/fab'
;
import
SubButton
from
'../../components/FAB/sub_button'
;
import
SubButton
from
'../../components/FAB/sub_button'
;
...
@@ -9,15 +16,12 @@ import R from '../../assets/R';
...
@@ -9,15 +16,12 @@ import R from '../../assets/R';
import
TabViewComponent
from
'../../components/TabView'
;
import
TabViewComponent
from
'../../components/TabView'
;
import
AddWorkModal
from
'../list_work/modal_add/index'
;
import
AddWorkModal
from
'../list_work/modal_add/index'
;
const
ListWorkView
=
(
props
)
=>
{
const
ListWorkView
=
props
=>
{
const
{
const
{
searchQuery
,
setSearchQuery
}
=
props
;
searchQuery
,
setSearchQuery
,
}
=
props
;
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
handleFilterChange
=
(
item
)
=>
{
const
handleFilterChange
=
item
=>
{
console
.
log
(
item
);
console
.
log
(
item
);
};
};
...
@@ -25,7 +29,7 @@ const ListWorkView = (props) => {
...
@@ -25,7 +29,7 @@ const ListWorkView = (props) => {
setModalVisible
(
true
);
setModalVisible
(
true
);
};
};
const
handleSaveWork
=
(
workData
)
=>
{
const
handleSaveWork
=
workData
=>
{
console
.
log
(
'Saving work:'
,
workData
);
console
.
log
(
'Saving work:'
,
workData
);
};
};
...
@@ -34,53 +38,51 @@ const ListWorkView = (props) => {
...
@@ -34,53 +38,51 @@ const ListWorkView = (props) => {
};
};
const
renderTabView
=
()
=>
{
const
renderTabView
=
()
=>
{
return
(
<
TabViewComponent
return
(
data
=
{[
<
TabViewComponent
{
key
:
'all'
,
label
:
'Tất cả'
},
data
=
{[
{
key
:
'public'
,
label
:
'Công khai'
},
{
key
:
'all'
,
label
:
'Tất cả'
},
{
key
:
'private'
,
label
:
'Hạn chế'
},
{
key
:
'public'
,
label
:
'Công khai'
},
{
key
:
'draft'
,
label
:
'Nháp'
},
{
key
:
'private'
,
label
:
'Hạn chế'
},
]}
{
key
:
'draft'
,
label
:
'Nháp'
},
tabStyle
=
{{
]}
backgroundColor
:
R
.
colors
.
gray
,
tabStyle
=
{{
marginHorizontal
:
5
,
backgroundColor
:
R
.
colors
.
gray
,
borderRadius
:
10
,
marginHorizontal
:
5
,
width
:
100
,
borderRadius
:
10
,
height
:
35
,
width
:
100
,
justifyContent
:
'center'
,
height
:
35
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
}}
alignItems
:
'center'
,
style
=
{{
}}
marginVertical
:
5
,
style
=
{{
}}
marginVertical
:
5
,
mode
=
"filter"
}}
defaultActiveKey
=
"all"
mode
=
"filter"
scrollable
=
{
true
}
defaultActiveKey
=
"all"
activeTabStyle
=
{{
scrollable
=
{
true
}
backgroundColor
:
R
.
colors
.
blue
,
activeTabStyle
=
{{
}}
backgroundColor
:
R
.
colors
.
blue
,
textStyle
=
{{
}}
color
:
R
.
colors
.
white
,
textStyle
=
{{
fontWeight
:
'400'
,
color
:
R
.
colors
.
white
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontWeight
:
'400'
,
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontSize
:
R
.
fontsize
.
fontSizeContent
,
}}
}}
showActiveIndicator
=
{
false
}
showActiveIndicator
=
{
false
}
onFilterChange
=
{
handleFilterChange
}
onFilterChange
=
{
handleFilterChange
}
/
>
/>
);
)
};
}
return
(
return
(
<
View
<
View
style
=
{
styles
.
container
}
>
style
=
{
styles
.
container
}
>
<
Header
title
=
{
'Danh sách công việc'
}
isBack
/>
<
Header
title
=
{
'Danh sách công việc'
}
isBack
/>
<
View
style
=
{
styles
.
body
}
>
<
View
style
=
{
styles
.
body
}
>
{
renderTabView
()}
{
renderTabView
()}
<
View
style
=
{{
marginBottom
:
15
}}
>
<
View
style
=
{{
marginBottom
:
15
}}
>
<
View
style
=
{
styles
.
card
}
>
<
View
style
=
{
styles
.
card
}
>
<
TouchableOpacity
style
=
{
styles
.
btnCard
}
>
<
TouchableOpacity
style
=
{
styles
.
btnCard
}
>
<
Text
style
=
{
styles
.
text
}
>
H
ọ
c
k
ỳ
2
,
N
ă
m
2025
<
/Text
>
<
Text
style
=
{
styles
.
text
}
>
H
ọ
c
k
ỳ
2
,
N
ă
m
2025
<
/Text
>
...
@@ -93,42 +95,37 @@ const ListWorkView = (props) => {
...
@@ -93,42 +95,37 @@ const ListWorkView = (props) => {
source
=
{
R
.
images
.
icSearch
}
source
=
{
R
.
images
.
icSearch
}
style
=
{{
width
:
20
,
height
:
20
}}
style
=
{{
width
:
20
,
height
:
20
}}
/
>
/
>
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
TextInput
<
TextInput
placeholder
=
"Tìm kiếm"
placeholder
=
"Tìm kiếm"
style
=
{
styles
.
text
}
style
=
{
styles
.
text
}
value
=
{
searchQuery
}
value
=
{
searchQuery
}
onChangeText
=
{
setSearchQuery
}
onChangeText
=
{
setSearchQuery
}
/
>
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.1
}}
><
/View
>
<
View
style
=
{{
flex
:
0.1
}}
><
/View
>
<
View
style
=
{
styles
.
boxFilter
}
>
<
View
style
=
{
styles
.
boxFilter
}
>
<
Dropdown
title
=
{
'Tìm kiếm'
}
height
=
{
40
}
/
>
<
Dropdown
title
=
{
'Tìm kiếm'
}
height
=
{
40
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
FAB
>
<
SubButton
onPress
=
{
handleAddWork
}
label
=
"Tạo công việc"
images
=
{
R
.
images
.
icMenuEdit
}
backgroundColor
=
{
R
.
colors
.
blue
}
/
>
<
/FAB
>
<
AddWorkModal
visible
=
{
modalVisible
}
<
/View
>
onClose
=
{
handleCloseModal
}
<
FAB
>
onSave
=
{
handleSaveWork
}
<
SubButton
onPress
=
{
handleAddWork
}
label
=
"Tạo công việc"
images
=
{
R
.
images
.
icMenuEdit
}
backgroundColor
=
{
R
.
colors
.
blue
}
/
>
/
>
<
/FAB
>
<
AddWorkModal
visible
=
{
modalVisible
}
onClose
=
{
handleCloseModal
}
onSave
=
{
handleSaveWork
}
/
>
<
/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