update login
This commit is contained in:
@@ -17,9 +17,9 @@ import {
|
||||
AlertTriangleIcon,
|
||||
UserIcon
|
||||
} from 'lucide-react'
|
||||
import { Link, useParams, useFetcher } from 'react-router'
|
||||
import { redirect, Link, useParams, useFetcher } from 'react-router'
|
||||
import { Controller, useFieldArray, useForm } from 'react-hook-form'
|
||||
import { Fragment, use, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { Fragment, use, useMemo, useState } from 'react'
|
||||
import { format } from 'date-fns'
|
||||
import { ptBR } from 'react-day-picker/locale'
|
||||
import { zodResolver } from '@hookform/resolvers/zod'
|
||||
@@ -75,7 +75,6 @@ import { cloudflareContext } from '@repo/auth/context'
|
||||
import { SearchFilter } from '@repo/ui/components/search-filter'
|
||||
|
||||
import { formSchema, type Schema, MAX_ITEMS } from './data'
|
||||
import { redirect } from 'react-router'
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [{ title: 'Adicionar matrícula' }]
|
||||
@@ -284,6 +283,7 @@ export default function Route({
|
||||
<InputGroupInput
|
||||
readOnly
|
||||
value={value?.name || ''}
|
||||
autoFocus={true}
|
||||
placeholder="Colaborador"
|
||||
className="cursor-pointer"
|
||||
autoComplete="off"
|
||||
@@ -320,7 +320,6 @@ export default function Route({
|
||||
</InputGroup>
|
||||
)}
|
||||
</SearchFilter>
|
||||
|
||||
<ErrorMessage
|
||||
errors={formState.errors}
|
||||
name={name}
|
||||
@@ -455,7 +454,6 @@ function FacetedFilter({
|
||||
const [open, { set }] = useToggle()
|
||||
const [sort, { toggle }] = useToggle('a-z', 'z-a')
|
||||
const { hits } = use(options)
|
||||
const listRef = useRef<HTMLDivElement | null>(null)
|
||||
const fuse = useMemo(() => {
|
||||
return new Fuse(hits, {
|
||||
keys: ['name'],
|
||||
@@ -506,6 +504,7 @@ function FacetedFilter({
|
||||
<Button
|
||||
variant="link"
|
||||
size="icon-sm"
|
||||
tabIndex={-1}
|
||||
className="cursor-pointer text-muted-foreground"
|
||||
onClick={toggle}
|
||||
>
|
||||
@@ -571,7 +570,7 @@ function ScheduledForInput({ value, onChange }: ScheduledForInputProps) {
|
||||
tomorrow.setDate(today.getDate() + 1)
|
||||
const [open, { set }] = useToggle()
|
||||
const [selected, setDate] = useState<Date | undefined>(value)
|
||||
const displayValue = selected ? format(selected, 'dd/MM/yyyy') : ''
|
||||
const display = selected ? format(selected, 'dd/MM/yyyy') : ''
|
||||
|
||||
return (
|
||||
<Popover open={open} onOpenChange={set}>
|
||||
@@ -580,7 +579,7 @@ function ScheduledForInput({ value, onChange }: ScheduledForInputProps) {
|
||||
<InputGroupInput
|
||||
readOnly
|
||||
placeholder="Imediatamente"
|
||||
value={displayValue}
|
||||
value={display}
|
||||
/>
|
||||
|
||||
<InputGroupAddon>
|
||||
|
||||
Reference in New Issue
Block a user