Commit fa64995b by tungnq

TODO: Dựng xong khung văn bản chờ duyệt

parent e15defe3
...@@ -25,9 +25,33 @@ const EditSendDocument = (props) => { ...@@ -25,9 +25,33 @@ const EditSendDocument = (props) => {
{ id: 19, name: 'Nguyễn Hữu Tài' }, { id: 19, name: 'Nguyễn Hữu Tài' },
{ id: 20, name: 'Phạm Thị Kim' } { id: 20, name: 'Phạm Thị Kim' }
]); ]);
const [dataList2, setDataList2] = useState([
{
"author": "Bút Tiến Công",
"code":"08569",
"date":"29/07/2025",
"time":"16:00",
"content": "Ban lãnh đạo yêu cầu hoàn thành thời khoá biểu trong tháng cho các đơn vị chuyên môn, nộp đầy đủ công việc theo đúng kế hoạch."
},
{
"author": "Nguyễn Thị Kim Phụng",
"code":"08569",
"date":"29/07/2025",
"time":"16:00",
"content": "Trưởng phòng xác nhận hợp bộ hồ sơ."
},
{
"author": "Đặng Duy Minh",
"code":"08569",
"date":"29/07/2025",
"time":"16:00",
"content": "Trưởng phòng nhập công bố quyết định nội bộ."
}
]);
return ( return (
<EditSendDocumentView <EditSendDocumentView
dataList={dataList} dataList={dataList}
dataList2={dataList2}
/> />
); );
}; };
......
...@@ -83,7 +83,15 @@ const styles = StyleSheet.create({ ...@@ -83,7 +83,15 @@ const styles = StyleSheet.create({
borderWidth:1, borderWidth:1,
borderColor:R.colors.blue1, borderColor:R.colors.blue1,
height:80 height:80
} },
containerContent:{
padding:10,
borderRadius:10,
borderWidth:1,
borderColor:R.colors.grayBorderInputTextHeader,
},
sub_title:{color: R.colors.blue, fontSize:R.fontsize.fontSizeSubTitle, fontWeight:'600', fontFamily:R.fonts.fontMedium},
text_2:{color: R.colors.gray2, fontSize:R.fontsize.fontSizeContent, fontWeight:'400', fontFamily:R.fonts.fontRegular}
}) })
export default styles export default styles
\ No newline at end of file
...@@ -19,7 +19,8 @@ import TextField from '../../../components/Input/TextField'; ...@@ -19,7 +19,8 @@ import TextField from '../../../components/Input/TextField';
import TextMulti from '../../../components/Input/TextMulti'; import TextMulti from '../../../components/Input/TextMulti';
const EditSendDocumentView = props => { const EditSendDocumentView = props => {
const {dataList} = props; const {dataList, dataList2} = props;
const navigation = useNavigation(); const navigation = useNavigation();
const renderItem_1 = ({item, onPress}) => { const renderItem_1 = ({item, onPress}) => {
return ( return (
...@@ -37,6 +38,23 @@ const EditSendDocumentView = props => { ...@@ -37,6 +38,23 @@ const EditSendDocumentView = props => {
); );
}; };
const renderItem = ({item}) => {
console.log(item);
return (
<View style={{marginVertical: 7.5 ,}}>
<View style={{flexDirection: 'row', marginBottom: 5}}>
<Text style={styles.text}>{item.author} - </Text>
<Text style={styles.text}>{item.code} </Text>
<Text style={styles.text}>{item.time} </Text>
<Text style={styles.text}>{item.date}</Text>
</View>
<View style={styles.containerContent}>
<Text style={styles.text_2}>{item.content}</Text>
</View>
</View>
);
};
const body = () => { const body = () => {
return ( return (
<View style={styles.body}> <View style={styles.body}>
...@@ -224,6 +242,20 @@ const EditSendDocumentView = props => { ...@@ -224,6 +242,20 @@ const EditSendDocumentView = props => {
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
<Text style={[styles.text, styles.sub_title ]}>
Bút phê văn bn
</Text>
<Text style={{marginVertical:10, color: R.colors.blue}}>
Báo cáo ln 1 - 16:00 24/07/2025
</Text>
<FlatList
data={dataList2}
renderItem={renderItem}
keyExtractor={(item, index) => index.toString()}
/>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Button <Button
......
import React from 'react'; import React from 'react';
import {Text, View, StyleSheet} from 'react-native'; import {Text, View, StyleSheet} from 'react-native';
import ApprovalView from './view'; import ApprovalView from './view';
import { useState } from 'react';
const Approval = (props) => { const Approval = (props) => {
const [icomingDocument, setIncomingDocument] = useState({
id: 102934,
title: 'Văn bản thông báo lịch nộp thời khoá biểu của học kỳ 2 năm 2025',
status: 'Hạn chế',
symbol_number: '2038475',
regime:'Chờ phê duyệt ',
number_entry_book: '12493-fh544',
term: '29/07/2025',
term_display: '09/07/2025',
document_date: '2025-07-08',
document_date_display: '08/07/2025',
document_type: 'Hành chính',
field: 'Thời khoá biểu',
signer_name: 'Nguyễn Minh Đức',
sender_partner: 'Võ Công Bình',
note: '',
content:
'Ban lãnh đạo yêu cầu hoàn thành thời khoá biểu trong tháng cho các đơn vị chuyên môn, nộp đầy đủ công việc theo đúng kế hoạch.',
opinion_bgh: 'Thực hiện nhanh công tác thời khoá biểu',
received_departments: [
{id: 1, name: 'Phòng đào tạo'},
{id: 2, name: 'Phòng đào tạo'},
],
received_group: [{id: 12, name: 'Nhóm chuyên môn đào tạo'}],
receiver: [{id: 55, name: 'Nguyễn Minh Đức'}],
attachments: [
{
id: '001247363',
filename: 'Quyết định thông báo đào tạo - 001247363',
file_ext: 'pdf',
file_size: 0,
download_url: '#',
preview_url: '#',
},
],
total_head_of_work: 7,
approvals: [
{
author: 'Bút Tiến Công',
code: '08569',
date: '29/07/2025',
time: '16:00',
content:
'Ban lãnh đạo yêu cầu hoàn thành thời khoá biểu trong tháng cho các đơn vị chuyên môn, nộp đầy đủ công việc theo đúng kế hoạch.',
},
{
author: 'Nguyễn Thị Kim Phụng',
code: '08569',
date: '29/07/2025',
time: '16:00',
content: 'Trưởng phòng xác nhận hợp bộ hồ sơ.',
},
{
author: 'Đặng Duy Minh',
code: '08569',
date: '29/07/2025',
time: '16:00',
content: 'Trưởng phòng nhập công bố quyết định nội bộ.',
},
],
actions: {
can_create_task: true,
create_task_label: 'Tạo công việc',
},
});
const items = [
{id: 1, label: 'Option 1'},
{id: 2, label: 'Option 2'},
{id: 3, label: 'Option 3'},
];
const [dataList, setDataList] = useState([
{id: 1, name: 'Nguyễn Minh Đức'},
{id: 2, name: 'Trần Văn Hùng'},
{id: 3, name: 'Lê Thị Mai'},
{id: 4, name: 'Phạm Quốc Khánh'},
{id: 5, name: 'Hoàng Anh Tuấn'},
{id: 6, name: 'Vũ Thị Hằng'},
{id: 7, name: 'Ngô Văn Nam'},
{id: 8, name: 'Đinh Thị Lan'},
{id: 9, name: 'Bùi Văn Phúc'},
{id: 10, name: 'Lý Thị Hoa'},
{id: 11, name: 'Phan Minh Hoàng'},
{id: 12, name: 'Tạ Thị Hương'},
{id: 13, name: 'Đoàn Văn Dũng'},
{id: 14, name: 'Nguyễn Thị Vân'},
{id: 15, name: 'Trương Văn Long'},
{id: 16, name: 'Mai Thị Ngọc'},
{id: 17, name: 'Huỳnh Quốc Việt'},
{id: 18, name: 'Lâm Thị Thu'},
{id: 19, name: 'Nguyễn Hữu Tài'},
{id: 20, name: 'Phạm Thị Kim'},
]);
return ( return (
<ApprovalView /> <ApprovalView
icomingDocument={icomingDocument}
items={items}
dataList={dataList}
/>
); );
}; };
......
import { StyleSheet, Text, View } from 'react-native' import { StyleSheet, Text, View } from 'react-native'
import R from '../../../assets/R'
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: R.colors.white,
},
body:{
flex:1,
backgroundColor:R.colors.white,
marginHorizontal:15,
marginVertical:10
},
row_1:{
flexDirection: 'row',
justifyContent: 'space-between',
marginBottom: 10,
marginTop: 10,
},
sub_text :{
fontSize: R.fontsize.fontSizeContent,
fontWeight: '500',
fontFamily:R.fonts.fontSemiBold,
color:R.colors.black,
},
text:{
fontSize: R.fontsize.fontSizeContent,
fontWeight: '400',
fontFamily:R.fonts.fontRegular,
color:R.colors.black,
},
containerDropdown:{
marginBottom:10,
position: 'relative',
zIndex: 1000
},
chip: {
flexDirection: 'row',
alignItems: 'center',
// position: 'relative',
paddingLeft: 10,
paddingRight:10,
height: 25,
borderRadius: 10,
marginBottom:10,
marginRight:5,
backgroundColor: R.colors.blue2,
alignSelf:'flex-start'
},
imageIcon: {
width: 15,
height: 15,
},
containerIcon: {
marginRight: 2,
},
flatListSelect:{
flexDirection:'row',
flexWrap:'wrap',
},
textChip:{
fontSize: R.fontsize.fontSizeContent,
fontWeight: '400',
fontFamily:R.fonts.fontRegular,
color:R.colors.blueTextChip,
},
containerBtn:{
flexDirection:'row',
alignItems:'center',
justifyContent:'space-around',
marginVertical:10,
borderRadius:10,
backgroundColor:R.colors.blue1,
padding:10,
width:350
},
button:{
borderRadius:10,
alignItems:'center',
justifyContent:'center',
marginVertical:10,
borderWidth:1,
borderColor:R.colors.blue1,
height:80
}
}) })
......
import React from 'react'; import React, {useEffect, useState} from 'react';
import {Text, View, TouchableOpacity, StyleSheet} from 'react-native'; import {
Text,
View,
TouchableOpacity,
StyleSheet,
Image,
ScrollView,
FlatList,
Alert,
Modal,
TextInput,
} from 'react-native';
import R from '../../../assets/R';
import styles from './style'; import styles from './style';
const ApprovalView = (props) => { import Header from '../../../components/Header/Header';
const { } = props; import TextMulti from '../../../components/Input/TextMulti';
import FAB from '../../../components/FAB/fab';
import SubButton from '../../../components/FAB/sub_button';
import TextField from '../../../components/Input/TextField';
import Dropdown from '../../../components/DropdownAlert/Dropdown';
const ApprovalView = props => {
const {
icomingDocument,
item,
dataList,
} = props;
const renderItem_1 = ({item, onPress}) => {
return ( return (
<View <View style={styles.chip}>
style={{ <TouchableOpacity style={styles.containerIcon} onPress={onPress}>
flex: 1, <Image
justifyContent: 'center', resizeMode="cover"
alignItems: 'center', source={R.images.icCancel}
}}> style={styles.imageIcon}
<TouchableOpacity> tintColor={R.colors.blue}
<Text>Approval</Text> />
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.textChip}> {`${item.id}, ${item.name}`}</Text>
</View>
);
};
const body = () => {
return (
<ScrollView showsVerticalScrollIndicator={false}>
<View style={styles.body}>
<View style={styles.row_1}>
<Text style={styles.sub_text}>Ngày to:{' '}
<Text style={styles.sub_text}>29/07/2025</Text>
</Text>
<Text style={styles.sub_text}>Trng thái:{' '}
<Text style={[styles.sub_text, {color: R.colors.orange}]}>
D tho
</Text>
</Text>
</View>
<TextField
title="Tiêu đề"
required
fontSize={R.fontsize.fontSizeContent}
fontSizeTitle={R.fontsize.fontSizeContent}
fontFamily={R.fonts.fontSemiBold}
placeholder="Nhập tiêu đề"
containerMarginBottom={10}
/>
<TextMulti
title="Nội dung văn bản"
required
fontSize={R.fontsize.fontSizeContent}
titleFontSize={R.fontsize.fontSizeContent}
fontFamily={R.fonts.fontSemiBold}
placeholder="Ban lãnh đạo yêu cầu hoàn thành thời khóa biểu trong tháng cho các đơn vị chuyên môn sắp xếp các công việc và lịch liên quan"
containerMarginBottom={10}
numberOfLines={3}
/>
<TextMulti
title="Ghi chú"
fontSize={R.fontsize.fontSizeContent}
titleFontSize={R.fontsize.fontSizeContent}
fontFamily={R.fonts.fontSemiBold}
placeholder="Ban lãnh đạo yêu cầu hoàn thành thời khóa biểu trong tháng cho các đơn vị chuyên môn sắp xếp các công việc và lịch liên quan"
containerMarginBottom={10}
numberOfLines={3}
/>
<TextField
fontSize={R.fontsize.fontSizeContent}
titleFontSize={R.fontsize.fontSizeContent}
fontFamily={R.fonts.fontSemiBold}
title="Loại văn bản"
required
containerMarginBottom={10}
/>
<TextField
title="Loại vực văn bản"
required
containerMarginBottom={10}
/>
<View style={styles.containerDropdown}>
<Text style={[{marginBottom: 3}, styles.sub_text]}>
Chế độ <Text style={{color: R.colors.red}}>*</Text>
</Text>
<Dropdown
title="Chế độ"
required
containerMarginBottom={10}
height={35}
/>
</View>
<View style={styles.containerDropdown}>
<Text style={[{marginBottom: 3}, styles.sub_text]}>
Phòng ban nhn <Text style={{color: R.colors.red}}>*</Text>
</Text>
<Dropdown
title="Chế độ"
required
containerMarginBottom={10}
height={35}
/>
</View>
<Text style={[{marginBottom: 3}, styles.sub_text]}>
Danh sách phòng ban nhn đã chn :
</Text>
<FlatList
data={dataList}
renderItem={({item}) => renderItem_1({item, onPress: () => {}})}
keyExtractor={(item, index) =>
item.id?.toString() || index.toString()
}
numColumns={2}
style={{maxHeight: 150, marginBottom: 10}}
showsVerticalScrollIndicator={true}
columnWrapperStyle={styles.flatListSelect}
nestedScrollEnabled={true}
scrollEnabled={true}
/>
<View style={styles.containerDropdown}>
<Text style={[{marginBottom: 3}, styles.sub_text]}>
Nhóm người nhn <Text style={{color: R.colors.red}}>*</Text>
</Text>
<Dropdown
title="Chế độ"
required
containerMarginBottom={10}
height={35}
/>
</View>
<Text style={[{marginBottom: 3}, styles.sub_text]}>
Danh sách nhóm người nhn đã chn :
</Text>
<FlatList
data={dataList}
renderItem={({item}) => renderItem_1({item, onPress: () => {}})}
keyExtractor={(item, index) =>
item.id?.toString() || index.toString()
}
numColumns={2}
style={{maxHeight: 150, marginBottom: 10}}
showsVerticalScrollIndicator={true}
columnWrapperStyle={styles.flatListSelect}
nestedScrollEnabled={true}
scrollEnabled={true}
/>
<View style={styles.containerDropdown}>
<Text style={[{marginBottom: 3}, styles.sub_text]}>
Người nhn <Text style={{color: R.colors.red}}>*</Text>
</Text>
<Dropdown
title="Chế độ"
required
containerMarginBottom={10}
height={35}
/>
</View>
<Text style={[{marginBottom: 3}, styles.sub_text]}>
Danh sách người nhn đã chn :
</Text>
<FlatList
data={dataList}
renderItem={({item}) => renderItem_1({item, onPress: () => {}})}
keyExtractor={(item, index) =>
item.id?.toString() || index.toString()
}
numColumns={2}
style={{maxHeight: 150, marginBottom: 10}}
showsVerticalScrollIndicator={true}
columnWrapperStyle={styles.flatListSelect}
nestedScrollEnabled={true}
scrollEnabled={true}
/>
<Text style={[styles.text, {color: R.colors.blue}]}>
Tài liu đính kèm
</Text>
<TouchableOpacity style={styles.containerBtn}>
<Text style={styles.textBtn}>
Quyết định thông báo đào to - QD347583
</Text>
<Image
source={R.images.icDownload}
style={{width: 20, height: 20}}
resizeMode="contain"
tintColor={R.colors.blue}
/>
</TouchableOpacity>
</View>
</ScrollView>
);
};
return (
<View style={styles.container}>
<Header title={'Văn bản đi 2038475'} isBack />
<View style={{flex: 1}}>
{body()}
</View>
</View> </View>
); );
}; };
......
...@@ -119,7 +119,7 @@ const ListSendView = (props) => { ...@@ -119,7 +119,7 @@ const ListSendView = (props) => {
<View style={{flex: 0.1}}></View> <View style={{flex: 0.1}}></View>
<Button <Button
title="Yêu cầu phê duyệt" title="Yêu cầu phê duyệt"
onPress={() => {}} onPress={() => navigation.navigate(ScreenName.STATUSSENDDOCUMENT)}
backgroundColor={R.colors.orange} backgroundColor={R.colors.orange}
textColor={R.colors.white} textColor={R.colors.white}
height={25} height={25}
......
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