Fix edit invoice initialization and routing

The form initialization logic for editing invoices was improved to
handle route changes correctly. The edit link path was fixed and cache
invalidation was added to ensure fresh data on navigation.
This commit is contained in:
2025-08-01 03:33:19 -04:00
parent 5e30d338af
commit 9de86df070
2 changed files with 48 additions and 37 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ function InvoiceViewContent({ invoiceId }: { invoiceId: string }) {
>
<PDFDownloadButton invoiceId={invoice.id} variant="outline" />
<Button asChild variant="default">
<Link href={`/dashboard/invoices/${invoice.id}`}>
<Link href={`/dashboard/invoices/${invoice.id}/edit`}>
<Edit className="h-5 w-5" />
<span>Edit</span>
</Link>