feat(WEB): 글로벌 검색, 토큰 갱신 개선, 템플릿 기능 확장
- CommandMenuSearch 컴포넌트 추가 (Cmd+K 글로벌 메뉴 검색) - AuthenticatedLayout: 검색 통합, 모바일/데스크톱 스켈레톤 분리 - middleware: 토큰 갱신 후 리다이렉트 방식으로 변경 (race condition 방지) - IntegratedDetailTemplate: stickyButtons 옵션 추가 (하단 고정 버튼) - UniversalListPage: 컬럼 정렬 기능 추가 (sortBy, sortOrder) - Sidebar: 축소 모드 패딩/간격 최적화 - 각종 컴포넌트 버그 수정 및 경로 정규화 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
import { Client } from "../../hooks/useClientList";
|
||||
import { PageLayout } from "../organisms/PageLayout";
|
||||
import { PageHeader } from "../organisms/PageHeader";
|
||||
import { useMenuStore } from "@/store/menuStore";
|
||||
|
||||
interface ClientDetailProps {
|
||||
client: Client;
|
||||
@@ -64,6 +65,8 @@ export function ClientDetail({
|
||||
onEdit,
|
||||
onDelete,
|
||||
}: ClientDetailProps) {
|
||||
const sidebarCollapsed = useMenuStore((state) => state.sidebarCollapsed);
|
||||
|
||||
// 금액 포맷
|
||||
const formatCurrency = (amount: string) => {
|
||||
if (!amount) return "-";
|
||||
@@ -73,30 +76,14 @@ export function ClientDetail({
|
||||
|
||||
return (
|
||||
<PageLayout maxWidth="2xl">
|
||||
{/* 헤더 - PageHeader 사용으로 등록/수정과 동일한 레이아웃 */}
|
||||
{/* 헤더 */}
|
||||
<PageHeader
|
||||
title={client.name}
|
||||
description="거래처 상세 정보"
|
||||
icon={Building2}
|
||||
actions={
|
||||
<>
|
||||
<Button variant="outline" onClick={onBack}>
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
목록
|
||||
</Button>
|
||||
<Button variant="outline" onClick={onEdit}>
|
||||
<Pencil className="h-4 w-4 mr-2" />
|
||||
수정
|
||||
</Button>
|
||||
<Button variant="destructive" onClick={onDelete}>
|
||||
<Trash2 className="h-4 w-4 mr-2" />
|
||||
삭제
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-6 pb-24">
|
||||
{/* 1. 기본 정보 */}
|
||||
<Card>
|
||||
<CardHeader>
|
||||
@@ -244,6 +231,24 @@ export function ClientDetail({
|
||||
</Card>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 하단 액션 버튼 (sticky) */}
|
||||
<div className={`fixed bottom-6 ${sidebarCollapsed ? 'left-[156px]' : 'left-[316px]'} right-[48px] px-6 py-3 bg-background/95 backdrop-blur rounded-xl border shadow-lg z-50 transition-all duration-300 flex items-center justify-between`}>
|
||||
<Button variant="outline" onClick={onBack}>
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
목록으로
|
||||
</Button>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button variant="outline" onClick={onDelete} className="text-destructive hover:bg-destructive hover:text-destructive-foreground">
|
||||
<Trash2 className="h-4 w-4 mr-2" />
|
||||
삭제
|
||||
</Button>
|
||||
<Button onClick={onEdit}>
|
||||
<Pencil className="h-4 w-4 mr-2" />
|
||||
수정
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
@@ -24,7 +24,7 @@ export const clientCreateConfig: DetailConfig = {
|
||||
* 거래처 수정 페이지 Config
|
||||
*/
|
||||
export const clientEditConfig: DetailConfig = {
|
||||
title: '거래처 수정',
|
||||
title: '거래처',
|
||||
description: '거래처 정보를 수정합니다',
|
||||
icon: Building2,
|
||||
basePath: '/sales/client-management',
|
||||
|
||||
Reference in New Issue
Block a user