What is the problem/feature request? :
-
Multi-Role Selection: The form uses checkboxes, which incorrectly allows users to select multiple roles at once with no proper user friendly format.
-
Incorrect Validation: All users (including customers) are forced to fill out restaurant details to successfully submit the form.
-
Admin role exclusion: The ADMIN role option is publicly visible and selectable during signup.
Steps to Reproduce
-
Go to the signup page.
-
Notice that multiple roles can be selected simultaneously using checkboxes.
-
Try registering as a standard CUSTOMER; the form will fail due to missing restaurant details validation.
-
Notice that the ADMIN option is visible to public visitors.
Scope
[FRONTEND]
Role Selection:
-
Checkboxes are replaced with a Dropdown Menu to enforce a strict single-role selection state in Register.jsx.
-
Conditional Validation: Yup schema validations and layout conditions are configured so restaurant fields are rendered and required only when RESTAURANT_OWNER is selected.
-
Role Filtering: The backend response is filtered to exclude and hide the ADMIN role from public registration forms.
@rdodiya Kindly assign me this issue.
What is the problem/feature request? :
Multi-Role Selection: The form uses checkboxes, which incorrectly allows users to select multiple roles at once with no proper user friendly format.
Incorrect Validation: All users (including customers) are forced to fill out restaurant details to successfully submit the form.
Admin role exclusion: The ADMIN role option is publicly visible and selectable during signup.
Steps to Reproduce
Go to the signup page.
Notice that multiple roles can be selected simultaneously using checkboxes.
Try registering as a standard CUSTOMER; the form will fail due to missing restaurant details validation.
Notice that the ADMIN option is visible to public visitors.
Scope
[FRONTEND]
Role Selection:
Checkboxes are replaced with a Dropdown Menu to enforce a strict single-role selection state in Register.jsx.
Conditional Validation: Yup schema validations and layout conditions are configured so restaurant fields are rendered and required only when RESTAURANT_OWNER is selected.
Role Filtering: The backend response is filtered to exclude and hide the ADMIN role from public registration forms.
@rdodiya Kindly assign me this issue.