Registration Modal - Copy this Angular, Css Component to your project
User Registration Modal Form Description The modal form will be used to register a new user. It will include the following fields: First Name: Input field for entering the user's first name. Required. Last Name: Input field for entering the user's last name. Required. Email: Input field for entering the user's email address. Must validate as a proper email format. Required. Role: Dropdown/select field to choose the role the user will perform. The dropdown will be pre populated with available roles fetched from the backend or a predefined list. Required. Modal Layout The modal will have a title at the top, such as "Register New User." Below the title, it will include the form fields mentioned above. At the bottom of the modal: A Submit button to save the user. A Cancel button to close the modal without saving. Functionality Form Validation: All fields are required. The email field must be validated for proper email format. The form will not submit unless all validations pass. Dynamic Role Selection: The "Role" field will dynamically load available roles if required, ensuring the form is always up to date with valid options. Responsive Design: The modal will be fully responsive, adapting to different screen sizes for a seamless user experience. Error Handling: If the backend returns an error (e.g., duplicate email), a message will be displayed below the form fields.
