Fix several admin UI issues (#10869)

### What problem does this PR solve?

- Fix login card will overlap title in admin login page.
- Disable unnecessary `listRoles()` query in user management page and
create user form
- Disable admin UI API queries and mutations retry mechanism
- Fix page not redirect to login page automatically if API reports
unauthorized (401)
- Fix change password form not reset when change password modal close
- Resolve admin UI content (mostly long texts) may break layout main box
issue

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Jimmy Ben Klieve
2025-10-30 20:13:39 +08:00
committed by GitHub
parent 5059d3db18
commit 361c74ab42
6 changed files with 251 additions and 224 deletions
+4
View File
@@ -24,7 +24,9 @@ import {
SelectValue,
} from '@/components/ui/select';
import { listRoles } from '@/services/admin-service';
import EnterpriseFeature from '../components/enterprise-feature';
import { IS_ENTERPRISE } from '../utils';
interface CreateUserFormData {
email: string;
@@ -49,6 +51,8 @@ export const CreateUserForm = ({
const { data: roleList } = useQuery({
queryKey: ['admin/listRoles'],
queryFn: async () => (await listRoles()).data.data.roles,
enabled: IS_ENTERPRISE,
retry: false,
});
return (