feat: invoice share context, CSV trim, duplicate rename, export date-… - #646
Open
cyberpunk30 wants to merge 1 commit into
Open
feat: invoice share context, CSV trim, duplicate rename, export date-…#646cyberpunk30 wants to merge 1 commit into
cyberpunk30 wants to merge 1 commit into
Conversation
…range (Stellar-split#601 Stellar-split#602 Stellar-split#603 Stellar-split#604) - Stellar-split#601 InvoiceShareQRModal: add invoiceTitle and totalAmount props to header; falls back to 'Invoice #<id>' when title is absent; text truncates on narrow viewports - Stellar-split#602 CsvRecipientImport: trim leading/trailing whitespace from all CSV fields before validation; also trim inline-edited values in handleUpdateRow so spreadsheet export artifacts no longer cause silent import failures - Stellar-split#603 DuplicateModal: add editable name field pre-filled with 'Copy of Invoice #<id>'; trims whitespace, rejects empty string with inline error; onConfirm signature updated to (name, deadlineIso) - Stellar-split#604 ExportModal: From defaults to 30 days ago, To defaults to today; From/To labels added to pickers; validates From <= To before export with inline error; passes from/to as query params to the API route - Stellar-split#604 export/route.ts: read from/to query params, merge into filters, return 400 when from > to
|
@cyberpunk30 is attempting to deploy a commit to the kingsman-99's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@cyberpunk30 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Title:
feat: invoice share context, CSV trim, duplicate rename, export date-range
Body:
Closes #601
Closes #602
Closes #603
Closes #604
Summary
Implements four independent UI/UX improvements across the invoice modals.
#601 — InvoiceShareQRModal: show invoice context in header
The modal header was context-free. Added two optional props (
invoiceTitle,totalAmount) socallers can pass invoice details directly into the modal. The header now renders:
Invoice #<id>when absent)All header text uses
truncateso it degrades gracefully on narrow viewports.File:
src/components/InvoiceShareQRModal.tsx#602 — CsvRecipientImport: trim whitespace before validation
CSV exports from spreadsheet tools often include leading/trailing spaces in address cells,
causing silent validation failures. Fixed in two places:
parseCsv: each field (address,percentage,amount) is now explicitly trimmed aftercolumn extraction.
handleUpdateRow: inline-edited values are trimmed before re-running validation.Genuinely malformed addresses still produce the
"Invalid Stellar address"error as before.File:
src/components/CsvRecipientImport.tsx#603 — DuplicateModal: editable name field
The duplicate was always created with an auto-generated name (
Copy of Invoice #<id>) and no wayto change it before saving. Added:
role="alert")onConfirmsignature updated to(name: string, deadlineIso: string)File:
src/components/DuplicateModal.tsx#604 — ExportModal + API: date-range picker with defaults
Exporting all invoices with no date constraint was impractical for long-running accounts.
Changes:
YYYY-MM-DD)apiFetchcall now appends?from=...&to=...query paramsvalues), and returns
400iffrom > toFiles:
src/components/ExportModal.tsx,src/app/api/invoices/export/route.tsTesting
The Closes #601 … Closes #604 lines will auto-close all four issues when the PR is merged on
GitHub.