Skip to content

#5: Make Users Table Editable #42

Description

@AnanthKini1

Quote

"SIUUUUU" - Cristiano Ronaldo

Description

This PR adds editing functionality to the existing Users.jsx table, allowing a user's email and project to be changed and updated.

Instructions

Task

  • Add an "Edit" action to each row in Users.jsx (e.g. edit icon/button)
  • Clicking edit should make that row's email and project fields editable (inline), or open a modal with an editable form (either is fine, but be consistent)
  • On save, use the PUT endpoint to /users/:id with the updated fields
  • On cancel, make sure changes are discarded and revert back to the original values
  • A clear error should be displayed if the update fails (ex: project doesn't exist)
  • Update the table's displayed data after a successful save, without requiring a full page refresh

Acceptance Criteria

  • Each row has an edit action
  • Editing allows changing email and project
  • Save calls PUT /users/:id and updates the table on success
  • Cancel discards changes without saving
  • Failed update shows a clear error message
  • No full page reload needed to see updated data

Resources

  • server/routes/users.js (look here for existing endpoints)
  • client/src/components/Users.jsx (original read only component)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions