fix postoadms
This commit is contained in:
@ -9,8 +9,9 @@ import { useNavigate, useParams } from 'react-router';
|
||||
import ListToolbar from '../blocks/ListToolbar';
|
||||
|
||||
interface PostoAdmsProps {
|
||||
id: number;
|
||||
name: string;
|
||||
posto_adms_id: number;
|
||||
posto_adms_name: string;
|
||||
municipios_name: string;
|
||||
}
|
||||
|
||||
interface ContextProps {
|
||||
@ -82,7 +83,7 @@ const ManagePostoAdmsContextProvider = ({ children }: { children: React.ReactNod
|
||||
const columns = useMemo<ColumnDef<any>[]>(
|
||||
() => [
|
||||
{
|
||||
accessorFn: (row) => row.id,
|
||||
accessorFn: (row) => row.posto_adms_id,
|
||||
id: 'id',
|
||||
header: ({ column }) => <DataGridColumnHeader title="ID" column={column} />,
|
||||
enableSorting: true,
|
||||
@ -92,8 +93,8 @@ const ManagePostoAdmsContextProvider = ({ children }: { children: React.ReactNod
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorFn: (row) => row.name,
|
||||
id: 'name',
|
||||
accessorFn: (row) => row.posto_adms_name,
|
||||
id: 'posto_adms_name',
|
||||
header: ({ column }) => (
|
||||
<DataGridColumnHeader title="Posto Administrativo Name" column={column} />
|
||||
),
|
||||
@ -103,6 +104,16 @@ const ManagePostoAdmsContextProvider = ({ children }: { children: React.ReactNod
|
||||
headerClassName: 'w-[1000px]'
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorFn: (row) => row.municipios_name,
|
||||
id: 'municipios_name',
|
||||
header: ({ column }) => <DataGridColumnHeader title="Municipio Name" column={column} />,
|
||||
enableSorting: true,
|
||||
enableHiding: false,
|
||||
meta: {
|
||||
headerClassName: 'w-[1000px]'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
header: ({ column }) => <DataGridColumnHeader title="Actions" column={column} />,
|
||||
|
||||
Reference in New Issue
Block a user