feat: [중간검사] 테스트 입력/초기화 토글 버튼 추가

This commit is contained in:
김보곤
2026-03-21 08:00:06 +09:00
parent bf49a59825
commit a6329f6cea

View File

@@ -824,9 +824,59 @@ export function InspectionInputModal({
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="w-[95vw] max-w-[500px] sm:max-w-[500px] max-h-[90vh] flex flex-col p-0">
<DialogHeader className="px-6 pt-6 pb-0 shrink-0">
<DialogTitle className="text-lg font-bold">
{PROCESS_TITLES[processType]}
</DialogTitle>
<div className="flex items-center justify-between">
<DialogTitle className="text-lg font-bold">
{PROCESS_TITLES[processType]}
</DialogTitle>
{process.env.NEXT_PUBLIC_DEV_TOOLBAR_ENABLED === 'true' && (
<Button
type="button"
variant="outline"
size="sm"
className={cn(
'h-7 text-xs',
!formData.judgment
? 'bg-emerald-50 text-emerald-700 border-emerald-300 hover:bg-emerald-100'
: 'text-gray-600 hover:bg-gray-100'
)}
onClick={() => {
if (!formData.judgment) {
const w = workItemDimensions?.width || 1000;
const h = workItemDimensions?.height || 500;
setFormData((prev) => ({
...prev,
bendingStatus: 'good',
processingStatus: 'good',
sewingStatus: 'good',
assemblyStatus: 'good',
length: w,
width: h,
height1: h,
height2: h,
judgment: 'pass',
nonConformingContent: '',
}));
} else {
setFormData((prev) => ({
...prev,
bendingStatus: null,
processingStatus: null,
sewingStatus: null,
assemblyStatus: null,
length: null,
width: null,
height1: null,
height2: null,
judgment: null,
nonConformingContent: '',
}));
}
}}
>
{!formData.judgment ? '테스트 입력' : '초기화'}
</Button>
)}
</div>
</DialogHeader>
<div className="flex-1 min-h-0 overflow-y-auto px-5 py-4 space-y-5">