Implement Recipient List Export to CSV
Closed this issue · 0 comments
gruz0 commented
As a frontend developer, your next task is to implement a feature that allows users to export the recipients of a specific group from the database to a CSV file. The feature should be accessible through a button labeled "Export" on the group interface.
The following steps outline the expected behavior of the export feature:
- On the group interface, a button labeled "Export" should be visible to the user.
- When a user clicks the "Export" button, the frontend should send a request to the backend API endpoint:
/api/groups/:group_id/export
. - The backend API should retrieve all entries from the recipients table associated with the specified group, including all fields for each recipient.
- The backend should then generate a CSV file containing the recipient data from the database.
- The CSV file should be sent as the output to the browser in response to the frontend request.
- The browser should initiate the download of the CSV file, allowing the user to save it to their computer.
Additionally, ensure that the exported CSV file includes all relevant recipient information, and each field is properly formatted to adhere to CSV standards.
Test the feature thoroughly to ensure it works smoothly and handles any potential edge cases gracefully.