From 7341dc6e80d5c0b8552537ef63179fa613d4fbcb Mon Sep 17 00:00:00 2001 From: SJ-Kwak Date: Sat, 17 Feb 2024 10:07:28 +0900 Subject: [PATCH] sdp-tech#25 feat: add quotation check page --- src/common/BottomButton.tsx | 4 +- .../Home/Quotation/QuotationForm.tsx | 2 +- .../Home/Quotation/QuotationPage.tsx | 133 ++++++++++++++++++ src/pages/Home.tsx | 12 +- 4 files changed, 145 insertions(+), 6 deletions(-) diff --git a/src/common/BottomButton.tsx b/src/common/BottomButton.tsx index e658ddb..fcb14b1 100644 --- a/src/common/BottomButton.tsx +++ b/src/common/BottomButton.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { View, TouchableOpacity } from 'react-native'; import styled from 'styled-components/native'; -import { Body16B, Body16M } from '../styles/GlobalText'; +import { Body16M } from '../styles/GlobalText'; import { PURPLE, GREEN, PURPLE2 } from '../styles/GlobalColor'; interface BottomButtonProps { @@ -13,7 +13,7 @@ interface BottomButtonProps { const BottomButton = ({ value, pressed, onPress }: BottomButtonProps) => { return ( - {value} + {value} ) } diff --git a/src/components/Home/Quotation/QuotationForm.tsx b/src/components/Home/Quotation/QuotationForm.tsx index c988c54..e2d1d6c 100644 --- a/src/components/Home/Quotation/QuotationForm.tsx +++ b/src/components/Home/Quotation/QuotationForm.tsx @@ -42,7 +42,7 @@ const FilterSection = ({ label, items }: FilterSectionProps) => { ) } -const QuotationForm = ({ navigation, route }: StackScreenProps) => { +const QuotationForm = ({ navigation, route }: StackScreenProps) => { const materials = ['폴리에스테르', '면', '스웨이드', '울', '캐시미어', '가죽', '데님', '추가 요청사항에 기재'] const sizes = ['XS(85)', 'S(90)', 'M(95)', 'L(100)', 'XL(105)', 'XXL(110)'] const options = ['프릴 추가', '단추 추가', '지퍼 추가', '주머니 추가'] diff --git a/src/components/Home/Quotation/QuotationPage.tsx b/src/components/Home/Quotation/QuotationPage.tsx index e69de29..c5196ff 100644 --- a/src/components/Home/Quotation/QuotationPage.tsx +++ b/src/components/Home/Quotation/QuotationPage.tsx @@ -0,0 +1,133 @@ +import { useState } from 'react'; +import { ScrollView, View, Text, TouchableOpacity, ImageBackground, Dimensions } from 'react-native'; +import styled from 'styled-components/native'; +import { getStatusBarHeight } from 'react-native-safearea-height'; + +import { HomeStackParams } from '../../../pages/Home'; +import { StackScreenProps } from '@react-navigation/stack'; + +import Arrow from '../../../assets/common/Arrow.svg'; + +import { BLACK, GREEN, PURPLE, PURPLE2, PURPLE3 } from '../../../styles/GlobalColor'; +import { Body14R, Body16M, Caption11M, Caption12M, Filter14M, Subtitle16M, Title20B } from '../../../styles/GlobalText'; +import Carousel from '../../../common/Carousel'; +import CheckBox from '../../../common/CheckBox'; +import BottomButton from '../../../common/BottomButton'; + +const statusBarHeight = getStatusBarHeight(true); +const { width, height } = Dimensions.get('window'); + +const QuotationPage = ({ navigation, route }: StackScreenProps) => { + const quotation = [ + {key: '재질', data: '니트'}, + {key: '희망 사이즈', data: '여성 55'}, + {key: '추가 요청사항', data: ''}, + {key: '포폴 사용 가능 여부', data: '가능'}, + {key: '거래 방식', data: '비대면'}, + {key: '이름', data: '이소윤'}, + {key: '연락처', data: '010 1234 1234'}, + {key: '주소', data: '서울특별시 서대문구 어쩌구저쩌구동 124'}, + ] + // 한 줄에 2개씩 아이템 배치 + const refPhotos = [...new Array(6).keys()] + const splitArrayIntoPairs = (arr: any[], pairSize: number) => { + return arr.reduce((result, item, index) => { + if (index % pairSize === 0) { + result.push([]); + } + result[result.length - 1].push(item); + return result; + }, []); + }; + const splitRefPhotos = splitArrayIntoPairs(refPhotos, 2); + return ( + + navigation.goBack()}> + + + + + 견적서 확인 + + 마켓명 (SDP의 상점) + 리폼러 닉네임 (전성식탁) + 마켓 소개글 + + + + 견적서 영수증 + + {quotation.map((item, index) => { + return ( + <> + + {item.key} + {item.data} + + {item.key === '추가 요청사항' && + ( + <> + { + return ( + + {item.map((subItem: any) => ( + + + + ))} + + ) + }} + slider + /> + 이렇게 저렇게 해주세요 + + )} + + ) + })} + + + 안내문 + + 증빙자료를 첨부하시면 담당자 검토 후, 확인 마크를 달아드립니다.{'\n'} + 첨부 가능 자료 : 재학증명서, 졸업증명서, 성적증명서{'\n'} + (용량 입력) 이하 (파일형식 입력) 파일만 등록 가능합니다.{'\n'} + 제출한 자료는 의뢰인에게 노출되지 않습니다. + + {}} text='리폼 제품이 서비스 내의 포트폴리오에 사용되는 것에 동의합니다.' /> + + + {}} /> + + {}} /> + + + + ) +} + +const BackButton = styled.TouchableOpacity` + padding: 10px; + position: absolute; + left: 0px; + top: ${statusBarHeight-10}px; + z-index: 1; +` + +const TextBox = styled.View` + flex-direction: row; + padding: 8px 25px; + justify-content: space-between; +` + +export default QuotationPage; \ No newline at end of file diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index f5ff86e..ba2d984 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -13,6 +13,7 @@ import { TouchableOpacity } from 'react-native-gesture-handler'; import CustomHeader from '../common/CustomHeader'; import MarketTabView from '../components/Home/Market/MarketTabView'; import QuotationForm from '../components/Home/Quotation/QuotationForm'; +import QuotationPage from '../components/Home/Quotation/QuotationPage'; import TempStorage from '../components/Home/Market/TempStorage'; import ServiceRegistrationPage from '../components/Home/Market/ServiceRegistration'; import ServiceDetailPageScreen from '../components/Home/Market/ServiceDetailPage'; @@ -28,7 +29,8 @@ export type HomeStackParams = { id?: number; }; GoodsDetailPage: undefined; - Quotation: undefined; + QuotationForm: undefined; + QuotationPage: undefined; ServiceRegistrationPage: undefined; GoodsRegistrationPage: undefined; TempStorage: undefined; @@ -51,7 +53,8 @@ const HomeScreen = ({ - + + @@ -71,9 +74,12 @@ const HomeMainScreen = ({ navigation.navigate('Market')}> 마켓 - navigation.navigate('Quotation')}> + navigation.navigate('QuotationForm')}> 견적서 + navigation.navigate('QuotationPage')}> + 견적서 확인 + navigation.navigate('ServiceDetailPage', {})}> 서비스 디테일