export type BaseOrderData = {
id?: string | null;
createdAt?: string | null;
status?: string | null;
shippingMethod?: string | null;
address?: string | null;
totalProducts?: number | null;
total?: number | null;
};
export const columns: ColumnDef<BaseOrderData>[] = [
{
accessorKey: "id",
header: "ID",
cell: ({ row }) => {
return (row.getCanExpand() ? (
<button
{...{
onClick: row.getToggleExpandedHandler(),
style: { cursor: 'pointer' },
}}
>
{row.getIsExpanded() ? '👇' : '👉'}
</button>) : 'nope')
}
},
{
accessorKey: "createdAt",
header: "Fecha",
},
{
accessorKey: "status",
header: "Estado",
},
{
accessorKey: "shippingMethod",
header: "Método de envío",
},
{
accessorKey: "address",
header: "Dirección",
},
{
accessorKey: "totalProducts",
header: "Total productos",
},
{
accessorKey: "total",
header: "Total",
},
];
export type BaseOrderData = {
id?: string | null;
createdAt?: string | null;
status?: string | null;
shippingMethod?: string | null;
address?: string | null;
totalProducts?: number | null;
total?: number | null;
};
export const columns: ColumnDef<BaseOrderData>[] = [
{
accessorKey: "id",
header: "ID",
cell: ({ row }) => {
return (row.getCanExpand() ? (
<button
{...{
onClick: row.getToggleExpandedHandler(),
style: { cursor: 'pointer' },
}}
>
{row.getIsExpanded() ? '👇' : '👉'}
</button>) : 'nope')
}
},
{
accessorKey: "createdAt",
header: "Fecha",
},
{
accessorKey: "status",
header: "Estado",
},
{
accessorKey: "shippingMethod",
header: "Método de envío",
},
{
accessorKey: "address",
header: "Dirección",
},
{
accessorKey: "totalProducts",
header: "Total productos",
},
{
accessorKey: "total",
header: "Total",
},
];