fix: corrige formato de colunas UTable para Nuxt UI v3 (TanStack Table)
Substitui o formato de colunas { key, label } (Nuxt UI v2) pelo formato
correto { id, accessorKey, header } exigido pelo TanStack Table no Nuxt UI v3.
Afetou 7 arquivos: EditaisTable, index, orgaos, concorrentes, contratos,
inteligencia/index e sistema/usuarios.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,13 +13,13 @@ const modalidadeLabel: Record<string, string> = {
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{ key: 'numero', label: 'Nº Edital' },
|
||||
{ key: 'objeto', label: 'Objeto' },
|
||||
{ key: 'orgao', label: 'Órgão' },
|
||||
{ key: 'modalidade', label: 'Modalidade' },
|
||||
{ key: 'valorEstimado', label: 'Valor Est.' },
|
||||
{ key: 'status', label: 'Status' },
|
||||
{ key: 'dataAbertura', label: 'Abertura' },
|
||||
{ id: 'numero', accessorKey: 'numero', header: 'Nº Edital' },
|
||||
{ id: 'objeto', accessorKey: 'objeto', header: 'Objeto' },
|
||||
{ id: 'orgao', accessorKey: 'orgao', header: 'Órgão' },
|
||||
{ id: 'modalidade', accessorKey: 'modalidade', header: 'Modalidade' },
|
||||
{ id: 'valorEstimado', accessorKey: 'valorEstimado', header: 'Valor Est.' },
|
||||
{ id: 'status', accessorKey: 'status', header: 'Status' },
|
||||
{ id: 'dataAbertura', accessorKey: 'dataAbertura', header: 'Abertura' },
|
||||
]
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
import { concorrentes } from '~/data/mock/concorrentes'
|
||||
|
||||
const columns = [
|
||||
{ key: 'cnpj', label: 'CNPJ' },
|
||||
{ key: 'nome', label: 'Empresa' },
|
||||
{ key: 'totalDisputas', label: 'Disputas' },
|
||||
{ key: 'totalVitorias', label: 'Vitórias' },
|
||||
{ key: 'taxaVitoria', label: 'Taxa' },
|
||||
{ id: 'cnpj', accessorKey: 'cnpj', header: 'CNPJ' },
|
||||
{ id: 'nome', accessorKey: 'nome', header: 'Empresa' },
|
||||
{ id: 'totalDisputas', accessorKey: 'totalDisputas', header: 'Disputas' },
|
||||
{ id: 'totalVitorias', accessorKey: 'totalVitorias', header: 'Vitórias' },
|
||||
{ id: 'taxaVitoria', accessorKey: 'taxaVitoria', header: 'Taxa' },
|
||||
]
|
||||
|
||||
const dados = computed(() => concorrentes.map(c => ({
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
import { contratos } from '~/data/mock/contratos'
|
||||
|
||||
const columns = [
|
||||
{ key: 'numero', label: 'Nº Contrato' },
|
||||
{ key: 'orgao', label: 'Órgão' },
|
||||
{ key: 'valor', label: 'Valor' },
|
||||
{ key: 'dataInicio', label: 'Início' },
|
||||
{ key: 'dataFim', label: 'Término' },
|
||||
{ key: 'fiscalContrato', label: 'Fiscal' },
|
||||
{ key: 'sla', label: 'SLA' },
|
||||
{ id: 'numero', accessorKey: 'numero', header: 'Nº Contrato' },
|
||||
{ id: 'orgao', accessorKey: 'orgao', header: 'Órgão' },
|
||||
{ id: 'valor', accessorKey: 'valor', header: 'Valor' },
|
||||
{ id: 'dataInicio', accessorKey: 'dataInicio', header: 'Início' },
|
||||
{ id: 'dataFim', accessorKey: 'dataFim', header: 'Término' },
|
||||
{ id: 'fiscalContrato', accessorKey: 'fiscalContrato', header: 'Fiscal' },
|
||||
{ id: 'sla', accessorKey: 'sla', header: 'SLA' },
|
||||
]
|
||||
</script>
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ import { orgaos } from '~/data/mock/orgaos'
|
||||
|
||||
const esferaLabel = { federal: 'Federal', estadual: 'Estadual', municipal: 'Municipal' }
|
||||
const columns = [
|
||||
{ key: 'nome', label: 'Órgão' },
|
||||
{ key: 'esfera', label: 'Esfera' },
|
||||
{ key: 'estado', label: 'UF' },
|
||||
{ key: 'totalParticipacoes', label: 'Participações' },
|
||||
{ key: 'totalVitorias', label: 'Vitórias' },
|
||||
{ key: 'taxaVitoria', label: 'Taxa' },
|
||||
{ id: 'nome', accessorKey: 'nome', header: 'Órgão' },
|
||||
{ id: 'esfera', accessorKey: 'esfera', header: 'Esfera' },
|
||||
{ id: 'estado', accessorKey: 'estado', header: 'UF' },
|
||||
{ id: 'totalParticipacoes', accessorKey: 'totalParticipacoes', header: 'Participações' },
|
||||
{ id: 'totalVitorias', accessorKey: 'totalVitorias', header: 'Vitórias' },
|
||||
{ id: 'taxaVitoria', accessorKey: 'taxaVitoria', header: 'Taxa' },
|
||||
]
|
||||
|
||||
const dados = computed(() => orgaos.map(o => ({
|
||||
|
||||
@@ -120,13 +120,13 @@ const modalidadeLabel: Record<string, string> = {
|
||||
<UTable
|
||||
:data="editaisRecentes"
|
||||
:columns="[
|
||||
{ key: 'numero', label: 'Nº Edital' },
|
||||
{ key: 'objeto', label: 'Objeto' },
|
||||
{ key: 'orgao', label: 'Órgão' },
|
||||
{ key: 'modalidade', label: 'Modalidade' },
|
||||
{ key: 'valorEstimado', label: 'Valor Est.' },
|
||||
{ key: 'status', label: 'Status' },
|
||||
{ key: 'dataAbertura', label: 'Abertura' },
|
||||
{ id: 'numero', accessorKey: 'numero', header: 'Nº Edital' },
|
||||
{ id: 'objeto', accessorKey: 'objeto', header: 'Objeto' },
|
||||
{ id: 'orgao', accessorKey: 'orgao', header: 'Órgão' },
|
||||
{ id: 'modalidade', accessorKey: 'modalidade', header: 'Modalidade' },
|
||||
{ id: 'valorEstimado', accessorKey: 'valorEstimado', header: 'Valor Est.' },
|
||||
{ id: 'status', accessorKey: 'status', header: 'Status' },
|
||||
{ id: 'dataAbertura', accessorKey: 'dataAbertura', header: 'Abertura' },
|
||||
]"
|
||||
>
|
||||
<template #modalidade-cell="{ row }">
|
||||
|
||||
@@ -56,10 +56,10 @@ const fmt = (v: number) => new Intl.NumberFormat('pt-BR', { style: 'currency', c
|
||||
<UTable
|
||||
:data="concorrentesFrequentes"
|
||||
:columns="[
|
||||
{ key: 'nome', label: 'Empresa' },
|
||||
{ key: 'cnpj', label: 'CNPJ' },
|
||||
{ key: 'totalDisputas', label: 'Disputas' },
|
||||
{ key: 'totalVitorias', label: 'Vitórias' },
|
||||
{ id: 'nome', accessorKey: 'nome', header: 'Empresa' },
|
||||
{ id: 'cnpj', accessorKey: 'cnpj', header: 'CNPJ' },
|
||||
{ id: 'totalDisputas', accessorKey: 'totalDisputas', header: 'Disputas' },
|
||||
{ id: 'totalVitorias', accessorKey: 'totalVitorias', header: 'Vitórias' },
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -11,10 +11,10 @@ const perfilLabel: Record<string, string> = {
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{ key: 'nome', label: 'Nome' },
|
||||
{ key: 'email', label: 'E-mail' },
|
||||
{ key: 'perfil', label: 'Perfil' },
|
||||
{ key: 'status', label: 'Status' },
|
||||
{ id: 'nome', accessorKey: 'nome', header: 'Nome' },
|
||||
{ id: 'email', accessorKey: 'email', header: 'E-mail' },
|
||||
{ id: 'perfil', accessorKey: 'perfil', header: 'Perfil' },
|
||||
{ id: 'status', accessorKey: 'status', header: 'Status' },
|
||||
]
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user