From b1e39a15183488029c5d331a77c878db55c8c424 Mon Sep 17 00:00:00 2001 From: keven Date: Mon, 15 Sep 2025 15:20:38 -0300 Subject: [PATCH] =?UTF-8?q?[MVPTN-62]=20fix(Schema):=20Ajusta=20o=20schema?= =?UTF-8?q?=20do=20formul=C3=A1rio=20para=20abrir=20corretamente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts | 2 +- src/components/login-form.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts index 6033859..6bd2c60 100644 --- a/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts +++ b/src/app/(protected)/(cadastros)/cadastros/_hooks/g_tb_profissao/useGTBProfissaoReadHook.ts @@ -6,7 +6,7 @@ import GTBProfissaoIndexService from "../../_services/g_tb_profissao/GTBProfissa export const useGTBProfissaoReadHook = () => { const { setResponse } = useResponse(); - const [gTBProfissao, setGTBProfissao] = useState(null); + const [gTBProfissao, setGTBProfissao] = useState([]); const fetchGTBProfissao = async () => { diff --git a/src/components/login-form.tsx b/src/components/login-form.tsx index 888204b..602127c 100644 --- a/src/components/login-form.tsx +++ b/src/components/login-form.tsx @@ -5,7 +5,7 @@ import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" import { Input } from "@/components/ui/input" -import { UsuarioFormSchema } from "@/app/(protected)/(administrativo)/_schemas/GUsuarioSchema" +import { GUsuarioSchema } from "@/app/(protected)/(administrativo)/_schemas/GUsuarioSchema" import z from "zod" import { zodResolver } from "@hookform/resolvers/zod" import GUsuarioLoginService from "@/app/(protected)/(administrativo)/_services/g_usuario/GUsuarioLogin" @@ -20,7 +20,7 @@ import { FormMessage } from "./ui/form" -type FormValues = z.infer +type FormValues = z.infer export function LoginForm({ className, @@ -28,7 +28,7 @@ export function LoginForm({ }: React.ComponentProps<"div">) { const form = useForm({ - resolver: zodResolver(UsuarioFormSchema), + resolver: zodResolver(GUsuarioSchema), defaultValues: { login: '', senha_api: ''