From 5643e7855586b74355790d3604d913037002d736 Mon Sep 17 00:00:00 2001 From: HyeonJongKim Date: Mon, 10 Nov 2025 10:24:12 +0900 Subject: [PATCH] =?UTF-8?q?-=20SMS,=EC=A7=80=EA=B8=89=EB=8C=80=ED=96=89=20?= =?UTF-8?q?=EB=8B=A4=EA=B5=AD=EC=96=B4=20=EB=AC=B8=EC=9E=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/payout/detail/payout-detail.tsx | 348 +++++++++--------- .../sms-payment/sms-payment-detail-resend.tsx | 2 +- src/locales/en.json | 3 +- src/locales/ko.json | 9 +- 4 files changed, 182 insertions(+), 180 deletions(-) diff --git a/src/entities/additional-service/ui/payout/detail/payout-detail.tsx b/src/entities/additional-service/ui/payout/detail/payout-detail.tsx index a30220d..5bfe27a 100644 --- a/src/entities/additional-service/ui/payout/detail/payout-detail.tsx +++ b/src/entities/additional-service/ui/payout/detail/payout-detail.tsx @@ -13,190 +13,190 @@ import { checkGrant } from '@/shared/lib/check-grant'; import { snackBar } from '@/shared/lib'; export interface PayoutDetailProps { - detailOn: boolean; - setDetailOn: (detailOn: boolean) => void; - mid: string; - tid: string; + detailOn: boolean; + setDetailOn: (detailOn: boolean) => void; + mid: string; + tid: string; }; export const PayoutDetail = ({ - detailOn, - setDetailOn, - mid, - tid + detailOn, + setDetailOn, + mid, + tid }: PayoutDetailProps) => { - const { t } = useTranslation(); + const { t } = useTranslation(); - const [detail, setDetail] = useState(); - - const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState(false); + const [detail, setDetail] = useState(); - const { mutateAsync: extensionPayoutDetail } = useExtensionPayoutDetailMutation(); - const { mutateAsync: extensionPayoutDetailDownloadCertification } = useExtensionPayoutDetailDownloadCertificateMutation(); + const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState(false); - const callDetail = () => { - let params: ExtensionPayoutDetailParams = { - tid: tid, - mid: mid, - }; - extensionPayoutDetail(params).then((rs: ExtensionPayoutDetailResponse) => { - setDetail(rs); - }).catch((e: any) => { - if(e.response?.data?.error?.message){ - snackBar(e.response?.data?.error?.message); - return; - } - }); - } + const { mutateAsync: extensionPayoutDetail } = useExtensionPayoutDetailMutation(); + const { mutateAsync: extensionPayoutDetailDownloadCertification } = useExtensionPayoutDetailDownloadCertificateMutation(); - const onClickToOpenDownloadBottomSheet = () => { - if(!checkGrant(53, 'D')){ - showAlert(t('common.nopermission')); - return; - } - setDownloadBottomSheetOn(true); - }; + const callDetail = () => { + let params: ExtensionPayoutDetailParams = { + tid: tid, + mid: mid, + }; + extensionPayoutDetail(params).then((rs: ExtensionPayoutDetailResponse) => { + setDetail(rs); + }).catch((e: any) => { + if (e.response?.data?.error?.message) { + snackBar(e.response?.data?.error?.message); + return; + } + }); + } - const onRequestDownload = ( - selectedMode: DownloadSelectedMode, - userEmail?: string - ) => { - if(selectedMode === DownloadSelectedMode.IMAGE){ - const params: ExtensionPayoutDetailDownloadCertificateParams = { - mid: mid, - tid: tid, - requestType: 'IMAGE', - email: '' - }; - extensionPayoutDetailDownloadCertification(params).then((rs: ExtensionPayoutDetailDownloadCertificateResponse) => { - console.log('Certificate Download Status:', rs); - }).catch((error) => { - console.error('Certificate Download Failed:', error); - }); - } - else if(selectedMode === DownloadSelectedMode.EMAIL - && userEmail - ){ - const params: ExtensionPayoutDetailDownloadCertificateParams = { - mid: mid, - tid: tid, - requestType: 'EMAIL', - email: userEmail - }; - extensionPayoutDetailDownloadCertification(params).then((rs: ExtensionPayoutDetailDownloadCertificateResponse) => { - console.log('Certificate Download Status:', rs); - }).catch((error) => { - console.error('Certificate Download Failed:', error); - }); - } - }; + const onClickToOpenDownloadBottomSheet = () => { + if (!checkGrant(53, 'D')) { + showAlert(t('common.nopermission')); + return; + } + setDownloadBottomSheetOn(true); + }; - const onClickToClose = () => { - setDetailOn(false); - }; + const onRequestDownload = ( + selectedMode: DownloadSelectedMode, + userEmail?: string + ) => { + if (selectedMode === DownloadSelectedMode.IMAGE) { + const params: ExtensionPayoutDetailDownloadCertificateParams = { + mid: mid, + tid: tid, + requestType: selectedMode, + email: '' + }; + extensionPayoutDetailDownloadCertification(params).then((rs: ExtensionPayoutDetailDownloadCertificateResponse) => { + console.log('Certificate Download Status:', rs); + }).catch((error) => { + console.error('Certificate Download Failed:', error); + }); + } + else if (selectedMode === DownloadSelectedMode.EMAIL + && userEmail + ) { + const params: ExtensionPayoutDetailDownloadCertificateParams = { + mid: mid, + tid: tid, + requestType: 'EMAIL', + email: userEmail + }; + extensionPayoutDetailDownloadCertification(params).then((rs: ExtensionPayoutDetailDownloadCertificateResponse) => { + console.log('Certificate Download Status:', rs); + }).catch((error) => { + console.error('Certificate Download Failed:', error); + }); + } + }; - useEffect(() => { - if (!!mid && !!tid) { - callDetail(); - } - }, [mid, tid]); + const onClickToClose = () => { + setDetailOn(false); + }; - return ( - <> - -
-
-
{t('additionalService.payout.detailTitle')}
-
- -
-
-
-
- - {t('home.money', { value: new Intl.NumberFormat('en-US').format(detail?.disbursementAmount || 0) })} - -
-
{detail?.companyName}
-
{moment(detail?.settlementDate).format('YYYY.MM.DD')}
-
- -
-
-
-
-
{t('additionalService.payout.detailInfo')}
-
    -
  • - {t('additionalService.payout.disbursementStatus')} - {detail?.disbursementStatus} -
  • -
  • - {t('additionalService.payout.transactionType')} - {detail?.transTypeName} -
  • -
  • - {t('common.requestDate')} - {moment(detail?.requestDate).format('YYYY.MM.DD')} -
  • -
  • - {t('additionalService.payout.disbursementDateTime')} - {detail?.settlementDateTime ? moment(detail?.settlementDateTime, 'YYYYMMDDHHmmss').format('YYYY.MM.DD HH:mm:ss') : ""} -
  • -
  • - {t('additionalService.payout.businessNumber')} - {detail?.companyNo} -
  • -
  • - {t('additionalService.payout.accountHolder')} - {detail?.accountName} -
  • -
  • - {t('additionalService.payout.bank')} - {detail?.bankName} -
  • -
  • - {t('additionalService.payout.accountNumber')} - {detail?.accountNo} -
  • -
  • - {t('additionalService.payout.depositor')} - {detail?.depositName} -
  • -
  • - {t('additionalService.payout.failureReason')} - {detail?.failReason} -
  • -
-
-
- { !!downloadBottomSheetOn && - - } -
- - ); + useEffect(() => { + if (!!mid && !!tid) { + callDetail(); + } + }, [mid, tid]); + + return ( + <> + +
+
+
{t('additionalService.payout.detailTitle')}
+
+ +
+
+
+
+ + {t('home.money', { value: new Intl.NumberFormat('en-US').format(detail?.disbursementAmount || 0) })} + +
+
{detail?.companyName}
+
{moment(detail?.settlementDate).format('YYYY.MM.DD')}
+
+ +
+
+
+
+
{t('additionalService.payout.detailInfo')}
+
    +
  • + {t('additionalService.payout.disbursementStatus')} + {detail?.disbursementStatus} +
  • +
  • + {t('additionalService.payout.transactionType')} + {detail?.transTypeName} +
  • +
  • + {t('common.requestDate')} + {moment(detail?.requestDate).format('YYYY.MM.DD')} +
  • +
  • + {t('additionalService.payout.disbursementDateTime')} + {detail?.settlementDateTime ? moment(detail?.settlementDateTime, 'YYYYMMDDHHmmss').format('YYYY.MM.DD HH:mm:ss') : ""} +
  • +
  • + {t('additionalService.payout.businessNumber')} + {detail?.companyNo} +
  • +
  • + {t('additionalService.payout.accountHolder')} + {detail?.accountName} +
  • +
  • + {t('additionalService.payout.bank')} + {detail?.bankName} +
  • +
  • + {t('additionalService.payout.accountNumber')} + {detail?.accountNo} +
  • +
  • + {t('additionalService.payout.depositor')} + {detail?.depositName} +
  • +
  • + {t('additionalService.payout.failureReason')} + {detail?.failReason} +
  • +
+
+
+ {!!downloadBottomSheetOn && + + } +
+ + ); }; \ No newline at end of file diff --git a/src/entities/additional-service/ui/sms-payment/sms-payment-detail-resend.tsx b/src/entities/additional-service/ui/sms-payment/sms-payment-detail-resend.tsx index 588e387..48f25ba 100644 --- a/src/entities/additional-service/ui/sms-payment/sms-payment-detail-resend.tsx +++ b/src/entities/additional-service/ui/sms-payment/sms-payment-detail-resend.tsx @@ -99,7 +99,7 @@ export const SmsPaymentDetailResend = ({ onClick={onClickResend} disabled={!smsDetailData?.sendMessage} > - {t('common.request')} + {t('additionalService.sms.smsResendButton')} diff --git a/src/locales/en.json b/src/locales/en.json index 7c53c31..1b10fbd 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -933,6 +933,7 @@ "virtualAccountRequest": "Virtual Account Request", "virtualAccountRequestDeposit": "Virtual Account Request + Deposit", "smsDetailAndResend": "SMS Details & Resend", + "smsResendButton": "Resend", "sender": "Sender (Number)", "receiver": "Receiver (Number)", "sendSuccess": "SMS sent successfully.", @@ -1204,7 +1205,7 @@ "paymentComplete": "Payment Complete", "paymentFailed": "Payment Failed", "paymentStopped": "Payment Stopped/Inactive", - "applyRequest": "Request", + "applyRequest": "Payment Request", "noData": "No data available", "phoneNumber": "Phone Number", "email": "Email", diff --git a/src/locales/ko.json b/src/locales/ko.json index 5a186cc..e04a080 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -933,6 +933,7 @@ "virtualAccountRequest": "가상계좌 요청", "virtualAccountRequestDeposit": "가상계좌 요청 + 입금", "smsDetailAndResend": "SMS 상세 & 재발송", + "smsResendButton": "재발송", "sender": "발신자(번호)", "receiver": "수신자(번호)", "sendSuccess": "SMS 발송을 성공하였습니다.", @@ -1040,8 +1041,8 @@ "processingResult": "처리결과", "balance": "잔액", "won": "원", - "transferRegistration": "송금등록", - "transferRegistrationNotice": "송금등록 후 별도의 '이체요청' 처리가 필요하며, 요청하지 않을 경우 이체가 진행되지 않습니다.", + "transferRegistration": "이체 등록", + "transferRegistrationNotice": "이체 등록 후 별도의 '이체요청' 처리가 필요하며, 요청하지 않을 경우 이체가 진행되지 않습니다.", "resultInquiry": "결과조회", "tabTransferRequest": "이체요청", "tabResultInquiry": "결과조회", @@ -1108,7 +1109,7 @@ "payout": { "title": "지급대행", "detailTitle": "지급대행 상세", - "requestTitle": "지급대행 요청", + "requestTitle": "지급대행 신청", "requestDate": "요청일자", "disbursementDate": "지급일자", "paymentStatus": "지급 상태", @@ -1204,7 +1205,7 @@ "paymentComplete": "결제완료", "paymentFailed": "결제실패", "paymentStopped": "결제중단/비활성화", - "applyRequest": "요청", + "applyRequest": "결제 신청", "noData": "데이터가 없습니다", "phoneNumber": "휴대폰번호", "email": "이메일",