Create user
The system grants the administrator the authority to create new users and user roles.
Create User form

When the administrative user clicks the "Create User" button, they will be directed to a form where they need to fill in all the required fields. The "Role" field is a type of selection box where users can choose from a list of available options. All the roles that have been created will be shown in this dropdown list, and users can pick the one that best fits their profile or designation.
There are also five checkboxes available:
Enable: This checkbox is used to activate the user.
Listed in Sales Dictionary: Selecting this checkbox adds the user to the sales dictionary.
Send login details via Email: If checked, the user's login credentials will be sent to them via email.
Developer: This checkbox is related to a developer option (further details might be needed).
List as Supervisor: Selecting this checkbox adds the user to the supervisors' list.
When the button is clicked, a validation banner with the message "The xxxx field is required." will appear for each field if they are left empty, except for the email field. Instead of the validation banner, a separate popup validation will be shown specifically for the email field to ensure it is filled correctly. This way, users are prompted to complete all required fields while receiving a specialized validation for the email field.

In addition to the required field validations, the system performs the following checks:
Email Address Format: The system requires that the "@" symbol is included in the email address. If the "@" symbol is missing, the email will be considered invalid.
Mobile Number Length: The system checks that the mobile number entered has a length of exactly 10 digits. If the number is not exactly 10 digits long, it will be flagged as invalid.
Username Characters: The system ensures that the username only contains letters, numbers, dashes, and underscores. If there are any other characters in the username, it will be considered invalid.

By implementing these checks, the system ensures that the email addresses have the correct format, mobile numbers have the right length, and usernames follow the specified character requirements. This helps maintain data integrity and ensures that users provide valid information.
Here are the database tables related to Create user:
users
Last updated