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
c5884469
Commit
c5884469
authored
Sep 15, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã bổ sung chỉnh sửa lại filter cho cố vấn học tập
parent
ffbf4592
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
30 deletions
+36
-30
index.js
src/screens/academic_advisor/list_student/index.js
+7
-8
style.js
src/screens/academic_advisor/list_student/style.js
+3
-1
view.js
src/screens/academic_advisor/list_student/view.js
+24
-17
style.js
src/screens/academic_advisor/style.js
+2
-4
No files found.
src/screens/academic_advisor/list_student/index.js
View file @
c5884469
import
React
,
{
useMemo
,
useState
}
from
'react'
;
import
React
,
{
useMemo
,
useState
}
from
'react'
;
import
{
Text
,
View
,
StyleSheet
}
from
'react-native'
;
import
ListStudentView
from
'./view'
;
import
ListStudentView
from
'./view'
;
const
ListStudent
=
props
=>
{
const
ListStudent
=
props
=>
{
...
@@ -7,12 +6,6 @@ const ListStudent = props => {
...
@@ -7,12 +6,6 @@ const ListStudent = props => {
const
handleSearchChange
=
text
=>
{
const
handleSearchChange
=
text
=>
{
setSearchText
(
text
);
setSearchText
(
text
);
};
};
const
filter
=
useMemo
(()
=>
{
if
(
!
searchText
.
trim
())
return
dataListStudent
;
return
dataListStudent
.
filter
(
item
=>
item
.
name
.
toLowerCase
().
includes
(
searchText
.
toLowerCase
()),
);
},
[
dataListStudent
,
searchText
]);
const
[
dataListStudent
,
setDataListStudent
]
=
useState
([
const
[
dataListStudent
,
setDataListStudent
]
=
useState
([
{
{
...
@@ -286,6 +279,12 @@ const ListStudent = props => {
...
@@ -286,6 +279,12 @@ const ListStudent = props => {
tele_phone
:
'0978899221'
,
tele_phone
:
'0978899221'
,
},
},
]);
]);
const
filterData
=
dataListStudent
.
filter
(
item
=>
{
const
matchSearch
=
item
.
name
.
toLowerCase
().
includes
(
searchText
.
toLowerCase
());
return
matchSearch
;
})
const
getStatusColor
=
status
=>
{
const
getStatusColor
=
status
=>
{
const
statusColor
=
{
const
statusColor
=
{
'Đang học'
:
'#4CAF50'
,
'Đang học'
:
'#4CAF50'
,
...
@@ -311,7 +310,7 @@ const ListStudent = props => {
...
@@ -311,7 +310,7 @@ const ListStudent = props => {
<
ListStudentView
<
ListStudentView
searchText
=
{
searchText
}
searchText
=
{
searchText
}
onSearchChange
=
{
handleSearchChange
}
onSearchChange
=
{
handleSearchChange
}
filter
=
{
dataListStudent
}
dataListStudent
=
{
filterData
}
statusStats
=
{
statusStats
}
statusStats
=
{
statusStats
}
/
>
/
>
);
);
...
...
src/screens/academic_advisor/list_student/style.js
View file @
c5884469
...
@@ -68,8 +68,8 @@ const styles = StyleSheet.create({
...
@@ -68,8 +68,8 @@ const styles = StyleSheet.create({
},
},
studentCard
:
{
studentCard
:
{
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
marginVertical
:
10
,
borderRadius
:
15
,
borderRadius
:
15
,
marginBottom
:
15
,
marginHorizontal
:
15
,
marginHorizontal
:
15
,
padding
:
15
,
padding
:
15
,
...
@@ -98,6 +98,8 @@ const styles = StyleSheet.create({
...
@@ -98,6 +98,8 @@ const styles = StyleSheet.create({
height
:
15
,
height
:
15
,
marginHorizontal
:
5
,
marginHorizontal
:
5
,
},
},
containerList
:
{
},
studentInfo
:
{
studentInfo
:
{
flex
:
1
,
flex
:
1
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
...
...
src/screens/academic_advisor/list_student/view.js
View file @
c5884469
...
@@ -15,8 +15,7 @@ import R from '../../../assets/R';
...
@@ -15,8 +15,7 @@ import R from '../../../assets/R';
import
*
as
SCREENNAME
from
'../../../routers/ScreenNames'
;
import
*
as
SCREENNAME
from
'../../../routers/ScreenNames'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
const
ListStudentView
=
props
=>
{
const
ListStudentView
=
props
=>
{
const
{
searchText
,
onSearchChange
,
filter
,
statusStats
}
=
props
;
const
{
searchText
,
onSearchChange
,
dataListStudent
,
statusStats
}
=
props
;
console
.
log
(
props
);
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
const
renderSearchBox
=
()
=>
{
const
renderSearchBox
=
()
=>
{
return
(
return
(
...
@@ -76,7 +75,6 @@ const ListStudentView = props => {
...
@@ -76,7 +75,6 @@ const ListStudentView = props => {
}}
>
}}
>
<
View
style
=
{
styles
.
studentCardContent
}
>
<
View
style
=
{
styles
.
studentCardContent
}
>
<
View
style
=
{
styles
.
studentInfo
}
>
<
View
style
=
{
styles
.
studentInfo
}
>
{
/*Tên sinh viên*/
}
<
View
style
=
{
styles
.
leftSection
}
>
<
View
style
=
{
styles
.
leftSection
}
>
<
Text
style
=
{
styles
.
studentName
}
>
{
item
.
name
}
<
/Text
>
<
Text
style
=
{
styles
.
studentName
}
>
{
item
.
name
}
<
/Text
>
{
isLeftIcon
&&
(
{
isLeftIcon
&&
(
...
@@ -95,9 +93,7 @@ const ListStudentView = props => {
...
@@ -95,9 +93,7 @@ const ListStudentView = props => {
)}
)}
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
rightSection
}
>
<
View
style
=
{
styles
.
rightSection
}
>
{
/*Mã sinh viên*/
}
<
Text
style
=
{
styles
.
studentName
}
>
MSV
:
{
item
.
code_student
}
<
/Text
>
<
Text
style
=
{
styles
.
studentName
}
>
MSV
:
{
item
.
code_student
}
<
/Text
>
{
/*Trạng thái*/
}
<
View
<
View
style
=
{[
style
=
{[
styles
.
statusIndicator
,
styles
.
statusIndicator
,
...
@@ -122,7 +118,6 @@ const ListStudentView = props => {
...
@@ -122,7 +118,6 @@ const ListStudentView = props => {
<
/Text
>
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
rightSection
}
>
<
View
style
=
{
styles
.
rightSection
}
>
{
/*Mã sinh viên*/
}
<
Text
<
Text
style
=
{[
style
=
{[
styles
.
studentName
,
styles
.
studentName
,
...
@@ -146,21 +141,33 @@ const ListStudentView = props => {
...
@@ -146,21 +141,33 @@ const ListStudentView = props => {
return
statusColors
[
status
]
||
'#9E9E9E'
;
return
statusColors
[
status
]
||
'#9E9E9E'
;
};
};
return
(
const
renderListStudent
=
()
=>
{
<
View
style
=
{
styles
.
container
}
>
return
(
<
Header
title
=
{
'Danh sách sinh viên lớp ATTT2024.1'
}
isBack
/>
<
FlatList
data
=
{
dataListStudent
||
[]}
renderItem
=
{
renderStudentItem
}
vertical
keyExtractor
=
{(
item
,
index
)
=>
`
${
index
}
`
}
showsVerticalScrollIndicator
=
{
false
}
containerStyle
=
{
styles
.
containerList
}
/
>
);
};
const
renderBody
=
()
=>
{
return
(
<
View
style
=
{
styles
.
body
}
>
<
View
style
=
{
styles
.
body
}
>
{
renderSearchBox
()}
{
renderSearchBox
()}
{
renderListStatus
()}
{
renderListStatus
()}
<
FlatList
{
renderListStudent
()}
data
=
{
filter
||
[]}
renderItem
=
{
renderStudentItem
}
vertical
keyExtractor
=
{(
item
,
index
)
=>
`
${
index
}
`
}
showsVerticalScrollIndicator
=
{
false
}
contentContainerStyle
=
{{
paddingTop
:
5
}}
/
>
<
/View
>
<
/View
>
);
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
Header
title
=
{
'Danh sách sinh viên lớp ATTT2024.1'
}
isBack
/>
{
renderBody
()}
<
/View
>
<
/View
>
);
);
};
};
...
...
src/screens/academic_advisor/style.js
View file @
c5884469
...
@@ -19,8 +19,7 @@ const styles = StyleSheet.create({
...
@@ -19,8 +19,7 @@ const styles = StyleSheet.create({
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderColor
:
R
.
colors
.
grayBorderInputTextHeader
,
borderRadius
:
10
,
borderRadius
:
10
,
padding
:
5
,
padding
:
5
,
marginTop
:
15
,
marginVertical
:
10
,
marginBottom
:
15
,
marginHorizontal
:
15
,
marginHorizontal
:
15
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
@@ -55,7 +54,6 @@ const styles = StyleSheet.create({
...
@@ -55,7 +54,6 @@ const styles = StyleSheet.create({
},
},
containerCard
:
{
containerCard
:
{
padding
:
10
,
padding
:
10
,
marginBottom
:
15
,
borderRadius
:
10
,
borderRadius
:
10
,
backgroundColor
:
R
.
colors
.
white
,
backgroundColor
:
R
.
colors
.
white
,
shadowColor
:
R
.
colors
.
black
,
shadowColor
:
R
.
colors
.
black
,
...
@@ -64,7 +62,7 @@ const styles = StyleSheet.create({
...
@@ -64,7 +62,7 @@ const styles = StyleSheet.create({
shadowRadius
:
1
,
shadowRadius
:
1
,
elevation
:
Platform
.
OS
===
'ios'
?
1
:
2
,
elevation
:
Platform
.
OS
===
'ios'
?
1
:
2
,
marginHorizontal
:
15
,
marginHorizontal
:
15
,
marginVertical
:
1
5
,
marginVertical
:
1
0
,
},
},
containerEmpty
:
{
containerEmpty
:
{
alignItems
:
'center'
,
alignItems
:
'center'
,
...
...
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