"use client"; import { clsx } from "clsx"; import { CommercialTermsEditor } from "~/components/estimates/CommercialTermsEditor.js"; import type { EstimateVersionView, EstimateWorkspaceView, } from "~/components/estimates/EstimateWorkspace.types.js"; import { InfoTooltip } from "~/components/ui/InfoTooltip.js"; import { formatMoney } from "~/lib/format.js"; function EmptyState({ children }: { children: React.ReactNode }) { return (
Total Cost
{formatMoney(totals.costCents, estimate.baseCurrency)}
Avg {formatMoney(Math.round(avgCostRate), estimate.baseCurrency)}/h
Total Price
{formatMoney(totals.priceCents, estimate.baseCurrency)}
Avg {formatMoney(Math.round(avgBillRate), estimate.baseCurrency)}/h
Margin
= 0 ? "text-emerald-700 dark:text-emerald-400" : "text-red-700 dark:text-red-400")}> {formatMoney(marginCents, estimate.baseCurrency)}
{marginPercent.toFixed(1)}% of price
Total Hours
{totals.hours.toFixed(1)} h
{demandLines.length} demand lines
| Chapter | Lines | Hours | Cost | Price | Margin | Margin % |
|---|---|---|---|---|---|---|
| {chapter} | {data.count} | {data.hours.toFixed(1)} | {formatMoney(data.costCents, estimate.baseCurrency)} | {formatMoney(data.priceCents, estimate.baseCurrency)} | = 0 ? "text-emerald-700 dark:text-emerald-400" : "text-red-700 dark:text-red-400")}> {formatMoney(chapterMargin, estimate.baseCurrency)} | = 0 ? "text-emerald-700 dark:text-emerald-400" : "text-red-700 dark:text-red-400")}> {chapterMarginPct.toFixed(1)}% |
| Total | {demandLines.length} | {totals.hours.toFixed(1)} | {formatMoney(totals.costCents, estimate.baseCurrency)} | {formatMoney(totals.priceCents, estimate.baseCurrency)} | = 0 ? "text-emerald-700 dark:text-emerald-400" : "text-red-700 dark:text-red-400")}> {formatMoney(marginCents, estimate.baseCurrency)} | = 0 ? "text-emerald-700 dark:text-emerald-400" : "text-red-700 dark:text-red-400")}> {marginPercent.toFixed(1)}% |
| Month | Hours | Cost | Price | Margin |
|---|---|---|---|---|
| {month} | {data.hours.toFixed(1)} | {formatMoney(data.costCents, estimate.baseCurrency)} | {formatMoney(data.priceCents, estimate.baseCurrency)} | = 0 ? "text-emerald-700 dark:text-emerald-400" : "text-red-700 dark:text-red-400")}> {formatMoney(mMargin, estimate.baseCurrency)} |