"use client"; import React from "react"; /* ------------------------------------------------------------------ */ /* Types */ /* ------------------------------------------------------------------ */ export interface ProcessStep { no: number; name: string; code: string; status: "completed" | "in_progress" | "waiting" | "acceptable"; inputQty: number; goodQty: number; defectQty: number; planQty: number; availableQty: number; } interface ProcessDetailModalProps { open: boolean; onClose: () => void; workInstructionNo: string; totalQty: number; steps: ProcessStep[]; } /* ------------------------------------------------------------------ */ /* Component */ /* ------------------------------------------------------------------ */ export function ProcessDetailModal({ open, onClose, workInstructionNo, totalQty, steps, }: ProcessDetailModalProps) { if (!open) return null; const completedCount = steps.filter((s) => s.status === "completed").length; const overallPct = steps.length > 0 ? Math.round((completedCount / steps.length) * 100) : 0; return (
{workInstructionNo}