Commit 61131c30 by tungnq

TODO: Đã hoàn thiện giao diện chi tiết điểm danh theo từng lớp

parent 2e1a6c91
import React from 'react'; import React, {useState} from 'react';
import {Text, View, StyleSheet} from 'react-native'; import {Text, View, StyleSheet} from 'react-native';
import DetailRollCallView from './view'; import DetailRollCallView from './view';
const DetailRollCall = (props) => { const DetailRollCall = (props) => {
// Mock data - in real app this would come from API
const [sessionDates] = useState([
'30/06/2025', '06/07/2025', '13/07/2025', '20/07/2025', '27/07/2025',
'04/08/2025', '11/08/2025', '18/08/2025', '25/08/2025', '04/09/2025'
]);
const [studentsData] = useState([
{
id: 1,
studentCode: '85964',
name: 'Hoàng Lâm Anh',
attendance: [1, 1, 1, 1, 1, 1, 1, 1, 1, '*'],
percentage: '0%(0/18)'
},
{
id: 2,
studentCode: '85964',
name: 'Vũ Tuấn Khải',
attendance: [1, 1, 1, 1, 1, 1, 1, 1, 1, '*'],
percentage: '0%(0/18)'
},
{
id: 3,
studentCode: '85964',
name: 'Huỳnh Ngọc Lâm',
attendance: [1, 1, 0, 1, 0, 1, 1, 1, 1, '*'],
percentage: '22%(2/18)'
},
{
id: 4,
studentCode: '85964',
name: 'Nguyễn Đức Mạnh',
attendance: [1, 0, 0, 0, 0, 0, 1, 1, 1, '*'],
percentage: '50%(9/18)'
},
{
id: 5,
studentCode: '85964',
name: 'Vũ Thúy Linh',
attendance: [1, 1, 1, 1, 1, 0, 0, 0, 0, '*'],
percentage: '50%(9/18)'
},
{
id: 6,
studentCode: '85964',
name: 'Vũ Hồng Nhung',
attendance: [1, 1, 0, 0, 1, 1, 0, 1, 0, '*'],
percentage: '50%(9/18)'
}
]);
return ( return (
<DetailRollCallView /> <DetailRollCallView sessionDates={sessionDates} studentsData={studentsData} />
); );
}; };
......
...@@ -18,7 +18,7 @@ const styles = StyleSheet.create({ ...@@ -18,7 +18,7 @@ const styles = StyleSheet.create({
marginBottom:15, marginBottom:15,
}, },
sectionTitle: { sectionTitle: {
fontSize: R.fontsize.fontsSizeTitle, fontSize: R.fontsize.fontSizeSubTitle,
fontWeight: '600', fontWeight: '600',
fontFamily: R.fonts.fontMedium, fontFamily: R.fonts.fontMedium,
color: R.colors.blue, color: R.colors.blue,
...@@ -28,11 +28,10 @@ const styles = StyleSheet.create({ ...@@ -28,11 +28,10 @@ const styles = StyleSheet.create({
attendanceTableContainer: { attendanceTableContainer: {
borderWidth: 1, borderWidth: 1,
borderColor: R.colors.gray3, borderColor: R.colors.gray3,
borderRadius: 8,
marginBottom: 20, marginBottom: 20,
}, },
attendanceTable: { attendanceTable: {
minWidth: 800, // Minimum width to accommodate all columns minWidth: 800,
}, },
attendanceHeaderRow: { attendanceHeaderRow: {
flexDirection: 'row', flexDirection: 'row',
...@@ -103,6 +102,12 @@ const styles = StyleSheet.create({ ...@@ -103,6 +102,12 @@ const styles = StyleSheet.create({
fontWeight: '700', fontWeight: '700',
textAlign: 'center', textAlign: 'center',
}, },
txt:{
fontSize: R.fontsize.fontSizeContent,
fontFamily: R.fonts.fontRegular,
fontWeight: '400',
color: R.colors.black,
}
}) })
export default styles export default styles
\ No newline at end of file
...@@ -6,63 +6,15 @@ import Button from '../../../components/Button'; ...@@ -6,63 +6,15 @@ import Button from '../../../components/Button';
import R from '../../../assets/R'; import R from '../../../assets/R';
const DetailRollCallView = props => { const DetailRollCallView = props => {
const {} = props; const { sessionDates, studentsData } = props;
// Mock data - in real app this would come from API
const [sessionDates] = useState([
'30/06/2025', '06/07/2025', '13/07/2025', '20/07/2025', '27/07/2025',
'04/08/2025', '11/08/2025', '18/08/2025', '25/08/2025', '04/09/2025'
]);
const [studentsData] = useState([
{
id: 1,
studentCode: '85964',
name: 'Hoàng Lâm Anh',
attendance: [1, 1, 1, 1, 1, 1, 1, 1, 1, '*'],
percentage: '0%(0/18)'
},
{
id: 2,
studentCode: '85964',
name: 'Vũ Tuấn Khải',
attendance: [1, 1, 1, 1, 1, 1, 1, 1, 1, '*'],
percentage: '0%(0/18)'
},
{
id: 3,
studentCode: '85964',
name: 'Huỳnh Ngọc Lâm',
attendance: [1, 1, 0, 1, 0, 1, 1, 1, 1, '*'],
percentage: '22%(2/18)'
},
{
id: 4,
studentCode: '85964',
name: 'Nguyễn Đức Mạnh',
attendance: [1, 0, 0, 0, 0, 0, 1, 1, 1, '*'],
percentage: '50%(9/18)'
},
{
id: 5,
studentCode: '85964',
name: 'Vũ Thúy Linh',
attendance: [1, 1, 1, 1, 1, 0, 0, 0, 0, '*'],
percentage: '50%(9/18)'
},
{
id: 6,
studentCode: '85964',
name: 'Vũ Hồng Nhung',
attendance: [1, 1, 0, 0, 1, 1, 0, 1, 0, '*'],
percentage: '50%(9/18)'
}
]);
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Header title={'Thống kê: ATTT2024.P1'} isBack /> <Header title={'Thống kê: ATTT2024.P1'} isBack />
<View style={styles.body}> <View style={styles.body}>
<View style={styles.btnGroup}> <ScrollView vertical showsVerticalScrollIndicator={false}>
<View style={styles.btnGroup}>
<Button <Button
title="Tạo QR điểm danh" title="Tạo QR điểm danh"
onPress={() => {}} onPress={() => {}}
...@@ -74,7 +26,7 @@ const DetailRollCallView = props => { ...@@ -74,7 +26,7 @@ const DetailRollCallView = props => {
backgroundColor={R.colors.orange} backgroundColor={R.colors.orange}
textColor={R.colors.white} textColor={R.colors.white}
fontSize={12} fontSize={12}
height={40} height={35}
width={150} width={150}
/> />
<Button /> <Button />
...@@ -90,26 +42,26 @@ const DetailRollCallView = props => { ...@@ -90,26 +42,26 @@ const DetailRollCallView = props => {
backgroundColor={R.colors.blue} backgroundColor={R.colors.blue}
textColor={R.colors.white} textColor={R.colors.white}
fontSize={12} fontSize={12}
height={40} height={35}
width={150} width={150}
/> />
<Button /> <Button />
</View> </View>
<View> <View>
<Text> <Text style={styles.txt}>
SL sinh viên ngh quá s lượng cho phép: {' '} SL sinh viên ngh quá s lượng cho phép: {' '}
<Text> <Text>
3 3
</Text> </Text>
</Text> </Text>
<Text> <Text style={styles.txt}>
SL sinh viên đang b cnh báo: {' '} SL sinh viên đang b cnh báo: {' '}
<Text> <Text>
1 1
</Text> </Text>
</Text> </Text>
<Text> <Text style={styles.txt}>
SL sinh viên đủ điu kin: {' '} SL sinh viên đủ điu kin: {' '}
<Text> <Text>
3 3
...@@ -118,30 +70,30 @@ const DetailRollCallView = props => { ...@@ -118,30 +70,30 @@ const DetailRollCallView = props => {
</View> </View>
<View> <View>
<Text> <Text style={[styles.txt, {fontSize: R.fontsize.fontSizeSubTitle, fontFamily: R.fonts.fontMedium, fontWeight:'600' , color: R.colors.blue}]}>
Kí hiu Kí hiu
</Text> </Text>
<View style={{flexDirection:'row', justifyContent:'space-between'}}> <View style={{flexDirection:'row', justifyContent:'space-between'}}>
<View> <View>
<Text> <Text style={[styles.txt, {color: R.colors.blue}]}>
(1) (1) {' '}
<Text> <Text style={[styles.txt, {color: R.colors.black, fontFamily: R.fonts.fontMedium, fontWeight:'600'}]}>
Có mt Có mt
</Text> </Text>
</Text> </Text>
</View> </View>
<View> <View>
<Text> <Text style={[styles.txt, {color: R.colors.red}]}>
(0) (0) {' '}
<Text> <Text style={[styles.txt, {color: R.colors.black, fontFamily: R.fonts.fontMedium, fontWeight:'600'}]}>
Vng mt Vng mt
</Text> </Text>
</Text> </Text>
</View> </View>
<View> <View>
<Text> <Text style={[styles.txt, {color: R.colors.blue}]}>
(*) (*) {' '}
<Text> <Text style={[styles.txt, {color: R.colors.black, fontFamily: R.fonts.fontMedium, fontWeight:'600'}]}>
Chưa đến ngày Chưa đến ngày
</Text> </Text>
</Text> </Text>
...@@ -203,6 +155,8 @@ const DetailRollCallView = props => { ...@@ -203,6 +155,8 @@ const DetailRollCallView = props => {
</ScrollView> </ScrollView>
</View> </View>
</View> </View>
</ScrollView>
</View> </View>
</View> </View>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment