SRS Edit Mentor details - ita-social-projects/what-front GitHub Wiki

Edit mentor details

Process

  • Admin and Secretary have access to this component from List of Mentors
  • This feature allows to edit details of a particular mentor, which can be approached by mentor ID
  • After clicking on icon Edit - system will redirect the user to Mentors Tabs component with an active Tab(tab color: shiny greenish blue) Edit mentor details and relevant content
  • The system sends a request to the server and if the request is successfully loaded, it will show Mentors Tabs
  • Not Found component will be rendered if mentor with current ID doesn't exist

Requirements for the Form

  • User is able to edit all fields in the Edit mentor details component
  • There are 5 fields in the form with accordant validation in each of them:
    • First name field allows to change and update the mentor's first name. This field accepts 2-50 alphabetic symbols and requires to put in whether Latin and Cyrillic letters in uppercase, in lowercase, including hyphen and apostrophe. Numbers are not allowed to enter
    • Last name field allows to change and update the mentor's last name. This field accepts 2-50 alphabetic symbols and requires to put in whether Latin and Cyrillic letters in uppercase, in lowercase, including hyphen and apostrophe. Numbers are not allowed to enter
    • Email field allows to change and update the mentor's email address
      • This field requires to put in whether Cyrillic, Latin letters, in upper or lower case, numbers or all of them
      • This field requires to put in **@** symbol in the end after typed expression
      • This field requires to add a post address in the end after **@** symbol (For example: "admUлодрвае[email protected]")
    • Groups field allows to change/add update the mentor's groups name by filling in an accordant input
      • This field requires to put in whether Latin and Cyrillic letters in uppercase, in lowercase, including hyphen and apostrophe, numbers or all of them
      • This field allows to remove and update the mentor's groups name by clicking on a "X" button, which is located opposite to the group's name in every, defined some time ago, group's name
    • Courses field allows to change/add/remove and update the mentor's courses name
      • This field requires to put in whether Latin and Cyrillic letters in uppercase, in lowercase, including hyphen and apostrophe, numbers or all of them
      • This field allows to remove and update the mentor's course name by clicking on a "X" button, which is located opposite to the group's name in every, defined some time ago, group's name

image

General Requirements

  • User must be logged in as Admin or Secretary
  • Until the mentor by id is downloaded, inside Edit mentor details component the loader is being shown
  • Until all groups are downloaded, inside "Edit mentor details" component the loader is being shown
  • Until the groups by student id are downloaded, under the input for adding groups - the loader is being shown
  • Until all courses are downloaded, inside "Edit mentor details" component the loader is being shown
  • Until the courses by student id are downloaded, under the input for adding courses - the loader is being shown
  • The Button Arrow, which is shown as an icon and located next to the left of the first tab, is enabled and redirects us to the previous component(List of Mentors)
  • After clicking on the button "Save", a request is sent, and during this time, the buttons "Save" is disabled. Then if a request is successful - the system redirects the user to the List of Mentors. If a request is failed the user keeps staying in this component and the button become enabled
  • By clicking on the button "Reset" all inputs values return to their initial state
  • By clicking on the button "Lay off" the current mentor is being disabled and the system redirects the user to the updated List of Mentors
  • By clicking on the button "Reinstate" the current mentor is being enabled and the system redirects the user to the updated List of Mentors
  • Clicking on the Mentor details Tab - this tab becomes active and shows a relevant content
  • The "Lay off" button is activated if the form is loaded, valid and no changes have been made to the form. When the user makes changes in any field the Fire button is disabled
  • The "Reset" button is disabled if the form is loaded and no changes have been made to the form. When the user makes changes in any field the Clear button is active
  • The "Save" button is disabled if no changes have been made to the form. When the user makes changes in any field and the form is valid the Save button is active

Errors

Description Result
Writing the wrong id in the URL address redirect to Not Found component
The first name field
The first name field is empty This field is required
The first name field contains one letter Too short
The first name field contains more than fifty letters Too long
The first name starts or finished with whitespace or hyphen Invalid first name
The first name field contains at least one symbol or number Invalid first name
The last name field
The last name field is empty This field is required
The last name field contains one letter Too short
The last name field contains more than fifty letters Too long
The first name starts or finished with whitespace or hyphen Invalid last name
The first name field contains at least one symbol (except for apostrophe) or number Invalid last name
The email address field
The Email address field is empty This field is required
The email address field is filled by non-existent email Invalid email address

Back to content