update table list Wallet Rule
- add column wallet name and group name
This commit is contained in:
@ -132,7 +132,7 @@ const AddDialog = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(formField);
|
||||
// console.log(formField);
|
||||
doCreateWallet(e);
|
||||
setAlert({ show: false, message: '' });
|
||||
};
|
||||
|
||||
@ -81,6 +81,26 @@ const ManageWalletRuleContextProvider = ({ children }: { children: React.ReactNo
|
||||
|
||||
const columns = useMemo<ColumnDef<any>[]>(
|
||||
() => [
|
||||
{
|
||||
accessorFn: (row) => row.wallet.name,
|
||||
id: 'wallet_name',
|
||||
header: ({ column }) => <DataGridColumnHeader title="Wallet Name" column={column} />,
|
||||
enableSorting: true,
|
||||
enableHiding: false,
|
||||
meta: {
|
||||
headerClassName: 'w-[250px]'
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorFn: (row) => row.group.name,
|
||||
id: 'group_name',
|
||||
header: ({ column }) => <DataGridColumnHeader title="Group Name" column={column} />,
|
||||
enableSorting: true,
|
||||
enableHiding: false,
|
||||
meta: {
|
||||
headerClassName: 'w-[250px]'
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorFn: (row) => row.balance_minimum,
|
||||
id: 'balance_minimum',
|
||||
@ -202,7 +222,7 @@ const ManageWalletRuleContextProvider = ({ children }: { children: React.ReactNo
|
||||
order_direction: sorting[0].desc == false ? 'ASC' : 'DESC',
|
||||
filter: JSON.stringify(filter)
|
||||
});
|
||||
// console.log(response?.data);
|
||||
console.log(response?.data);
|
||||
setWalletRules(response?.data.list);
|
||||
return { data: response?.data.list, totalCount: response?.data.total_count };
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user