fix dletion
This commit is contained in:
@ -122,13 +122,18 @@ const ManageKycDeletionContextProvider = ({ children }: { children: React.ReactN
|
||||
limit,
|
||||
page: page + 1,
|
||||
with_deleted: false,
|
||||
order_field: "id",
|
||||
order_field: "created_at",
|
||||
order_direction: 'DESC',
|
||||
filter: JSON.stringify(formattedFilter)
|
||||
});
|
||||
let temp = 1;
|
||||
let resDeletion = response?.data.list.map((el: any) => {
|
||||
el.no = temp++;
|
||||
return el;
|
||||
});
|
||||
|
||||
setManageKyc(response?.data.list);
|
||||
return { data: response?.data.list, totalCount: response?.data.total_count };
|
||||
setManageKyc(resDeletion);
|
||||
return { data: resDeletion, totalCount: response?.data.total_count };
|
||||
} catch (error) {
|
||||
console.error('Error fetching transaction', error);
|
||||
}
|
||||
@ -148,7 +153,6 @@ const ManageKycDeletionContextProvider = ({ children }: { children: React.ReactN
|
||||
}, []);
|
||||
|
||||
const handleApproveReject = useCallback(async (customerDeletionId: string, status_approve: string) => {
|
||||
console.log(customerDeletionId, status_approve)
|
||||
try {
|
||||
let approveReject = await PostData(`${API_URL}/customer_deletion/update_status/${customerDeletionId}`, {
|
||||
status_approve
|
||||
@ -170,9 +174,9 @@ const ManageKycDeletionContextProvider = ({ children }: { children: React.ReactN
|
||||
const columns = useMemo<ColumnDef<any>[]>(
|
||||
() => [
|
||||
{
|
||||
accessorFn: (row) => row.id,
|
||||
id: 'id',
|
||||
header: ({ column }) => <DataGridColumnHeader title="ID" column={column} />,
|
||||
accessorFn: (row) => row.no,
|
||||
id: 'no',
|
||||
header: ({ column }) => <DataGridColumnHeader title="No" column={column} />,
|
||||
enableSorting: true,
|
||||
enableHiding: false,
|
||||
meta: {
|
||||
|
||||
Reference in New Issue
Block a user