sitmun / sitmun-admin-app

Administration application for the SITMUN system.
European Union Public License 1.2
0 stars 0 forks source link

Broken Role form: mandatory field error and premature association #197

Open mvinent opened 3 months ago

mvinent commented 3 months ago

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:

  1. Navigate to the ‘Create New Role’ page.
  2. Click the option to add a territory and user combination.
  3. Select a user and a territory from the respective dropdowns.
  4. Observe that the selected combination is not displayed in the table (the table remains empty).
  5. Fill out the remaining required fields for the role.
  6. Attempt to save the role.
  7. An error occurs upon saving.

Expected behavior

Screenshots

Creating a new role (initial view): Captura de pantalla 2024-08-06 120139

Attempting to add a territory and user combination: Captura de pantalla 2024-08-06 120200

Territory and user combination table remains empty after selection: Captura de pantalla 2024-08-06 120139

Error upon trying to save the role: Captura de pantalla 2024-08-06 120230

mvinent commented 3 months ago

I have found out a way to create a new Role following these steps:

  1. Create a new Role.
  2. 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.
  3. 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.

  1. Observations should not be mandatory
  2. We should be able to add a new territory and user combination without needing to save the new role previously.