Commit dc6982fe by tungnq

TODO: Đã hoàn thiện giao diện chỉnh sửa báo cáo pop-up

parent b3fea5c6
...@@ -14,7 +14,7 @@ export const FAB_BORDER_RADIUS = FAB_WIDTH / 2; ...@@ -14,7 +14,7 @@ export const FAB_BORDER_RADIUS = FAB_WIDTH / 2;
export const FAB_BACKGROUND_COLOR = '#2F6BFF'; export const FAB_BACKGROUND_COLOR = '#2F6BFF';
// Khoảng cách margin của FAB với viền màn hình // Khoảng cách margin của FAB với viền màn hình
export const FAB_MARGIN = 10; export const FAB_MARGIN = -5;
export const LEFT_EDGE_SPACING = 110; export const LEFT_EDGE_SPACING = 110;
......
...@@ -7,7 +7,7 @@ const DetailListWork = (props) => { ...@@ -7,7 +7,7 @@ const DetailListWork = (props) => {
{ {
id: 1, id: 1,
title: 'Tạo thời khóa biểu cho sinh viến khai giảng và học kỳ 2 năm 2025', title: 'Tạo thời khóa biểu cho sinh viến khai giảng và học kỳ 2 năm 2025',
status: 'Đang thực hiện', status: 'Chờ duyệt',
deadline: '2025-09-04', deadline: '2025-09-04',
supervisor: [ supervisor: [
{ {
......
import { StyleSheet } from "react-native";
import R from "../../../../assets/R";
const styles = StyleSheet.create({
overlay: {
flex: 1,
backgroundColor: R.colors.blackShadow,
justifyContent: 'center',
alignItems: 'center',
},
modalContainer: {
backgroundColor: 'white',
borderRadius: 12,
padding: 20,
width: '90%',
maxWidth: 400,
},
title: {
fontSize: R.fontsize.fontsSizeTitle,
fontWeight: '600',
color: R.colors.blue,
textAlign: 'center',
},
required: {
color: R.colors.red,
fontSize: 14,
fontWeight: '500',
},
label: {
fontSize: R.fontsize.fontSizeContent,
fontWeight: '600',
fontFamily: R.fonts.fontMedium,
color: R.colors.black,
},
textInput: {
borderWidth: 1,
borderColor: R.colors.gray,
borderRadius: 8,
padding: 12,
fontSize: 14,
color: R.colors.black,
marginBottom: 16,
minHeight: 120,
},
attachmentContainer: {
borderWidth: 1,
borderColor: R.colors.blue,
borderRadius: 8,
padding: 20,
alignItems: 'center',
marginBottom: 20,
},
uploadIcon: {
width: 23,
height: 28,
tintColor: R.colors.blue,
marginBottom: 5,
},
attachmentText: {
fontSize: R.fontsize.fontSizeContent,
color: R.colors.blue,
fontWeight: '500',
},
buttonContainer: {
flexDirection: 'row',
justifyContent: 'flex-end',
},
cancelButton: {
flex: 1,
backgroundColor: R.colors.orange,
borderRadius: 8,
paddingVertical: 12,
alignItems: 'center',
},
submitButton: {
flex: 1,
backgroundColor: R.colors.blue,
borderRadius: 8,
paddingVertical: 12,
alignItems: 'center',
},
disabledButton: {
backgroundColor: R.colors.gray,
},
cancelButtonText: {
color: 'white',
fontSize: 16,
fontWeight: '600',
},
submitButtonText: {
color: 'white',
fontSize: 16,
fontWeight: '600',
},
});
export default styles;
...@@ -11,6 +11,7 @@ import { ...@@ -11,6 +11,7 @@ import {
import TextMulti from '../../../../components/Input/TextMulti'; import TextMulti from '../../../../components/Input/TextMulti';
import R from '../../../../assets/R'; import R from '../../../../assets/R';
import Button from '../../../../components/Button'; import Button from '../../../../components/Button';
import styles from './style';
const WorkReportModal = ({visible, onClose, onSubmit}) => { const WorkReportModal = ({visible, onClose, onSubmit}) => {
const [reportContent, setReportContent] = useState(''); const [reportContent, setReportContent] = useState('');
...@@ -37,7 +38,7 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => { ...@@ -37,7 +38,7 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => {
<View style={styles.overlay}> <View style={styles.overlay}>
<View style={styles.modalContainer}> <View style={styles.modalContainer}>
<Text style={styles.title}>Báo cáo công vic</Text> <Text style={styles.title}>Báo cáo công vic</Text>
<TextMulti <TextMulti
placeholder="Nhập nội dung báo cáo..." placeholder="Nhập nội dung báo cáo..."
title="Nội dung báo cáo" title="Nội dung báo cáo"
required={true} required={true}
...@@ -51,8 +52,8 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => { ...@@ -51,8 +52,8 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => {
</TouchableOpacity> </TouchableOpacity>
<View style={styles.buttonContainer}> <View style={styles.buttonContainer}>
<Button <Button
title= 'Huỷ' title="Huỷ"
height={35} height={35}
width={100} width={100}
backgroundColor={R.colors.orange} backgroundColor={R.colors.orange}
...@@ -65,9 +66,9 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => { ...@@ -65,9 +66,9 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => {
fontFamily: R.fonts.fontMedium, fontFamily: R.fonts.fontMedium,
}} }}
marginRight={10} marginRight={10}
/> />
<Button <Button
title= 'Báo cáo' title="Báo cáo"
height={35} height={35}
width={100} width={100}
backgroundColor={R.colors.blue} backgroundColor={R.colors.blue}
...@@ -79,7 +80,7 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => { ...@@ -79,7 +80,7 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => {
fontWeight: '600', fontWeight: '600',
fontFamily: R.fonts.fontMedium, fontFamily: R.fonts.fontMedium,
}} }}
/> />
</View> </View>
</View> </View>
</View> </View>
...@@ -87,97 +88,6 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => { ...@@ -87,97 +88,6 @@ const WorkReportModal = ({visible, onClose, onSubmit}) => {
); );
}; };
const styles = StyleSheet.create({
overlay: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
justifyContent: 'center',
alignItems: 'center',
},
modalContainer: {
backgroundColor: 'white',
borderRadius: 12,
padding: 20,
width: '90%',
maxWidth: 400,
},
title: {
fontSize: R.fontsize.fontsSizeTitle,
fontWeight: '600',
color: R.colors.blue,
textAlign: 'center',
},
required: {
color: R.colors.red,
fontSize: 14,
fontWeight: '500',
},
label: {
fontSize: R.fontsize.fontSizeContent,
fontWeight: '600',
fontFamily: R.fonts.fontMedium,
color: R.colors.black,
},
textInput: {
borderWidth: 1,
borderColor: R.colors.gray,
borderRadius: 8,
padding: 12,
fontSize: 14,
color: R.colors.black,
marginBottom: 16,
minHeight: 120,
},
attachmentContainer: {
borderWidth: 1,
borderColor: R.colors.blue,
borderRadius: 8,
padding: 20,
alignItems: 'center',
marginBottom: 20,
},
uploadIcon: {
width: 23,
height: 28,
tintColor: R.colors.blue,
marginBottom: 5,
},
attachmentText: {
fontSize: 14,
color: R.colors.blue,
fontWeight: '500',
},
buttonContainer: {
flexDirection: 'row',
justifyContent: 'flex-end',
},
cancelButton: {
flex: 1,
backgroundColor: R.colors.orange,
borderRadius: 8,
paddingVertical: 12,
alignItems: 'center',
},
submitButton: {
flex: 1,
backgroundColor: R.colors.blue,
borderRadius: 8,
paddingVertical: 12,
alignItems: 'center',
},
disabledButton: {
backgroundColor: R.colors.gray,
},
cancelButtonText: {
color: 'white',
fontSize: 16,
fontWeight: '600',
},
submitButtonText: {
color: 'white',
fontSize: 16,
fontWeight: '600',
},
});
export default WorkReportModal; export default WorkReportModal;
...@@ -9,6 +9,7 @@ import { ...@@ -9,6 +9,7 @@ import {
Image, Image,
} from 'react-native'; } from 'react-native';
import R from '../../../../assets/R'; import R from '../../../../assets/R';
import Button from '../../../../components/Button';
const EditReportModal = ({visible, onClose, onSubmit, initialContent = ''}) => { const EditReportModal = ({visible, onClose, onSubmit, initialContent = ''}) => {
const [reportContent, setReportContent] = useState(initialContent); const [reportContent, setReportContent] = useState(initialContent);
...@@ -34,37 +35,54 @@ const EditReportModal = ({visible, onClose, onSubmit, initialContent = ''}) => { ...@@ -34,37 +35,54 @@ const EditReportModal = ({visible, onClose, onSubmit, initialContent = ''}) => {
<View style={styles.overlay}> <View style={styles.overlay}>
<View style={styles.modalContainer}> <View style={styles.modalContainer}>
<Text style={styles.title}>Chnh sa báo cáo</Text> <Text style={styles.title}>Chnh sa báo cáo</Text>
<Text style={styles.text}>
Ni dung báo cáo
<Text style={styles.required}>*</Text>
</Text>
<Text style={styles.description}> <Text style={styles.description}>
Bn đã np yêu cu nhưng thành thi khoa chưa trong Bn đã np yêu cu nhưng thành thi khoa chưa trong
thông cho cn đánh giá môn hc các công vic và thông cho cn đánh giá môn hc các công vic và
lch hn quan lch hn quan
</Text> </Text>
<Text style={styles.label}>Tài liu đính kèm</Text> <Text style={styles.text}>Tài liu đính kèm</Text>
<View style={styles.attachedFileContainer}> <View style={styles.attachedFileContainer}>
<Text style={styles.fileName}> <Text style={styles.fileName}>
Quyết định thông báo đào to - QD347583 Quyết định thông báo đào to - QD347583
</Text> </Text>
<TouchableOpacity> <TouchableOpacity>
<Image source={R.images.icDelete} style={styles.deleteIcon} /> <Image source={R.images.icCancel} style={styles.deleteIcon} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<TouchableOpacity style={styles.attachmentContainer}> <TouchableOpacity style={styles.attachmentContainer}>
<Image source={R.images.icUpload} style={styles.uploadIcon} /> <Image source={R.images.icDocument} style={styles.uploadIcon} />
<Text style={styles.attachmentText}>Thêm tài liu</Text> <Text style={styles.attachmentText}>Thêm tài liu</Text>
</TouchableOpacity> </TouchableOpacity>
<View style={styles.buttonContainer}> <View style={styles.buttonContainer}>
<TouchableOpacity style={styles.cancelButton} onPress={handleCancel}> <Button
<Text style={styles.cancelButtonText}>Hy</Text> title="Hủy"
</TouchableOpacity> onPress={handleCancel}
<TouchableOpacity backgroundColor={R.colors.orange}
style={styles.submitButton} width={100}
onPress={handleSubmit}> height={35}
<Text style={styles.submitButtonText}>Cp nht</Text> borderRadius={100}
</TouchableOpacity> marginRight={10}
fontSize={R.fontsize.fontSizeContent}
textColor={R.colors.white}
/>
<Button
title="Cập nhật"
onPress={handleSubmit}
backgroundColor={R.colors.blue}
width={100}
height={35}
borderRadius={100}
fontSize={R.fontsize.fontSizeContent}
textColor={R.colors.white}
/>
</View> </View>
</View> </View>
</View> </View>
...@@ -87,58 +105,64 @@ const styles = StyleSheet.create({ ...@@ -87,58 +105,64 @@ const styles = StyleSheet.create({
maxWidth: 400, maxWidth: 400,
}, },
title: { title: {
fontSize: 18, fontSize: R.fontsize.fontsSizeTitle,
fontWeight: '600', fontWeight: '600',
color: R.colors.blue, color: R.colors.blue,
textAlign: 'center', textAlign: 'center',
marginBottom: 16,
}, },
description: { description: {
fontSize: 14, fontSize: R.fontsize.fontSizeContent,
color: R.colors.black, color: R.colors.gray1,
lineHeight: 20, lineHeight: 18,
marginBottom: 20, marginBottom: 10,
textAlign: 'left', textAlign: 'left',
borderWidth: 1,
borderColor: R.colors.grayBorderInputTextHeader,
borderRadius: 10,
padding: 10,
}, },
label: { required: {
fontSize: 14, color: R.colors.red,
fontWeight: '500',
color: R.colors.black,
marginBottom: 8,
}, },
attachedFileContainer: { attachedFileContainer: {
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
backgroundColor: '#f5f5f5', backgroundColor: R.colors.blue1,
borderRadius: 8, borderRadius: 10,
padding: 12, padding: 10,
marginBottom: 12, marginBottom: 10,
},
text: {
fontSize:R.fontsize.fontSizeContent,
fontFamily: R.fonts.fontMedium,
fontWeight: '600',
color: R.colors.black,
}, },
fileName: { fileName: {
fontSize: 14, fontSize: 10,
color: R.colors.black, color: R.colors.black,
flex: 1, flex: 1,
}, },
deleteIcon: { deleteIcon: {
width: 20, width: 20,
height: 20, height: 20,
tintColor: R.colors.red, tintColor: R.colors.blue,
}, },
attachmentContainer: { attachmentContainer: {
borderWidth: 1, borderWidth: 1,
borderColor: R.colors.gray, borderColor: R.colors.blue,
borderRadius: 8, borderRadius: 10,
borderStyle: 'dashed',
padding: 20, padding: 20,
alignItems: 'center', alignItems: 'center',
marginBottom: 20, marginBottom: 20,
}, },
uploadIcon: { uploadIcon: {
width: 40, width: 23,
height: 40, height: 28,
tintColor: R.colors.blue, tintColor: R.colors.blue,
marginBottom: 8, marginBottom: 5,
}, },
attachmentText: { attachmentText: {
fontSize: 14, fontSize: 14,
...@@ -147,8 +171,7 @@ const styles = StyleSheet.create({ ...@@ -147,8 +171,7 @@ const styles = StyleSheet.create({
}, },
buttonContainer: { buttonContainer: {
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'flex-end',
gap: 12,
}, },
cancelButton: { cancelButton: {
flex: 1, flex: 1,
......
...@@ -39,7 +39,7 @@ const DetailListWorkView = props => { ...@@ -39,7 +39,7 @@ const DetailListWorkView = props => {
const renderView = () => { const renderView = () => {
return ( return (
<View style={styles.body}> <View style={styles.body}>
<Text style={[styles.text, {fontSize: R.fontsize.fontSizeSubTitle}]}> <Text style={[styles.text, {fontSize: R.fontsize.fontSizeSubTitle ,}]}>
{data.title} {data.title}
</Text> </Text>
<View style={{flexDirection: 'row', justifyContent: 'space-between'}}> <View style={{flexDirection: 'row', justifyContent: 'space-between'}}>
...@@ -115,7 +115,7 @@ const DetailListWorkView = props => { ...@@ -115,7 +115,7 @@ const DetailListWorkView = props => {
} }
numColumns={2} numColumns={2}
style={{maxHeight: 150, marginBottom: 10}} style={{maxHeight: 150, marginBottom: 10}}
showsVerticalScrollIndicator={true} showsVerticalScrollIndicator={false}
columnWrapperStyle={styles.flatListSelect} columnWrapperStyle={styles.flatListSelect}
nestedScrollEnabled={true} nestedScrollEnabled={true}
scrollEnabled={true} scrollEnabled={true}
...@@ -154,12 +154,10 @@ const DetailListWorkView = props => { ...@@ -154,12 +154,10 @@ const DetailListWorkView = props => {
const handleWorkReportSubmit = (reportContent) => { const handleWorkReportSubmit = (reportContent) => {
console.log('Work report submitted:', reportContent); console.log('Work report submitted:', reportContent);
// Handle work report submission logic here
}; };
const handleEditReportSubmit = (reportContent) => { const handleEditReportSubmit = (reportContent) => {
console.log('Edit report submitted:', reportContent); console.log('Edit report submitted:', reportContent);
// Handle edit report submission logic here
}; };
const shouldShowFAB = () => { const shouldShowFAB = () => {
......
...@@ -102,11 +102,11 @@ const ListWorkView = props => { ...@@ -102,11 +102,11 @@ const ListWorkView = props => {
return( return(
<View style={{ marginHorizontal:15, marginVertical:10}}> <View style={{ marginHorizontal:15, marginVertical:10}}>
<View style ={{backgroundColor: getColor(item.status),borderTopLeftRadius:15, borderTopRightRadius:15}}> <View style ={{backgroundColor: getColor(item.status),borderTopLeftRadius:15, borderTopRightRadius:15}}>
<Text style={[styles.subText , {marginHorizontal:15}]}>{item.status}</Text> <Text style={[styles.subText , {marginHorizontal:15, fontFamily: R.fonts.fontMedium, fontWeight: '600', color: R.colors.white,}]}>{item.status}</Text>
</View> </View>
<View style={styles.containerCard}> <View style={styles.containerCard}>
<Text style={styles.text}>{item.title}</Text> <Text style={styles.text }>{item.title}</Text>
<View style={{flexDirection: 'row', justifyContent: 'space-between' }}> <View style={{flexDirection: 'row', justifyContent: 'space-between' }}>
<Text style={styles.text}>Ngày đến hn: <Text style={styles.text}>Ngày đến hn:
<Text style={styles.subText}>{item.deadline}</Text> <Text style={styles.subText}>{item.deadline}</Text>
......
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