diff --git a/frontend/components/pop/hardcoded/production/WorkOrderList.tsx b/frontend/components/pop/hardcoded/production/WorkOrderList.tsx index a14d6a3a..fc45e0e7 100644 --- a/frontend/components/pop/hardcoded/production/WorkOrderList.tsx +++ b/frontend/components/pop/hardcoded/production/WorkOrderList.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { useState, useEffect, useCallback, useMemo } from "react"; +import React, { useState, useEffect, useCallback, useMemo, useRef } from "react"; import { useRouter } from "next/navigation"; import { useAuth } from "@/hooks/useAuth"; import { apiClient } from "@/lib/api/client"; @@ -9,6 +9,41 @@ import { AcceptProcessModal } from "./AcceptProcessModal"; import { ProcessDetailModal, ProcessStep } from "./ProcessDetailModal"; import { ProcessWork } from "./ProcessWork"; +/* 텍스트가 넘칠 때 자동 슬라이드 (마키) */ +function AutoScrollText({ children, className }: { children: React.ReactNode; className?: string }) { + const outerRef = useRef(null); + const innerRef = useRef(null); + const [needsScroll, setNeedsScroll] = useState(false); + + useEffect(() => { + const check = () => { + if (outerRef.current && innerRef.current) { + setNeedsScroll(innerRef.current.scrollWidth > outerRef.current.clientWidth + 2); + } + }; + check(); + window.addEventListener("resize", check); + return () => window.removeEventListener("resize", check); + }, [children]); + + return ( +
+ + {children} + {needsScroll && } + {needsScroll && children} + + {needsScroll && ( + + )} +
+ ); +} + /* ------------------------------------------------------------------ */ /* Types */ /* ------------------------------------------------------------------ */ @@ -176,9 +211,9 @@ function FullscreenWorkModal({
{wi?.work_instruction_no || "작업지시"}
-
- {wi?.item_name || ""}{(wi?.item_code || wi?.item_number) ? `(${wi?.item_code || wi?.item_number})` : ""} -
+ + 📦 {wi?.item_name || ""}{(wi?.item_code || wi?.item_number) ? `(${wi?.item_code || wi?.item_number})` : ""} +
{proc.process_name} · {proc.equipment_code || "미배정"}
@@ -1401,8 +1436,10 @@ export function WorkOrderList() { {/* Sub-info: item name + equipment */} -
- 📦 {wi?.item_name || "품목"}{(wi?.item_code || wi?.item_number) ? `(${wi?.item_code || wi?.item_number})` : ""} +
+ + 📦 {wi?.item_name || "품목"}{(wi?.item_code || wi?.item_number) ? `(${wi?.item_code || wi?.item_number})` : ""} + {!isRework && ( ⚙️ {eqName} )}