mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-14 05:10:05 +01:00
chore: updates in UI due to migration to OAS3.1
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
@@ -11,30 +11,10 @@ import { z } from "zod"
|
||||
|
||||
import { Button } from "@/components/ui/button.tsx"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card.tsx"
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form.tsx"
|
||||
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, } from "@/components/ui/form.tsx"
|
||||
import { Input } from "@/components/ui/input.tsx"
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select.tsx"
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table.tsx"
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select.tsx"
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table.tsx"
|
||||
|
||||
const addSchema = z.object({
|
||||
user_id: z.uuid("Invalid UUID"),
|
||||
@@ -68,7 +48,7 @@ export const OrgMembers = () => {
|
||||
})
|
||||
|
||||
const addMut = useMutation({
|
||||
mutationFn: (v: AddValues) => api.addOrUpdateMember({ id: orgId!, body: v }),
|
||||
mutationFn: (v: AddValues) => api.addOrUpdateMember({ id: orgId!, handlersMemberUpsertReq: v }),
|
||||
onSuccess: () => {
|
||||
toast.success("Member added/updated")
|
||||
void qc.invalidateQueries({ queryKey: ["org:members", orgId] })
|
||||
@@ -88,7 +68,7 @@ export const OrgMembers = () => {
|
||||
|
||||
const roleMut = useMutation({
|
||||
mutationFn: ({ userId, role }: { userId: string; role: "owner" | "admin" | "member" }) =>
|
||||
api.addOrUpdateMember({ id: orgId!, body: { user_id: userId, role } }),
|
||||
api.addOrUpdateMember({ id: orgId!, handlersMemberUpsertReq: { user_id: userId, role } }),
|
||||
onMutate: async ({ userId, role }) => {
|
||||
setUpdatingId(userId)
|
||||
// cancel queries and snapshot previous
|
||||
|
||||
Reference in New Issue
Block a user