[feat] negodata: 대시보드 — 회사/내 견적 요약 API + 프론트 페이지
백엔드: GET /v1/dashboard/summary — 회사 전체(company)+내 견적(mine) 스코프로 진행중·이번달생성·마감임박(72h)·메일미발송·동가·결렬 집계(users.company_id 조인, 읽기 전용). 프론트: /dashboard 페이지(KPI 카드 + 액션 위젯, 행 클릭→/quotation?detail= 딥링크), 사이드바·라우트 배선, 루트·로그인 리다이렉트를 /dashboard 로. orval 재생성(useGetDashboardSummary + Dashboard* 타입, QuotationData.creator_name 동기화 포함). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f648965e2
commit
b42cc41b5e
22 files changed
+774
-4
No files matched your search
@@ -5,6 +5,7 @@ import {useAuth} from '@/features/auth/useAuth';
|
||||
import {showToast} from '@/lib/notify';
|
||||
|
||||
const PAGE_TO_PATH: Record<PageType, string> = {
|
||||
DASHBOARD: '/dashboard',
|
||||
PRODUCTS: '/products',
|
||||
PARTNERS: '/partners',
|
||||
QUOTATION: '/quotation',
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Badge } from '@/components/ui/badge';
|
||||
import { Typography } from '@/components/ui/typography';
|
||||
import { cn } from '@/lib/utils';
|
||||
import {
|
||||
LayoutDashboard,
|
||||
Briefcase,
|
||||
Users,
|
||||
UserCog,
|
||||
@@ -33,6 +34,7 @@ type SidebarUser = ReturnType<typeof useAuth>['user'];
|
||||
|
||||
// ownerOnly 항목은 최고관리자에게만 노출된다(렌더 시 user.role 로 필터).
|
||||
const menuItems: { type: PageType; label: string; icon: ElementType; id: string; ownerOnly?: boolean }[] = [
|
||||
{ type: 'DASHBOARD', label: '대시보드', icon: LayoutDashboard, id: 'sidebar-dashboard' },
|
||||
{ type: 'PRODUCTS', label: '상품관리', icon: Briefcase, id: 'sidebar-products' },
|
||||
{ type: 'PARTNERS', label: '협력사관리', icon: Users, id: 'sidebar-partners' },
|
||||
{ type: 'QUOTATION', label: '견적관리', icon: FileSpreadsheet, id: 'sidebar-quotation' },
|
||||
@@ -41,6 +43,7 @@ const menuItems: { type: PageType; label: string; icon: ElementType; id: string;
|
||||
];
|
||||
|
||||
const pageLabelMap: Record<PageType, string> = {
|
||||
DASHBOARD: '대시보드',
|
||||
PRODUCTS: '상품관리',
|
||||
PARTNERS: '협력사관리',
|
||||
QUOTATION: '견적관리',
|
||||
|
||||
Reference in new issue
Block a user