refactor: enhance role management UI and integrate profile management features
- Introduced a modal for managing user profiles, allowing for the creation and editing of profiles with improved state management. - Updated the role filtering logic to enhance type safety and readability. - Refactored UI components for better user experience, including improved button states and loading indicators. - Removed outdated code related to permissions and streamlined the overall structure for maintainability.
This commit is contained in:
@@ -190,15 +190,6 @@ export const limparPerfisAntigos = internalMutation({
|
||||
await ctx.db.delete(perm._id);
|
||||
}
|
||||
|
||||
// Remover menu permissões associadas
|
||||
const menuPerms = await ctx.db
|
||||
.query("menuPermissoes")
|
||||
.withIndex("by_role", (q) => q.eq("roleId", role._id))
|
||||
.collect();
|
||||
for (const menuPerm of menuPerms) {
|
||||
await ctx.db.delete(menuPerm._id);
|
||||
}
|
||||
|
||||
// Remover o role
|
||||
await ctx.db.delete(role._id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user