-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat(export invoices): Create data export #2226
Merged
Merged
Conversation
This file contains 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
ancorcruz
added
Feature
Add a new feature to the app
Export
user export capabilities
labels
Jun 27, 2024
ancorcruz
force-pushed
the
feat-export-invoices-create-data-export
branch
2 times, most recently
from
July 1, 2024 08:05
db30956
to
03f1d93
Compare
julienbourdeau
approved these changes
Jul 1, 2024
receives user, format, resource_type and resource_query, creates a new record and queues a job to produce the export file
this job calls the ExportResourcesService
remove relationship with user to ensure we have access to all the required data (organization, membership and user through membership)
also, ensure preview does not clutter the development database
file_url creates a link with expiration time filename is based in the creation date, resource type and format of the export
ancorcruz
force-pushed
the
feat-export-invoices-create-data-export
branch
from
July 1, 2024 17:18
161fc43
to
0f4de55
Compare
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.
Roadmap Task
👉 https://getlago.canny.io/feature-requests/p/ability-to-export-data-from-the-user-interface
Context
In order to effortlessly download export of invoices by non-technical users, it is required to extend the invoices filtering capabilities.
Description
This change modifies the data_exports database table adding references to memberships and organizations (drops reference to users) to ensure we can identify the user that initiates the export request but also the organization we are exporting the data from.
Also, this introduces the mailer to notify the user the export is ready, a service to create to create the data export record and queue the job to process the export, and enables action mailer previews to try emails in local in a more convenient way opening the email in the url: https://api.lago.dev/rails/mailers/data_export_mailer/completed.html?locale=en