mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-07-27 03:48:56 +00:00
Update user roles page to include organization selection
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/dc6a6ab3-60a5-4efd-8f50-74ecbe656b46.jpg
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useState } from "react";
|
||||
import { useQuery, useMutation } from "@tanstack/react-query";
|
||||
import { MainLayout } from "@/components/layouts/main-layout";
|
||||
import { User, InsertUser, systemRoles, UserRole } from "@shared/schema";
|
||||
import { User, InsertUser, systemRoles, UserRole, Organization } from "@shared/schema";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { apiRequest, queryClient } from "@/lib/queryClient";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
@@ -99,7 +99,7 @@ export default function UsersRolesPage() {
|
||||
});
|
||||
|
||||
// Fetch organizations for select
|
||||
const { data: organizations = [] } = useQuery({
|
||||
const { data: organizations = [] } = useQuery<Organization[]>({
|
||||
queryKey: ["/api/organizations"],
|
||||
});
|
||||
|
||||
@@ -570,8 +570,8 @@ export default function UsersRolesPage() {
|
||||
<FormItem>
|
||||
<FormLabel>Organization</FormLabel>
|
||||
<Select
|
||||
onValueChange={(value) => field.onChange(parseInt(value))}
|
||||
defaultValue={field.value?.toString()}
|
||||
onValueChange={(value) => field.onChange(value)}
|
||||
defaultValue={field.value}
|
||||
>
|
||||
<FormControl>
|
||||
<SelectTrigger>
|
||||
|
||||
Reference in New Issue
Block a user