fix(EsLint): Ajuste automáticos do LINT
This commit is contained in:
parent
99791bd06f
commit
0dc065d9bb
73 changed files with 131 additions and 141 deletions
|
|
@ -1,14 +1,13 @@
|
|||
'use client';
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useParams } from 'next/navigation';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import MainEditor from '@/components/MainEditor';
|
||||
|
||||
import Loading from '@/shared/components/loading/loading';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
|
||||
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
|
||||
import Loading from '@/shared/components/loading/loading';
|
||||
|
||||
export default function TMinutaDetalhes() {
|
||||
const params = useParams();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
'use client';
|
||||
|
||||
import z from 'zod';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { useEffect } from 'react';
|
||||
import { useForm, Controller } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import z from 'zod';
|
||||
|
||||
import MainEditor from '@/components/MainEditor';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import {
|
||||
Form,
|
||||
|
|
@ -17,11 +19,8 @@ import {
|
|||
} from '@/components/ui/form';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
import MainEditor from '@/components/MainEditor';
|
||||
import { TMinutaSchema } from '@/packages/administrativo/schemas/TMinuta/TMinutaSchema';
|
||||
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { TMinutaSchema } from '@/packages/administrativo/schemas/TMinuta/TMinutaSchema';
|
||||
|
||||
type FormValues = z.infer<typeof TMinutaSchema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
'use client';
|
||||
|
||||
import { useEffect, useState, useCallback } from 'react';
|
||||
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog';
|
||||
|
||||
import Header from '@/shared/components/structure/Header';
|
||||
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
|
||||
import Loading from '@/shared/components/loading/loading';
|
||||
|
||||
import TMinutaTable from '@/packages/administrativo/components/TMinuta/TMinutaTable';
|
||||
import TMinutaForm from '@/packages/administrativo/components/TMinuta/TMinutaForm';
|
||||
|
||||
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
|
||||
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
|
||||
import { useTMinutaRemoveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook';
|
||||
|
||||
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
|
||||
import TMinutaTable from '@/packages/administrativo/components/TMinuta/TMinutaTable';
|
||||
import { useTMinutaIndexHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaIndexHook';
|
||||
import { useTMinutaReadHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaReadHook';
|
||||
import { useTMinutaRemoveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaRemoveHook';
|
||||
import { useTMinutaSaveHook } from '@/packages/administrativo/hooks/TMinuta/useTMinutaSaveHook';
|
||||
import { TMinutaInterface } from '@/packages/administrativo/interfaces/TMinuta/TMinutaInterface';
|
||||
import ConfirmDialog from '@/shared/components/confirmDialog/ConfirmDialog';
|
||||
import { useConfirmDialog } from '@/shared/components/confirmDialog/useConfirmDialog';
|
||||
import Loading from '@/shared/components/loading/loading';
|
||||
import Header from '@/shared/components/structure/Header';
|
||||
|
||||
export default function TMinutaPage() {
|
||||
// Hooks de leitura e escrita
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
'use client';
|
||||
|
||||
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import useGUsuarioGetJWTHook from '@/shared/hooks/auth/useGUsuarioGetJWTHook';
|
||||
|
||||
export default function Page() {
|
||||
const { userAuthenticated } = useGUsuarioGetJWTHook();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogCancel,
|
||||
|
|
@ -11,7 +12,6 @@ import {
|
|||
AlertDialogTitle,
|
||||
AlertDialogAction,
|
||||
} from '@/components/ui/alert-dialog';
|
||||
|
||||
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
|
||||
|
||||
interface ConfirmExclusionProps {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { Editor } from '@tinymce/tinymce-react';
|
||||
import React from 'react';
|
||||
|
||||
// 1. Define as propriedades que nosso componente vai receber
|
||||
interface MainEditorProps {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
'use client';
|
||||
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import Image from 'next/image';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import z from 'zod';
|
||||
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import z from 'zod';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import GUsuarioLoginService from '@/packages/administrativo/services/GUsuario/GUsuarioLogin';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { useState } from 'react';
|
||||
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from './ui/form';
|
||||
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
|
||||
import { Button } from './ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { GUsuarioLoginSchema } from '@/packages/administrativo/schemas/GUsuario/GUsuarioLoginSchema';
|
||||
import GUsuarioLoginService from '@/packages/administrativo/services/GUsuario/GUsuarioLogin';
|
||||
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
|
||||
|
||||
import { Button } from './ui/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from './ui/form';
|
||||
|
||||
|
||||
type FormValues = z.infer<typeof GUsuarioLoginSchema>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { ChevronsUpDown, Plus } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
import { buttonVariants } from '@/components/ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
||||
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react"
|
||||
import { Slot } from "@radix-ui/react-slot"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react';
|
||||
import { Slot } from '@radix-ui/react-slot';
|
||||
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Slot } from "@radix-ui/react-slot"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const buttonGroupVariants = cva(
|
||||
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react"
|
||||
import { Slot } from "@radix-ui/react-slot"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
||||
import { CheckIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { Command as CommandPrimitive } from 'cmdk';
|
||||
import { SearchIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
|
@ -12,6 +11,7 @@ import {
|
|||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { XIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
||||
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as LabelPrimitive from '@radix-ui/react-label';
|
||||
import { Slot } from '@radix-ui/react-slot';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Controller,
|
||||
FormProvider,
|
||||
|
|
@ -13,8 +13,8 @@ import {
|
|||
type FieldValues,
|
||||
} from 'react-hook-form';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const Form = FormProvider;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import { OTPInput, OTPInputContext } from 'input-otp';
|
||||
import { MinusIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import * as React from "react"
|
||||
import { Slot } from "@radix-ui/react-slot"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as LabelPrimitive from '@radix-ui/react-label';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import * as SelectPrimitive from "@radix-ui/react-select"
|
||||
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
||||
import { XIcon } from 'lucide-react';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { NextResponse, type MiddlewareConfig, type NextRequest } from 'next/serv
|
|||
const publicRoutes = [
|
||||
{ path: '/login', whenAuthenticated: 'redirect' },
|
||||
{ path: '/register', whenAuthenticated: 'redirect' },
|
||||
{ path: '/', whenAuthenticated: 'next' },
|
||||
] as const;
|
||||
|
||||
const ROOT_PATH = '/login'; // url raiz
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Command,
|
||||
|
|
@ -15,8 +18,6 @@ import { cn } from '@/lib/utils';
|
|||
import { CCaixaServicoReadInterface } from '@/packages/administrativo/hooks/CCaixaServico/CCaixaServicoReadInterface';
|
||||
import { useCCaixaServicoReadHook } from '@/packages/administrativo/interfaces/CCaixaServico/useCCaixaServicoReadHook';
|
||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
export default function CCaixaServicoSelect({ sistema_id, field }: any) {
|
||||
const cCaixaServicoReadParams: CCaixaServicoReadInterface = { sistema_id };
|
||||
|
|
@ -58,7 +59,7 @@ export default function CCaixaServicoSelect({ sistema_id, field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar etiquetas/carimbos..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||
|
||||
import GEmolumentoColumns from './GEmolumentoColumns';
|
||||
import GEmolumentoTableInterface from '../../interfaces/GEmolumento/GEmolumentoTableInterface';
|
||||
import GEmolumentoPeriodoSelect from '../GEmolumentoPeriodo/GEmolumentoPeriodoSelect';
|
||||
import GEmolumentoColumns from './GEmolumentoColumns';
|
||||
|
||||
/**
|
||||
* Componente principal da tabela de Naturezas
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||
|
||||
import GGramaticaTableInterface from '../../interfaces/GGramatica/GGramaticaTableInterface';
|
||||
import GGramaticaColumns from './GGramaticaColumns';
|
||||
import GGramaticaTableInterface from '../../interfaces/GGramatica/GGramaticaTableInterface';
|
||||
|
||||
/**
|
||||
* Componente principal da tabela de Naturezas
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Command,
|
||||
|
|
@ -15,8 +18,6 @@ import { cn } from '@/lib/utils';
|
|||
import { useGMarcacaoTipoReadHook } from '@/packages/administrativo/hooks/GMarcacaoTipo/useGMarcacaoTipoReadHook';
|
||||
import { GMarcacaoTipoReadInterface } from '@/packages/administrativo/interfaces/GMarcacaoTipo/GMarcacaoTipoReadInterface';
|
||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
export default function GMarcacaoTipoSelect({ grupo, sistema_id, situacao, field }: any) {
|
||||
const gMarcacaoTipoReadParams: GMarcacaoTipoReadInterface = { grupo, sistema_id, situacao };
|
||||
|
|
@ -60,7 +61,7 @@ export default function GMarcacaoTipoSelect({ grupo, sistema_id, situacao, field
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar etiquetas/carimbos..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export default function GSeloGrupoSelect({ field }: GTBairroSelectInterface) {
|
|||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar bairro..." disabled={isLoading} />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import { useResponse } from '@/shared/components/response/ResponseContext';
|
|||
import Header from '@/shared/components/structure/Header';
|
||||
import { SituacoesEnum } from '@/shared/enums/SituacoesEnum';
|
||||
|
||||
import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface';
|
||||
import GTBBairroForm from './GTBBairroForm';
|
||||
import GTBBairroTable from './GTBBairroTable';
|
||||
import { GTBBairroInterface } from '../../interfaces/GTBBairro/GTBBairroInterface';
|
||||
|
||||
const initialBairro: GTBBairroInterface = {
|
||||
sistema_id: null,
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export default function GTBBairroSelect({ field }: GTBairroSelectInterface) {
|
|||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar bairro..." disabled={isLoading} />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ import Loading from '@/shared/components/loading/loading';
|
|||
import { useResponse } from '@/shared/components/response/ResponseContext';
|
||||
import Header from '@/shared/components/structure/Header';
|
||||
|
||||
import GTBEstadoCivilForm from './GTBEstadoCivilForm';
|
||||
import GTBEstadoCivilTable from './GTBEstadoCivilTable';
|
||||
import { useGTBEstadoCivilReadHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilReadHook';
|
||||
import { useGTBEstadoCivilRemoveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilRemoveHook';
|
||||
import { useGTBEstadoCivilSaveHook } from '../../hooks/GTBEstadoCivil/useGTBEstadoCivilSaveHook';
|
||||
import { GTBEstadoCivilInterface } from '../../interfaces/GTBEstadoCivil/GTBEstadoCivilInterface';
|
||||
import GTBEstadoCivilForm from './GTBEstadoCivilForm';
|
||||
import GTBEstadoCivilTable from './GTBEstadoCivilTable';
|
||||
|
||||
const initalEstadoCivil: GTBEstadoCivilInterface = {
|
||||
tb_estadocivil_id: 0,
|
||||
|
|
|
|||
|
|
@ -20,26 +20,14 @@ import GUsuarioIndexInterface from '@/packages/administrativo/interfaces/GUsuari
|
|||
import GUsuarioSelectInterface from '@/packages/administrativo/interfaces/GUsuario/GUsuarioSelectInterface';
|
||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||
|
||||
|
||||
export default function GUsuarioSelect({ field }: GUsuarioSelectInterface) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const { usuarios, fetchUsuarios } = useGUsuarioIndexHook();
|
||||
|
||||
/**
|
||||
* Efeito para buscar os dados apenas uma vez.
|
||||
* useCallback evita recriação desnecessária da função.
|
||||
*/
|
||||
const loadData = useCallback(async () => {
|
||||
|
||||
const urlParams = {
|
||||
assina: 'S',
|
||||
situacao: 'A'
|
||||
}
|
||||
|
||||
const GUsuarioIndex: GUsuarioIndexInterface = {
|
||||
urlParams: urlParams
|
||||
}
|
||||
const urlParams = { assina: 'S', situacao: 'A' };
|
||||
const GUsuarioIndex: GUsuarioIndexInterface = { urlParams };
|
||||
|
||||
if (usuarios?.length) return;
|
||||
setIsLoading(true);
|
||||
|
|
@ -51,17 +39,11 @@ export default function GUsuarioSelect({ field }: GUsuarioSelectInterface) {
|
|||
loadData();
|
||||
}, [loadData]);
|
||||
|
||||
/**
|
||||
* Memoriza o bairro selecionado para evitar reprocessamentos.
|
||||
*/
|
||||
const selected = useMemo(
|
||||
() => usuarios?.find((b) => String(b.usuario_id) === String(field?.value ?? '')),
|
||||
[usuarios, field?.value],
|
||||
);
|
||||
|
||||
/**
|
||||
* Manipulador de seleção com verificação segura.
|
||||
*/
|
||||
const handleSelect = useCallback(
|
||||
(bairroId: string | number) => {
|
||||
if (!field?.onChange) return;
|
||||
|
|
@ -80,7 +62,7 @@ export default function GUsuarioSelect({ field }: GUsuarioSelectInterface) {
|
|||
role="combobox"
|
||||
aria-expanded={open}
|
||||
disabled={isLoading}
|
||||
className="justify-between"
|
||||
className="w-full justify-between"
|
||||
>
|
||||
{isLoading
|
||||
? 'Carregando...'
|
||||
|
|
@ -91,19 +73,25 @@ export default function GUsuarioSelect({ field }: GUsuarioSelectInterface) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar bairro..." disabled={isLoading} />
|
||||
<CommandList>
|
||||
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command className="w-full">
|
||||
<CommandInput
|
||||
placeholder="Buscar usuário..."
|
||||
disabled={isLoading}
|
||||
className="w-full"
|
||||
/>
|
||||
<CommandList className="w-full">
|
||||
<CommandEmpty>
|
||||
{isLoading ? 'Carregando...' : 'Nenhum resultado encontrado.'}
|
||||
</CommandEmpty>
|
||||
<CommandGroup>
|
||||
<CommandGroup className="w-full">
|
||||
{usuarios?.map((item) => (
|
||||
<CommandItem
|
||||
key={item.usuario_id}
|
||||
value={item?.nome_completo?.toLowerCase() ?? ''}
|
||||
onSelect={() => handleSelect(item.usuario_id)}
|
||||
className="w-full"
|
||||
>
|
||||
<CheckIcon
|
||||
className={cn(
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import { useResponse } from '@/shared/components/response/ResponseContext';
|
|||
import Header from '@/shared/components/structure/Header';
|
||||
import { SituacoesEnum } from '@/shared/enums/SituacoesEnum';
|
||||
|
||||
import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface';
|
||||
import TCensecNaturezaLitigioForm from './TCensecNaturezaLitigioForm';
|
||||
import TCensecNaturezaLitigioTable from './TCensecNaturezaLitigioTable';
|
||||
import { TCensecNaturezaLitigioInterface } from '../../interfaces/TCensecNaturezaLitigio/TCensecNaturezaLitigioInterface';
|
||||
|
||||
const initialCensecNaturezaLitigio: TCensecNaturezaLitigioInterface = {
|
||||
censec_naturezalitigio_id: 0,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export default function TCensecQualidadeSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo logradouro..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ import Loading from '@/shared/components/loading/loading';
|
|||
import Header from '@/shared/components/structure/Header';
|
||||
import { SituacoesEnum } from '@/shared/enums/SituacoesEnum';
|
||||
|
||||
import TCensecTipoAtoForm from './TCensecTipoAtoForm';
|
||||
import TCensecTipoAtoTable from './TCensecTipoAtoTable';
|
||||
import { useTCensecReadHook } from '../../hooks/TCensec/useTCensecReadHook';
|
||||
import { useTCensecTipoAtoReadHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoReadHook';
|
||||
import { useTCensecTipoAtoRemoveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoRemoveHook';
|
||||
import { useTCensecTipoAtoSaveHook } from '../../hooks/TCensecTipoAto/useTCensecTipoAtoSaveHook';
|
||||
import { TCensecTipoAtoInterface } from '../../interfaces/TCensecTipoAto/TCensecTipoAtoInterface';
|
||||
import TCensecTipoAtoForm from './TCensecTipoAtoForm';
|
||||
import TCensecTipoAtoTable from './TCensecTipoAtoTable';
|
||||
|
||||
// Estado inicial para criação
|
||||
const initialTCensecTipoAto: TCensecTipoAtoInterface = {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export default function TCensecTipoAtoSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo logradouro..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default function TImovelTipoConstrucaoSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo construção..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default function TImovelTipoImovelSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo imóvel..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export default function TImovelTipoLogradouroSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo logradouro..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default function TImovelTipoRegistroSelect({ field }: any) {
|
|||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo construção..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ export default function TPessoaFisicaForm({
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar estado civil..." />
|
||||
<CommandList>
|
||||
|
|
@ -365,7 +365,7 @@ export default function TPessoaFisicaForm({
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar estado civil..." />
|
||||
<CommandList>
|
||||
|
|
@ -432,7 +432,7 @@ export default function TPessoaFisicaForm({
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar profissão..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ import { ResetFormIfData } from '@/shared/actions/form/ResetFormIfData';
|
|||
import { DataTable } from '@/shared/components/dataTable/DataTable';
|
||||
import LoadingButton from '@/shared/components/loadingButton/LoadingButton';
|
||||
|
||||
import TPessoasRepresentanteFormColumns from './TPessoasRepresentanteFormColumns';
|
||||
import { useTPessoaFisicaIndexHook } from '../../hooks/TPessoa/TPessoaFisica/useTPessoaFisicaIndexHook';
|
||||
import { useTPessoaRepresentanteFormHook } from '../../hooks/TPessoaRepresentante/useTPessoaRepresentanteFormHook';
|
||||
import TPessoaRepresentanteInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentanteInterface';
|
||||
import TPessoaRepresentanteFormInterface from '../../interfaces/TPessoaRepresentante/TPessoaRepresentnateFormInterface';
|
||||
import TPessoasRepresentanteFormColumns from './TPessoasRepresentanteFormColumns';
|
||||
|
||||
export default function TPessoaRepresentanteForm({
|
||||
isOpen,
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ export default function TServicoTipoSelect({ field }: TServicoTipoSelectInterfac
|
|||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo de serviço..." disabled={isLoading} />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
'use client';
|
||||
|
||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Command,
|
||||
|
|
@ -14,8 +17,6 @@ import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover
|
|||
import { cn } from '@/lib/utils';
|
||||
import { useTTBReconhecimentoTipoReadHook } from '@/packages/administrativo/hooks/TTBReconhecimentoTipo/useTTBReconhecimentoTipoReadHook';
|
||||
import GetCapitalize from '@/shared/actions/text/GetCapitalize';
|
||||
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
export default function TTBReconhecimentoTipoSelect({ field }: any) {
|
||||
const [open, setOpen] = React.useState(false);
|
||||
|
|
@ -55,7 +56,7 @@ export default function TTBReconhecimentoTipoSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar etiquetas/carimbos..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Importa o serviço de API que será utilizado para realizar requisições HTTP
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
import API from '@/shared/services/api/Api'; //
|
||||
|
||||
// Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE)
|
||||
|
|
@ -8,7 +9,6 @@ import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; //
|
|||
import { TServicoEtiquetaInterface } from '../../interfaces/TServicoEtiqueta/TServicoEtiquetaInterface';
|
||||
|
||||
// Importa função que encapsula chamadas assíncronas e trata erros automaticamente
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
|
||||
// Função assíncrona que implementa a lógica de localizar um tipo de serviço
|
||||
async function executeTServicoEtiquetaService(data: TServicoEtiquetaInterface) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Importa o serviço de API que será utilizado para realizar requisições HTTP
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
import API from '@/shared/services/api/Api'; //
|
||||
|
||||
// Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE)
|
||||
|
|
@ -8,7 +9,6 @@ import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; //
|
|||
import { TServicoEtiquetaInterface } from '../../interfaces/TServicoEtiqueta/TServicoEtiquetaInterface'; // Alterado de GCidadeInterface
|
||||
|
||||
// Importa função que encapsula chamadas assíncronas e trata erros automaticamente
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
|
||||
// Função assíncrona que implementa a lógica de remover um tipo de serviço
|
||||
async function executeTServicoEtiquetaRemoveData(data: TServicoEtiquetaInterface) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Importa o serviço de API que será utilizado para realizar requisições HTTP
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
import API from '@/shared/services/api/Api'; //
|
||||
|
||||
// Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE)
|
||||
|
|
@ -8,7 +9,6 @@ import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; //
|
|||
import TServicoTipoInterface from '../../interfaces/TServicoTipo/TServicoTipoInterface'; // Alterado de GCidadeInterface
|
||||
|
||||
// Importa função que encapsula chamadas assíncronas e trata erros automaticamente
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
|
||||
// Função assíncrona que implementa a lógica de localizar um tipo de serviço
|
||||
async function executeTServicoTipoEditService(data: TServicoTipoInterface) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Importa o serviço de API que será utilizado para realizar requisições HTTP
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
import API from '@/shared/services/api/Api'; //
|
||||
|
||||
// Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE)
|
||||
|
|
@ -8,7 +9,6 @@ import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; //
|
|||
import TServicoTipoInterface from '../../interfaces/TServicoTipo/TServicoTipoInterface'; // Alterado de GCidadeInterface
|
||||
|
||||
// Importa função que encapsula chamadas assíncronas e trata erros automaticamente
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
|
||||
// Função assíncrona que implementa a lógica de remover um tipo de serviço
|
||||
async function executeTServicoTipoRemoveData(data: TServicoTipoInterface) {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
// Importa o serviço de API que será utilizado para realizar requisições HTTP
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
import API from '@/shared/services/api/Api'; //
|
||||
|
||||
// Importa o esquema de validação de dados para tipos de serviço
|
||||
import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; //
|
||||
|
||||
import { TServicoTipoFormValues } from '../../schemas/TServicoTipo/TServicoTipoSchema';
|
||||
|
||||
// Importa o enum que contém os métodos HTTP disponíveis (GET, POST, PUT, DELETE)
|
||||
import { Methods } from '@/shared/services/api/enums/ApiMethodEnum'; //
|
||||
|
||||
// Importa a interface tipada que define a estrutura dos dados do tipo de serviço
|
||||
|
||||
// Importa função que encapsula chamadas assíncronas e trata erros automaticamente
|
||||
import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/withClientErrorHandler'; //
|
||||
|
||||
// Função assíncrona que implementa a lógica de salvar (criar/atualizar) um tipo de serviço
|
||||
async function executeTServicoTipoSaveData(
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API
|
||||
|
||||
// Interface tipada do tipo de serviço
|
||||
import { TServicoEtiquetaRemoveData } from '../../data/TServicoEtiqueta/TServicoEtiquetaRemoveData';
|
||||
import { TServicoEtiquetaInterface } from '../../interfaces/TServicoEtiqueta/TServicoEtiquetaInterface';
|
||||
|
||||
// Função que remove o tipo de serviço via API
|
||||
import { TServicoEtiquetaRemoveData } from '../../data/TServicoEtiqueta/TServicoEtiquetaRemoveData';
|
||||
|
||||
// Hook customizado para remoção de tipos de serviço
|
||||
export const useTServicoEtiquetaRemoveHook = () => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API
|
||||
|
||||
// Interface tipada do tipo de serviço
|
||||
import { TServicoTipoEditData } from '../../data/TServicoTipo/TServicoTipoEditData';
|
||||
import TServicoTipoInterface from '../../interfaces/TServicoTipo/TServicoTipoInterface';
|
||||
|
||||
// Função que Edit o tipo de serviço via API
|
||||
import { TServicoTipoEditData } from '../../data/TServicoTipo/TServicoTipoEditData';
|
||||
|
||||
// Hook customizado para remoção de tipos de serviço
|
||||
export const useTServicoTipoEditHook = () => {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { useResponse } from '@/shared/components/response/ResponseContext'; // Contexto global para gerenciar respostas da API
|
||||
|
||||
// Interface tipada do tipo de serviço
|
||||
import { TServicoTipoRemoveData } from '../../data/TServicoTipo/TServicoTipoRemoveData';
|
||||
import TServicoTipoInterface from '../../interfaces/TServicoTipo/TServicoTipoInterface';
|
||||
|
||||
// Função que remove o tipo de serviço via API
|
||||
import { TServicoTipoRemoveData } from '../../data/TServicoTipo/TServicoTipoRemoveData';
|
||||
|
||||
// Hook customizado para remoção de tipos de serviço
|
||||
export const useTServicoTipoRemoveHook = () => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { useResponse } from '@/shared/components/response/ResponseContext';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { useResponse } from '@/shared/components/response/ResponseContext';
|
||||
|
||||
// Interface tipada do tipo de serviço
|
||||
import TServicoTipoInterface from '../../interfaces/TServicoTipo/TServicoTipoInterface';
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { withClientErrorHandler } from '@/shared/actions/withClientErrorHandler/
|
|||
// Função que envolve qualquer ação assíncrona para capturar e tratar erros do cliente
|
||||
|
||||
import { TServicoEtiquetaReadData } from '../../data/TServicoEtiqueta/TServicoEtiquetaReadData';
|
||||
|
||||
import { TServicoEtiquetaInterface } from '../../interfaces/TServicoEtiqueta/TServicoEtiquetaInterface';
|
||||
// Interface tipada do tipo de serviço
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export default function CategoriaServicoSelect({ field }: CategoriaServicoSelect
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar categoria..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default function SituacoesSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar situação..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const SistemasSelect: React.FC<SistemasSelectProps> = ({ field }) => {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar sistema..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default function SituacoesSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar situação..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default function TipoAtoAnteriorSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar situação..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default function TipoCartorioSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar situação..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ export default function TipoDaParteSelect({ field }: TipoDaParteSelectProps) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo de parte..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default function TipoEmolumentoSelect({ field }: any) {
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar situação..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ export default function TipoNaturezaSelect({ field }: any) {
|
|||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo natureza..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ export default function TipoPagamentoSelect({ field }: TipoPagamentoSelectProps)
|
|||
</Button>
|
||||
</FormControl>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-full p-0">
|
||||
<PopoverContent className="w-[var(--radix-popover-trigger-width)] p-0">
|
||||
<Command>
|
||||
<CommandInput placeholder="Buscar tipo de parte..." />
|
||||
<CommandList>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue