feat(WEB): 리스트 페이지 UI 레이아웃 표준화
- 공통 레이아웃 패턴 적용: [달력] → [프리셋] → [검색창] → [버튼들] - beforeTableContent → headerActions + createButton 마이그레이션 - DateRangeSelector extraActions prop 활용하여 검색창 통합 - PricingListClient 테이블 행 클릭 → 상세 이동 기능 추가 - 회계 관련 페이지 (입금/출금/매입/매출/어음/카드/예상지출 등) 정리 - 건설 관련 페이지 검색 영역 정리 - 부모 메뉴 리다이렉트 컴포넌트 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
14
src/app/[locale]/(protected)/accounting/page.tsx
Normal file
14
src/app/[locale]/(protected)/accounting/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 회계관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function AccountingPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/accounting"
|
||||
fallbackPath="/accounting/vendors"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/approval/page.tsx
Normal file
14
src/app/[locale]/(protected)/approval/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 결재관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function ApprovalPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/approval"
|
||||
fallbackPath="/approval/inbox"
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import { format } from 'date-fns';
|
||||
import { TableCell, TableRow } from '@/components/ui/table';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import {
|
||||
Select,
|
||||
@@ -26,7 +25,6 @@ import {
|
||||
type UniversalListConfig,
|
||||
type TableColumn,
|
||||
} from '@/components/templates/UniversalListPage';
|
||||
import { DateRangeSelector } from '@/components/molecules/DateRangeSelector';
|
||||
import { getDynamicBoardPosts } from '@/components/board/DynamicBoard/actions';
|
||||
import { getBoardByCode } from '@/components/board/BoardManagement/actions';
|
||||
import type { PostApiData } from '@/components/customer-center/shared/types';
|
||||
@@ -340,20 +338,22 @@ export default function DynamicBoardListPage() {
|
||||
},
|
||||
|
||||
columns: tableColumns,
|
||||
headerActions: () => (
|
||||
<>
|
||||
<DateRangeSelector
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
onStartDateChange={setStartDate}
|
||||
onEndDateChange={setEndDate}
|
||||
/>
|
||||
<Button className="ml-auto" onClick={handleCreate}>
|
||||
<Plus className="h-4 w-4 mr-2" />
|
||||
글쓰기
|
||||
</Button>
|
||||
</>
|
||||
),
|
||||
|
||||
// 공통 패턴: dateRangeSelector + createButton + onSearchChange
|
||||
dateRangeSelector: {
|
||||
enabled: true,
|
||||
startDate,
|
||||
endDate,
|
||||
onStartDateChange: setStartDate,
|
||||
onEndDateChange: setEndDate,
|
||||
},
|
||||
createButton: {
|
||||
label: '글쓰기',
|
||||
icon: Plus,
|
||||
onClick: handleCreate,
|
||||
},
|
||||
onSearchChange: setSearchValue,
|
||||
|
||||
tableHeaderActions: (
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
<span className="text-sm text-muted-foreground whitespace-nowrap">
|
||||
|
||||
14
src/app/[locale]/(protected)/construction/page.tsx
Normal file
14
src/app/[locale]/(protected)/construction/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 건설관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function ConstructionPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/construction"
|
||||
fallbackPath="/construction/project"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/customer-center/page.tsx
Normal file
14
src/app/[locale]/(protected)/customer-center/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 고객센터 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function CustomerCenterPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/customer-center"
|
||||
fallbackPath="/customer-center/notices"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/hr/page.tsx
Normal file
14
src/app/[locale]/(protected)/hr/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 인사관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function HrPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/hr"
|
||||
fallbackPath="/hr/attendance-management"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/master-data/page.tsx
Normal file
14
src/app/[locale]/(protected)/master-data/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 기준정보 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function MasterDataPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/master-data"
|
||||
fallbackPath="/master-data/item-master-data-management"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/material/page.tsx
Normal file
14
src/app/[locale]/(protected)/material/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 자재관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function MaterialPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/material"
|
||||
fallbackPath="/material/stock-status"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/outbound/page.tsx
Normal file
14
src/app/[locale]/(protected)/outbound/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 출고관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function OutboundPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/outbound"
|
||||
fallbackPath="/outbound/shipments"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/production/page.tsx
Normal file
14
src/app/[locale]/(protected)/production/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 생산관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function ProductionPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/production"
|
||||
fallbackPath="/production/dashboard"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/quality/page.tsx
Normal file
14
src/app/[locale]/(protected)/quality/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 품질관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function QualityPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/quality"
|
||||
fallbackPath="/quality/inspections"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/sales/page.tsx
Normal file
14
src/app/[locale]/(protected)/sales/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 영업관리 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function SalesPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/sales"
|
||||
fallbackPath="/sales/client-management-sales-admin"
|
||||
/>
|
||||
);
|
||||
}
|
||||
14
src/app/[locale]/(protected)/settings/page.tsx
Normal file
14
src/app/[locale]/(protected)/settings/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ParentMenuRedirect } from '@/components/common/ParentMenuRedirect';
|
||||
|
||||
/**
|
||||
* 설정 - 부모 메뉴 동적 리다이렉트
|
||||
* 메뉴 구조에서 첫 번째 자식으로 자동 이동
|
||||
*/
|
||||
export default function SettingsPage() {
|
||||
return (
|
||||
<ParentMenuRedirect
|
||||
parentPath="/settings"
|
||||
fallbackPath="/settings/accounts"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user