"use client"; import { TimelineSchedulerConfig, ZoomLevel, ScheduleType } from "./types"; /** * 기본 타임라인 스케줄러 설정 * - 기본적으로 schedule_mng 테이블 사용 (공통 스케줄 테이블) * - 필드 매핑은 schedule_mng 컬럼에 맞춤 */ export const defaultTimelineSchedulerConfig: Partial = { // schedule_mng 테이블 기본 사용 useCustomTable: false, scheduleType: "PRODUCTION", // 기본: 생산계획 // 표시 설정 defaultZoomLevel: "day", editable: true, draggable: true, resizable: true, rowHeight: 50, headerHeight: 60, resourceColumnWidth: 150, cellWidth: { day: 60, week: 120, month: 40, }, showConflicts: true, showProgress: true, showTodayLine: true, showToolbar: true, showZoomControls: true, showNavigation: true, showAddButton: true, height: 500, // 상태별 색상 statusColors: { planned: "#3b82f6", // blue-500 in_progress: "#f59e0b", // amber-500 completed: "#10b981", // emerald-500 delayed: "#ef4444", // red-500 cancelled: "#6b7280", // gray-500 }, // schedule_mng 테이블 필드 매핑 fieldMapping: { id: "schedule_id", resourceId: "resource_id", title: "schedule_name", startDate: "start_date", endDate: "end_date", status: "status", }, // 리소스 필드 매핑 (equipment_mng 기준) resourceFieldMapping: { id: "equipment_code", name: "equipment_name", group: "equipment_type", }, // 기본 리소스 테이블 resourceTable: "equipment_mng", }; /** * 줌 레벨 옵션 */ export const zoomLevelOptions: { value: ZoomLevel; label: string }[] = [ { value: "day", label: "일" }, { value: "week", label: "주" }, { value: "month", label: "월" }, ]; /** * 상태 옵션 */ export const statusOptions = [ { value: "planned", label: "계획됨", color: "#3b82f6" }, { value: "in_progress", label: "진행중", color: "#f59e0b" }, { value: "completed", label: "완료", color: "#10b981" }, { value: "delayed", label: "지연", color: "#ef4444" }, { value: "cancelled", label: "취소", color: "#6b7280" }, ]; /** * 스케줄 타입 옵션 */ export const scheduleTypeOptions: { value: ScheduleType; label: string }[] = [ { value: "PRODUCTION", label: "생산계획" }, { value: "MAINTENANCE", label: "정비계획" }, { value: "SHIPPING", label: "배차계획" }, { value: "WORK_ASSIGN", label: "작업배정" }, ]; /** * 줌 레벨별 표시 일수 */ export const zoomLevelDays: Record = { day: 14, // 2주 week: 56, // 8주 month: 90, // 3개월 }; /** * 요일 라벨 (한글) */ export const dayLabels = ["일", "월", "화", "수", "목", "금", "토"]; /** * 월 라벨 (한글) */ export const monthLabels = [ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월", ];