refactor(WEB): 회계/차량/결재 등 코드 중복 제거 및 공통 훅 추출

- useAccountingListPage, useDateRange 공통 훅 추출
- accounting/shared/ 공통 컴포넌트 분리
- 회계 모듈(입금/출금/매출/매입/청구 등) 중복 로직 통합
- 차량관리 page.tsx 패턴 간소화
- 건설/결재/자재/출하/단가 등 날짜 관련 코드 공통화
- 코드 중복 제거 체크리스트 문서 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-02-19 19:01:41 +09:00
parent a2c3e4c41e
commit 71352923c8
80 changed files with 833 additions and 587 deletions

View File

@@ -11,6 +11,7 @@
import { useState, useMemo, useCallback, useEffect, useRef } from 'react';
import { useRouter } from 'next/navigation';
import { useDateRange } from '@/hooks';
import { Wrench, Plus, GripVertical } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { TableCell, TableRow, TableHead } from '@/components/ui/table';
@@ -45,8 +46,7 @@ export default function ProcessListClient({ initialData = [], initialStats }: Pr
const [deleteTargetId, setDeleteTargetId] = useState<string | null>(null);
// 날짜 범위 상태
const [startDate, setStartDate] = useState('2025-01-01');
const [endDate, setEndDate] = useState('2025-12-31');
const { startDate, endDate, setStartDate, setEndDate } = useDateRange('currentYear');
// 검색어 상태
const [searchQuery, setSearchQuery] = useState('');