SFU-Blueprint / Pedals

Apache License 2.0
2 stars 0 forks source link

/manage/people Username editing #68

Closed dangminhduc1101 closed 1 month ago

dangminhduc1101 commented 1 month ago

Problem

The username field in the /manage/people grid is not editable when the "Edit" button is pressed. This functionality needs to be implemented to allow username updates.

Instructions

  1. Pull the latest updates from the develop branch.
  2. Start the server by running npm run dev (if needed, navigate to the src/ folder and run npm ci), then go to localhost:3000/manage/people.
  3. Implement the following changes:
    • In manage/people/page.tsx, enable the username field to be editable when the "Edit" button is pressed in the /manage/people grid.
    • Ensure that the updated username is validated (e.g., no spaces, all lowercase letters or numbers only).
    • Update the API route in api/people/[id]/route.ts to handle the PATCH request for username updates when changes are saved.
    • Test the functionality to confirm that username edits are reflected in the grid and saved correctly.
  4. Submit a pull request and tag @dangminhduc1101 for review.