From 3753edaa20ebac15d21e4c44e970346af1434c2a Mon Sep 17 00:00:00 2001 From: John Yeo Date: Thu, 16 Apr 2026 17:43:23 +0100 Subject: [PATCH] Revert "Fix invoice detail sheet styling to match subscription detail sheet" This reverts commit 96001829ebe06419dd88a74d4b609f4588022c4f. --- .../components/sheets/InvoiceDetailSheet.tsx | 157 +++++++++--------- 1 file changed, 75 insertions(+), 82 deletions(-) diff --git a/vite/src/views/customers2/components/sheets/InvoiceDetailSheet.tsx b/vite/src/views/customers2/components/sheets/InvoiceDetailSheet.tsx index f1b584056..4fa67236e 100644 --- a/vite/src/views/customers2/components/sheets/InvoiceDetailSheet.tsx +++ b/vite/src/views/customers2/components/sheets/InvoiceDetailSheet.tsx @@ -8,11 +8,8 @@ import { import { ArrowCounterClockwiseIcon, ArrowSquareOutIcon, - CalendarBlankIcon, - CreditCardIcon, EyeIcon, EyeSlashIcon, - HashIcon, } from "@phosphor-icons/react"; import { format } from "date-fns"; import { useMemo, useState } from "react"; @@ -20,7 +17,6 @@ import { AdminHover } from "@/components/general/AdminHover"; import { Badge } from "@/components/v2/badges/Badge"; import { Button } from "@/components/v2/buttons/Button"; import { MiniCopyButton } from "@/components/v2/buttons/CopyButton"; -import { InfoRow } from "@/components/v2/InfoRow"; import { SheetHeader, SheetSection } from "@/components/v2/sheets/InlineSheet"; import { useFeaturesQuery } from "@/hooks/queries/useFeaturesQuery"; import { useOrgStripeQuery } from "@/hooks/queries/useOrgStripeQuery"; @@ -193,7 +189,7 @@ export function InvoiceDetailSheet({ }; return ( -
+
@@ -208,94 +204,91 @@ export function InvoiceDetailSheet({ description={`${formatDate(invoice.created_at)} • ${formatSignedAmount(invoice.total, invoice.currency)}`} /> - {productGroups.map((productGroup) => ( - -
- - {productGroup.productName} - - -
+
+ {/* Product groups with line items */} + {productGroups.map((productGroup) => ( + + {/* Product header with description toggle */} +
+ + {productGroup.productName} + + +
-
- {productGroup.lineItemGroups.map((group) => ( - - ))} + {/* Line item groups within this product */} +
+ {productGroup.lineItemGroups.map((group) => ( + + ))} +
+ + ))} + + {/* Invoice Total */} + +
+ Total + + {formatSignedAmount(invoice.total, invoice.currency)} +
- ))} - -
- Total - - {formatSignedAmount(invoice.total, invoice.currency)} - -
-
- - -
- } - label="Invoice ID" - value={ + {/* Invoice Details - Compact */} + +
+
+ Invoice ID - } - /> - } - label="Stripe ID" - value={ +
+
+ Stripe ID - } - /> - } - label="Created" - value={ - - } - /> -
- +
+
+ Created + + {format(new Date(invoice.created_at), "MMM d, yyyy HH:mm")} + +
+
+
+
-
+ {/* Footer */} +