Commit 6a213b97 by tungnq

TODO: Đã hoàn thiện giao diện modal add work

parent d72ec17d
...@@ -21,8 +21,10 @@ const TextField = props => { ...@@ -21,8 +21,10 @@ const TextField = props => {
containerMarginTop, containerMarginTop,
containerBackgroundColor, containerBackgroundColor,
onFocus, onFocus,
fontFamily, fontFamily = R.fonts.fontMedium,
fontWeight = '600',
height, height,
color = R.colors.black,
numberOfLines = 5, numberOfLines = 5,
} = props; } = props;
...@@ -36,9 +38,9 @@ const TextField = props => { ...@@ -36,9 +38,9 @@ const TextField = props => {
<Text <Text
style={{ style={{
fontSize: titleFontSize, fontSize: titleFontSize,
color: 'black', color: color,
fontFamily:fontFamily, fontFamily:fontFamily,
fontWeight:'400', fontWeight:fontWeight,
marginBottom: 5, marginBottom: 5,
}}> }}>
{title ? title : ''} {title ? title : ''}
......
import AddWorkModal from './view';
export default AddWorkModal;
import React from 'react'; import React, { useState } from 'react';
import {Text, View, TouchableOpacity, StyleSheet, Image, TextInput} from 'react-native'; import {Text, View, TouchableOpacity, StyleSheet, Image, TextInput} from 'react-native';
import styles from './style'; import styles from './style';
import FAB from '../../components/FAB/fab'; import FAB from '../../components/FAB/fab';
...@@ -7,6 +7,7 @@ import Header from '../../components/Header/Header'; ...@@ -7,6 +7,7 @@ import Header from '../../components/Header/Header';
import Dropdown from '../../components/DropdownAlert/Dropdown'; import Dropdown from '../../components/DropdownAlert/Dropdown';
import R from '../../assets/R'; import R from '../../assets/R';
import TabViewComponent from '../../components/TabView'; import TabViewComponent from '../../components/TabView';
import AddWorkModal from '../list_work/modal_add/index';
const ListWorkView = (props) => { const ListWorkView = (props) => {
const { const {
...@@ -14,10 +15,24 @@ const ListWorkView = (props) => { ...@@ -14,10 +15,24 @@ const ListWorkView = (props) => {
setSearchQuery, setSearchQuery,
} = props; } = props;
const [modalVisible, setModalVisible] = useState(false);
const handleFilterChange = (item) => { const handleFilterChange = (item) => {
console.log(item); console.log(item);
}; };
const handleAddWork = () => {
setModalVisible(true);
};
const handleSaveWork = (workData) => {
console.log('Saving work:', workData);
};
const handleCloseModal = () => {
setModalVisible(false);
};
const renderTabView = () => { const renderTabView = () => {
return ( <TabViewComponent return ( <TabViewComponent
data={[ data={[
...@@ -36,7 +51,6 @@ const ListWorkView = (props) => { ...@@ -36,7 +51,6 @@ const ListWorkView = (props) => {
alignItems : 'center', alignItems : 'center',
}} }}
style={{ style={{
// marginHorizontal: 5,
marginVertical: 5, marginVertical: 5,
}} }}
mode="filter" mode="filter"
...@@ -103,12 +117,18 @@ const ListWorkView = (props) => { ...@@ -103,12 +117,18 @@ const ListWorkView = (props) => {
</View> </View>
<FAB> <FAB>
<SubButton <SubButton
onPress={() =>({})} onPress={handleAddWork}
label="Tạo công việc" label="Tạo công việc"
images={R.images.icMenuEdit} images={R.images.icMenuEdit}
backgroundColor={R.colors.blue} backgroundColor={R.colors.blue}
/> />
</FAB> </FAB>
<AddWorkModal
visible={modalVisible}
onClose={handleCloseModal}
onSave={handleSaveWork}
/>
</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