diff --git a/src/entities/transaction/model/types.ts b/src/entities/transaction/model/types.ts index ddf888a..c145342 100644 --- a/src/entities/transaction/model/types.ts +++ b/src/entities/transaction/model/types.ts @@ -336,6 +336,7 @@ export interface AmountInfo { receiptAmount?: number; cupDepositAmount?: number; + customerName?: string; amount?: number; supplyAmount?: number; vat?: number; @@ -486,6 +487,8 @@ export interface MerchantInfo { } export interface DetailResponse { + amount?: number; + customerName?: string; amountDetail?: AmountInfo; amountInfo?: AmountInfo; importantInfo?: ImportantInfo; diff --git a/src/entities/transaction/ui/section/amount-info-section.tsx b/src/entities/transaction/ui/section/amount-info-section.tsx index 167a134..1e343fb 100644 --- a/src/entities/transaction/ui/section/amount-info-section.tsx +++ b/src/entities/transaction/ui/section/amount-info-section.tsx @@ -18,7 +18,6 @@ export const AmountInfoSection = ({ const { mutateAsync: downloadConfirmation } = useDownloadConfirmationMutation(); let newAmountInfo: Record | undefined = amountInfo; - console.log('amountInfo --> ', amountInfo); const subItems: Record> = { mid: {name: 'MID', type: 'string'}, transactionRequestAmount: {name: '거래요청금액', type: 'number'}, @@ -274,17 +273,166 @@ export const AmountInfoSection = ({ } { (transactionCategory === TransactionCategory.Escrow) && - <> + <> + { (serviceCode === '02' || serviceCode === '03') && +
  • + ·  거래금액 + + + +
  • + } + { (serviceCode === '01') && + <> +
  • + ·  신용카드금액 + + + +
  • +
  • + ·  포인트금액 + + + +
  • +
  • + ·  쿠폰금액 + + + +
  • + + } + { (serviceCode === '02' || serviceCode === '03') && +
  • + ·  에스크로수수료 + + + +
  • + } + { (serviceCode === '01') && + <> +
  • + ·  카카오머니 + + + +
  • +
  • + ·  카카오포인트 + + + +
  • +
  • + ·  카카오즉시할인 + + + +
  • +
  • + ·  네이버포인트 + + + +
  • +
  • + ·  토스머니 + + + +
  • +
  • + ·  토스할인 + + + +
  • +
  • + ·  페이코포인트 + + + +
  • +
  • + ·  페이코쿠폰 + + + +
  • + + } + } } - { (transactionCategory === TransactionCategory.AllTransaction) && + { ((transactionCategory === TransactionCategory.AllTransaction) || + (transactionCategory === TransactionCategory.Escrow)) &&
    { amountInfo?.mid }
    } + { (transactionCategory === TransactionCategory.CashReceipt) && +
    + { amountInfo?.customerName } +
    + }
    { ((transactionCategory === TransactionCategory.CashReceipt) || diff --git a/src/pages/transaction/cash-receipt/detail-page.tsx b/src/pages/transaction/cash-receipt/detail-page.tsx index 81e71e2..f424d8b 100644 --- a/src/pages/transaction/cash-receipt/detail-page.tsx +++ b/src/pages/transaction/cash-receipt/detail-page.tsx @@ -76,6 +76,9 @@ export const CashReceiptDetailPage = () => { tid: tid }; cashReceiptDetail(cashReceitDetailParams).then((rs: DetailResponse) => { + if(rs.amountDetail){ + rs.amountDetail.customerName = rs.customerName; + } setAmountInfo(rs.amountDetail || {}); setIssueInfo(rs.issueInfo || {}); setDetailInfo(rs.detailInfo || {}); diff --git a/src/pages/transaction/escrow/detail-page.tsx b/src/pages/transaction/escrow/detail-page.tsx index 7575537..9d026c3 100644 --- a/src/pages/transaction/escrow/detail-page.tsx +++ b/src/pages/transaction/escrow/detail-page.tsx @@ -19,7 +19,8 @@ import { TransactionInfo, SettlementInfo, InfoSectionKeys, - MerchantInfo + MerchantInfo, + AmountInfo } from '@/entities/transaction/model/types'; import { useSetOnBack, @@ -30,6 +31,7 @@ import { import { EscrowMailResendBottomSheet } from '@/entities/transaction/ui/escrow-mail-resend-bottom-sheet'; import { useEscrowMailResendMutation } from '@/entities/transaction/api/use-escrow-mail-resend-mutation'; import { MerchantInfoSection } from '@/entities/transaction/ui/section/merchant-info-section'; +import { AmountInfoSection } from '@/entities/transaction/ui/section/amount-info-section'; export const EscrowDetailPage = () => { const { navigate } = useNavigate(); @@ -37,7 +39,7 @@ export const EscrowDetailPage = () => { const paramTid = location?.state.tid; const serviceCode = location?.state.serviceCode; - const [amountInfo, setAmountInfo] = useState(); + const [amountInfo, setAmountInfo] = useState(); const [importantInfo, setImportantInfo] = useState(); const [escrowInfo, setEscrowInfo] = useState(); const [paymentInfo, setPaymentInfo] = useState(); @@ -73,6 +75,7 @@ export const EscrowDetailPage = () => { tid: tid || paramTid, }; escrowDetail(escroDetailParams).then((rs: DetailResponse) => { + setAmountInfo(rs.amountInfo || {}); setImportantInfo(rs.importantInfo || {}); setEscrowInfo(rs.escrowInfo || {}); setPaymentInfo(rs.paymentInfo || {}); @@ -133,6 +136,15 @@ export const EscrowDetailPage = () => {
    + onClickToOpenInfo(infoSectionKey) } + > +