Commit 5bbf4eb5 by tungnq

TODO: Bổ sung dữ liệu để test chức năng

parent 38ec09e1
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,
}, },
card:{ body: {
borderRadius:10, flex: 1,
padding:5, backgroundColor:R.colors.white
marginTop:15,
marginBottom:15,
marginHorizontal:15,
alignItems:'center',
justifyContent:'center',
backgroundColor:R.colors.white,
shadowColor:R.colors.black,
shadowOffset:{width:0.5,height:2},
shadowOpacity:Platform.OS === 'ios' ? 0.25 : 1,
shadowRadius:5,
elevation:Platform.OS === 'ios' ? 1 : 2,
}, },
btnCard:{ card: {
borderRadius:10, borderRadius: 10,
borderWidth:1, padding: 5,
padding:5, marginTop: 15,
width:'100%', marginBottom:5,
alignItems:'center', marginHorizontal: 15,
justifyContent:'center', alignItems: 'center',
borderColor:R.colors.grayBorderInputTextHeader, justifyContent: 'center',
backgroundColor: R.colors.white,
shadowColor: R.colors.black,
shadowOffset: {width: 0.5, height: 2},
shadowOpacity: Platform.OS === 'ios' ? 0.25 : 1,
shadowRadius: 5,
elevation: Platform.OS === 'ios' ? 1 : 2,
}, },
body:{ btnCard: {
flex:1, borderRadius: 10,
backgroundColor:R.colors.white borderWidth: 1,
padding: 5,
width: '100%',
alignItems: 'center',
justifyContent: 'center',
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',
}, },
containerCard:{ containerCard: {
padding:10, padding: 10,
borderRadius:10, borderRadius: 10,
marginBottom:15, marginVertical:10,
backgroundColor:R.colors.white, backgroundColor: R.colors.white,
shadowColor:R.colors.black, shadowColor: R.colors.black,
shadowOffset:{width:0,height:2}, shadowOffset: {width: 0, height: 2},
shadowOpacity:Platform.OS === 'ios' ? 0.25 : 1, shadowOpacity: Platform.OS === 'ios' ? 0.25 : 1,
shadowRadius:1, shadowRadius: 1,
elevation:Platform.OS === 'ios' ? 1 : 2, elevation: Platform.OS === 'ios' ? 1 : 2,
marginHorizontal:15, marginHorizontal: 15,
flexDirection:'row', flexDirection: 'row',
alignItems:'center', alignItems: 'center',
justifyContent:'space-between', justifyContent: 'space-between',
}, },
containerText:{ containerText: {
alignItems:'center', alignItems: 'center',
justifyContent:'center', justifyContent: 'center',
}, },
btnRight:{ btnRight: {},
} });
})
export default styles; export default styles;
import React, {useState} from 'react'; import React, {useState} from 'react';
import ListRestReportView from './view'; import ListRestReportView from './view';
const ListRestReport = (props) => { const ListRestReport = props => {
const [dataList, setDataList] = useState([ const [dataList, setDataList] = useState([
{ {id: 1, classCode: 'ATTT2024.1', rest: 5, compensate: 0, total: 25},
id:1, {id: 2, classCode: 'ATTT2024.2', rest: 4, compensate: 1, total: 25},
classCode:'ATTT2024.1', {id: 3, classCode: 'ATTT2024.3', rest: 6, compensate: 0, total: 25},
rest:5, {id: 4, classCode: 'ATTT2024.4', rest: 3, compensate: 2, total: 25},
compensate:0, {id: 5, classCode: 'ATTT2024.5', rest: 5, compensate: 0, total: 25},
total:25
}, {id: 6, classCode: 'CNTT2024.1', rest: 2, compensate: 1, total: 25},
{ {id: 7, classCode: 'CNTT2024.2', rest: 4, compensate: 0, total: 25},
id:2, {id: 8, classCode: 'CNTT2024.3', rest: 5, compensate: 0, total: 25},
classCode:'ATTT2024.2', {id: 9, classCode: 'CNTT2024.4', rest: 3, compensate: 1, total: 25},
rest:5, {id: 10, classCode: 'CNTT2024.5', rest: 6, compensate: 0, total: 25},
compensate:0,
total:25 {id: 11, classCode: 'KTPM2024.1', rest: 4, compensate: 1, total: 25},
}, {id: 12, classCode: 'KTPM2024.2', rest: 2, compensate: 2, total: 25},
{id: 13, classCode: 'KTPM2024.3', rest: 5, compensate: 0, total: 25},
{id: 14, classCode: 'KTPM2024.4', rest: 4, compensate: 0, total: 25},
{id: 15, classCode: 'KTPM2024.5', rest: 3, compensate: 1, total: 25},
{id: 16, classCode: 'HTTT2024.1', rest: 5, compensate: 0, total: 25},
{id: 17, classCode: 'HTTT2024.2', rest: 6, compensate: 0, total: 25},
{id: 18, classCode: 'HTTT2024.3', rest: 3, compensate: 2, total: 25},
{id: 19, classCode: 'HTTT2024.4', rest: 4, compensate: 1, total: 25},
{id: 20, classCode: 'HTTT2024.5', rest: 5, compensate: 0, total: 25},
{id: 21, classCode: 'KHMT2024.1', rest: 4, compensate: 0, total: 25},
{id: 22, classCode: 'KHMT2024.2', rest: 5, compensate: 1, total: 25},
{id: 23, classCode: 'KHMT2024.3', rest: 6, compensate: 0, total: 25},
{id: 24, classCode: 'KHMT2024.4', rest: 3, compensate: 1, total: 25},
{id: 25, classCode: 'KHMT2024.5', rest: 5, compensate: 0, total: 25},
{id: 26, classCode: 'MMT2024.1', rest: 4, compensate: 1, total: 25},
{id: 27, classCode: 'MMT2024.2', rest: 2, compensate: 0, total: 25},
{id: 28, classCode: 'MMT2024.3', rest: 5, compensate: 0, total: 25},
{id: 29, classCode: 'MMT2024.4', rest: 3, compensate: 2, total: 25},
{id: 30, classCode: 'MMT2024.5', rest: 6, compensate: 0, total: 25},
]); ]);
return ( return <ListRestReportView dataList={dataList} />;
<ListRestReportView dataList={dataList}/>
);
}; };
export default ListRestReport; export default ListRestReport;
...@@ -14,7 +14,7 @@ const styles = StyleSheet.create({ ...@@ -14,7 +14,7 @@ const styles = StyleSheet.create({
borderRadius: 10, borderRadius: 10,
padding: 5, padding: 5,
marginTop: 15, marginTop: 15,
marginBottom: 15, marginBottom:5,
marginHorizontal: 15, marginHorizontal: 15,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
...@@ -44,7 +44,7 @@ const styles = StyleSheet.create({ ...@@ -44,7 +44,7 @@ const styles = StyleSheet.create({
containerCard: { containerCard: {
padding: 10, padding: 10,
borderRadius: 10, borderRadius: 10,
marginBottom: 15, marginVertical:10,
backgroundColor: R.colors.white, backgroundColor: R.colors.white,
shadowColor: R.colors.black, shadowColor: R.colors.black,
shadowOffset: {width: 0, height: 2}, shadowOffset: {width: 0, height: 2},
......
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