From 0de4545d6276b56ca748c603d99c3f1ea2d3d92e Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:51:55 +0000 Subject: [PATCH 1/2] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/cases/time-tab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/cases/time-tab.tsx b/src/components/cases/time-tab.tsx index b4cd1a1..75530f6 100644 --- a/src/components/cases/time-tab.tsx +++ b/src/components/cases/time-tab.tsx @@ -10,7 +10,7 @@ import { useAuth } from "@/lib/auth"; import { Plus, Trash2, Loader2, FilePlus, PlusCircle, CheckCircle2, Undo2, Download } from "lucide-react"; import { formatCurrency, formatDate } from "@/lib/format"; import { ensureMarkedInvoicedPlaceholder } from "@/lib/invoice-generation"; -import { roundToSixth } from "@/lib/timer"; +import { roundToTenth } from "@/lib/timer"; import { toast } from "sonner"; import { ImportUnbilledDialog } from "@/components/cases/import-unbilled-dialog"; import { From e0e283c993d2d2972beddfe23bd14ac92a8f73c9 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:52:08 +0000 Subject: [PATCH 2/2] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/cases/time-tab.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/cases/time-tab.tsx b/src/components/cases/time-tab.tsx index 75530f6..5e48439 100644 --- a/src/components/cases/time-tab.tsx +++ b/src/components/cases/time-tab.tsx @@ -51,9 +51,9 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) { billable: true, }); - // Compute total raw hours from hours + minutes inputs, then round UP to 1/6. + // Compute total raw hours from hours + minutes inputs, then round UP to 1/10 hr (6 min). const rawHours = (parseFloat(form.hours || "0") || 0) + (parseFloat(form.minutes || "0") || 0) / 60; - const roundedHours = roundToSixth(rawHours); + const roundedHours = roundToTenth(rawHours); const [fees, setFees] = useState([]); const [selectedFeeId, setSelectedFeeId] = useState(""); @@ -125,7 +125,7 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) { setSubmitting(false); if (error) toast.error(error.message); else { - toast.success(`Time entry added (${hours.toFixed(2)} hrs)`); + toast.success(`Time entry added (${hours.toFixed(1)} hrs)`); setShowForm(false); setForm({ ...form, hours: "", minutes: "", description: "" }); load(); @@ -173,7 +173,7 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) {
- +
@@ -251,7 +251,7 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) { setForm({ ...form, minutes: e.target.value })} /> {rawHours > 0 && (

- Billed as {roundedHours.toFixed(2)} hrs (1/6 hr) + Billed as {roundedHours.toFixed(1)} hrs (1/10 hr)

)}
@@ -302,7 +302,7 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) { {formatDate(e.work_date)} {e.user?.full_name || e.user?.email} {e.description} - {Number(e.hours).toFixed(2)} + {Number(e.hours).toFixed(1)} {formatCurrency(e.hourly_rate)} {e.billable ? formatCurrency(Number(e.hours) * Number(e.hourly_rate)) : "—"} {!e.billable ? "Non-billable" : e.invoice_id ? "Invoiced" : "Unbilled"}