feat(WEB): 입력 컴포넌트 공통화 및 UI 개선
- 숫자/통화/전화번호/사업자번호 등 특수 입력 컴포넌트 추가 - MobileCard 컴포넌트 통합 (ListMobileCard 제거) - IntegratedListTemplateV2 페이지네이션 버그 수정 (NaN 이슈) - IntegratedDetailTemplate 타이틀 중복 수정 - 문서 시스템 컴포넌트 추가 - 헤더 벨 아이콘 포커스 스타일 개선 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ import {
|
||||
type RowClickHandlers,
|
||||
type StatCard,
|
||||
} from '@/components/templates/UniversalListPage';
|
||||
import { MobileCard } from '@/components/molecules/MobileCard';
|
||||
import { MobileCard } from '@/components/organisms/MobileCard';
|
||||
import type {
|
||||
WithdrawalRecord,
|
||||
SortOption,
|
||||
@@ -151,6 +151,12 @@ export function WithdrawalManagement({ initialData, initialPagination }: Withdra
|
||||
];
|
||||
}, [withdrawalData]);
|
||||
|
||||
// ===== 테이블 합계 계산 =====
|
||||
const tableTotals = useMemo(() => {
|
||||
const totalAmount = withdrawalData.reduce((sum, item) => sum + (item.withdrawalAmount ?? 0), 0);
|
||||
return { totalAmount };
|
||||
}, [withdrawalData]);
|
||||
|
||||
// ===== 핸들러 =====
|
||||
const handleRowClick = useCallback((item: WithdrawalRecord) => {
|
||||
router.push(`/ko/accounting/withdrawals/${item.id}`);
|
||||
@@ -421,22 +427,19 @@ export function WithdrawalManagement({ initialData, initialPagination }: Withdra
|
||||
),
|
||||
|
||||
// tableFooter: 합계 행
|
||||
tableFooter: (filteredData: WithdrawalRecord[]) => {
|
||||
const totalAmount = filteredData.reduce((sum, item) => sum + (item.withdrawalAmount ?? 0), 0);
|
||||
return (
|
||||
<TableRow className="bg-muted/50 font-medium">
|
||||
<TableCell className="text-center"></TableCell>
|
||||
<TableCell className="font-bold">합계</TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell className="text-right font-bold">{totalAmount.toLocaleString()}</TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
},
|
||||
tableFooter: (
|
||||
<TableRow className="bg-muted/50 font-medium">
|
||||
<TableCell className="text-center"></TableCell>
|
||||
<TableCell className="font-bold">합계</TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell className="text-right font-bold">{tableTotals.totalAmount.toLocaleString()}</TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
<TableCell></TableCell>
|
||||
</TableRow>
|
||||
),
|
||||
|
||||
// Stats 카드
|
||||
computeStats: (): StatCard[] => [
|
||||
@@ -573,6 +576,7 @@ export function WithdrawalManagement({ initialData, initialPagination }: Withdra
|
||||
selectedAccountSubject,
|
||||
isRefreshing,
|
||||
vendorOptions,
|
||||
tableTotals,
|
||||
handleRowClick,
|
||||
handleEdit,
|
||||
handleRefresh,
|
||||
|
||||
Reference in New Issue
Block a user