import React, { useState } from 'react'; import { Box, TextField, IconButton, InputAdornment, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Checkbox, Paper, MenuItem, InputLabel, Select, FormControl, SelectChangeEvent } from '@mui/material'; import SearchIcon from '@mui/icons-material/Search'; const rows = [ { merchantId: '100987998', txId: '1049078821', userId: 17, userEmail: 'dhkheni1@yopmail.com', kycStatus: 'N/A', }, { merchantId: '100987998', txId: '1049078821', userId: 18, userEmail: 'dhkheni1@yopmail.com', kycStatus: 'N/A', }, { merchantId: '100987998', txId: '1049078821', userId: 19, userEmail: 'dhkheni1@yopmail.com', kycStatus: 'N/A', }, ]; export const Approve = () => { const [age, setAge] = useState(''); const [selectedRows, setSelectedRows] = useState([]); const handleCheckboxChange = (userId: number) => (event: React.ChangeEvent) => { const isChecked = event.target.checked; setSelectedRows((prevSelected: number[]) => isChecked ? [...prevSelected, userId] : prevSelected.filter((id) => id !== userId) ); console.log('Selected IDs:', isChecked ? [...selectedRows, userId] : selectedRows.filter((id) => id !== userId)); }; const handleChangeAge = (event: SelectChangeEvent) => { setAge(event.target.value as string); }; return ( ), }} /> {/* */} {/* */} {/* */} {/* */} {/* Action 1 */} {/* Action 2 */} {/* */} Action Merchant-id Tx-id User User email KYC Status KYC PSP KYC PSP status KYC ID status KYC address status KYC liveness status KYC age status KYC peps and sanctions Suspected {rows.map((row, idx) => ( {row.merchantId} {row.txId} {row.userId} {row.userEmail} {row.kycStatus} ))}
); }