diff --git a/src/app/dashboard/invoices/[id]/_components/invoice-details-skeleton.tsx b/src/app/dashboard/invoices/[id]/_components/invoice-details-skeleton.tsx index 5f646e8..36b7cab 100644 --- a/src/app/dashboard/invoices/[id]/_components/invoice-details-skeleton.tsx +++ b/src/app/dashboard/invoices/[id]/_components/invoice-details-skeleton.tsx @@ -4,46 +4,64 @@ import { Skeleton } from "~/components/ui/skeleton"; export function InvoiceDetailsSkeleton() { return ( -
-
- {/* Main Content */} -
+
+ {/* Header */} +
+
+ + +
+
+ + +
+
+ + {/* Content */} +
+ {/* Left Column */} +
{/* Invoice Header Skeleton */} - + -
-
-
- - +
+
+
+
+ + +
+
+ + +
+
+
+ +
- -
-
- -
- {/* Client & Business Information Skeleton */} -
+ {/* Client & Business Info */} +
{Array.from({ length: 2 }).map((_, i) => ( - +
- +
- + -
+
{Array.from({ length: 3 }).map((_, j) => ( -
- - +
+ +
))}
@@ -53,130 +71,81 @@ export function InvoiceDetailsSkeleton() {
{/* Invoice Items Skeleton */} - - + +
- -
- - - - {["Date", "Description", "Hours", "Rate", "Amount"].map( - (header) => ( - - ), - )} - - - - {Array.from({ length: 3 }).map((_, i) => ( - - - - - - - - ))} - -
- -
- - - - - - - - - -
-
+ + {Array.from({ length: 3 }).map((_, i) => ( +
+
+
+ +
+ + + +
+
+
+ +
+
+
+ ))} - {/* Totals Section Skeleton */} -
-
-
-
- - -
-
- - -
- -
- - -
+ {/* Totals */} +
+
+
+ + +
+
+ + +
+ +
+ +
- {/* Notes Skeleton */} - - - + {/* Notes */} + + +
- - - + + +
- {/* Sidebar Skeleton */} -
- {/* Actions Skeleton */} - - - - - - {Array.from({ length: 4 }).map((_, i) => ( - - ))} - - - - {/* Details Skeleton */} - - + {/* Right Column - Actions */} +
+ +
- - + +
- -
- {Array.from({ length: 6 }).map((_, i) => ( -
- - -
- ))} -
-
-
- - {/* Danger Zone Skeleton */} - - - - - - + + {Array.from({ length: 3 }).map((_, i) => ( + + ))}
diff --git a/src/app/dashboard/invoices/[id]/_components/pdf-download-button.tsx b/src/app/dashboard/invoices/[id]/_components/pdf-download-button.tsx index 05b48aa..10dbd58 100644 --- a/src/app/dashboard/invoices/[id]/_components/pdf-download-button.tsx +++ b/src/app/dashboard/invoices/[id]/_components/pdf-download-button.tsx @@ -57,13 +57,12 @@ export function PDFDownloadButton({ onClick={handleDownloadPDF} disabled={isGenerating} variant="ghost" - size="sm" className={className} > {isGenerating ? ( - + ) : ( - + )} ); @@ -74,17 +73,16 @@ export function PDFDownloadButton({ onClick={handleDownloadPDF} disabled={isGenerating} variant={variant} - size="default" - className={`w-full shadow-sm ${className}`} + className={`shadow-sm ${className ?? ""}`} > {isGenerating ? ( <> - + Generating PDF... ) : ( <> - + Download PDF )} diff --git a/src/app/dashboard/invoices/[id]/page.tsx b/src/app/dashboard/invoices/[id]/page.tsx index e619a2f..dc2c666 100644 --- a/src/app/dashboard/invoices/[id]/page.tsx +++ b/src/app/dashboard/invoices/[id]/page.tsx @@ -10,12 +10,9 @@ import { PageHeader } from "~/components/layout/page-header"; import { PDFDownloadButton } from "./_components/pdf-download-button"; import { SendInvoiceButton } from "./_components/send-invoice-button"; import { InvoiceDetailsSkeleton } from "./_components/invoice-details-skeleton"; -import { InvoiceActionsDropdown } from "./_components/invoice-actions-dropdown"; + import { - ArrowLeft, Building, - Calendar, - Copy, Edit, FileText, Mail, @@ -23,12 +20,6 @@ import { Phone, User, AlertTriangle, - Trash2, - DollarSign, - Clock, - Eye, - Download, - Send, Check, } from "lucide-react"; @@ -75,20 +66,19 @@ async function InvoiceContent({ invoiceId }: { invoiceId: string }) { return (
- {/* Header */} -
-
-

- Invoice Details -

-

- View and manage invoice information -

-
-
- -
-
+ + + + {/* Content */}
@@ -96,7 +86,7 @@ async function InvoiceContent({ invoiceId }: { invoiceId: string }) {
{/* Invoice Header */} - +
@@ -276,7 +266,7 @@ async function InvoiceContent({ invoiceId }: { invoiceId: string }) { - {invoice.items.map((item, index) => ( + {invoice.items.map((item) => (
diff --git a/src/app/page.tsx b/src/app/page.tsx index c9f77a4..f0ab918 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -24,31 +24,41 @@ export default function HomePage() { {/* Navigation */} -