diff --git a/src/components/cases/time-tab.tsx b/src/components/cases/time-tab.tsx index 3f8834c..5232bf0 100644 --- a/src/components/cases/time-tab.tsx +++ b/src/components/cases/time-tab.tsx @@ -286,6 +286,28 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) { + + { + // 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, + })); + }} + /> ); }