feat(WEB): IntegratedDetailTemplate 통합 템플릿 구현 및 Phase 1~8 마이그레이션

- Phase 1: 기안함(DocumentCreate) 마이그레이션
- Phase 2: 작업지시(WorkOrderCreate/Edit) 마이그레이션
- Phase 3: 출하(ShipmentCreate/Edit) 마이그레이션
- Phase 4: 사원(EmployeeForm) 마이그레이션
- Phase 5: 게시판(BoardForm) 마이그레이션
- Phase 6: 1:1문의(InquiryForm) 마이그레이션
- Phase 7: 공정(ProcessForm) 마이그레이션
- Phase 8: 수입검사/품질검사(InspectionCreate) 마이그레이션
- DetailActions에 showSave 옵션 추가
- 각 도메인별 config 파일 생성

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
유병철
2026-01-20 19:31:07 +09:00
parent 6b0ffc810b
commit 62ef2b1ff9
24 changed files with 861 additions and 534 deletions

View File

@@ -2,6 +2,8 @@
/**
* 수입검사 등록 (IQC) 페이지
* IntegratedDetailTemplate 마이그레이션 (2025-01-20)
*
* - 검사 대상 선택
* - 검사 정보 입력 (검사일, 검사자*, LOT번호)
* - 검사 항목 테이블 (겉모양, 두께, 폭, 길이)
@@ -10,13 +12,14 @@
import { useState, useCallback, useMemo, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { ClipboardCheck, Calendar } from 'lucide-react';
import { Calendar } from 'lucide-react';
import { IntegratedDetailTemplate } from '@/components/templates/IntegratedDetailTemplate';
import { materialInspectionCreateConfig } from './inspectionConfig';
import { ContentLoadingSpinner } from '@/components/ui/loading-spinner';
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 { PageLayout } from '@/components/organisms/PageLayout';
import {
Select,
SelectContent,
@@ -183,27 +186,10 @@ export function InspectionCreate({ id }: Props) {
router.push('/ko/material/receiving-management');
}, [router]);
return (
<PageLayout>
<div className="space-y-6">
{/* 헤더 */}
<div className="flex items-center justify-between">
<div className="flex items-center gap-3">
<ClipboardCheck className="w-6 h-6" />
<h1 className="text-xl font-semibold"> (IQC)</h1>
</div>
<div className="flex items-center gap-2">
<Button variant="outline" onClick={handleCancel}>
</Button>
<Button onClick={handleSubmit}>
<ClipboardCheck className="w-4 h-4 mr-1.5" />
</Button>
</div>
</div>
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
// ===== 폼 콘텐츠 렌더링 =====
const renderFormContent = useCallback(() => (
<>
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
{/* 좌측: 검사 대상 선택 */}
<div className="lg:col-span-1 space-y-2">
<Label className="text-sm font-medium"> </Label>
@@ -362,7 +348,6 @@ export function InspectionCreate({ id }: Props) {
</div>
</div>
</div>
</div>
{/* 성공 다이얼로그 */}
<SuccessDialog
@@ -371,6 +356,23 @@ export function InspectionCreate({ id }: Props) {
lotNo={lotNo}
onClose={handleSuccessClose}
/>
</PageLayout>
</>
), [
isLoadingTargets, inspectionTargets, selectedTargetId, inspectionDate,
inspector, lotNo, inspectionItems, opinion, validationErrors, showSuccess,
handleTargetSelect, handleJudgmentChange, handleRemarkChange, handleSuccessClose,
]);
return (
<IntegratedDetailTemplate
config={materialInspectionCreateConfig}
mode="create"
isLoading={isLoadingTargets}
isSubmitting={false}
onBack={handleCancel}
onCancel={handleCancel}
onSubmit={handleSubmit}
renderForm={renderFormContent}
/>
);
}

View File

@@ -0,0 +1,23 @@
'use client';
import { ClipboardCheck } from 'lucide-react';
import type { DetailConfig } from '@/components/templates/IntegratedDetailTemplate/types';
/**
* 수입검사 등록 (IQC) 페이지 Config
* IntegratedDetailTemplate 마이그레이션 (2025-01-20)
*/
export const materialInspectionCreateConfig: DetailConfig = {
title: '수입검사 등록',
description: '수입검사를 등록합니다',
icon: ClipboardCheck,
basePath: '/material/receiving-management',
fields: [],
actions: {
showBack: true,
showEdit: false,
showDelete: false,
showSave: true,
submitLabel: '등록',
},
};