[MVPTN-62] fix(Schema): Ajusta o schema do formulário para abrir corretamente
This commit is contained in:
parent
b7c5f670df
commit
b1e39a1518
2 changed files with 4 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ import GTBProfissaoIndexService from "../../_services/g_tb_profissao/GTBProfissa
|
|||
export const useGTBProfissaoReadHook = () => {
|
||||
|
||||
const { setResponse } = useResponse();
|
||||
const [gTBProfissao, setGTBProfissao] = useState<GTBProfissaoInterface | null>(null);
|
||||
const [gTBProfissao, setGTBProfissao] = useState<GTBProfissaoInterface[]>([]);
|
||||
|
||||
const fetchGTBProfissao = async () => {
|
||||
|
||||
|
|
|
|||
|
|
@ -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<typeof UsuarioFormSchema>
|
||||
type FormValues = z.infer<typeof GUsuarioSchema>
|
||||
|
||||
export function LoginForm({
|
||||
className,
|
||||
|
|
@ -28,7 +28,7 @@ export function LoginForm({
|
|||
}: React.ComponentProps<"div">) {
|
||||
|
||||
const form = useForm<FormValues>({
|
||||
resolver: zodResolver(UsuarioFormSchema),
|
||||
resolver: zodResolver(GUsuarioSchema),
|
||||
defaultValues: {
|
||||
login: '',
|
||||
senha_api: ''
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue