Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/dashboard

This commit is contained in:
dohyeons
2025-10-14 16:52:46 +09:00
19 changed files with 2811 additions and 165 deletions

View File

@@ -27,6 +27,16 @@ const VehicleMapWidget = dynamic(() => import("@/components/dashboard/widgets/Ve
loading: () => <div className="flex h-full items-center justify-center text-sm text-gray-500"> ...</div>,
});
const DeliveryStatusWidget = dynamic(() => import("@/components/dashboard/widgets/DeliveryStatusWidget"), {
ssr: false,
loading: () => <div className="flex h-full items-center justify-center text-sm text-gray-500"> ...</div>,
});
const RiskAlertWidget = dynamic(() => import("@/components/dashboard/widgets/RiskAlertWidget"), {
ssr: false,
loading: () => <div className="flex h-full items-center justify-center text-sm text-gray-500"> ...</div>,
});
// 시계 위젯 임포트
import { ClockWidget } from "./widgets/ClockWidget";
// 달력 위젯 임포트
@@ -448,6 +458,16 @@ export function CanvasElement({
<div className="widget-interactive-area h-full w-full">
<VehicleMapWidget />
</div>
) : element.type === "widget" && element.subtype === "delivery-status" ? (
// 배송/화물 현황 위젯 렌더링
<div className="widget-interactive-area h-full w-full">
<DeliveryStatusWidget />
</div>
) : element.type === "widget" && element.subtype === "risk-alert" ? (
// 리스크/알림 위젯 렌더링
<div className="widget-interactive-area h-full w-full">
<RiskAlertWidget />
</div>
) : element.type === "widget" && element.subtype === "calendar" ? (
// 달력 위젯 렌더링
<div className="h-full w-full">

View File

@@ -135,6 +135,22 @@ export function DashboardSidebar() {
onDragStart={handleDragStart}
className="border-l-4 border-red-500"
/>
<DraggableItem
icon="📦"
title="배송/화물 현황"
type="widget"
subtype="delivery-status"
onDragStart={handleDragStart}
className="border-l-4 border-amber-500"
/>
<DraggableItem
icon="⚠️"
title="리스크/알림 위젯"
type="widget"
subtype="risk-alert"
onDragStart={handleDragStart}
className="border-l-4 border-rose-500"
/>
<DraggableItem
icon="📅"
title="달력 위젯"
@@ -144,7 +160,7 @@ export function DashboardSidebar() {
className="border-l-4 border-indigo-500"
/>
<DraggableItem
icon="🚚"
icon="🚗"
title="기사 관리 위젯"
type="widget"
subtype="driver-management"

View File

@@ -19,6 +19,8 @@ export type ElementSubtype =
| "calendar"
| "calculator"
| "vehicle-map"
| "delivery-status"
| "risk-alert"
| "driver-management"; // 위젯 타입
export interface Position {