Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #140

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@babel/plugin-transform-shorthand-properties": "^7.0.0-0",
"@babel/plugin-transform-template-literals": "^7.0.0-0",
"@gorhom/bottom-sheet": "^4.6.1",
"@react-native-community/checkbox": "^0.5.17",
"@react-native-community/slider": "^4.5.0",
"@react-native-picker/picker": "^2.8.1",
"@react-navigation/bottom-tabs": "^6.5.11",
Expand Down
Binary file added src/assets/completed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions src/components/Home/Order/CompletedOrder.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { SafeAreaView, Image, View, TouchableOpacity } from "react-native"
import { Body14M, Body16B, Subtitle16B, Title20B } from "../../../styles/GlobalText"
import Arrow from '../../../assets/common/Arrow.svg';
import { GREEN } from "../../../styles/GlobalColor";
import { useNavigation } from '@react-navigation/native';
import BottomButton from '../../../common/BottomButton';

const CompletedOrder = () => {
const navigation = useNavigation();

const handlePress = () => {
navigation.navigate('Home'); // 'Home'을 실제 네비게이션 스택에 맞게 수정
};


return (
<SafeAreaView style={{alignItems: 'center', justifyContent: 'center', flex: 1}}>
<View style={{marginTop: 120}}/>
<Title20B style={{marginBottom: 10, textAlign: 'center'}}></Title20B>
<Image source={require('../../../assets/completed.png')} style={{width: 200, height: 200}} />
<Title20B style={{textAlign: 'center', marginTop: 10}}>거래가 완료 되었습니다</Title20B>
<TouchableOpacity style={{flexDirection: 'row', borderRadius: 5, backgroundColor: GREEN, marginTop: 160, marginBottom:15 , width:'90%', alignItems: 'center', justifyContent: 'space-between', paddingRight: 20}} onPress={() => navigation.navigate('WriteReviewPage')}>
<View style={{padding: 16}}>
<Body14M>구매한 상품이 마음에 드시나요?</Body14M>
<Body16B>후기 작성하러 가기</Body16B>
</View>
<Arrow color={'black'} transform={[{ rotate: '180deg' }]} />
</TouchableOpacity>

<TouchableOpacity style={{flexDirection: 'row', borderRadius: 5, backgroundColor: GREEN , width: '90%', alignItems: 'center', justifyContent: 'space-between', paddingRight: 20}} onPress={() => navigation.navigate('Home')}>
<View style={{padding: 16}}>
<Body14M>이 마켓이 마음에 들었나요?</Body14M>
<Body16B>SDP 마켓의 다른 서비스 보러가기</Body16B>
</View>
<Arrow color={'black'} transform={[{ rotate: '180deg' }]} />
</TouchableOpacity>



</SafeAreaView>
)
}

export default CompletedOrder;
15 changes: 13 additions & 2 deletions src/components/Home/Order/OrderManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { getStatusBarHeight } from 'react-native-safearea-height';
import { Title20B, Body14R, Caption11M } from '../../../styles/GlobalText.tsx';
import { BLACK, BLACK2 } from '../../../styles/GlobalColor.tsx';

import { useNavigation } from '@react-navigation/native';

import { StackScreenProps } from '@react-navigation/stack';
import { HomeStackParams } from '../../../pages/Home';

Expand All @@ -17,13 +19,15 @@ import ScrollToTopButton from '../../../common/ScrollToTopButtonFlat.tsx';
import ScrollTopButton from '../../../common/ScrollTopButton.tsx';


const OrderInfo = ({ id, name, customer, orderDate, is_online }) => (
const OrderInfo = ({ id, name, customer, orderDate, is_online , navigation}) => (
<InfoContainer>
<Text style={{ color: 'black', fontSize: 18, fontWeight: 'bold', marginBottom: 4 }}>{name}</Text>
<Text style={{ color: 'black', fontSize: 15 , marginBottom: 4}}>주문자: {customer}</Text>
<Text style={{ color: 'black', fontSize: 15 , marginBottom: 4 }}>주문 일시: {orderDate}</Text>
<Text style={{ color: 'black', fontSize: 15 }}>거래 방식: {is_online ? '비대면' : '대면'}</Text>
<TouchableOpacity style={{ marginTop: 10, alignSelf: 'flex-end' }}>
<TouchableOpacity style={{ marginTop: 10, alignSelf: 'flex-end' }}
onPress={() => navigation.navigate('QuotationPage')}
>
<Text style={{ color: 'gray', fontSize: 14, fontWeight: 'bold' }}>주문서 확인</Text>
</TouchableOpacity>
</InfoContainer>
Expand All @@ -32,6 +36,7 @@ const OrderInfo = ({ id, name, customer, orderDate, is_online }) => (
const OrderManagement = () => {
const { width } = Dimensions.get('window');
const scrollRef = useRef<ScrollView | null>(null);
const navigation = useNavigation();

const [orderlist, setOrderList] = useState([
{
Expand Down Expand Up @@ -125,6 +130,8 @@ const OrderManagement = () => {
customer={order.customer}
orderDate={order.orderDate}
is_online={order.is_online}
navigation={navigation}

/>
</OrderInfoBox>
))
Expand All @@ -147,6 +154,9 @@ const OrderManagement = () => {
customer={order.customer}
orderDate={order.orderDate}
is_online={order.is_online}
navigation={navigation}


/>
</OrderInfoBox>
))
Expand All @@ -169,6 +179,7 @@ const OrderManagement = () => {
customer={order.customer}
orderDate={order.orderDate}
is_online={order.is_online}
navigation={navigation}
/>
</OrderInfoBox>
))
Expand Down
Loading