When creating a new role, it is not possible to successfully add a territory and user combination. After selecting both, the table remains empty, and saving the role results in an error.
To Reproduce
Steps to reproduce the behavior:
Navigate to the ‘Create New Role’ page.
Click the option to add a territory and user combination.
Select a user and a territory from the respective dropdowns.
Observe that the selected combination is not displayed in the table (the table remains empty).
Fill out the remaining required fields for the role.
Attempt to save the role.
An error occurs upon saving.
Expected behavior
The “Observations” field should not be mandatory when creating a new role.
The “Add Territory and User Combination” functionality should be disabled until the role has been successfully saved, to avoid confusion.
Screenshots
Creating a new role (initial view):
Attempting to add a territory and user combination:
Territory and user combination table remains empty after selection:
I have found out a way to create a new Role following these steps:
Create a new Role.
Add a Name and Observations. Observations seems to be mandatory although it's not marked as so. Without some value in this field the error appears when trying to save.
After saving the new role with name and observations, we are able to add a new new territory and user combination.
Seems like at least two things are wrong.
Observations should not be mandatory
We should be able to add a new territory and user combination without needing to save the new role previously.
Describe the bug
When creating a new role, it is not possible to successfully add a territory and user combination. After selecting both, the table remains empty, and saving the role results in an error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Creating a new role (initial view):
Attempting to add a territory and user combination:
Territory and user combination table remains empty after selection:
Error upon trying to save the role: