/** * 견적 푸터 바 * * - 예상 전체 견적금액 표시 * - 버튼: 견적서 산출, 임시저장, 최종저장 * - 뒤로가기 버튼 */ "use client"; import { Download, Save, Check, ArrowLeft, Loader2, Calculator, Eye, Pencil, ClipboardList } from "lucide-react"; import { Button } from "../ui/button"; // ============================================================================= // Props // ============================================================================= interface QuoteFooterBarProps { totalLocations: number; totalAmount: number; status: "draft" | "temporary" | "final"; onCalculate: () => void; onPreview: () => void; onSaveTemporary: () => void; onSaveFinal: () => void; onBack: () => void; onEdit?: () => void; onOrderRegister?: () => void; isCalculating?: boolean; isSaving?: boolean; disabled?: boolean; /** view 모드 여부 (view: 수정+최종저장, edit: 임시저장+최종저장) */ isViewMode?: boolean; } // ============================================================================= // 컴포넌트 // ============================================================================= export function QuoteFooterBar({ totalLocations, totalAmount, status, onCalculate, onPreview, onSaveTemporary, onSaveFinal, onBack, onEdit, onOrderRegister, isCalculating = false, isSaving = false, disabled = false, isViewMode = false, }: QuoteFooterBarProps) { return (
{/* 왼쪽: 뒤로가기 + 금액 표시 */}

예상 전체 견적금액

{totalAmount.toLocaleString()}

{/* 오른쪽: 버튼들 */}
{/* 견적서 산출 - edit 모드에서만 활성화 */} {!isViewMode && ( )} {/* 미리보기 */} {/* 수정 - view 모드에서만 표시 */} {isViewMode && onEdit && ( )} {/* 임시저장 - edit 모드에서만 표시 */} {!isViewMode && ( )} {/* 최종저장 - 양쪽 모드에서 표시 (final 상태가 아닐 때만) */} {status !== "final" && ( )} {/* 수주등록 - final 상태일 때 표시 */} {status === "final" && onOrderRegister && ( )}
); }