Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-18 01:27:37 +00:00
co-authored by renee-png
parent 62c9b79d0b
commit 3ed1f2a0f4
+31
View File
@@ -160,6 +160,37 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) {
{showForm && (
<Card className="border-border/60">
<CardContent className="p-4">
{fees.length > 0 && (
<div className="mb-3 space-y-1.5">
<Label className="text-xs">Fee schedule (optional)</Label>
<Select
value={selectedFeeId}
onValueChange={(v) => {
setSelectedFeeId(v);
const fee = fees.find((f) => f.id === v);
if (fee) {
setForm((f) => ({
...f,
hourly_rate: String(fee.amount),
billable: fee.billable,
description: f.description || fee.description || fee.name,
}));
}
}}
>
<SelectTrigger>
<SelectValue placeholder="Pick a rate from the fee schedule…" />
</SelectTrigger>
<SelectContent>
{fees.map((f) => (
<SelectItem key={f.id} value={f.id}>
{f.name} — {formatCurrency(Number(f.amount))}/hr
</SelectItem>
))}
</SelectContent>
</Select>
</div>
)}
<form onSubmit={submit} className="grid grid-cols-1 md:grid-cols-4 gap-3">
<div className="space-y-1.5">
<Label className="text-xs">Date</Label>