forked from vtex-apps/return-app
-
Notifications
You must be signed in to change notification settings - Fork 0
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(manifest.json): update outbound-access path to include all sub… #2
Open
johnmartinez93
wants to merge
3
commits into
develop
Choose a base branch
from
feature/export-csv
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
…-paths ✨ feat(en.json): add export returns table filter The outbound-access path has been updated to include all sub-paths by adding a wildcard character to the end of the path. This allows the outbound-access to match all sub-paths under the specified path. The en.json file has been updated to include a new table filter for exporting returns. This will allow users to export returns data in a more convenient way. 🆕 feat(return.ts): add exportReturns method to Return class 🆕 feat(index.ts): add exportRequests middleware to handle GET requests to /exportRequests endpoint The `exportReturns` method is added to the `Return` class, which allows the client to generate an export of returns. The `exportRequests` middleware is added to handle GET requests to the `/exportRequests` endpoint. This middleware will be responsible for calling the `exportReturns` method and returning the response to the client. 🆕 feat(exportRequests.ts): add middleware to export return requests as CSV 🚀 chore(service.json): add route for exportRequests middleware The exportRequests middleware is added to export return requests as CSV. The middleware checks for the '_dateSubmitted' query parameter and throws an error if it is not present. The middleware then exports the return requests as CSV and sets the response headers accordingly. The service.json file is updated to include the route for the exportRequests middleware. The route is public and accessible via the '/_v/return-request/export' path. 🚀 feat(ListTableFilter.tsx): add CSV export functionality This commit adds a new function called `downloadCSV` that exports the return requests data to a CSV file. The function is called when the user clicks on a new button added to the component. The button is only enabled when the user has selected a date range to filter the data. The CSV file is downloaded from the endpoint `/_v/return-request/export` and is named `requests.csv`.
…ce variables This commit refactors the routes in the Return class to use the defaultAccount and workspace variables instead of hardcoding the values. This improves consistency and makes it easier to change the values in the future. Additionally, console.info statements were added to help with debugging.
johnmartinez93
force-pushed
the
feature/export-csv
branch
from
April 13, 2023 22:58
848754c
to
e7d9fd9
Compare
…le filters 🐛 fix(bg.json): add missing comma in input-iban-invalid error message The export returns button has been added to the return request list table filters, which allows users to export the list of returns. A missing comma has been added to the input-iban-invalid error message to fix a syntax error. 🔧 chore(context.json): remove unused translations The commit removes unused translations from the context.json file. The translations that were removed were not being used in the application and were just taking up space. 🌐 feat(i18n): add export returns filter to return request list table The i18n messages for Spanish, French, and Italian have been updated to include a new filter option for exporting returns in the return request list table. This feature allows users to export the list of returns in a CSV format for further analysis. Additionally, a comma has been added to separate the last two items in the messages to improve readability. 🌐 feat(i18n): add export returns translation to return request list table filters Added translations for "EXPORTEREN" in Dutch, "EXPORTAR" in Portuguese, and "EXPORTĂ" in Romanian to the return request list table filters. This allows users to export returns in their preferred language. 🌐 i18n(th.json): add export-returns filter to return-request-list table This commit adds a new filter to the return-request-list table in the Thai translation file. The new filter is named "export-returns" and is translated to "ส่งออก". This filter will allow users to export the list of returns in the table. Additionally, a comma was added to the end of the previous line to improve consistency.
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.
✨ feat(en.json): add export returns table filter
The outbound-access path has been updated to include all sub-paths by adding a wildcard character to the end of the path. This allows the outbound-access to match all sub-paths under the specified path. The en.json file has been updated to include a new table filter for exporting returns. This will allow users to export returns data in a more convenient way.
🆕 feat(return.ts): add exportReturns method to Return class 🆕 feat(index.ts): add exportRequests middleware to handle GET requests to /exportRequests endpoint The
exportReturns
method is added to theReturn
class, which allows the client to generate an export of returns. TheexportRequests
middleware is added to handle GET requests to the/exportRequests
endpoint. This middleware will be responsible for calling theexportReturns
method and returning the response to the client.🆕 feat(exportRequests.ts): add middleware to export return requests as CSV 🚀 chore(service.json): add route for exportRequests middleware The exportRequests middleware is added to export return requests as CSV. The middleware checks for the '_dateSubmitted' query parameter and throws an error if it is not present. The middleware then exports the return requests as CSV and sets the response headers accordingly. The service.json file is updated to include the route for the exportRequests middleware. The route is public and accessible via the '/_v/return-request/export' path.
🚀 feat(ListTableFilter.tsx): add CSV export functionality This commit adds a new function called
downloadCSV
that exports the return requests data to a CSV file. The function is called when the user clicks on a new button added to the component. The button is only enabled when the user has selected a date range to filter the data. The CSV file is downloaded from the endpoint/_v/return-request/export
and is namedrequests.csv
.