gabrielshufelt / Real-Ratings-SOEN-341_Project_F24

0 stars 1 forks source link

Allow Instructors to edit Team Members #43

Closed gabrielshufelt closed 2 weeks ago

gabrielshufelt commented 3 weeks ago

Requirements

  1. Adding a team member

    • In the teams/edit view:

      • Add a list of all team members, with their full name (first name + last name), and their id.
      • Add a button under the list of team members to 'Add a new team member`.
      • When clicked, this button should create a new section under the list of all team members, and move itself below this newly created section. This section should include:

        • A search dropdown which allows the instructor user to search for a student user by his full or part name (ex. if I want to add 'Gabriel Shufelt' to my team, searching for 'Gabriel S' should find this user).

        • This search dropdown also allows the instructor user to select a user directly from the dropdown instead of searching.

        • This dropdown should organize all student users who do not belong to a team, in alphabetical order based on their first name. image

        • A button to 'Add team member' below the search dropdown.

        • This button is disabled until a student is selected from the search dropdown, then it is enabled.

        • Upon pressing this button, this whole section with the search dropdown and button should be replaced with a new list element with the information of the newly added team member

  2. Removing a team member

    • In the teams/edit view:
      • Add a trash button next to each team member in the list to remove them from the current team.
      • Upon clicking this button, it should remove the team member from the current team without prompting for confirmation.

Technical Requirements

It seems that this cannot be done in rails alone, so either use embedded javascript to implement this feature, or optionally use turbo + stimulus (ask ChatGPT)