Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Super Admin/Nomenclator] implement CRUD roluri specialiști #157

Open
teodoranegru opened this issue Aug 29, 2024 · 1 comment · Fixed by #171
Open

[Super Admin/Nomenclator] implement CRUD roluri specialiști #157

teodoranegru opened this issue Aug 29, 2024 · 1 comment · Fixed by #171

Comments

@teodoranegru
Copy link

teodoranegru commented Aug 29, 2024

User story

As a Super Admin, I need to be able to define the list of roles the NGO Specialist users can have. The roles I configure in the Super Admin interface will populate the "Rol" dropdown from the Staff section.

Implement in the "Nomenclator servicii și specialiști section" the "Specialiști" tab.
In the "Specialiști" tab, implement the "Toate rolurile de specialiști" table (link to design in Figma)

Flows

Add specialist role

  1. Super Admin user navigates to "Nomenclator servicii și specialiști" page, "Specialisti" tab
  2. User clicks on "Adauga rol speiclist" button
  3. The system retrieves the "Adauga rol specialist" page
  4. The user fills in the name of the role and chooses the default permissions of that role
  5. The user clicks on "Salveaza modificarile" button
  6. The system retrieves the page of that role in view mode

Edit specialist role

  1. Super Admin user navigates to "Nomenclator servicii și specialiști" page, "Specialisti" tab
  2. The user clicks on the "Modifica" button
  3. The system retrieves the specialist role page in edit mode (see design in Figma)
  4. The user edits the service and clicks on "Salvează modificările" button
  5. The system retrieves the "Specialisti" tab and displays the success message

Delete specialist role

  1. Super Admin user navigates to "Nomenclator servicii și specialiști" page, "Specialisti" tab
  2. The user clicks on the "Modifica" button
  3. The system retrieves the specialist role page in edit mode (see design in Figma)
  4. The user clicks on the "Sterge rol" button (the button is clickable ONLY if the role has not been used)
  5. The system displays a confirmation message
  6. The user clicks on the "Sterge rol" button
  7. The role is deleted from the db, the user is redirected to the "Nomenclator servicii și specialiști" page, "Specialisti" tab, and a success message is displayed

Business rules

  1. If there are no role added on the platform, display the empty state (link to design)
  2. When a new role is created, the default status of that role is Active
  3. A role that was used can not be deleted, only deactivated
  4. At hover on the "Sterge rol" button (disabled) from a role that can not be deleted, display the following tooltip (link)
  5. Display in the "Toate rolurile de specialiști" table the following information:Rol specialist;
    Institutii (total nr of Organizations that have users with that role)
    Centre (total nr of tenants that have users with that role)
    Status
  6. Implement filter by Status on the "Toate rolurile de specialiști" table
@teodoranegru teodoranegru changed the title WIP [Super Admin] CRUD roluri speciliști WIP [Super Admin] implement CRUD roluri speciliști Aug 30, 2024
@teodoranegru teodoranegru changed the title WIP [Super Admin] implement CRUD roluri speciliști [Super Admin/ Nomenclator servicii si specialisti] implement CRUD roluri speciliști Sep 11, 2024
@teodoranegru teodoranegru changed the title [Super Admin/ Nomenclator servicii si specialisti] implement CRUD roluri speciliști [Super Admin/Nomenclator] implement CRUD roluri specialiști Sep 11, 2024
@teodoranegru
Copy link
Author

teodoranegru commented Sep 18, 2024

Additional business rules:

  • The permissions chosen by the Super Admin for a role will serve as the default permissions for that role. This means that when the NGO Admin adds a user with that role, the default permissions will automatically be selected and cannot be changed.
    Example: When the Super Admin configures the Manager de caz role, it will select the "Poate lua rol de manager de caz" checkbox. This means that when an NGO Admin creates a user with the role Manager de caz, the "Poate lua rol de manager de caz" checkbox will be selected and disabled.

  • Because an user can have multiple roles, when the NGO Admin adds an user, IF they select multiple roles, the default of that user will contain all the default permissions of those roles.

@alexPopaCode4 alexPopaCode4 linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant