Commit 7963c796 by tungnq

TODO: Tái cấu trúc các component để cải thiện hiển thị và xử lý sự kiện trong ứng dụng

parent 1fc5f40c
......@@ -130,11 +130,11 @@ const DetailIncomingDocumentView = props => {
</Text>
</View>
<Text style={[styles.text, styles.textWithMargin]}>
Loi văn bn:
Loi văn bn:{' '}
<Text style={styles.text_2}>{icomingDocument.document_type}</Text>
</Text>
<Text style={[styles.text, styles.textWithMargin]}>
Lĩnh vc văn bn:
Lĩnh vc văn bn:{' '}
<Text style={styles.text_2}>{icomingDocument.field}</Text>
</Text>
<View style={styles.signerContainer}>
......
......@@ -18,7 +18,7 @@ const styles = StyleSheet.create({
},
card: {
borderRadius: 10,
marginVertical: 10,
marginVertical: 7.5,
backgroundColor: R.colors.white,
shadowColor: R.colors.black,
shadowOffset: {width: 0, height: 2},
......@@ -36,6 +36,7 @@ const styles = StyleSheet.create({
statusHeader: {
borderTopRightRadius: 10,
borderTopLeftRadius: 10,
paddingLeft:10
},
statusText: {
fontSize: R.sizes.sm,
......@@ -48,6 +49,8 @@ const styles = StyleSheet.create({
statusTextInner: {
fontSize: R.sizes.sm,
color: R.colors.white,
fontFamily: R.fonts.fontMedium,
fontWeight: '600',
},
// Styles cho card content
cardContent: {
......
......@@ -32,11 +32,9 @@ const AbsenceListByCourseView = props => {
<View style={styles.card}>
<View style={styles.statusHeaderContainer}>
<View style={[styles.statusHeader, {backgroundColor: getColor(item.status)}]}>
<Text style={[styles.text, styles.statusText]}>
<Text style={styles.statusTextInner}>
{item.status}
</Text>
</Text>
</View>
</View>
......@@ -61,14 +59,14 @@ const AbsenceListByCourseView = props => {
{item.periods.map((item, index) => {
return <Text key={index}>{item.time},</Text>;
})}{' '}
- Ngày:{item.dateStudy}
- Ngày: {' '}{item.dateStudy}
</Text>
</Text>
</View>
{/* Row 3 */}
<View>
<Text style={[styles.text, styles.labelText]}>
Địa đim:
Địa đim:{' '}
<Text style={[styles.text, styles.valueText]}>
{item.location}
</Text>
......@@ -77,7 +75,7 @@ const AbsenceListByCourseView = props => {
{/* Row 4 */}
<View>
<Text style={[styles.text, styles.labelText]}>
Ging viên thay thế:
Ging viên thay thế:{' '}
<Text style={[styles.text, styles.valueText]}>
{item.teacher}
</Text>
......@@ -99,9 +97,9 @@ const AbsenceListByCourseView = props => {
onPress={() => navigation.navigate(SCREENNAME.LISTMAKEUPCLASSES)}
backgroundColor={R.colors.blue}
textColor={R.colors.white}
height={25}
height={35}
width={90}
borderRadius={15}
borderRadius={50}
fontSize={11}
fontWeight={'600'}
fontFamily={R.fonts.fontMedium}
......@@ -116,9 +114,9 @@ const AbsenceListByCourseView = props => {
onPress={() => {}}
backgroundColor={R.colors.orange}
textColor={R.colors.white}
height={25}
height={35}
width={90}
borderRadius={15}
borderRadius={50}
fontSize={11}
fontWeight={'600'}
fontFamily={R.fonts.fontMedium}
......
......@@ -35,7 +35,7 @@ const styles = StyleSheet.create({
fontSize: R.fontsize.fontSizeContent,
fontWeight: '400',
fontFamily: R.fonts.fontRegular,
color: R.colors.black,
color: R.colors.gray4,
},
textBtn: {
color: R.colors.black,
......@@ -60,8 +60,10 @@ const styles = StyleSheet.create({
borderWidth: 1,
borderColor: R.colors.grayBorderInputTextHeader,
borderRadius: 100,
padding: 10,
paddingHorizontal: 5,
height:35,
alignSelf: 'flex-start',
justifyContent: 'center',
backgroundColor: R.colors.orange,
marginHorizontal: 5,
},
......@@ -72,8 +74,9 @@ const styles = StyleSheet.create({
marginVertical: 10,
borderRadius: 10,
backgroundColor: R.colors.blue1,
padding: 10,
height:35,
width: 300,
alignItems: 'center',
},
//MODAL Thêm Bút Phê
modalOverlay: {
......
......@@ -106,11 +106,11 @@ const DetailSendDocumentView = props => {
marginBottom: 5,
}}>
<Text style={styles.text}>
S ký hiu:
S ký hiu:{' '}
<Text style={styles.text_2}>{icomingDocument.symbol_number}</Text>
</Text>
<Text style={styles.text}>
S vào s:
S vào s:{' '}
<Text style={styles.text_2}>
{icomingDocument.number_entry_book}
</Text>
......@@ -123,47 +123,39 @@ const DetailSendDocumentView = props => {
marginBottom: 5,
}}>
<Text style={styles.text}>
Ngày đến:
Ngày đến:{' '}
<Text style={styles.text_2}>{icomingDocument.term}</Text>
</Text>
<Text style={styles.text}>
Ngày văn bn:
Ngày văn bn:{' '}
<Text style={styles.text_2}>{icomingDocument.term_display}</Text>
</Text>
</View>
<Text style={[styles.text, {marginBottom: 5}]}>
Loi văn bn:
Loi văn bn:{' '}
<Text style={styles.text_2}>{icomingDocument.document_type}</Text>
</Text>
<Text style={[styles.text, {marginBottom: 5}]}>
Lĩnh vc văn bn:
Lĩnh vc văn bn:{' '}
<Text style={styles.text_2}>{icomingDocument.field}</Text>
</Text>
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
marginBottom: 5,
}}>
<Text style={styles.text}>
Người ký:
<Text style={[styles.text, {marginBottom: 5}]}>
Người ký:{' '}
<Text style={styles.text_2}>{icomingDocument.signer_name}</Text>
</Text>
<Text style={styles.text}>
Đối tác gi:
<Text style={styles.text_2}>
{icomingDocument.sender_partner}
</Text>
<Text style={[styles.text, {marginBottom: 5}]}>
Đối tác gi:{' '}
<Text style={styles.text_2}>{icomingDocument.sender_partner}</Text>
</Text>
</View>
<TextMulti title="Ghi chú" />
<View style={{marginTop: 5}}></View>
<Text style={[styles.text, {marginBottom: 3}]}>Ni dung</Text>
<Text style={[styles.text, {marginBottom: 5}]}>Ni dung</Text>
<View style={[styles.containerContent, {marginBottom: 5}]}>
<Text style={styles.text_2}>{icomingDocument.content}</Text>
</View>
<Text style={[styles.text, {marginBottom: 5}]}>
Ý kiến ca BGH:
Ý kiến ca BGH:{' '}
<Text style={styles.text_2}>{icomingDocument.opinion_bgh}</Text>
</Text>
<View
......
......@@ -61,11 +61,12 @@ const styles = StyleSheet.create({
justifyContent: 'center',
borderColor: R.colors.grayBorderInputTextHeader,
},
text: {
textCardTitle: {
fontSize: R.sizes.sm,
color: R.colors.black,
fontFamily: R.fonts.fontRegular,
fontWeight: '400',
color: R.colors.white,
fontFamily: R.fonts.fontMedium,
fontWeight: '600',
},
box_3: {
flexDirection: 'row',
......@@ -86,17 +87,24 @@ const styles = StyleSheet.create({
boxFilter: {
flex: 1,
},
cardIncomingDocument: {
borderRadius: 10,
padding: 10,
boxIncomingDocument: {
marginHorizontal: 15,
marginVertical:7.5,
borderRadius: 15,
borderWidth: 1,
borderColor: R.colors.grayBorderInputTextHeader,
backgroundColor: R.colors.white,
shadowColor: R.colors.black,
shadowOffset: {width: 0.5, height: 2},
shadowOpacity: Platform.OS === 'ios' ? 0.25 : 1,
elevation: Platform.OS === 'ios' ? 1 : 2,
},
cardIncomingDocument: {
padding: 10,
borderBottomLeftRadius: 15,
borderBottomRightRadius: 15,
},
textSubTitle: {
fontSize: R.fontsize.fontSizeContent,
fontWeight: '500',
......
......@@ -69,6 +69,13 @@ const ListSendView = props => {
const renderItemIncomingDocument = ({item}) => {
const showRelatedWork = getHiddenButton(item?.total_head_of_work);
return (
<View style={styles.boxIncomingDocument}>
<View style={{paddingLeft:10, borderTopLeftRadius:15, borderTopRightRadius:15, backgroundColor:getColorStatus(item.status)}}>
<Text style= {styles.textCardTitle }>
{item.status}
</Text>
</View>
<View style={styles.cardIncomingDocument}>
<Text style={styles.textSubTitle}>{item.title}</Text>
......@@ -76,12 +83,6 @@ const ListSendView = props => {
<Text style={styles.textSubTitle}>
Ngày to: <Text style={styles.text}>{item.term}</Text>
</Text>
<Text style={styles.textSubTitle}>
Trng thái:{' '}
<Text style={[{color: getColorStatus(item.status)}]}>
{item.status}
</Text>
</Text>
</View>
<Text style={styles.textSubTitle}>
Chế độ:{' '}
......@@ -116,7 +117,9 @@ const ListSendView = props => {
<View style={{flex: 0.1}}></View>
<Button
title="Chỉnh sửa"
onPress={() => navigation.navigate(ScreenName.EDITSENDDOCUMENT)}
onPress={() =>
navigation.navigate(ScreenName.EDITSENDDOCUMENT)
}
backgroundColor={R.colors.orange}
textColor={R.colors.white}
width={150}
......@@ -167,6 +170,7 @@ const ListSendView = props => {
/>
</View>
</View>
</View>
);
};
......
......@@ -58,7 +58,7 @@ const DetailListWorkDeliverToMeView = props => {
borderRadius: 10,
marginBottom: 5,
}}>
<Text style={[styles.text, {color: R.colors.gray}]}>
<Text style={[styles.text, {color: R.colors.gray4}]}>
{item.content}
</Text>
</View>
......@@ -111,7 +111,7 @@ const DetailListWorkDeliverToMeView = props => {
padding: 10,
borderRadius: 10,
}}>
<Text style={[styles.text, {color: R.colors.gray}]}>
<Text style={[styles.text, {color: R.colors.gray4}]}>
{item.content}
</Text>
</View>
......@@ -158,7 +158,7 @@ const DetailListWorkDeliverToMeView = props => {
</Text>
<Text style={styles.text}>Ni dung công vic:</Text>
<View style={styles.containerContent}>
<Text style={[styles.text, {color: R.colors.gray}]}>
<Text style={[styles.text, {color: R.colors.gray4}]}>
{data.content}
</Text>
</View>
......
......@@ -109,7 +109,7 @@ const DetailListWorkMonitoringView = props => {
</Text>
<Text style={[styles.text, {marginBottom: 3}]}>Ni dung công vic</Text>
<View style={styles.containerContent}>
<Text style={[styles.text, {color: R.colors.gray}]}>
<Text style={[styles.text, {color: R.colors.gray4}]}>
{data.content}
</Text>
</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