- 부가서비스 : 자금이체_이체신청 List,필터 재구성
This commit is contained in:
@@ -3,15 +3,17 @@ 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 { getFundAccountStatusName } from '../model/fund-account/constant';
|
||||
import moment from 'moment';
|
||||
|
||||
export const ListItem = ({
|
||||
additionalServiceCategory,
|
||||
mid, tid, paymentDate, paymentStatus,
|
||||
|
||||
requestDate, bankName, accountNo, resultStatus,
|
||||
requestDate, bankName, accountNo, resultStatus,resultMessage,
|
||||
amount, sendDate, sendStatus, sendMethod,
|
||||
scheduledSendDate, processStatus,
|
||||
registDate,
|
||||
|
||||
accountName, transferStatus,
|
||||
|
||||
@@ -118,6 +120,18 @@ export const ListItem = ({
|
||||
} 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 (status === "REQUEST_SUCCESS" || status === "REGIST_COMPLETE") {
|
||||
rs = 'blue';
|
||||
} else if (status === "REQUEST_FAIL") {
|
||||
rs = 'gray';
|
||||
}
|
||||
}
|
||||
return rs;
|
||||
|
||||
@@ -242,7 +256,9 @@ export const ListItem = ({
|
||||
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4) + ':' + time?.substring(4, 6);
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
||||
timeStr = moment(requestDate).format('mm:ss');
|
||||
if (registDate && registDate.length >= 12) {
|
||||
timeStr = registDate.substring(8, 10) + ':' + registDate.substring(10, 12);
|
||||
}
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
||||
timeStr = moment(requestDate).format('mm:ss');
|
||||
@@ -261,6 +277,29 @@ export const ListItem = ({
|
||||
return timeStr;
|
||||
};
|
||||
|
||||
const getStatus = () => {
|
||||
let statusText = '';
|
||||
if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
||||
statusText = getFundAccountStatusName(resultStatus);
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
||||
statusText = getFundAccountStatusName(status);
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
||||
statusText = resultStatus || '';
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||
statusText = transferStatus || '';
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
||||
statusText = status || '';
|
||||
}
|
||||
else {
|
||||
statusText = resultStatus || status || '';
|
||||
}
|
||||
return statusText;
|
||||
};
|
||||
|
||||
const getTitle = () => {
|
||||
let str: string | undefined = '';
|
||||
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
||||
@@ -288,7 +327,7 @@ export const ListItem = ({
|
||||
str = companyName;
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
||||
str = `${receiveAccountName}(${receiveAccountNo})`;
|
||||
str = `${accountName}(${accountNo})`;
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
||||
str = `${receiveAccountName}(${receiveAccountNo})`;
|
||||
@@ -337,7 +376,7 @@ export const ListItem = ({
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FaceAuth) {
|
||||
rs.push(
|
||||
//TODO : 추후 수정 필요
|
||||
//TODO :
|
||||
<div key="face-auth" className="transaction-details">
|
||||
<span>{processStatus}</span>
|
||||
<span className="separator">|</span>
|
||||
@@ -386,10 +425,17 @@ export const ListItem = ({
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<div key="fund-account-transfer" className="transaction-details">
|
||||
<span>{getTime()}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{status}</span>
|
||||
<span>{getStatus()}</span>
|
||||
{resultMessage && (
|
||||
<>
|
||||
<span className="separator">|</span>
|
||||
<span>{resultMessage}</span>
|
||||
</>
|
||||
)}
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -505,11 +551,11 @@ export const ListItem = ({
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
||||
rs.push(
|
||||
<div
|
||||
key="payout-item-amount"
|
||||
key="fund-account-transfer-amount"
|
||||
className="transaction-amount"
|
||||
>
|
||||
<NumericFormat
|
||||
value={transferAmount}
|
||||
value={amount}
|
||||
thousandSeparator
|
||||
displayType="text"
|
||||
suffix='원'
|
||||
|
||||
Reference in New Issue
Block a user