2025-12-26 15:48:08 +09:00
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
/**
|
2026-01-22 15:07:17 +09:00
|
|
|
* 공정 작업일지 미리보기 모달
|
2025-12-26 15:48:08 +09:00
|
|
|
*
|
2026-01-22 15:07:17 +09:00
|
|
|
* document-system 통합 버전 (2026-01-22)
|
2025-12-26 15:48:08 +09:00
|
|
|
*/
|
|
|
|
|
|
2026-01-22 15:07:17 +09:00
|
|
|
import { DocumentViewer } from '@/components/document-system';
|
2025-12-26 15:48:08 +09:00
|
|
|
import type { Process } from '@/types/process';
|
2026-01-22 15:07:17 +09:00
|
|
|
import { ProcessWorkLogContent } from './ProcessWorkLogContent';
|
2025-12-26 15:48:08 +09:00
|
|
|
|
|
|
|
|
const getDocumentCode = (processName: string): string => {
|
|
|
|
|
if (processName.includes('스크린')) return 'WL-SCR';
|
|
|
|
|
if (processName.includes('슬랫')) return 'WL-SLT';
|
|
|
|
|
if (processName.includes('절곡') || processName.includes('포밍')) return 'WL-BEN';
|
|
|
|
|
return 'WL-STK';
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-22 15:07:17 +09:00
|
|
|
interface ProcessWorkLogPreviewModalProps {
|
|
|
|
|
open: boolean;
|
|
|
|
|
onOpenChange: (open: boolean) => void;
|
|
|
|
|
process: Process;
|
|
|
|
|
}
|
2025-12-26 15:48:08 +09:00
|
|
|
|
|
|
|
|
export function ProcessWorkLogPreviewModal({
|
|
|
|
|
open,
|
|
|
|
|
onOpenChange,
|
|
|
|
|
process
|
|
|
|
|
}: ProcessWorkLogPreviewModalProps) {
|
|
|
|
|
const documentCode = getDocumentCode(process.processName);
|
|
|
|
|
|
|
|
|
|
return (
|
2026-01-22 15:07:17 +09:00
|
|
|
<DocumentViewer
|
|
|
|
|
title={`${process.workLogTemplate} 미리보기`}
|
|
|
|
|
subtitle={`(${documentCode})`}
|
|
|
|
|
preset="inspection"
|
|
|
|
|
open={open}
|
|
|
|
|
onOpenChange={onOpenChange}
|
|
|
|
|
>
|
|
|
|
|
<ProcessWorkLogContent data={process} />
|
|
|
|
|
</DocumentViewer>
|
2025-12-26 15:48:08 +09:00
|
|
|
);
|
2026-01-22 15:07:17 +09:00
|
|
|
}
|