reject member

This commit is contained in:
unknown
2025-03-10 21:41:27 +07:00
parent 09b471c6b2
commit d14b219d6f
3 changed files with 222 additions and 15 deletions

View File

@ -0,0 +1,195 @@
import { Button } from '@/components/ui/button';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuTrigger
} from '@/components/ui/dropdown-menu';
import { ColumnDef } from '@tanstack/react-table';
import { ArrowUpDown, MoreHorizontal } from 'lucide-react';
export type Members = {
// id: number;
username: number;
fullname: string;
group: string;
email: string;
created_at: Date;
};
export const columns: ColumnDef<Members>[] = [
{
accessorKey: 'no',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
No
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
accessorKey: 'username',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Username
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
accessorKey: 'name',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Fullname
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
accessorKey: 'group_name',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Group
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
accessorKey: 'destinationGroup',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Destination Group
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
accessorKey: 'email',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Email
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
accessorKey: 'created_at',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Created Date
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
},
cell: ({ row }) => new Date(row.original.created_at).toLocaleDateString()
},
{
accessorKey: 'statusApproval',
header: ({ column }) => {
return (
<Button
variant="ghost"
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
>
Status Approval
<ArrowUpDown className="ml-2 h-4 w-4" />
</Button>
);
}
},
{
id: 'actions',
cell: ({ row }) => {
const dataMembers = row.original;
return (
<DropdownMenu>
</DropdownMenu>
);
}
}
];
export const initialMember = {
id: "",
fullname: "",
email: "",
username: "",
msisdn: "",
password: "",
pin: "",
try_pin: "",
mother_fullname: "",
agent_name: "",
bank_name: "",
bank_account: "",
ibank_number: "",
address: "",
longitude: "",
latitude: "",
nationality: "",
photouser: "",
photomerchant: "",
file_selfie: "",
file_document_id: "",
file_document_id_selfie: "",
file_commercial_license: "",
identity_type: "",
identity_number: "",
license_number: "",
date_birth: "",
gender: "",
status: "N",
isneedapproval: "",
isapproved: "",
approveddate: "",
approvedby: "",
created_by: "",
created_at: "",
updated_by: "",
updated_at: "",
deleted_by: "",
deleted_at: "",
group: "",
point_tier: "",
language: "",
municipio: "",
posto_adms: "",
suco: "",
aldeia: "",
profession: "",
}