'use client'; /** * 수입검사 입력 모달 * * 작업자 화면 중간검사 모달 양식 참고 * 기획서: 스크린샷 2026-02-05 오후 9.58.16 */ import { useState, useEffect } from 'react'; import { Dialog, DialogContent, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Textarea } from '@/components/ui/textarea'; import { cn } from '@/lib/utils'; // 시료 탭 타입 type SampleTab = 'N1' | 'N2' | 'N3'; // 검사 결과 데이터 타입 export interface ImportInspectionData { sampleTab: SampleTab; productName: string; specification: string; // 겉모양 appearanceStatus: 'ok' | 'ng' | null; // 치수 thickness: number | null; width: number | null; length: number | null; // 판정 judgment: 'pass' | 'fail' | null; // 물성치 tensileStrength: number | null; // 인장강도 (270 이상) elongation: number | null; // 연신율 (36 이상) zincCoating: number | null; // 아연의 최소 부착량 (17 이상) // 내용 content: string; } interface ImportInspectionInputModalProps { open: boolean; onOpenChange: (open: boolean) => void; productName?: string; specification?: string; onComplete: (data: ImportInspectionData) => void; } // OK/NG 버튼 컴포넌트 function OkNgToggle({ value, onChange, }: { value: 'ok' | 'ng' | null; onChange: (v: 'ok' | 'ng') => void; }) { return (