From ba8cd44a0ed2c613a5f2cee06bfc9bd0f61f21c7 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 7 Nov 2025 08:39:04 +0000 Subject: (최겸) 입찰/견적 수정사항 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bidding/bidding-notice-template-manager.tsx | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 lib/bidding/bidding-notice-template-manager.tsx (limited to 'lib/bidding/bidding-notice-template-manager.tsx') diff --git a/lib/bidding/bidding-notice-template-manager.tsx b/lib/bidding/bidding-notice-template-manager.tsx new file mode 100644 index 00000000..3426020f --- /dev/null +++ b/lib/bidding/bidding-notice-template-manager.tsx @@ -0,0 +1,63 @@ +'use client' + +import { useState } from 'react' +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' +import { BiddingNoticeEditor } from './bidding-notice-editor' +import { BiddingNoticeTemplate } from '@/db/schema/bidding' +import { biddingNoticeTypeLabels } from '@/db/schema/bidding' + +interface BiddingNoticeTemplateManagerProps { + initialTemplates: Record +} + +export function BiddingNoticeTemplateManager({ initialTemplates }: BiddingNoticeTemplateManagerProps) { + const [activeTab, setActiveTab] = useState('standard') + const [templates, setTemplates] = useState(initialTemplates) + + const handleTemplateUpdate = (type: string, template: BiddingNoticeTemplate) => { + setTemplates(prev => ({ + ...prev, + [type]: template + })) + } + + const templateTypes = [ + { key: 'standard', label: biddingNoticeTypeLabels.standard }, + { key: 'facility', label: biddingNoticeTypeLabels.facility }, + { key: 'unit_price', label: biddingNoticeTypeLabels.unit_price } + ] + + return ( + + + {templateTypes.map(({ key, label }) => ( + + {label} + + ))} + + + {templateTypes.map(({ key, label }) => ( + + + + {label} 입찰공고문 템플릿 + + {label} 타입의 입찰공고문 템플릿을 작성하고 관리할 수 있습니다. + 이 템플릿은 실제 입찰 공고 작성 시 기본 양식으로 사용됩니다. + + + + handleTemplateUpdate(key, template)} + /> + + + + ))} + + ) +} -- cgit v1.2.3