import React from 'react'; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/Components/ui/card'; import { Button } from '@/Components/ui/button'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/Components/ui/table'; import { FileSpreadsheet, FileDown, AlertTriangle, ChevronLeft, ChevronRight } from 'lucide-react'; import { ProjectWizardData } from '../../../types/project-wizard'; interface Step6EstimationProps { project: ProjectWizardData; isUnprofitableEst: boolean; calculatedMaterialsCost: number; calculatedLaborCost: number; calculatedEquipmentCost: number; totalEstimatedCost: number; grossMarginVal: number; grossMarginPct: number; contractValueNum: number; formatCurrency: (v: string | number) => string; handleBack: () => void; onNext: () => void; } export default function Step6Estimation({ project, isUnprofitableEst, calculatedMaterialsCost, calculatedLaborCost, calculatedEquipmentCost, totalEstimatedCost, grossMarginVal, grossMarginPct, contractValueNum, formatCurrency, handleBack, onNext }: Step6EstimationProps) { return (
This project's estimated costs exceed its contract value, resulting in a negative projected margin. The unprofitable warning will flag this project in procurement logs and approval cycles.
{formatCurrency(project.contract_value)}
{formatCurrency(totalEstimatedCost)}
= 0 ? 'text-emerald-700' : 'text-rose-600'}`}> {formatCurrency(grossMarginVal)}
= 0 ? 'text-emerald-700' : 'text-rose-600'}`}> {grossMarginPct.toFixed(2)}%