Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -253,6 +253,12 @@ export default function CustomerAccountManagementPage() {
|
||||
});
|
||||
}, [currentPage, itemsPerPage, searchTerm, filterType, fetchClients, loadTotalStats]);
|
||||
|
||||
// 페이지 변경 핸들러 (Hooks 순서 보장을 위해 조건부 return 전에 정의)
|
||||
const handlePageChange = useCallback((page: number) => {
|
||||
setCurrentPage(page);
|
||||
setSelectedItems(new Set()); // 페이지 변경 시 선택 초기화
|
||||
}, []);
|
||||
|
||||
// 핸들러 - 페이지 기반 네비게이션
|
||||
const handleAddNew = () => {
|
||||
router.push("/sales/client-management-sales-admin/new");
|
||||
@@ -611,6 +617,8 @@ export default function CustomerAccountManagementPage() {
|
||||
|
||||
itemsPerPage,
|
||||
|
||||
// 서버 사이드 페이지네이션 + 클라이언트 사이드 탭 필터링
|
||||
// externalPagination으로 페이지네이션은 외부에서 제어
|
||||
clientSideFiltering: true,
|
||||
|
||||
searchFilter: (item, searchValue) => {
|
||||
@@ -695,6 +703,13 @@ export default function CustomerAccountManagementPage() {
|
||||
config={clientManagementConfig}
|
||||
initialData={clients}
|
||||
initialTotalCount={pagination?.total || clients.length}
|
||||
externalPagination={{
|
||||
currentPage,
|
||||
totalPages,
|
||||
totalItems: pagination?.total || clients.length,
|
||||
itemsPerPage,
|
||||
onPageChange: handlePageChange,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -852,12 +852,11 @@ export function IntegratedListTemplateV2<T = any>({
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* 페이지네이션 - 데스크톱에서만 표시 */}
|
||||
{/* 페이지네이션 - 데스크톱에서만 표시 (1페이지여도 항상 표시) */}
|
||||
<div className="hidden xl:flex items-center justify-between">
|
||||
<div className="text-sm text-muted-foreground">
|
||||
전체 {pagination.totalItems}개 중 {pagination.totalItems > 0 ? startIndex + 1 : 0}-{Math.min(startIndex + pagination.itemsPerPage, pagination.totalItems)}개 표시
|
||||
</div>
|
||||
{pagination.totalPages > 1 && (
|
||||
<div className="flex items-center gap-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
@@ -904,7 +903,6 @@ export function IntegratedListTemplateV2<T = any>({
|
||||
다음
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 일괄 삭제 확인 다이얼로그 */}
|
||||
|
||||
Reference in New Issue
Block a user