+
+
+
+
setTaxPct(e.target.value)} />
@@ -218,27 +206,73 @@ export function GenerateInvoiceDialog({ open, onOpenChange, clientId, clientName
setDueDays(e.target.value)} />
-
-
-
Estimated total
-
{formatCurrency(total)}
- {tax > 0 &&
{formatCurrency(subtotal)} + {formatCurrency(tax)} tax
}
+
+ ) : loading ? (
+
Loading unbilled work…
+ ) : cases.length === 0 ? (
+
+ No unbilled time or expenses across this client's cases.
+
+ ) : (
+ <>
+
+
+
+ {cases.map((c) => (
+
+ ))}
-
-
-
-
+
+
+
+ setTaxPct(e.target.value)} />
+
+
+
+ setDueDays(e.target.value)} />
+
+
+
+
Estimated total
+
{formatCurrency(total)}
+ {tax > 0 &&
{formatCurrency(subtotal)} + {formatCurrency(tax)} tax
}
+
+
+
+ >
+ )}
+
+
+
+
- )}
+