빌링
This commit is contained in:
@@ -318,7 +318,7 @@ export interface EscrowDetailParams {
|
|||||||
tid?: string;
|
tid?: string;
|
||||||
};
|
};
|
||||||
export interface BillingDetailParams {
|
export interface BillingDetailParams {
|
||||||
billKey?: string;
|
tid?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface AmountInfo {
|
export interface AmountInfo {
|
||||||
@@ -361,6 +361,8 @@ export interface AmountInfo {
|
|||||||
discountType?: string | null;
|
discountType?: string | null;
|
||||||
discountAmount?: number;
|
discountAmount?: number;
|
||||||
simplePaymentServiceCode?: string;
|
simplePaymentServiceCode?: string;
|
||||||
|
|
||||||
|
buyerName?: string;
|
||||||
};
|
};
|
||||||
export interface ImportantInfo {
|
export interface ImportantInfo {
|
||||||
moid?: string;
|
moid?: string;
|
||||||
@@ -522,6 +524,7 @@ export interface BillingInfo {
|
|||||||
orderNumber: string;
|
orderNumber: string;
|
||||||
approvalNumber: string;
|
approvalNumber: string;
|
||||||
approvalDate: string;
|
approvalDate: string;
|
||||||
|
transactionAmount?: number;
|
||||||
requestStatus: string;
|
requestStatus: string;
|
||||||
processResult: string;
|
processResult: string;
|
||||||
installmentMonth: string;
|
installmentMonth: string;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export const ListItem = ({
|
|||||||
else if(transactionCategory === TransactionCategory.Billing){
|
else if(transactionCategory === TransactionCategory.Billing){
|
||||||
navigate(PATHS.transaction.billing.detail, {
|
navigate(PATHS.transaction.billing.detail, {
|
||||||
state: {
|
state: {
|
||||||
billKey: billKey
|
tid: tid,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -461,8 +461,7 @@ export const AmountInfoSection = ({
|
|||||||
<div className="txn-doc">
|
<div className="txn-doc">
|
||||||
{
|
{
|
||||||
((transactionCategory === TransactionCategory.CashReceipt) ||
|
((transactionCategory === TransactionCategory.CashReceipt) ||
|
||||||
(transactionCategory === TransactionCategory.Escrow) ||
|
(transactionCategory === TransactionCategory.Escrow)) &&
|
||||||
(transactionCategory === TransactionCategory.Billing)) &&
|
|
||||||
!!canDownloadReceipt &&
|
!!canDownloadReceipt &&
|
||||||
<button
|
<button
|
||||||
className="doc-btn"
|
className="doc-btn"
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import {
|
|||||||
TransactionCategory,
|
TransactionCategory,
|
||||||
BillingDetailParams,
|
BillingDetailParams,
|
||||||
BillingDetailResponse,
|
BillingDetailResponse,
|
||||||
BillingInfo
|
BillingInfo,
|
||||||
|
AmountInfo
|
||||||
} from '@/entities/transaction/model/types';
|
} from '@/entities/transaction/model/types';
|
||||||
import {
|
import {
|
||||||
useSetOnBack,
|
useSetOnBack,
|
||||||
@@ -18,12 +19,18 @@ import {
|
|||||||
useSetFooterMode
|
useSetFooterMode
|
||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
} from '@/widgets/sub-layout/use-sub-layout';
|
||||||
import { NumericFormat } from 'react-number-format';
|
import { NumericFormat } from 'react-number-format';
|
||||||
|
import { C } from 'node_modules/react-router/dist/development/index-react-server-client-DRhjXpk2.mjs';
|
||||||
|
import { AmountInfoSection } from '@/entities/transaction/ui/section/amount-info-section';
|
||||||
|
|
||||||
export const BillingDetailPage = () => {
|
export const BillingDetailPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
const tid = location?.state.tid;
|
||||||
|
const serviceCode = location?.state.serviceCode;
|
||||||
|
|
||||||
|
|
||||||
const [billingInfo, setBillingInfo] = useState<BillingInfo>();
|
const [billingInfo, setBillingInfo] = useState<BillingInfo>();
|
||||||
|
const [amountInfo, setAmountInfo] = useState<AmountInfo>();
|
||||||
|
|
||||||
useSetHeaderTitle('빌링 상세');
|
useSetHeaderTitle('빌링 상세');
|
||||||
useSetHeaderType(HeaderType.RightClose);
|
useSetHeaderType(HeaderType.RightClose);
|
||||||
@@ -36,10 +43,14 @@ export const BillingDetailPage = () => {
|
|||||||
|
|
||||||
const callDetail = () => {
|
const callDetail = () => {
|
||||||
let billingDetailParams: BillingDetailParams = {
|
let billingDetailParams: BillingDetailParams = {
|
||||||
billKey: location?.state.billKey
|
tid: tid
|
||||||
};
|
};
|
||||||
billingDetail(billingDetailParams).then((rs: BillingDetailResponse) => {
|
billingDetail(billingDetailParams).then((rs: BillingDetailResponse) => {
|
||||||
setBillingInfo(rs);
|
setBillingInfo(rs);
|
||||||
|
setAmountInfo({
|
||||||
|
transactionAmount: rs.transactionAmount,
|
||||||
|
buyerName: rs.buyerName
|
||||||
|
})
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -57,17 +68,17 @@ export const BillingDetailPage = () => {
|
|||||||
<div className="txn-amount">
|
<div className="txn-amount">
|
||||||
<div className="value">
|
<div className="value">
|
||||||
<NumericFormat
|
<NumericFormat
|
||||||
value={ 100000000 }
|
value={ amountInfo?.transactionAmount }
|
||||||
thousandSeparator
|
thousandSeparator
|
||||||
displayType="text"
|
displayType="text"
|
||||||
></NumericFormat>
|
></NumericFormat>
|
||||||
<span className="unit">원</span>
|
<span className="unit">원</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div className="txn-mid">
|
<div className="txn-mid">
|
||||||
<span className="value">{ 'nitnitni' }</span>
|
<span className="value">{ amountInfo?.buyerName }</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="txn-doc"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
<BillingInfoSection
|
<BillingInfoSection
|
||||||
|
|||||||
Reference in New Issue
Block a user