import { useState } from 'react'; import { Settings, Plus } from 'lucide-react'; import { PageContainer } from '@/components/layout/PageContainer'; import { PageToolbar, SearchInput } from '@/components/layout/PageToolbar'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { useQuotations } from '@/features/quotations/hooks/useQuotations'; import { useQuotationFilters } from '@/features/quotations/hooks/useQuotationFilters'; import { QuotationTable } from '@/features/quotations/components/QuotationTable'; import { QuotationDetailDrawer } from '@/features/quotations/components/QuotationDetailDrawer'; import { CreateQuotationWizard } from '@/features/quotations/components/CreateQuotationWizard'; import { QuotationSettingsModal } from '@/features/quotations/components/QuotationSettingsModal'; import { QUOTATION_STATUS_FILTERS } from '@/features/quotations/types'; export default function QuotationPage() { const { products, partners, cards, quotations, quotationSettings, chatSessions, stopNegotiation, addSetting, deleteSetting, createQuotation, } = useQuotations(); const { search, setSearch, statusFilter, setStatusFilter, typeFilter, setTypeFilter, filtered } = useQuotationFilters(quotations); const [detailId, setDetailId] = useState(null); const [isCreateOpen, setIsCreateOpen] = useState(false); const [isSettingsOpen, setIsSettingsOpen] = useState(false); const activeQuotation = quotations.find((e) => e.id === detailId) ?? null; return ( } > setSearch(e.target.value)} placeholder="견적명 또는 견적 번호로 실시간 서치..." />
{activeQuotation && ( setDetailId(null)} /> )} {isCreateOpen && ( setIsCreateOpen(false)} /> )} {isSettingsOpen && ( setIsSettingsOpen(false)} /> )}
); }