Merge branch 'main' of https://gitea.bpsoft.co.kr/nicepayments/nice-app-web
This commit is contained in:
@@ -13,19 +13,22 @@ export const ListItem = ({
|
||||
amount, sendDate, sendStatus, sendMethod,
|
||||
scheduledSendDate, processStatus,
|
||||
|
||||
accountName,transferStatus,
|
||||
accountName, transferStatus,
|
||||
|
||||
submallId, settlementDate, companyName,
|
||||
disbursementStatus, disbursementAmount,
|
||||
|
||||
transferAmount, receiveBankName,
|
||||
transferAmount, receiveBankName,
|
||||
receiveAccountNo, receiveAccountName,
|
||||
status, processDate,
|
||||
|
||||
orderStatus, arsPaymentMethod,
|
||||
|
||||
alimCl, sendType, sendCl,
|
||||
paymentMethod, receiverName
|
||||
paymentMethod, receiverName,
|
||||
|
||||
smsCl,
|
||||
onResendClick
|
||||
}: ListItemProps) => {
|
||||
const { navigate } = useNavigate();
|
||||
const getItemClass = () => {
|
||||
@@ -100,13 +103,21 @@ export const ListItem = ({
|
||||
} else {
|
||||
rs = 'gray'
|
||||
}
|
||||
} else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment) {
|
||||
if (smsCl === "VACCOUNT_REQ_DEPOSIT") {
|
||||
rs = 'blue'
|
||||
} else {
|
||||
rs = 'gray'
|
||||
}
|
||||
}
|
||||
return rs;
|
||||
|
||||
};
|
||||
|
||||
const onClickToNavigate = () => {
|
||||
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
||||
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment ||
|
||||
additionalServiceCategory === AdditionalServiceCategory.SMSPayment
|
||||
) {
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -176,7 +187,7 @@ export const ListItem = ({
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Ars){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
||||
navigate(PATHS.additionalService.ars.detail, {
|
||||
state: {
|
||||
additionalServiceCategory: additionalServiceCategory,
|
||||
@@ -186,7 +197,7 @@ export const ListItem = ({
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
||||
navigate(PATHS.additionalService.alimtalk.detail, {
|
||||
state: {
|
||||
additionalServiceCategory: additionalServiceCategory,
|
||||
@@ -220,11 +231,11 @@ export const ListItem = ({
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
||||
timeStr = moment(requestDate).format('mm:ss');
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Ars){
|
||||
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){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
||||
let time = paymentDate?.substring(8, 12);
|
||||
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
||||
}
|
||||
@@ -257,16 +268,19 @@ export const ListItem = ({
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
||||
str = companyName;
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
||||
str = `${receiveAccountName}(${receiveAccountNo})`;
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.FundAccountResult){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
||||
str = `${receiveAccountName}(${receiveAccountNo})`;
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.Ars){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment) {
|
||||
str = `${paymentDate}(${paymentStatus})[추후 수정 필요]`
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
||||
str = '이름(' + tid + ')';
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.Alimtalk){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
||||
str = `${receiverName}(${tid})`;
|
||||
}
|
||||
|
||||
@@ -277,7 +291,7 @@ export const ListItem = ({
|
||||
let rs = [];
|
||||
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<div key='key-in-list' className="transaction-details">
|
||||
<span>{getTime()}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{paymentStatus}</span>
|
||||
@@ -295,7 +309,7 @@ export const ListItem = ({
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<div key="account-search" className="transaction-details">
|
||||
<span>{getTime()}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{bankName}</span>
|
||||
@@ -305,7 +319,7 @@ export const ListItem = ({
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory) {
|
||||
if (paymentStatus === "PAYMENT_FAIL" || paymentStatus === "INACTIVE") {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<div key="link-payment-history" className="transaction-details">
|
||||
<span>{getPaymentStatusText(paymentStatus)}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{getSendMethodText(sendMethod)}</span>
|
||||
@@ -313,7 +327,7 @@ export const ListItem = ({
|
||||
)
|
||||
} else {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<div key="link-payment-history" className="transaction-details">
|
||||
<span>{getPaymentStatusText(paymentStatus)}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{getSendMethodText(sendMethod)}</span>
|
||||
@@ -325,7 +339,7 @@ export const ListItem = ({
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentWait) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<div key="link-payment-wait" className="transaction-details">
|
||||
<span>{getProcessStatusText(processStatus)}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{getSendMethodText(sendMethod)}</span>
|
||||
@@ -341,48 +355,57 @@ export const ListItem = ({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountTransfer) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span>{getTime()}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ status }</span>
|
||||
<span>{status}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.FundAccountResult){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span>{getTime()}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ status }</span>
|
||||
<span>{status}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.Ars){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Ars) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span>{getTime()}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ paymentStatus }</span>
|
||||
<span>{paymentStatus}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ orderStatus }</span>
|
||||
<span>{orderStatus}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ arsPaymentMethod }</span>
|
||||
<span>{arsPaymentMethod}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.Alimtalk){
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span>{getTime()}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ paymentMethod }</span>
|
||||
<span>{paymentMethod}</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ alimCl }</span>
|
||||
<span>{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>{smsCl}</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
|
||||
@@ -394,7 +417,7 @@ export const ListItem = ({
|
||||
{resultStatus === 'SUCCESS' ? '성공' : '실패'}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||
rs.push(
|
||||
<div className={`status-label ${(transferStatus === 'REQUEST' || transferStatus === 'SUCCESS') ? 'success' : 'fail'}`}>
|
||||
@@ -493,9 +516,18 @@ export const ListItem = ({
|
||||
<div
|
||||
key="payout-item-amount"
|
||||
className="transaction-amount"
|
||||
>{ sendCl }</div>
|
||||
>{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;
|
||||
}
|
||||
|
||||
@@ -509,10 +541,10 @@ export const ListItem = ({
|
||||
<div className={`status-dot ${getDotClass()}`}></div>
|
||||
</div>
|
||||
<div className="transaction-content">
|
||||
<div className="transaction-title">{ getTitle() }</div>
|
||||
{ getDetail() }
|
||||
<div className="transaction-title">{getTitle()}</div>
|
||||
{getDetail()}
|
||||
</div>
|
||||
{ getAmount() }
|
||||
{getAmount()}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user