change group
This commit is contained in:
@ -440,8 +440,10 @@ function getAdmAccess(page: string, data: any, handleClose: any, fetchCustomers:
|
||||
await fetchCustomers()
|
||||
toast.success('Success Change group')
|
||||
} catch (error: any) {
|
||||
console.log(error);
|
||||
toast.error(error.message)
|
||||
} finally {
|
||||
await fetchCustomers()
|
||||
setChangeGroupD(false)
|
||||
handleClose()
|
||||
}
|
||||
@ -548,7 +550,6 @@ function getPinStatus(status: string) {
|
||||
}
|
||||
// CUSTOMER WALLET
|
||||
function showCustomerWallet(customerid: any) {
|
||||
const [dialogOpen, setDialogOpen] = useState(false);
|
||||
const [customerWallet, setCustomerWallet] = useState([]);
|
||||
if (!customerid) return ''
|
||||
|
||||
@ -565,14 +566,12 @@ function showCustomerWallet(customerid: any) {
|
||||
}
|
||||
}
|
||||
|
||||
const handleYes = async () => {}
|
||||
|
||||
return (
|
||||
<Box p={3} boxShadow={3} borderRadius={2} bgcolor="white">
|
||||
<Typography variant="h6" gutterBottom>Wallet Member</Typography>
|
||||
<Grid>
|
||||
<List>
|
||||
{customerWallet.map((item:any, index:any) => (
|
||||
{customerWallet.length ? (customerWallet.map((item:any, index:any) => (
|
||||
<React.Fragment key={item.id}>
|
||||
<ListItem
|
||||
sx={{
|
||||
@ -612,17 +611,9 @@ function showCustomerWallet(customerid: any) {
|
||||
</ListItem>
|
||||
{index < customerWallet.length - 1 && <Divider sx={{ my: 1 }} />}
|
||||
</React.Fragment>
|
||||
))}
|
||||
))): "No wallet"}
|
||||
</List>
|
||||
</Grid>
|
||||
<ConfirmDialog
|
||||
open={dialogOpen}
|
||||
onClose={() => setDialogOpen(false)}
|
||||
title="Confirm Action"
|
||||
content={`Are you sure you want to show?`}
|
||||
onYes={handleYes}
|
||||
onNo={() => setDialogOpen(false)}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user