feat: add CSV export + invoice save validation (closes #53, #48)#57
Open
PragyaTripathi990 wants to merge 2 commits into
Open
feat: add CSV export + invoice save validation (closes #53, #48)#57PragyaTripathi990 wants to merge 2 commits into
PragyaTripathi990 wants to merge 2 commits into
Conversation
Adds 'Export as CSV' option to the invoice action sheet. On hybrid (Android/iOS), attaches the CSV via EmailComposer. On web, triggers a direct Blob download. Uses the existing getCSVContent() from the SocialCalc index. Closes seetadev#53 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a validateInvoice() helper that blocks saving empty invoices or invoices with no SocialCalc cell data. Both doSave() and doSaveAs() in Menu.tsx now call this validator and show a descriptive toast on failure. The Save As dialog only reopens for filename-specific errors, not content errors. Part of seetadev#48 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@PragyaTripathi990 , Please see that I have already opened the PR that solves this issue. |
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.
Summary
Menu.tsx). On Android/iOS it attaches the CSV viacapacitor-email-composer; on web it triggers a direct Blob download.InvoiceValidatorservice (src/services/InvoiceValidator.ts) that guards both Save and Save As against empty filenames, placeholder names (default,Untitled), and invoices with no actual SocialCalc cell data.Related Issues
Closes #53
Closes #48
Test plan
.csvfile named after the current invoicedefault→ toast shows "Please save with a meaningful filename..."🤖 Generated with Claude Code