import * as React from "react";
import { Box } from "@mui/material";
import Card from "@mui/material/Card";
import { Typography } from "@mui/material";
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 Checkbox from '@mui/material/Checkbox';
import Tooltip from "@mui/material/Tooltip";
import DeleteIcon from "@mui/icons-material/Delete";
import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
import DriveFileRenameOutlineIcon from "@mui/icons-material/DriveFileRenameOutline";
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
function InvoiceList(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" ? : }
);
}
InvoiceList.propTypes = {
count: PropTypes.number.isRequired,
onPageChange: PropTypes.func.isRequired,
page: PropTypes.number.isRequired,
rowsPerPage: PropTypes.number.isRequired,
};
function createData(
orderID,
productName,
clientName,
clientImg,
email,
issuedDate,
total,
balance,
badgeClass,
) {
return {
orderID,
productName,
clientName,
clientImg,
email,
issuedDate,
total,
balance,
badgeClass,
};
}
const rows = [
createData(
"#14250",
"Laptop Macos Pro",
"Colin Firth",
"/images/user1.png",
"colinfirth@gmail.com",
"10 Jan 2023",
"$845",
"Paid",
"successBadge",
),
createData(
"#14251",
"Smart Camera XD6",
"Wade Dave",
"/images/user2.png",
"wadedave@gmail.com",
"11 Jan 2023",
"$189.50",
"Not Paid",
"dangerBadge",
),
createData(
"#14252",
"Pixi 8 Wireless Airphone",
"Seth Riley",
"/images/user3.png",
"sethriley@gmail.com",
"12 Jan 2023",
"$250.50",
"Paid",
"successBadge",
),
createData(
"#14253",
"Jebble Smart Watch",
"Gilbert Dan",
"/images/user4.png",
"gilbertdan@gmail.com",
"13 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14254",
"Admas Airpod x-Zon",
"Joshua Glen",
"/images/user5.png",
"joshuaGlen@gmail.com",
"14 Jan 2023",
"$289.50",
"Not Paid",
"dangerBadge",
),
createData(
"#14255",
"Smart Satch F8 Pro",
"Lewis Milton",
"/images/user6.png",
"lewisMilton@gmail.com",
"15 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14256",
"Nord Fold ZL",
"Liam Ethan",
"/images/user7.png",
"liamEthan@gmail.com",
"16 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14257",
"Wall Clock Cimbina",
"Ramon Miles",
"/images/user8.png",
"ramonMiles@gmail.com",
"17 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14258",
"Galaxo T6 Munsun",
"Brian Roberto",
"/images/user9.png",
"ramonMiles@gmail.com",
"18 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14259",
"Laptop Macos Pro",
"Colin Firth",
"/images/user10.png",
"colinFirth@gmail.com",
"19 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14260",
"Smart Camera XD6",
"Wade Dave",
"/images/user11.png",
"wadeDave@gmail.com",
"20 Jan 2023",
"$189.50",
"Paid",
"successBadge",
),
createData(
"#14261",
"Pixi 8 Wireless Airphone",
"Seth Riley",
"/images/user12.png",
"wadeDave@gmail.com",
"21 Jan 2023",
"$250.50",
"Paid",
"successBadge",
),
createData(
"#14262",
"Jebble Smart Watch",
"Gilbert Dan",
"/images/user13.png",
"wadeDave@gmail.com",
"22 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14263",
"Admas Airpod x-Zon",
"Joshua Glen",
"/images/user14.png",
"joshuaGlen@gmail.com",
"23 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14264",
"Smart Satch F8 Pro",
"Lewis Milton",
"/images/user15.png",
"lewisMilton@gmail.com",
"24 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
createData(
"#14265",
"Nord Fold ZL",
"Liam Ethan",
"/images/product7.png",
"liamEthan@gmail.com",
"25 Jan 2023",
"$289.50",
"Paid",
"successBadge",
),
].sort((a, b) => (a.orderID < b.orderID ? -1 : 1));
export default function InvoiceLists() {
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);
};
return (
<>
Invoice Lists
#
Product Name
Client Name
Issued Date
Total
Balance
Action
{(rowsPerPage > 0
? rows.slice(
page * rowsPerPage,
page * rowsPerPage + rowsPerPage
)
: rows
).map((row) => (
{row.orderID}
{row.productName}
{row.clientName}
{row.email}
{row.issuedDate}
{row.total}
{row.balance}
))}
{emptyRows > 0 && (
)}
>
);
}