diff --git a/src/components/cases/invoices-tab.tsx b/src/components/cases/invoices-tab.tsx index a755064..fd0d1bb 100644 --- a/src/components/cases/invoices-tab.tsx +++ b/src/components/cases/invoices-tab.tsx @@ -1,18 +1,17 @@ import { useEffect, useState } from "react"; -import { Link } from "@tanstack/react-router"; +import { Link, useNavigate } from "@tanstack/react-router"; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { supabase } from "@/integrations/supabase/client"; import { FilePlus } from "lucide-react"; import { formatCurrency, formatDate, statusBadgeClass } from "@/lib/format"; -import { GenerateInvoiceDialog } from "@/components/invoices/generate-invoice-dialog"; export function CaseInvoicesTab({ caseRecord }: { caseRecord: any }) { + const navigate = useNavigate(); const [invoices, setInvoices] = useState([]); const [unbilledTime, setUnbilledTime] = useState([]); const [unbilledExpenses, setUnbilledExpenses] = useState([]); - const [genOpen, setGenOpen] = useState(false); const load = async () => { const [{ data: invs }, { data: t }, { data: ex }] = await Promise.all([ @@ -42,7 +41,14 @@ export function CaseInvoicesTab({ caseRecord }: { caseRecord: any }) {
{formatCurrency(subtotal)}
- @@ -80,14 +86,6 @@ export function CaseInvoicesTab({ caseRecord }: { caseRecord: any }) { - - ); }