Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dc9a6c
commit 96beeb3
Showing
8 changed files
with
201 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { StringOptionsWithImporter } from 'sass'; | ||
|
||
// 전체 거래 조회 | ||
export interface TransactionDetail { | ||
detailId: string; | ||
user: { | ||
email: string; | ||
displayName: string; | ||
profileImg: string | null; | ||
}; | ||
account: { | ||
backName: string; | ||
bankCode: string; | ||
accountNumber: string; | ||
}; | ||
product: { | ||
productId: string; | ||
title: string; | ||
price: number; | ||
description: string; | ||
tags: string[]; | ||
thumbnail: string | null; | ||
}; | ||
reservation: Reservation | null; | ||
timePaid: string; | ||
isCanceled: boolean; | ||
done: boolean; | ||
} | ||
|
||
// 예약 | ||
export interface Reservation { | ||
start: string; | ||
end: string; | ||
isCanceled: boolean; | ||
isExpired: boolean; | ||
} | ||
|
||
// 전체 제품 조회 | ||
export interface Product { | ||
id: string; | ||
title: string; | ||
price: number; | ||
description: string; | ||
tags: string[]; | ||
thumbnail: string; | ||
isSoldOut: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,71 @@ | ||
import React from 'react'; | ||
import { FaFileInvoiceDollar, FaCoins } from 'react-icons/fa'; | ||
import { FaFileInvoiceDollar, FaCoins, FaDivide } from 'react-icons/fa'; | ||
import styles from './StateBoard.module.scss'; | ||
|
||
type Props = { | ||
state: string; | ||
content1: string; | ||
content2: string; | ||
content3: string; | ||
content1: number; | ||
content2: number; | ||
content3: number; | ||
}; | ||
|
||
const StateBoard = ({ state, content1, content2, content3 }: Props) => { | ||
return ( | ||
<div className={styles.board}> | ||
<div className={styles.title}> | ||
{state === '주문 현황' ? ( | ||
const orderState = () => { | ||
return ( | ||
<> | ||
<div className={styles.title}> | ||
<FaFileInvoiceDollar className={styles.icon} /> | ||
) : ( | ||
<h3>{state}</h3> | ||
</div> | ||
<div className={styles.content}> | ||
<div className={styles.des}> | ||
<span className={styles.desTitle}>신규 주문</span> | ||
<span className={styles.desContent}>{content1}</span> | ||
<span className={styles.desUnit}>건</span> | ||
</div> | ||
<div className={styles.des}> | ||
<span className={styles.desTitle}>구매 확정</span> | ||
<span className={styles.desContent}>{content2}</span> | ||
<span className={styles.desUnit}>건</span> | ||
</div> | ||
<div className={styles.des}> | ||
<span className={styles.desTitle}>거래 취소</span> | ||
<span className={styles.desContent}>{content3}</span> | ||
<span className={styles.desUnit}>건</span> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
const payState = () => { | ||
return ( | ||
<> | ||
<div className={styles.title}> | ||
<FaCoins className={styles.icon} /> | ||
)} | ||
<h3>{state}</h3> | ||
</div> | ||
<hr /> | ||
<div> | ||
<span>{content1}</span> | ||
<span>{state === '주문 현황' ? '건' : '개'}</span> | ||
</div> | ||
<div> | ||
<span>{content2}</span> | ||
<span>{state === '주문 현황' ? '건' : '원'}</span> | ||
</div> | ||
<div> | ||
<span>{content3}</span> | ||
<span>건</span> | ||
</div> | ||
</div> | ||
); | ||
<h3>{state}</h3> | ||
</div> | ||
<div className={styles.content}> | ||
<div className={styles.des}> | ||
<span className={styles.desTitle}>전체 상품 수</span> | ||
<span className={styles.desContent}>{content1}</span> | ||
<span className={styles.desUnit}>개</span> | ||
</div> | ||
<div className={styles.des}> | ||
<span className={styles.desTitle}>전체 판매액</span> | ||
<span className={styles.desContent}>{content2.toLocaleString()}</span> | ||
<span className={styles.desUnit}>원</span> | ||
</div> | ||
<div className={styles.des}> | ||
<span className={styles.desTitle}>전체 거래 수</span> | ||
<span className={styles.desContent}>{content3}</span> | ||
<span className={styles.desUnit}>건</span> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
return <div className={styles.board}>{state === '주문 현황' ? orderState() : payState()}</div>; | ||
}; | ||
|
||
export default StateBoard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
@import 'reset-css' | ||
@import 'reset-css'; | ||
@import url(//fonts.googleapis.com/earlyaccess/nanumgothic.css); | ||
|
||
body { | ||
font-family: 'Nanum Gothic', sans-serif; | ||
} |