Refactor organization and user management components/tests for simplification and improved clarity

- Removed unused properties (`slug`, `is_active`, etc.) in organization and user-related components and test data.
- Simplified function data typing by removing redundant `any` usage.
- Updated `params` in `OrganizationMembersPage` for Promise resolution and async handling.
- Cleaned up unused variables and streamlined form handling in `AddMemberDialog`.
This commit is contained in:
Felipe Cardoso
2025-11-07 00:14:10 +01:00
parent f8b77200f0
commit 6b556431d3
11 changed files with 12 additions and 23 deletions

View File

@@ -168,7 +168,7 @@ export function UserFormDialog({
await updateUser.mutateAsync({
userId: user.id,
userData: updateData as any,
userData: updateData,
});
toast.success(`User ${data.first_name} ${data.last_name || ''} updated successfully`);
@@ -181,9 +181,8 @@ export function UserFormDialog({
first_name: data.first_name,
last_name: data.last_name || undefined,
password: data.password,
is_active: data.is_active,
is_superuser: data.is_superuser,
} as any);
});
toast.success(`User ${data.first_name} ${data.last_name || ''} created successfully`);
onOpenChange(false);