Convert transaction constants to i18n-compatible getter functions

- Convert all hardcoded constant arrays to functions accepting TFunction
- Add transaction.constants namespace with 40+ translation keys
- Update contant.ts: All exports now use get* prefix (e.g., getCashReceiptPurposeTypeBtnGroup)
- Replace ko/en properties with single name property using t() function

Updated constants:
- getAllTransactionMoidTidOptionsGroup(t)
- getAllTransactionStatusCodeBtnGroup(t)
- getAllTransactionServiceCodeOptionsGroup(t)
- getAllTransactionStatusCode(t)
- getCashReceiptPurposeTypeBtnGroup(t)
- getCashReceiptTransactionTypeBtnGroup(t)
- getCashReceiptProcessResultBtnGroup(t)
- getEscrowSearchTypeOptionsGroup(t)
- getEscrowDeliveryStatusBtnGroup(t)
- getEscrowSettlementStatusBtnGroup(t)
- getBillingSearchTypeOptionsGroup(t)
- getBillingRequestStatusBtnGroup(t)
- getBillingProcessResultBtnGroup(t)
- getBillingPaymentMethodBtnGroup(t)

Updated components (9 files):
- Filter components: all-transaction, cash-receipt, billing, escrow
- List pages: billing, cash-receipt, escrow
- UI components: list-item, important-info-section

All constants now properly support Korean/English language switching.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jay Sheen
2025-10-30 16:36:30 +09:00
parent e067fc8d4f
commit 29f69c248c
12 changed files with 271 additions and 163 deletions

View File

@@ -30,7 +30,7 @@ import {
useSetHeaderType,
useSetFooterMode
} from '@/widgets/sub-layout/use-sub-layout';
import { CashReceiptTransactionTypeBtnGroup } from '@/entities/transaction/model/contant';
import { getCashReceiptTransactionTypeBtnGroup } from '@/entities/transaction/model/contant';
import { useStore } from '@/shared/model/store';
import { useCashReceiptSummaryMutation } from '@/entities/transaction/api/use-cash-receipt-summary-mutation';
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
@@ -256,7 +256,7 @@ export const CashReceiptListPage = () => {
<div>
<div className="full-menu-keywords no-padding">
{
CashReceiptTransactionTypeBtnGroup.map((value, index) => (
getCashReceiptTransactionTypeBtnGroup(t).map((value: any, index: number) => (
<span
key={`key-service-code=${index}`}
className={`keyword-tag ${(transactionType === value.value) ? 'active' : ''}`}