billing: show invoice payment method in the UI#269
Merged
Conversation
|
Preview deleted (PR closed). |
Surface the seller's bank-transfer + PromptPay details (the new InvoiceItem.payment field) directly in the console so customers no longer have to download the PDF to learn where to pay: - Invoice page: a "How to pay" panel on open (payable) invoices, with the amount to transfer and the destination account. - Pay modal: a "Transfer to" block (amount due + account) — previously the modal asked for a transfer slip without ever showing the account. Both surfaces are defensively guarded on payment data being present, so they no-op until the apiserver field ships. Mock fixture + Playwright coverage added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9FhPEapaKr4VugQBEdisj
9478dfa to
1ae9372
Compare
The selected-file row is a grid item in the modal's button column, and grid items default to min-width:auto — so a long, unbreakable file name pushed the row (and the whole modal) wider than its panel, clipping the Choose-file / Upload-slip button labels. Add min-width:0 so the existing .file-name ellipsis actually kicks in. Pre-existing bug, fixed here since this PR already touches the modal. Adds a regression test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N9FhPEapaKr4VugQBEdisj
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.
What
Surfaces the invoice payment method (the seller's bank-transfer + PromptPay details) directly in the console, so customers no longer have to download the invoice PDF to find out where to pay.
Both surfaces read the new
InvoiceItem.paymentfield (companion api/apiserver PRs) and are defensively guarded on the data being present, so they cleanly no-op until the apiserver field is deployed.Why
The payment instructions existed only on the rendered PDF — users didn't realize they had to download it to see where to pay. This closes that gap.
Notes
mock.ts,fixtures/mocks.js) updated to mirror the real API shape; 3 new Playwright tests added (panel shown on open, hidden on paid, modal shows the destination account).bun lint,bun check, and the billing suite (10 tests) pass.paymentfield.Screenshots
Invoice page — How to pay panel (new)
Pay modal — Transfer-to account (new)
Dark mode
🤖 Generated with Claude Code
Long file-name handling (pre-existing modal bug, fixed here)
A long, unbreakable slip file name previously pushed the row — and the whole modal — wider than its panel (the selected-file row is a grid item, which defaults to
min-width:auto), clipping the button labels. Addedmin-width:0so the existing.file-nameellipsis kicks in; the name now truncates and the modal keeps its size. Regression test added.