import * as React from "react"; import { Box, Typography } from "@mui/material"; import Card from "@mui/material/Card"; import PropTypes from "prop-types"; import { useTheme } from "@mui/material/styles"; import Table from "@mui/material/Table"; import TableHead from "@mui/material/TableHead"; import TableBody from "@mui/material/TableBody"; import TableCell from "@mui/material/TableCell"; import TableContainer from "@mui/material/TableContainer"; import TableFooter from "@mui/material/TableFooter"; import TablePagination from "@mui/material/TablePagination"; import TableRow from "@mui/material/TableRow"; import Paper from "@mui/material/Paper"; import IconButton from "@mui/material/IconButton"; import FirstPageIcon from "@mui/icons-material/FirstPage"; import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft"; import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight"; import LastPageIcon from "@mui/icons-material/LastPage"; import Grid from "@mui/material/Grid"; import Tooltip from "@mui/material/Tooltip"; import DeleteIcon from "@mui/icons-material/Delete"; import DriveFileRenameOutlineIcon from "@mui/icons-material/DriveFileRenameOutline"; import Button from "@mui/material/Button"; import TextField from "@mui/material/TextField"; import AddIcon from "@mui/icons-material/Add"; import ClearIcon from "@mui/icons-material/Clear"; import Link from 'next/link'; import styles from '@/styles/PageTitle.module.css'; import Checkbox from '@mui/material/Checkbox'; import { styled } from '@mui/material/styles'; import Dialog from '@mui/material/Dialog'; import DialogTitle from '@mui/material/DialogTitle'; import CloseIcon from '@mui/icons-material/Close'; const label = { inputProps: { 'aria-label': 'Checkbox demo' } }; // Create new user Modal const BootstrapDialog = styled(Dialog)(({ theme }) => ({ '& .MuiDialogContent-root': { padding: theme.spacing(2), }, '& .MuiDialogActions-root': { padding: theme.spacing(1), }, })); function BootstrapDialogTitle(props) { const { children, onClose, ...other } = props; return ( {children} {onClose ? ( theme.palette.grey[500], }} > ) : null} ); } BootstrapDialogTitle.propTypes = { children: PropTypes.node, onClose: PropTypes.func.isRequired, }; // End Create new user Modal function UsersList(props) { const theme = useTheme(); const { count, page, rowsPerPage, onPageChange } = props; const handleFirstPageButtonClick = (event) => { onPageChange(event, 0); }; const handleBackButtonClick = (event) => { onPageChange(event, page - 1); }; const handleNextButtonClick = (event) => { onPageChange(event, page + 1); }; const handleLastPageButtonClick = (event) => { onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1)); }; return ( {theme.direction === "rtl" ? : } {theme.direction === "rtl" ? ( ) : ( )} = Math.ceil(count / rowsPerPage) - 1} aria-label="next page" > {theme.direction === "rtl" ? ( ) : ( )} = Math.ceil(count / rowsPerPage) - 1} aria-label="last page" > {theme.direction === "rtl" ? : } ); } UsersList.propTypes = { count: PropTypes.number.isRequired, onPageChange: PropTypes.func.isRequired, page: PropTypes.number.isRequired, rowsPerPage: PropTypes.number.isRequired, }; function createData(name, userName, image, email, rolls, status, badgeClass, projects) { return { name, userName, image, email, rolls, status, badgeClass, projects }; } const rows = [ createData( "Evangelina Mcclain", "@jstevenson5c", "/images/user1.png", "jordansteve@gmail.com", "Agent", "Active", "successBadge", "165" ), createData( "Candice Munoz", "@candice3unoz", "/images/user2.png", "candicemunoz@gmail.com", "Administrator", "Active", "successBadge", "120" ), createData( "Mike Mcclain", "@mike4mcclain", "/images/user3.png", "mikemcclain@gmail.com", "Contributor", "Active", "successBadge", "220" ), createData( "Bernard Langley", "@bernardlangley", "/images/user4.png", "bernardlangley@gmail.com", "Agent", "Deactive", "dangerBadge", "122" ), createData( "Kristie Hall", "@kristie7hall", "/images/user5.png", "kristiehall@gmail.com", "Contributor", "Active", "successBadge", "360" ), createData( "Bolton Obrien", "@bolton4obrien", "/images/user6.png", "boltonobrien@gmail.com", "Administrator", "Active", "successBadge", "250" ), createData( "Dee Alvarado", "@dee3alvarado", "/images/user7.png", "deealvarado@gmail.com", "Agent", "Active", "successBadge", "140" ), createData( "Cervantes Kramer", "@cervantes4kramer", "/images/user8.png", "cervantes4kramer@gmail.com", "Agent", "Active", "successBadge", "345" ), createData( "Dejesus Michael", "@dejesus1michael", "/images/user9.png", "dejesusmichael@gmail.com", "Agent", "Active", "successBadge", "323" ), createData( "Alissa Nelson", "@alissa1nelson", "/images/user10.png", "alissa1nelson@gmail.com", "Agent", "Deactive", "dangerBadge", "451" ), createData( "Milton", "@milton", "/images/user11.png", "milton@gmail.com", "Agent", "Active", "successBadge", "432" ), createData( "Claude", "@claude", "/images/user12.png", "claude@gmail.com", "Agent", "Deactive", "dangerBadge", "543" ), createData( "Joshua", "@joshua", "/images/user13.png", "joshua@gmail.com", "Agent", "Active", "successBadge", "543" ), createData( "Harvey", "@harvey", "/images/user14.png", "harvey@gmail.com", "Agent", "Deactive", "dangerBadge", "432" ), createData( "Antonio", "@antonio", "/images/user15.png", "antonio@gmail.com", "Agent", "Active", "successBadge", "765" ), createData( "Julian", "@julian", "/images/user16.png", "julian@gmail.com", "Agent", "Active", "successBadge", "678" ), createData( "Harold", "@harold", "/images/user17.png", "harold@gmail.com", "Agent", "Deactive", "dangerBadge", "165" ), createData( "Kingston", "@kingston", "/images/user18.png", "kingston@info.com", "Agent", "Active", "successBadge", "165" ), ].sort((a, b) => (a.name < b.name ? -1 : 1)); export default function User() { // Table const [page, setPage] = React.useState(0); const [rowsPerPage, setRowsPerPage] = React.useState(10); // Avoid a layout jump when reaching the last page with empty rows. const emptyRows = page > 0 ? Math.max(0, (1 + page) * rowsPerPage - rows.length) : 0; const handleChangePage = (event, newPage) => { setPage(newPage); }; const handleChangeRowsPerPage = (event) => { setRowsPerPage(parseInt(event.target.value, 10)); setPage(0); }; // Create new user modal const [open, setOpen] = React.useState(false); const handleClickOpen = () => { setOpen(true); }; const handleClose = () => { setOpen(false); }; const handleSubmit = (event) => { event.preventDefault(); const data = new FormData(event.currentTarget); console.log({ email: data.get("email"), password: data.get("password"), }); }; // End Add Task Modal return ( <> {/* Page title */}

Users

Users List Name Email Rolls Status Projects Action {(rowsPerPage > 0 ? rows.slice( page * rowsPerPage, page * rowsPerPage + rowsPerPage ) : rows ).map((row) => ( User {row.name} {row.userName} {row.email} {row.rolls} {row.status} {row.projects} ))} {emptyRows > 0 && ( )}
{/* Create new user modal */} Create New User Image Name User Name Email Rolls Projects ); }