member kyc
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import { ColumnDef } from '@tanstack/react-table';
|
||||
|
||||
export type Group = {
|
||||
id: number;
|
||||
createdDate: Date;
|
||||
no: number;
|
||||
created_at: Date;
|
||||
name: string;
|
||||
status: string;
|
||||
description: string;
|
||||
@ -10,13 +10,13 @@ export type Group = {
|
||||
|
||||
export const columns: ColumnDef<Group>[] = [
|
||||
{
|
||||
accessorKey: 'id',
|
||||
accessorKey: 'no',
|
||||
header: 'ID'
|
||||
},
|
||||
{
|
||||
accessorKey: 'createdDate',
|
||||
accessorKey: 'created_at',
|
||||
header: 'Created Date',
|
||||
cell: ({ row }) => new Date(row.original.createdDate).toLocaleDateString()
|
||||
cell: ({ row }) => new Date(row.original.created_at).toLocaleDateString()
|
||||
},
|
||||
{
|
||||
accessorKey: 'name',
|
||||
|
||||
@ -47,7 +47,12 @@ const ManageGroups = () => {
|
||||
order_direction: 'ASC'
|
||||
}
|
||||
});
|
||||
setDataGroup(groups.data.data.list)
|
||||
let temp = 1
|
||||
let resGroups = groups.data.data.list.map((el: any) => {
|
||||
el.no = temp++
|
||||
return el
|
||||
})
|
||||
setDataGroup(resGroups)
|
||||
} catch (error: any) {
|
||||
alert(error.message)
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user