-
Notifications
You must be signed in to change notification settings - Fork 498
payments panel invoice list #1113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
payments panel invoice list #1113
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryAdded an invoice history table to the payments panel that displays the most recent 10 customer invoices with date, status, amount, and a link to view the full invoice on Stripe.
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant PaymentsPanel
participant CustomerHook as customer.useInvoices()
participant ClientApp
participant API as /api/.../invoices/[type]/[id]
participant DB as Database
User->>PaymentsPanel: View payments panel
PaymentsPanel->>CustomerHook: useInvoices({ limit: 10 })
CustomerHook->>ClientApp: Fetch invoice data
ClientApp->>API: GET invoices list
API->>DB: Query subscriptionInvoice table
DB-->>API: Return invoice records
API-->>ClientApp: Return formatted invoices
ClientApp-->>CustomerHook: Return CustomerInvoicesList
CustomerHook-->>PaymentsPanel: Invoices array with data
PaymentsPanel->>PaymentsPanel: formatInvoiceDate(createdAt)
PaymentsPanel->>PaymentsPanel: formatInvoiceStatus(status)
PaymentsPanel->>PaymentsPanel: formatInvoiceAmount(amountTotal)
PaymentsPanel->>User: Display invoice table
User->>PaymentsPanel: Click "View" button
PaymentsPanel->>User: Open hostedInvoiceUrl in new tab
|
Uh oh!
There was an error while loading. Please reload this page.