[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
@@ -3,6 +3,7 @@ import {initAuth} from '../features/auth/service';
|
||||
import {isLoggedIn, hasRole} from '../stores/auth';
|
||||
import AuthenticatedLayout from '@/components/layout/AuthenticatedLayout';
|
||||
import LoginPage from '../pages/login';
|
||||
import DashboardPage from '../pages/dashboard';
|
||||
import ForbiddenPage from '../pages/forbidden';
|
||||
import NotFoundPage from '../pages/not-found';
|
||||
import ProductsPage from '../pages/products';
|
||||
@@ -26,13 +27,13 @@ export const router = createBrowserRouter([
|
||||
: []),
|
||||
{
|
||||
index: true,
|
||||
loader: () => redirect('/products'),
|
||||
loader: () => redirect('/dashboard'),
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
loader: async () => {
|
||||
await initAuth();
|
||||
if (isLoggedIn()) return redirect('/products');
|
||||
if (isLoggedIn()) return redirect('/dashboard');
|
||||
return null;
|
||||
},
|
||||
Component: LoginPage,
|
||||
@@ -53,6 +54,7 @@ export const router = createBrowserRouter([
|
||||
},
|
||||
Component: AuthenticatedLayout,
|
||||
children: [
|
||||
{path: 'dashboard', Component: DashboardPage},
|
||||
{path: 'products', Component: ProductsPage},
|
||||
{path: 'partners', Component: PartnersPage},
|
||||
{path: 'quotation', Component: QuotationPage},
|
||||
|
||||
Reference in new issue
Block a user