648 lines
22 KiB
TypeScript
648 lines
22 KiB
TypeScript
import { NumericFormat } from 'react-number-format';
|
|
import { PATHS } from '@/shared/constants/paths';
|
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
import { ListItemProps, AdditionalServiceCategory } from '../model/types';
|
|
import { getPaymentStatusText, getProcessStatusText, getSendMethodText } from '../lib/payment-status-utils';
|
|
import { getFundAccountResultStatusName, getFundAccountStatusName } from '../model/fund-account/constant';
|
|
import moment from 'moment';
|
|
import { FundAccountResultStatus } from '../model/fund-account/types';
|
|
import { getSmsClName } from '../model/sms-payment/constant';
|
|
import { getKeyInPaymentPaymentStatusName } from '../model/key-in/constant';
|
|
import { getArsPaymentStatusName, getArsOrderStatusName } from '../model/ars/constant';
|
|
import { ServiceCode } from '../model/alimtalk/types';
|
|
import { getAlimtalkAlimClText, getAlimtalkSendClTypeText, getAlimtalkSendTypeText, getAlimtalkServiceCodeText } from '../model/alimtalk/constant';
|
|
import { getAuthResultStatusText, getTransTypeText } from '../model/face-auth/constant';
|
|
|
|
export const ListItem = ({
|
|
additionalServiceCategory,
|
|
mid, tid, paymentDate, paymentStatus,
|
|
|
|
applicationDate, requestDate, bankName, accountNo, resultStatus, resultMessage,
|
|
amount, sendMethod, processStatus,registDate,
|
|
|
|
accountName,
|
|
|
|
submallId, settlementDate, companyName,
|
|
disbursementStatus, disbursementAmount,
|
|
|
|
orderStatus, arsPaymentMethod,
|
|
|
|
alimCl, sendType, sendCl,
|
|
paymentMethod, receiverName,
|
|
requestId,subReqId,
|
|
buyerName,receiverInfo,
|
|
seq,serviceCode,sendDate,
|
|
authStatus,
|
|
|
|
smsCl,groupId,userMallId,transType,
|
|
authResult,failReason,requestTime,
|
|
onResendClick
|
|
}: ListItemProps) => {
|
|
const { navigate } = useNavigate();
|
|
const getItemClass = () => {
|
|
let rs = '';
|
|
if (paymentStatus === '') {
|
|
rs = '';
|
|
}
|
|
else if (paymentStatus === "APPROVAL") {
|
|
rs = 'approved';
|
|
}
|
|
else if (paymentStatus === "ALL_CANCEL") {
|
|
rs = 'refund';
|
|
}
|
|
else if (paymentStatus === 'AFTER_CANCEL') {
|
|
rs = 'refund';
|
|
}
|
|
return rs;
|
|
};
|
|
|
|
const getDotClass = (str?: string) => {
|
|
let rs = '';
|
|
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
|
if (paymentStatus === '') {
|
|
rs = '';
|
|
}
|
|
else if (paymentStatus === "APPROVAL") {
|
|
rs = 'blue';
|
|
}
|
|
else if (paymentStatus === "ALL_CANCEL") {
|
|
rs = 'gray';
|
|
}
|
|
else if (paymentStatus === 'AFTER_CANCEL') {
|
|
rs = 'gray';
|
|
}
|
|
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
|
if (authStatus === "REQUEST" || authStatus === "SUCCESS") {
|
|
rs = 'blue';
|
|
} else if (authStatus === "FAIL") {
|
|
rs = 'gray';
|
|
}
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
|
if (resultStatus === "SUCCESS") {
|
|
rs = 'blue';
|
|
}
|
|
else if (resultStatus === "FAIL") {
|
|
rs = 'gray';
|
|
}
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
|
if (authResult === "SUCCESS") {
|
|
rs = 'blue';
|
|
}
|
|
else if (authResult === "FAIL") {
|
|
rs = 'gray';
|
|
}
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory) {
|
|
if (paymentStatus === "PAYMENT_COMPLETE") {
|
|
rs = 'blue';
|
|
}
|
|
|
|
else if (paymentStatus === "ACTIVE") {
|
|
rs = 'blue';
|
|
}
|
|
else if (paymentStatus === "DEPOSIT_REQUEST") {
|
|
rs = 'blue';
|
|
}
|
|
else if (paymentStatus === "PAYMENT_FAIL") {
|
|
rs = 'blue';
|
|
}
|
|
else if (paymentStatus === "INACTIVE") {
|
|
rs = 'gray';
|
|
}
|
|
} else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentWait) {
|
|
if (processStatus === "SEND_REQUEST") {
|
|
rs = 'blue'
|
|
} else {
|
|
rs = 'gray'
|
|
}
|
|
} else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment) {
|
|
if (smsCl === "VACCOUNT_REQ_DEPOSIT") {
|
|
rs = 'blue'
|
|
} else {
|
|
rs = 'gray'
|
|
}
|
|
} else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
|
if (resultStatus === "REQUEST_SUCCESS" || resultStatus === "REGIST_COMPLETE" || resultStatus === "TRANSFER_REQUEST") {
|
|
rs = 'blue';
|
|
} else if (resultStatus === "REQUEST_FAIL") {
|
|
rs = 'gray';
|
|
}
|
|
} else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
|
if (resultStatus === "REQUEST" || resultStatus === "SUCCESS") {
|
|
rs = 'blue';
|
|
} else if (resultStatus === "FAIL") {
|
|
rs = 'gray';
|
|
}
|
|
}
|
|
return rs;
|
|
|
|
};
|
|
|
|
const onClickToNavigate = () => {
|
|
// 상세페이지 없음
|
|
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment ||
|
|
additionalServiceCategory === AdditionalServiceCategory.SMSPayment ||
|
|
additionalServiceCategory === AdditionalServiceCategory.FaceAuth
|
|
) {
|
|
|
|
return;
|
|
}
|
|
//이하 상세페이지 존재
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
|
navigate(PATHS.additionalService.accountHolderAuth.detail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid
|
|
}
|
|
})
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
|
navigate(PATHS.additionalService.accountHolderSearch.detail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid
|
|
}
|
|
});
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory) {
|
|
navigate(PATHS.additionalService.linkPayment.detail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid,
|
|
requestId: requestId,
|
|
subReqId: subReqId
|
|
}
|
|
});
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentWait) {
|
|
navigate(PATHS.additionalService.linkPayment.pendingDetail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid,
|
|
requestId: requestId
|
|
}
|
|
});
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
|
navigate(PATHS.additionalService.fundAccount.transferDetail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
seq: seq
|
|
}
|
|
});
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
|
navigate(PATHS.additionalService.fundAccount.resultDetail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid
|
|
}
|
|
});
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.SettlementAgency) {
|
|
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
|
navigate(PATHS.additionalService.payout.detail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid
|
|
}
|
|
});
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
|
navigate(PATHS.additionalService.ars.detail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid,
|
|
amount: amount
|
|
}
|
|
});
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
|
navigate(PATHS.additionalService.alimtalk.detail, {
|
|
state: {
|
|
additionalServiceCategory: additionalServiceCategory,
|
|
mid: mid,
|
|
tid: tid,
|
|
}
|
|
});
|
|
}
|
|
// else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
|
// navigate(PATHS.additionalService.faceAuth.detail, {
|
|
// state: {
|
|
// additionalServiceCategory: additionalServiceCategory,
|
|
// mid: mid
|
|
// }
|
|
// })
|
|
// }
|
|
else {
|
|
alert('additionalServiceCategory가 존재하지 않습니다.');
|
|
}
|
|
};
|
|
|
|
const getTime = () => {
|
|
let timeStr = '';
|
|
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
|
let time = paymentDate?.substring(8, 12);
|
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
|
let time = requestDate?.substring(8, 14);
|
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4) + ':' + time?.substring(4, 6);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
|
let time = requestDate?.substring(8, 14);
|
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4) + ':' + time?.substring(4, 6);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
|
let time = requestDate?.substring(8, 14);
|
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4) + ':' + time?.substring(4, 6);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
|
if (registDate && registDate.length >= 12) {
|
|
timeStr = registDate.substring(8, 10) + ':' + registDate.substring(10, 12);
|
|
}
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
|
if (applicationDate && applicationDate.length >= 12) {
|
|
timeStr = applicationDate.substring(8, 10) + ':' + applicationDate.substring(10, 12);
|
|
} else {
|
|
timeStr = requestDate?.substring(8,10) + ':' + requestDate?.substring(10, 12);
|
|
}
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
|
let time = paymentDate?.substring(8, 12);
|
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
|
let time = sendDate?.substring(8, 12);
|
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
|
}
|
|
else {
|
|
return
|
|
}
|
|
return timeStr;
|
|
};
|
|
|
|
const getStatus = () => {
|
|
let statusText = '';
|
|
if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
|
statusText = getFundAccountStatusName(resultStatus);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
|
statusText = getFundAccountResultStatusName(resultStatus);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
|
statusText = resultStatus || '';
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
|
statusText = authStatus || '';
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
|
statusText = getTransTypeText(transType)
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment) {
|
|
statusText = getSmsClName(smsCl);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
|
statusText = getKeyInPaymentPaymentStatusName(paymentStatus)
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
|
statusText = getArsPaymentStatusName(paymentStatus)
|
|
}
|
|
else {
|
|
statusText = resultStatus || status || '';
|
|
}
|
|
return statusText;
|
|
};
|
|
|
|
const getTitle = () => {
|
|
let str: string | undefined = '';
|
|
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
|
str = `${tid}(${amount})`;
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
|
str = `${accountName}(${accountNo})`;
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
|
str = `${accountNo}`;
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
|
str = `${userMallId}(${mid})`;
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory ||
|
|
additionalServiceCategory === AdditionalServiceCategory.LinkPaymentWait
|
|
) {
|
|
str = `${buyerName}(${receiverInfo})`;
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
|
str = companyName;
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer ||
|
|
additionalServiceCategory === AdditionalServiceCategory.FundAccountResult
|
|
) {
|
|
str = `${accountName}(${accountNo})`;
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment) {
|
|
str = `${paymentDate}(${paymentStatus})[추후 수정 필요]`
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
|
str = '이름(' + tid + ')';
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
|
str = `${receiverName}(${getAlimtalkSendTypeText(sendType)})`;
|
|
}
|
|
|
|
return str;
|
|
};
|
|
|
|
const getDetail = () => {
|
|
let rs = [];
|
|
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
|
rs.push(
|
|
<div key='key-in-list' className="transaction-details">
|
|
<span>{getTime()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getStatus()}</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
|
rs.push(
|
|
<div key="account-auth-list" className="transaction-details">
|
|
<span>{getTime()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{bankName}</span>
|
|
</div>
|
|
)
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
|
rs.push(
|
|
<div key="account-search" className="transaction-details">
|
|
<span>{getTime()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{bankName}</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
|
rs.push(
|
|
<div key="face-auth" className="transaction-details">
|
|
<span>{getStatus()}</span>
|
|
<span className="separator">|</span>
|
|
<span>
|
|
{authResult === 'FAIL'
|
|
? `${getAuthResultStatusText(authResult)}: ${failReason}`
|
|
: getAuthResultStatusText(authResult)
|
|
}
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory) {
|
|
if (paymentStatus === "0" || paymentStatus === "3" || paymentStatus === "4") {
|
|
rs.push(
|
|
<div key="link-payment-history" className="transaction-details">
|
|
<span>{getPaymentStatusText(paymentStatus)}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getSendMethodText(sendMethod)}</span>
|
|
</div>
|
|
)
|
|
} else {
|
|
rs.push(
|
|
<div key="link-payment-history" className="transaction-details">
|
|
<span>{getPaymentStatusText(paymentStatus)}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getSendMethodText(sendMethod)}</span>
|
|
<span className="separator">|</span>
|
|
<span>{paymentMethod}</span>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentWait) {
|
|
rs.push(
|
|
<div key="link-payment-wait" className="transaction-details">
|
|
<span>{getProcessStatusText(processStatus)}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getSendMethodText(sendMethod)}</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
|
rs.push(
|
|
<div className="transaction-details">
|
|
<span>{disbursementStatus}</span>
|
|
<span className="separator">|</span>
|
|
<span>{submallId}</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
|
rs.push(
|
|
<div key="fund-account-transfer" className="transaction-details">
|
|
<span>{getTime()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getStatus()}</span>
|
|
{resultMessage && (
|
|
<>
|
|
<span className="separator">|</span>
|
|
<span>{resultMessage}</span>
|
|
</>
|
|
)}
|
|
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
|
rs.push(
|
|
<div key="fund-account-transfer" className="transaction-details">
|
|
<span>{getTime()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getStatus()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{mid}</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
|
rs.push(
|
|
<div className="transaction-details">
|
|
<span>{getTime()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getStatus()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getArsOrderStatusName(orderStatus)}</span>
|
|
<span className="separator">|</span>
|
|
<span>{arsPaymentMethod}</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
|
console.log(serviceCode)
|
|
rs.push(
|
|
<div className="transaction-details">
|
|
<span>{getTime()}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getAlimtalkServiceCodeText(serviceCode)}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getAlimtalkAlimClText(alimCl)}</span>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment) {
|
|
rs.push(
|
|
<div key="sms-payment" className="transaction-details">
|
|
<span>{mid}</span>
|
|
<span className="separator">|</span>
|
|
<span>{getStatus()}</span>
|
|
</div>
|
|
)
|
|
}
|
|
return rs;
|
|
};
|
|
|
|
const getAmount = () => {
|
|
let rs: any[] = [];
|
|
if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
|
rs.push(
|
|
<div className={`status-label ${resultStatus === 'SUCCESS' ? 'success' : 'fail'}`}>
|
|
{resultStatus === 'SUCCESS' ? '성공' : '실패'}
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
|
rs.push(
|
|
<div className={`status-label ${authResult === 'SUCCESS' ? 'success' : 'fail'}`}>
|
|
{authResult === 'SUCCESS' ? '성공' : '실패'}
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
|
rs.push(
|
|
<div className={`status-label ${(authStatus === 'REQUEST' || authStatus === 'SUCCESS') ? 'success' : 'fail'}`}>
|
|
{(authStatus === 'REQUEST' || authStatus === 'SUCCESS') ? '성공' : '실패'}
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
|
rs.push(
|
|
<div className="transaction-amount">
|
|
<NumericFormat
|
|
value={amount}
|
|
thousandSeparator
|
|
displayType="text"
|
|
suffix='원'
|
|
></NumericFormat>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory ||
|
|
additionalServiceCategory === AdditionalServiceCategory.LinkPaymentWait
|
|
) {
|
|
rs.push(
|
|
<div className="transaction-amount">
|
|
<NumericFormat
|
|
value={amount}
|
|
thousandSeparator
|
|
displayType="text"
|
|
suffix='원'
|
|
></NumericFormat>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
|
rs.push(
|
|
<div
|
|
key="payout-item-amount"
|
|
className="transaction-amount"
|
|
>
|
|
<NumericFormat
|
|
value={disbursementAmount}
|
|
thousandSeparator
|
|
displayType="text"
|
|
suffix='원'
|
|
></NumericFormat>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer ||
|
|
additionalServiceCategory === AdditionalServiceCategory.FundAccountResult
|
|
) {
|
|
rs.push(
|
|
<div
|
|
key="fund-account-transfer-amount"
|
|
className="transaction-amount"
|
|
>
|
|
<NumericFormat
|
|
value={amount}
|
|
thousandSeparator
|
|
displayType="text"
|
|
suffix='원'
|
|
></NumericFormat>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
|
rs.push(
|
|
<div
|
|
key="payout-item-amount"
|
|
className="transaction-amount"
|
|
>
|
|
<NumericFormat
|
|
value={amount}
|
|
thousandSeparator
|
|
displayType="text"
|
|
suffix='원'
|
|
></NumericFormat>
|
|
</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
|
rs.push(
|
|
<div key="payout-item-amount" className={`status-label ${(sendCl === 'REQUEST' || sendCl === 'SUCCESS') ? 'success' : 'fail'}`}
|
|
>{getAlimtalkSendClTypeText(sendCl)}</div>
|
|
);
|
|
}
|
|
else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment && onResendClick && tid) {
|
|
rs.push(
|
|
<div
|
|
key="sms-payment-amount"
|
|
className={`status-label success`}
|
|
onClick={() => mid && tid && onResendClick(mid, tid)}
|
|
>{'재발송'}</div>
|
|
)
|
|
}
|
|
return rs;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<div
|
|
className={`transaction-item ${getItemClass()}`}
|
|
onClick={() => onClickToNavigate()}
|
|
>
|
|
<div className="transaction-status">
|
|
<div className={`status-dot ${getDotClass()}`}></div>
|
|
</div>
|
|
<div className="transaction-content">
|
|
<div className="transaction-title">{getTitle()}</div>
|
|
{getDetail()}
|
|
</div>
|
|
{getAmount()}
|
|
</div>
|
|
</>
|
|
);
|
|
}; |