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
Pull the latest changes from the develop branch.
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.
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.
Submit a pull request and tag @dangminhduc1101 for review.
Notes
This is a prototype, and the page will be improved in future iterations.
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
develop
branch.npm run dev
(if necessary, navigate to thesrc/
folder and runnpm ci
first), then go tolocalhost:3000/export
. You will see an error since the export page doesn't exist yet.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.Notes
This is a prototype, and the page will be improved in future iterations.