Localize payout pages (detail, list, request)
- Added payout-specific translation keys to en.json: - depositBalance, subId, disbursementAmount, requestFailed - Added common translation keys: filter, download, searchOptions, failed, clear, currency.krw - Localized detail-page.tsx: - Header title, button text, detail section title - All KV labels (disbursementStatus, transactionType, etc.) - Updated code comments from Korean to English - Localized list-page.tsx: - Header title, aria-labels, alt texts - Deposit balance label and currency unit - Request button text - Localized request-page.tsx: - Header title, form labels, placeholder text - Success/error messages in snackBar calls - Added useTranslation hook import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -16,8 +16,10 @@ import { useStore } from "@/shared/model/store";
|
||||
import moment from 'moment';
|
||||
import { NumericFormat } from "react-number-format";
|
||||
import { snackBar } from "@/shared/lib";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const PayoutRequestPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
@@ -29,7 +31,7 @@ export const PayoutRequestPage = () => {
|
||||
|
||||
const { mutateAsync: extensionPayoutRequest } = useExtensionPayoutRequestMutation();
|
||||
|
||||
useSetHeaderTitle('지급대행 신청');
|
||||
useSetHeaderTitle(t('additionalService.payout.requestTitle'));
|
||||
useSetHeaderType(HeaderType.RightClose);
|
||||
useSetFooterMode(false);
|
||||
useSetOnBack(() => {
|
||||
@@ -46,13 +48,13 @@ export const PayoutRequestPage = () => {
|
||||
extensionPayoutRequest(params)
|
||||
.then((rs) => {
|
||||
if (rs.status) {
|
||||
snackBar("신청을 성공하였습니다.")
|
||||
snackBar(t('additionalService.payout.requestSuccess'))
|
||||
} else {
|
||||
snackBar(`[실패] ${rs.error?.message}`)
|
||||
snackBar(`[${t('common.failed')}] ${rs.error?.message}`)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
snackBar(`[실패] ${error?.response?.data?.message} ` || '[실패] 신청을 실패하였습니다.')
|
||||
snackBar(`[${t('common.failed')}] ${error?.response?.data?.message} ` || `[${t('common.failed')}] ${t('additionalService.payout.requestFailed')}`)
|
||||
})
|
||||
;
|
||||
};
|
||||
@@ -79,7 +81,7 @@ export const PayoutRequestPage = () => {
|
||||
<div className="ing-list">
|
||||
<div className="billing-form gap-30">
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">서브ID</div>
|
||||
<div className="billing-label">{t('additionalService.payout.subId')}</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="text"
|
||||
@@ -89,7 +91,7 @@ export const PayoutRequestPage = () => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">지급액</div>
|
||||
<div className="billing-label">{t('additionalService.payout.disbursementAmount')}</div>
|
||||
<div className="billing-field">
|
||||
<NumericFormat
|
||||
value={disbursementAmount}
|
||||
@@ -104,12 +106,12 @@ export const PayoutRequestPage = () => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">지급일</div>
|
||||
<div className="billing-label">{t('additionalService.payout.disbursementDate')}</div>
|
||||
<div className="billing-field">
|
||||
<div className="input-wrapper date wid-100">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="날짜 선택"
|
||||
placeholder={t('additionalService.payout.dateSelectPlaceholder')}
|
||||
value={settlementDate ? moment(settlementDate).format('YYYY.MM.DD') : ''}
|
||||
/>
|
||||
<button
|
||||
@@ -119,7 +121,7 @@ export const PayoutRequestPage = () => {
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_date.svg'}
|
||||
alt="clear"
|
||||
alt={t('common.clear')}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
@@ -135,7 +137,7 @@ export const PayoutRequestPage = () => {
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={callExtensionPayoutRequest}
|
||||
disabled={!isFormValid()}
|
||||
>신청</button>
|
||||
>{t('common.request')}</button>
|
||||
</div>
|
||||
<NiceCalendar
|
||||
calendarOpen={calendarOpen}
|
||||
|
||||
Reference in New Issue
Block a user