diff --git a/src/app/[locale]/(protected)/sales/quote-management/test-new/page.tsx b/src/app/[locale]/(protected)/sales/quote-management/test-new/page.tsx
index 872bc423..90c78208 100644
--- a/src/app/[locale]/(protected)/sales/quote-management/test-new/page.tsx
+++ b/src/app/[locale]/(protected)/sales/quote-management/test-new/page.tsx
@@ -1,54 +1,71 @@
/**
* 견적 등록 테스트 페이지 (V2 UI)
*
+ * IntegratedDetailTemplate 마이그레이션 (2026-01-20)
* 새로운 자동 견적 산출 UI 테스트용
- * 기존 견적 등록 페이지는 수정하지 않음
*/
-"use client";
+'use client';
-import { useRouter } from "next/navigation";
-import { useState } from "react";
-import { QuoteRegistrationV2, QuoteFormDataV2 } from "@/components/quotes/QuoteRegistrationV2";
-import { toast } from "sonner";
+import { useRouter } from 'next/navigation';
+import { useState, useCallback } from 'react';
+import { QuoteRegistrationV2, QuoteFormDataV2 } from '@/components/quotes/QuoteRegistrationV2';
+import { IntegratedDetailTemplate } from '@/components/templates/IntegratedDetailTemplate';
+import { quoteCreateConfig } from '@/components/quotes/quoteConfig';
+import { toast } from 'sonner';
export default function QuoteTestNewPage() {
const router = useRouter();
const [isSaving, setIsSaving] = useState(false);
- const handleBack = () => {
- router.push("/sales/quote-management");
- };
+ const handleBack = useCallback(() => {
+ router.push('/sales/quote-management');
+ }, [router]);
- const handleSave = async (data: QuoteFormDataV2, saveType: "temporary" | "final") => {
+ const handleSave = useCallback(async (data: QuoteFormDataV2, saveType: 'temporary' | 'final') => {
setIsSaving(true);
try {
// TODO: API 연동 시 실제 저장 로직 구현
- console.log("[테스트] 저장 데이터:", data);
- console.log("[테스트] 저장 타입:", saveType);
+ console.log('[테스트] 저장 데이터:', data);
+ console.log('[테스트] 저장 타입:', saveType);
// 테스트용 지연
await new Promise((resolve) => setTimeout(resolve, 1000));
- toast.success(`[테스트] ${saveType === "temporary" ? "임시" : "최종"} 저장 완료`);
+ toast.success(`[테스트] ${saveType === 'temporary' ? '임시' : '최종'} 저장 완료`);
// 저장 후 상세 페이지로 이동 (테스트용으로 ID=1 사용)
- if (saveType === "final") {
- router.push("/sales/quote-management/test/1");
+ if (saveType === 'final') {
+ router.push('/sales/quote-management/test/1');
}
} catch (error) {
- toast.error("저장 중 오류가 발생했습니다.");
+ toast.error('저장 중 오류가 발생했습니다.');
} finally {
setIsSaving(false);
}
- };
+ }, [router]);
+
+ // 폼 콘텐츠 렌더링
+ const renderFormContent = useCallback(() => {
+ return (
+
+ );
+ }, [handleBack, handleSave, isSaving]);
return (
-
);
}
diff --git a/src/components/quotes/quoteConfig.ts b/src/components/quotes/quoteConfig.ts
index 754d37f3..a93f78e1 100644
--- a/src/components/quotes/quoteConfig.ts
+++ b/src/components/quotes/quoteConfig.ts
@@ -27,3 +27,19 @@ export const quoteConfig: DetailConfig = {
backLabel: '목록',
},
};
+
+/**
+ * 견적 등록 페이지 Config
+ */
+export const quoteCreateConfig: DetailConfig = {
+ title: '견적',
+ description: '새 견적을 등록합니다',
+ icon: FileText,
+ basePath: '/sales/quote-management',
+ fields: [],
+ actions: {
+ showBack: true,
+ showSave: false, // QuoteFooterBar에서 처리
+ backLabel: '목록',
+ },
+};