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
3804c1b7
Commit
3804c1b7
authored
Sep 04, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã bổ sung button logic
parent
5d0804e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
12 deletions
+61
-12
view.js
src/screens/list_work/view.js
+61
-12
No files found.
src/screens/list_work/view.js
View file @
3804c1b7
...
...
@@ -98,6 +98,65 @@ const ListWorkView = props => {
);
};
const
renderReportButton
=
(
item
)
=>
{
// Hide report button for completed, needs editing, and waiting for report status
if
(
item
.
status
===
'Đã hoàn thành'
||
item
.
status
===
'Cần chỉnh sửa'
||
item
.
status
===
'Đợi báo cáo'
)
{
return
null
;
}
// Special case for "Chờ duyệt" - show two buttons
if
(
item
.
status
===
'Chờ duyệt'
)
{
return
(
<>
<
Button
title
=
"Cần chỉnh sửa"
onPress
=
{()
=>
{}}
backgroundColor
=
{
R
.
colors
.
orange
}
textColor
=
{
R
.
colors
.
white
}
fontSize
=
{
R
.
fontsize
.
fontSizeContent
}
height
=
{
35
}
width
=
{
100
}
containerStyle
=
{{
marginRight
:
10
,
borderRadius
:
20
}}
/
>
<
Button
title
=
"Phê duyệt"
onPress
=
{()
=>
{}}
backgroundColor
=
{
R
.
colors
.
green
}
textColor
=
{
R
.
colors
.
white
}
fontSize
=
{
R
.
fontsize
.
fontSizeContent
}
height
=
{
35
}
width
=
{
100
}
containerStyle
=
{{
marginRight
:
10
,
borderRadius
:
20
}}
/
>
<
/
>
);
}
let
buttonTitle
=
'Báo cáo'
;
switch
(
item
.
status
)
{
case
'Đang thực hiện'
:
buttonTitle
=
'Yêu cầu báo cáo'
;
break
;
default
:
buttonTitle
=
'Báo cáo'
;
break
;
}
return
(
<
Button
title
=
{
buttonTitle
}
onPress
=
{()
=>
{}}
backgroundColor
=
{
R
.
colors
.
orange
}
textColor
=
{
R
.
colors
.
white
}
fontSize
=
{
R
.
fontsize
.
fontSizeContent
}
height
=
{
35
}
width
=
{
120
}
containerStyle
=
{{
marginRight
:
10
,
borderRadius
:
20
}}
/
>
);
};
const
renderListView
=
(
{
item
}
)
=>
{
return
(
<
View
style
=
{{
marginHorizontal
:
15
,
marginVertical
:
10
}}
>
...
...
@@ -122,17 +181,7 @@ const ListWorkView = props => {
<
Text
style
=
{
styles
.
subText
}
>
{
item
.
document
}
<
/Text
>
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'flex-end'
,
marginTop
:
10
}}
>
<
Button
title
=
"Báo cáo"
onPress
=
{()
=>
{}}
backgroundColor
=
{
R
.
colors
.
orange
}
textColor
=
{
R
.
colors
.
white
}
fontSize
=
{
R
.
fontsize
.
fontSizeContent
}
height
=
{
35
}
width
=
{
100
}
containerStyle
=
{{
marginRight
:
10
,
borderRadius
:
20
}}
/
>
{
renderReportButton
(
item
)}
<
Button
title
=
"Chi tiết"
onPress
=
{()
=>
navigation
.
navigate
(
ScreenName
.
DETAILWORK
)}
...
...
@@ -179,7 +228,7 @@ const ListWorkView = props => {
<
/View
>
<
View
style
=
{{
flex
:
0.1
}}
><
/View
>
<
View
style
=
{
styles
.
boxFilter
}
>
<
View
style
=
{
{
flex
:
1
}
}
>
<
Dropdown
title
=
{
'Tìm kiếm'
}
height
=
{
40
}
/
>
<
/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