import React, { useState, useMemo } from 'react'; import { Search } from 'lucide-react'; import ExcelTable from '../components/ExcelTable'; const TableDebug = () => { const [searchTerm, setSearchTerm] = useState(''); // Mock Data matching the screenshot structure const vehicles = useMemo(() => { // Top specific rows to match screenshot const topRows = [ { id: 1, modelo: 'TEO0G02', placa: 'TEO0G02', status: 'Em uso', motorista: 'Larissa Ribeiro de Souza', combustivel: 'Gasolina', tipo: 'Passeio', marca: 'Fiat', ano: '2020', cidade: 'São Paulo', empresa: 'Empresa A', financiamento: 'Sim', financeira: 'Banco X' }, { id: 2, modelo: 'HFB3A70', placa: 'HFB3A70', status: 'Não informado', motorista: 'Não atribuído', combustivel: 'Etanol', tipo: 'Utilitário', marca: 'VW', ano: '2021', cidade: 'Rio', empresa: 'Empresa B', financiamento: 'Não', financeira: '-' }, { id: 3, modelo: 'LUN1968', placa: 'LUN1968', status: 'Manutenção', motorista: 'Carlos Silva', combustivel: 'Diesel', tipo: 'Caminhão', marca: 'Volvo', ano: '2019', cidade: 'Curitiba', empresa: 'Empresa A', financiamento: 'Sim', financeira: 'Banco Y' }, // ... mix of data ]; // Fill rest with randomized variety const fillRows = Array.from({ length: 40 }, (_, i) => ({ id: 10 + i, modelo: `FLEX${i}`, placa: `ABC${10 + i}99`, status: ['Em uso', 'Manutenção', 'Vendido'][i % 3], // Varied status motorista: i % 2 === 0 ? 'Motorista Teste' : 'Não atribuído', combustivel: ['Flex', 'Gasolina', 'Diesel'][i % 3], tipo: ['Passeio', 'Utilitário', 'Caminhão'][i % 3], marca: ['Fiat', 'VW', 'Ford', 'Chevrolet'][i % 4], ano: String(2015 + (i % 10)), cidade: ['São Paulo', 'Rio', 'Belo Horizonte'][i % 3], empresa: ['Empresa A', 'Empresa B', 'Empresa C'][i % 3], financiamento: i % 2 === 0 ? 'Sim' : 'Não', financeira: i % 2 === 0 ? `Banco ${['X', 'Y', 'Z'][i % 3]}` : '-' })); return [...topRows, ...fillRows]; }, []); const columns = [ { header: 'MODELO', field: 'modelo', width: '120px' }, { header: 'PLACA', field: 'placa', width: '100px', className: 'text-[#eab308] font-bold' }, // Yellow text for Placa { header: 'STATUS', field: 'status', width: '140px', render: (row) => ( row.status === 'Em uso' ? Em uso : Não informado ) }, { header: 'MOTORISTA ATUAL', field: 'motorista', width: '200px' }, { header: 'COMBUSTÍVEL', field: 'combustivel', width: '120px' }, { header: 'TIPO', field: 'tipo', width: '100px' }, { header: 'MARCA', field: 'marca', width: '120px' }, { header: 'ANO', field: 'ano', width: '80px' }, { header: 'CIDADE', field: 'cidade', width: '120px' }, ]; return (

🔧 Debug - Tabela Prafrot

Teste standalone da tabela Excel-style (Pixel Perfect)

setSearchTerm(e.target.value)} />
{/* New ExcelTable Component */}
); }; export default TableDebug;