feat: 계정과목 공통화 및 회계 모듈 전반 개선

- 계정과목 관리를 accounting/common/으로 통합 (AccountSubjectSettingModal 이동)
- GeneralJournalEntry: 계정과목 actions/types 분리, 모달 import 경로 변경
- CardTransactionInquiry: JournalEntryModal/ManualInputModal 개선
- TaxInvoiceManagement: actions/types 리팩토링
- DepositManagement/WithdrawalManagement: 소폭 개선
- ExpectedExpenseManagement: UI 개선
- GiftCertificateManagement: 상세/목록 개선
- BillManagement: BillDetail/Client/index 소폭 추가
- PurchaseManagement/SalesManagement: 상세뷰 개선
- CEO 대시보드: dashboard-invalidation 유틸 추가, useCEODashboard 확장
- OrderRegistration/OrderSalesDetailView 소폭 수정
- claudedocs: 계정과목 통합 계획/분석/체크리스트, 대시보드 검증 문서 추가
This commit is contained in:
유병철
2026-03-08 12:44:36 +09:00
parent 74e0e2bf44
commit 7d369d1404
53 changed files with 3690 additions and 496 deletions

View File

@@ -59,6 +59,8 @@ import {
transformDailyAttendanceResponse,
} from '@/lib/api/dashboard/transformers';
import type { DashboardSectionKey } from '@/lib/dashboard-invalidation';
import type {
DailyReportData,
ReceivableData,
@@ -664,6 +666,7 @@ export interface CEODashboardState {
construction: SectionState<ConstructionData>;
dailyAttendance: SectionState<DailyAttendanceData>;
refetchAll: () => void;
refetchMap: Partial<Record<DashboardSectionKey, () => void>>;
}
export function useCEODashboard(options: UseCEODashboardOptions = {}): CEODashboardState {
@@ -782,6 +785,22 @@ export function useCEODashboard(options: UseCEODashboardOptions = {}): CEODashbo
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [dr.refetch, rv.refetch, dc.refetch, me.refetch, fetchCM, sb.refetch, ss.refetch, ps.refetch, dp.refetch, us.refetch, cs.refetch, da.refetch]);
// 섹션별 refetch 함수 맵 (targeted invalidation용)
const refetchMap = useMemo<Partial<Record<DashboardSectionKey, () => void>>>(() => ({
dailyReport: dr.refetch,
receivable: rv.refetch,
debtCollection: dc.refetch,
monthlyExpense: me.refetch,
cardManagement: fetchCM,
statusBoard: sb.refetch,
salesStatus: ss.refetch,
purchaseStatus: ps.refetch,
dailyProduction: dp.refetch,
unshipped: us.refetch,
construction: cs.refetch,
dailyAttendance: da.refetch,
}), [dr.refetch, rv.refetch, dc.refetch, me.refetch, fetchCM, sb.refetch, ss.refetch, ps.refetch, dp.refetch, us.refetch, cs.refetch, da.refetch]);
return {
dailyReport: { data: dr.data, loading: dr.loading, error: dr.error },
receivable: { data: rv.data, loading: rv.loading, error: rv.error },
@@ -796,5 +815,6 @@ export function useCEODashboard(options: UseCEODashboardOptions = {}): CEODashbo
construction: { data: cs.data, loading: cs.loading, error: cs.error },
dailyAttendance: { data: da.data, loading: da.loading, error: da.error },
refetchAll,
refetchMap,
};
}