feat: invoice preview panel, send modal, and activity timeline#127
Merged
0xdevcollins merged 1 commit intomainfrom Apr 4, 2026
Merged
feat: invoice preview panel, send modal, and activity timeline#1270xdevcollins merged 1 commit intomainfrom
0xdevcollins merged 1 commit intomainfrom
Conversation
…70) - Add SendInvoiceModal — dialog with pre-filled recipient email, custom message textarea (1000 char), invoice summary card, and Send button; validates email before dispatching - Add InvoicePdfPreview — full-screen dialog (sm:max-w-4xl) with iframe embedding the Cloudinary PDF URL; Download, Print, and Open-in-tab buttons in the header; mobile fallback shows action buttons without iframe - Rewrite InvoiceDetailSheet — adds activity timeline (created → sent → viewed → paid/overdue/cancelled) with animated step indicator and derived timestamps; adds payment details section for PAID/PARTIALLY_PAID; adds "Preview" button in the sheet header; "Send Invoice" button now opens SendInvoiceModal instead of firing immediately - Add useInvoicePdf query hook — auto-fetches PDF URL when preview is open; 5-minute stale time so it's only regenerated when necessary - Update onSend signature to (invoice, message?) across table and page; handleSendExisting forwards optional message to sendInvoice mutation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #70
Summary
SendInvoiceModal
onConfirm(invoice, message?)— integrates with existinguseSendInvoicehookInvoiceDetailSheet; replaces the previous direct-fire behaviourInvoicePdfPreview
sm:max-w-4xl,h-[90vh]) wrapping the Cloudinary PDF URL in an<iframe>useInvoicePdfquery hook auto-fetches the URL on open; 5-min stale time avoids redundant regeneration< sm) shows "Open in browser" + "Download" since PDF iframes don't work on small viewportsInvoiceDetailSheetheaderInvoiceDetailSheet (enhanced)
InvoicePdfPreviewcreatedAt,paidAt,dueDate)PAID/PARTIALLY_PAIDstatus:SendInvoiceModal(no more confirm → immediate send)Acceptance criteria
Test plan
🤖 Generated with Claude Code