fix build error
Deploy Frontend / build-and-deploy (push) Successful in 23s
Details
Deploy Frontend / build-and-deploy (push) Successful in 23s
Details
This commit is contained in:
parent
eacb0c2614
commit
50b64f87be
|
|
@ -30,7 +30,7 @@ interface UserEditModalProps {
|
|||
export default function UserEditModal({ userId, opened, onClose }: UserEditModalProps) {
|
||||
const { data: user, isLoading: userLoading } = useUser(userId)
|
||||
const { data: departments } = useDepartments()
|
||||
const { data: allRoles } = useRoles()
|
||||
const { data: allRoles } = useRoles({ limit: 1000 })
|
||||
const { data: userRoles, isLoading: rolesLoading } = useUserRoles(userId)
|
||||
|
||||
const updateUser = useUpdateUser()
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import { rolesApi } from '@/api/roles.ts'
|
|||
|
||||
export const ROLES_QUERY_KEY = 'roles'
|
||||
|
||||
export function useRoles() {
|
||||
export function useRoles(params: import('@/api/roles').RolesListParams = {}) {
|
||||
return useQuery({
|
||||
queryKey: [ROLES_QUERY_KEY],
|
||||
queryKey: [ROLES_QUERY_KEY, params],
|
||||
queryFn: async () => {
|
||||
const response = await rolesApi.getList()
|
||||
const response = await rolesApi.getList(params)
|
||||
return response.data.data || []
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue