SFU-Blueprint / Pedals

Apache License 2.0
0 stars 0 forks source link

/export Prototype #58

Closed dangminhduc1101 closed 1 month ago

dangminhduc1101 commented 1 month ago

Problem

We need to generate a summary of the data in the database and export it to a CSV or Excel file so that Cavan can easily review the results.

Instructions

  1. Pull the latest changes from the develop branch.
  2. Start the server by running npm run dev (if necessary, navigate to the src/ folder and run npm ci first), then go to localhost:3000/export. You will see an error since the export page doesn't exist yet.
  3. Modify export/page.tsx to add an unstyled button. When clicked, this button should trigger a GET request to the api/export route. The route should return a CSV file that lists each user along with their total hours worked. Update api/export/route.ts to handle this functionality.
  4. Submit a pull request and tag @dangminhduc1101 for review.

Notes

This is a prototype, and the page will be improved in future iterations.