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

Rework on filter to be able to have id=not_1|not_2 #72

Open
justinehell opened this issue Apr 26, 2024 · 0 comments
Open

Rework on filter to be able to have id=not_1|not_2 #72

justinehell opened this issue Apr 26, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@justinehell
Copy link
Member

Describe the bug

We need to be able to have a server side filter with id=not_1|not_2.

Example: on RolePage, when we are on roles tab, and click on attach role button → inside the table in the dialog, we do not want to show the current role nor the SUPER_ADMINISTRATOR role.

Inside AttachAccessControlToAnotherDialog.vue

/**
 * Load roles and invoke the appropriate method from RoleService based on the entity value.
 * @returns {object} Object that contains role filters.
 */
async function loadRoles() {
  if (targetAccessControlType.value === 'role') {
    return RoleService.find({
      id: `not_${superAdministratorId.value}`, // here add |not_${accessControl.value.id}
      ...getFilters(),
    });
  }
 ...
}
@justinehell justinehell added the Bug Something isn't working label Apr 26, 2024
@justinehell justinehell moved this to 🔖 Ready in Board of Leto-modelizer Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant