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
89bcaa81
Commit
89bcaa81
authored
Aug 19, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã hoàn thiện giao diện lịch báo nghỉ theo học phần
parent
05fb9e37
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
231 additions
and
19 deletions
+231
-19
colors.js
src/assets/colors.js
+1
-0
StackNavigation.js
src/routers/StackNavigation.js
+1
-1
index.js
src/screens/list_rest_report/detail/index.js
+69
-2
style.js
src/screens/list_rest_report/detail/style.js
+28
-1
view.js
src/screens/list_rest_report/detail/view.js
+132
-15
No files found.
src/assets/colors.js
View file @
89bcaa81
...
@@ -22,6 +22,7 @@ const colors = {
...
@@ -22,6 +22,7 @@ const colors = {
brown
:
'rgba(254, 184, 91, 0.55)'
,
brown
:
'rgba(254, 184, 91, 0.55)'
,
green
:
'rgba(0, 255, 21, 1)'
,
green
:
'rgba(0, 255, 21, 1)'
,
green1
:
'rgb(9, 193, 25)'
,
red
:
'rgba(255, 47, 48, 1)'
,
red
:
'rgba(255, 47, 48, 1)'
,
...
...
src/routers/StackNavigation.js
View file @
89bcaa81
...
@@ -24,7 +24,7 @@ function MyStack(props) {
...
@@ -24,7 +24,7 @@ function MyStack(props) {
headerStatusBarHeight
:
0
,
headerStatusBarHeight
:
0
,
}}
}}
headerMode
=
{
'none'
}
headerMode
=
{
'none'
}
initialRouteName
=
{
ScreenName
.
REGISTERABSENC
E
}
>
initialRouteName
=
{
ScreenName
.
ABSENCELISTBYCOURS
E
}
>
<
Stack
.
Screen
name
=
{
ScreenName
.
HOMESCREEN
}
component
=
{
Home
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
HOMESCREEN
}
component
=
{
Home
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
TABNAVIGATOR
}
component
=
{
TabNavigator
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
TABNAVIGATOR
}
component
=
{
TabNavigator
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
DETAILNOTIFICATION
}
component
=
{
NotificationDetail
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
DETAILNOTIFICATION
}
component
=
{
NotificationDetail
}
/
>
...
...
src/screens/list_rest_report/detail/index.js
View file @
89bcaa81
import
React
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Text
,
View
,
StyleSheet
}
from
'react-native'
;
import
{
Text
,
View
,
StyleSheet
}
from
'react-native'
;
import
AbsenceListByCourseView
from
'./view'
;
import
AbsenceListByCourseView
from
'./view'
;
const
AbsenceListByCourse
=
(
props
)
=>
{
const
AbsenceListByCourse
=
(
props
)
=>
{
const
[
item
,
setItem
]
=
useState
({
rest
:
5
,
compensate
:
0
,
total
:
25
,
});
const
[
listData
,
setDataList
]
=
useState
([
{
id
:
1
,
date
:
'2024-01-01'
,
status
:
'Đã xác nhận'
,
dayOfWeek
:
'Thứ 2'
,
periods
:[
{
id
:
1
,
time
:
'6'
,
},
{
id
:
2
,
time
:
'7'
,
},
{
id
:
3
,
time
:
'8'
,
},
{
id
:
4
,
time
:
'9'
,
}
],
dateStudy
:
'30/07/2025'
,
location
:
'Phòng B2.12'
,
teacher
:
'Nguyễn Minh Đức'
,
note
:
''
,
},
{
id
:
2
,
date
:
'2024-01-01'
,
status
:
'Chờ phê duyệt'
,
dayOfWeek
:
'Thứ 2'
,
periods
:[
{
id
:
1
,
time
:
'6'
,
},
{
id
:
2
,
time
:
'7'
,
},
{
id
:
3
,
time
:
'8'
,
},
{
id
:
4
,
time
:
'9'
,
}
],
dateStudy
:
'30/07/2025'
,
location
:
'Phòng B2.12'
,
teacher
:
''
,
note
:
''
,
},
])
return
(
return
(
<
AbsenceListByCourseView
/>
<
AbsenceListByCourseView
item
=
{
item
}
listData
=
{
listData
}
/
>
);
);
};
};
...
...
src/screens/list_rest_report/detail/style.js
View file @
89bcaa81
import
{
StyleSheet
,
Text
,
View
}
from
'react-native'
import
{
StyleSheet
,
Text
,
View
}
from
'react-native'
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
},
text
:{
fontSize
:
R
.
fontsize
.
fontSizeSubTitle
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontWeight
:
'400'
,
color
:
R
.
colors
.
black
,
},
card
:{
borderRadius
:
10
,
marginVertical
:
10
,
backgroundColor
:
R
.
colors
.
white
,
shadowColor
:
R
.
colors
.
black
,
shadowOffset
:{
width
:
0
,
height
:
2
},
shadowOpacity
:
Platform
.
OS
===
'ios'
?
0.25
:
1
,
shadowRadius
:
5
,
elevation
:
Platform
.
OS
===
'ios'
?
1
:
2
,
marginHorizontal
:
15
,
}
})
})
export
default
styles
export
default
styles
\ No newline at end of file
src/screens/list_rest_report/detail/view.js
View file @
89bcaa81
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'
;
import
R
from
'../../../assets/R'
;
import
Button
from
'../../../components/Button'
;
const
AbsenceListByCourseView
=
props
=>
{
const
{
item
,
listData
}
=
props
;
const
getColor
=
status
=>
{
switch
(
status
)
{
case
'Đã xác nhận'
:
return
R
.
colors
.
green1
;
case
'Chờ phê duyệt'
:
return
R
.
colors
.
blue
;
}
};
const
renderItem
=
({
item
})
=>
{
return
(
<
View
style
=
{
styles
.
card
}
>
<
View
style
=
{{
backgroundColor
:
R
.
colors
.
white
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
,
}}
>
<
View
style
=
{{
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
,
backgroundColor
:
getColor
(
item
.
status
)}}
>
<
Text
style
=
{[
styles
.
text
,
{
fontSize
:
R
.
sizes
.
sm
,
paddingHorizontal
:
10
,
paddingVertical
:
2
,
color
:
R
.
colors
.
white
,
fontWeight
:
'bold'
,
fontFamily
:
R
.
fonts
.
fontMedium
,}]}
>
<
Text
style
=
{{
fontSize
:
R
.
sizes
.
sm
,
color
:
R
.
colors
.
white
}}
>
{
item
.
status
}
<
/Text
>
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
paddingHorizontal
:
10
,
paddingTop
:
3
,
paddingBottom
:
10
}}
>
{
/* Row 1 */
}
<
View
style
=
{{
flexDirection
:
'row'
,
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
Text
style
=
{[
styles
.
text
,
{
fontSize
:
11
}]}
>
Ng
à
y
b
á
o
ngh
ỉ
:
{
item
.
date
}
<
/Text
>
<
/View
>
{
/* <View style={{flex: 1}}>
<Text style={[styles.text, {fontSize: R.sizes.sm}]}>
Tình trạng: <Text style={{color: getColor(item.status)}}>{item.status}</Text>
</Text>
</View> */
}
<
/View
>
{
/* Row 2 */
}
<
View
>
<
Text
style
=
{[
styles
.
text
,
{
fontSize
:
11
}]}
>
Th
ờ
i
gian
ngh
ỉ
:{
item
.
dayOfWeek
}
-
Ti
ế
t
:{
' '
}
{
item
.
periods
.
map
((
item
,
index
)
=>
{
return
<
Text
key
=
{
index
}
>
{
item
.
time
},
<
/Text>
;
})}{
' '
}
-
Ng
à
y
:{
item
.
dateStudy
}
<
/Text
>
<
/View
>
{
/* Row 3 */
}
<
View
style
=
{{}}
>
<
Text
style
=
{[
styles
.
text
,
{
fontSize
:
11
}]}
>
Đị
a
đ
i
ể
m
:
{
item
.
location
}
<
/Text
>
<
/View
>
{
/* Row 4 */
}
<
View
style
=
{{}}
>
<
Text
style
=
{[
styles
.
text
,
{
fontSize
:
11
}]}
>
Gi
ả
ng
vi
ê
n
thay
th
ế
:
{
item
.
teacher
}
<
/Text
>
<
/View
>
{
/* Row 5 */
}
<
View
style
=
{{}}
>
<
Text
style
=
{[
styles
.
text
,
{
fontSize
:
11
}]}
>
Ghi
ch
ú
:
{
item
.
note
}
<
/Text
>
<
/View
>
{
item
.
status
===
'Đã xác nhận'
&&
(
<
View
style
=
{{
alignItems
:
'flex-end'
}}
>
<
Button
title
=
'Báo bù'
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>
)
}
{
item
.
status
===
'Chờ phê duyệt'
&&
(
<
View
style
=
{{
alignItems
:
'flex-end'
}}
>
<
Button
title
=
'Huỷ'
onPress
=
{()
=>
{}}
backgroundColor
=
{
R
.
colors
.
brown
}
textColor
=
{
R
.
colors
.
white
}
height
=
{
25
}
width
=
{
90
}
borderRadius
=
{
15
}
fontSize
=
{
11
}
fontWeight
=
{
'600'
}
fontFamily
=
{
R
.
fonts
.
fontMedium
}
paddingHorizontal
=
{
15
}
/
>
<
/View>
)
}
<
/View
>
<
/View
>
);
};
const
AbsenceListByCourseView
=
(
props
)
=>
{
const
{
}
=
props
;
return
(
return
(
<
View
<
View
style
=
{
styles
.
container
}
>
style
=
{{
<
Header
title
=
{
'ATTT2024.1'
}
isBack
/>
flex
:
1
,
<
View
style
=
{
styles
.
body
}
>
justifyContent
:
'center'
,
<
View
style
=
{{
alignItems
:
'center'
,
marginTop
:
10
}}
>
alignItems
:
'center'
,
<
Text
style
=
{[
styles
.
text
]}
>
Ngh
ỉ
/
B
ù
/
T
ổ
ng
<
/Text
>
}}
>
<
Text
style
=
{[
styles
.
text
]}
>
<
TouchableOpacity
>
{
item
.
rest
}
/ {item.compensate} /
{
item
.
total
}
<
Text
>
AbsenceListByCourse
<
/Text
>
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
FlatList
data
=
{
listData
||
[]}
renderItem
=
{
renderItem
}
showsVerticalScrollIndicator
=
{
false
}
vertical
keyExtractor
=
{(
item
,
index
)
=>
`
${
index
}
`
}
/
>
<
/View
>
<
/View
>
<
/View
>
);
);
};
};
export
default
AbsenceListByCourseView
;
export
default
AbsenceListByCourseView
;
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