대시보드 관련 기타 수정사항 #123
|
|
@ -7,6 +7,7 @@ import * as THREE from "three";
|
|||
|
||||
interface YardPlacement {
|
||||
id: number;
|
||||
yard_layout_id?: number;
|
||||
material_code?: string | null;
|
||||
material_name?: string | null;
|
||||
quantity?: number | null;
|
||||
|
|
@ -26,7 +27,7 @@ interface YardPlacement {
|
|||
interface Yard3DCanvasProps {
|
||||
placements: YardPlacement[];
|
||||
selectedPlacementId: number | null;
|
||||
onPlacementClick: (placement: YardPlacement) => void;
|
||||
onPlacementClick: (placement: YardPlacement | null) => void;
|
||||
onPlacementDrag?: (id: number, position: { x: number; y: number; z: number }) => void;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { Loader2 } from "lucide-react";
|
|||
|
||||
interface YardPlacement {
|
||||
id: number;
|
||||
yard_layout_id: number;
|
||||
yard_layout_id?: number;
|
||||
material_code?: string | null;
|
||||
material_name?: string | null;
|
||||
quantity?: number | null;
|
||||
|
|
@ -20,12 +20,20 @@ interface YardPlacement {
|
|||
size_z: number;
|
||||
color: string;
|
||||
data_source_type?: string | null;
|
||||
data_source_config?: any;
|
||||
data_binding?: any;
|
||||
data_source_config?: Record<string, unknown> | null;
|
||||
data_binding?: Record<string, unknown> | null;
|
||||
status?: string;
|
||||
memo?: string;
|
||||
}
|
||||
|
||||
interface YardLayout {
|
||||
id: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
interface Yard3DViewerProps {
|
||||
layoutId: number;
|
||||
}
|
||||
|
|
@ -58,13 +66,14 @@ export default function Yard3DViewer({ layoutId }: Yard3DViewerProps) {
|
|||
// 야드 레이아웃 정보 조회
|
||||
const layoutResponse = await yardLayoutApi.getLayoutById(layoutId);
|
||||
if (layoutResponse.success) {
|
||||
setLayoutName(layoutResponse.data.name);
|
||||
const layout = layoutResponse.data as YardLayout;
|
||||
setLayoutName(layout.name);
|
||||
}
|
||||
|
||||
// 배치 데이터 조회
|
||||
const placementsResponse = await yardLayoutApi.getPlacementsByLayoutId(layoutId);
|
||||
if (placementsResponse.success) {
|
||||
setPlacements(placementsResponse.data);
|
||||
setPlacements(placementsResponse.data as YardPlacement[]);
|
||||
} else {
|
||||
setError("배치 데이터를 불러올 수 없습니다.");
|
||||
}
|
||||
|
|
@ -123,7 +132,7 @@ export default function Yard3DViewer({ layoutId }: Yard3DViewerProps) {
|
|||
|
||||
{/* 야드 이름 (좌측 상단) */}
|
||||
{layoutName && (
|
||||
<div className="absolute top-4 left-4 z-50 rounded-lg border border-gray-300 bg-white px-4 py-2 shadow-lg">
|
||||
<div className="absolute top-4 left-4 z-49 rounded-lg border border-gray-300 bg-white px-4 py-2 shadow-lg">
|
||||
<h2 className="text-base font-bold text-gray-900">{layoutName}</h2>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ interface MainHeaderProps {
|
|||
*/
|
||||
export function MainHeader({ user, onSidebarToggle, onProfileClick, onLogout }: MainHeaderProps) {
|
||||
return (
|
||||
<header className="bg-background/95 sticky top-0 z-50 h-14 min-h-14 w-full flex-shrink-0 border-b backdrop-blur">
|
||||
<header className="bg-background/95 fixed top-0 z-50 h-14 min-h-14 w-full flex-shrink-0 border-b backdrop-blur">
|
||||
<div className="flex h-full w-full items-center justify-between px-6">
|
||||
{/* Left side - Side Menu + Logo */}
|
||||
<div className="flex h-8 items-center gap-2">
|
||||
|
|
|
|||
Loading…
Reference in New Issue