Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 16:02:42 +00:00
co-authored by renee-png
parent 408632d7e0
commit 872de9e31c
+22
View File
@@ -286,6 +286,28 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) {
</table>
</CardContent>
</Card>
<NewFeeItemDialog
open={showNewFee}
onOpenChange={setShowNewFee}
defaultDescription={form.description}
defaultAmount={parseFloat(form.hourly_rate || "0") || undefined}
defaultBillable={form.billable}
onCreated={(item) => {
// Insert into local list and select it
setFees((prev) =>
[...prev, { id: item.id, name: item.name, description: item.description, amount: Number(item.amount), billable: item.billable }]
.sort((a, b) => a.name.localeCompare(b.name)),
);
setSelectedFeeId(item.id);
setForm((f) => ({
...f,
hourly_rate: String(item.amount),
billable: item.billable,
description: item.description || item.name,
}));
}}
/>
</div>
);
}