diff --git a/src/components/accounting/BillManagement/BillManagementClient.tsx b/src/components/accounting/BillManagement/BillManagementClient.tsx
index 72555b03..b2c94167 100644
--- a/src/components/accounting/BillManagement/BillManagementClient.tsx
+++ b/src/components/accounting/BillManagement/BillManagementClient.tsx
@@ -10,7 +10,7 @@
* - tableHeaderActions: 거래처, 구분, 상태 필터
*/
-import { useState, useMemo, useCallback } from 'react';
+import { useState, useMemo, useCallback, useEffect, useRef } from 'react';
import { useRouter } from 'next/navigation';
import { formatNumber } from '@/lib/utils/amount';
import { useDateRange } from '@/hooks';
@@ -32,8 +32,6 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
-import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
-import { Label } from '@/components/ui/label';
import {
UniversalListPage,
type UniversalListConfig,
@@ -148,6 +146,16 @@ export function BillManagementClient({
}
}, [searchQuery, billTypeFilter, statusFilter, vendorFilter, startDate, endDate, sortOption, itemsPerPage]);
+ // ===== 필터 변경 시 자동 재조회 =====
+ const isInitialMount = useRef(true);
+ useEffect(() => {
+ if (isInitialMount.current) {
+ isInitialMount.current = false;
+ return;
+ }
+ loadData(1);
+ }, [loadData]);
+
// ===== 체크박스 핸들러 =====
const toggleSelection = useCallback((id: string) => {
setSelectedItems(prev => {
@@ -348,32 +356,8 @@ export function BillManagementClient({
);
},
- // 모바일 필터 설정
- filterConfig: [
- {
- key: 'vendorFilter',
- label: '거래처',
- type: 'single',
- options: vendorOptions.filter(o => o.value !== 'all'),
- },
- {
- key: 'billType',
- label: '구분',
- type: 'single',
- options: BILL_TYPE_FILTER_OPTIONS.filter(o => o.value !== 'all'),
- },
- {
- key: 'status',
- label: '상태',
- type: 'single',
- options: BILL_STATUS_FILTER_OPTIONS.filter(o => o.value !== 'all'),
- },
- ],
- initialFilters: {
- vendorFilter: vendorFilter,
- billType: billTypeFilter,
- status: statusFilter,
- },
+ // 모바일 필터 설정 (tableHeaderActions와 중복 방지를 위해 비워둠)
+ filterConfig: [],
filterTitle: '어음 필터',
// 날짜 선택기
@@ -392,44 +376,12 @@ export function BillManagementClient({
icon: Plus,
},
- // 헤더 액션: 수취/발행 라디오 + 상태 선택 + 저장
- // 모바일: 라디오/상태필터는 숨기고 저장만 표시 (filterConfig 바텀시트와 중복 방지)
- // 데스크톱: 모두 표시
+ // 헤더 액션: 저장 버튼만 (필터는 tableHeaderActions에서 통합 관리)
headerActions: () => (
-
-
-
{ setBillTypeFilter(value); loadData(1); }}
- className="flex items-center gap-3"
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
+
),
// 테이블 헤더 액션 (필터)
@@ -448,7 +400,7 @@ export function BillManagementClient({
-