import FusePageSimple from "@fuse/core/FusePageSimple"; import FuseSvgIcon from "@fuse/core/FuseSvgIcon"; import { Button, Paper, Table, TableBody, TableCell, TableHead, TableRow, Typography, styled, } from "@mui/material"; import clsx from "clsx"; import { format } from "date-fns"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; const Root = styled(FusePageSimple)(({ theme }) => ({ "& .FusePageSimple-header": { backgroundColor: theme.palette.background.paper, boxShadow: `inset 0 0 0 1px ${theme.palette.divider}`, }, })); const ListInvoiceRender = () => { const { t } = useTranslation("invoicePage"); const columns = [ "Número factura", "Fecha", "Cliente", "Identificación", "Valor", "Estado", "Acciones", ]; const rows = [ { id: "528651571NT", date: "2019-10-07T22:22:37.274Z", name: "Morgan Page", identification: "17215896114", amount: 1358.75, status: "completed", action: true, }, { id: "421436904YT", date: "2019-12-18T14:51:24.461Z", name: "Nita Hebert", identification: "17215896114", amount: -1042.82, status: "completed", action: true, }, { id: "685377421YT", date: "2019-12-25T17:52:14.304Z", name: "Marsha Chambers", identification: "17215896114", amount: 1828.16, status: "pending", action: true, }, { id: "884960091RT", date: "2019-11-29T06:32:16.111Z", name: "Charmaine Jackson", identification: "17215896114", amount: 1647.55, status: "completed", action: true, }, { id: "361402213NT", date: "2019-11-24T12:13:23.064Z", name: "Maura Carey", identification: "17215896114", amount: -927.43, status: "completed", action: true, }, { id: "361402213NT", date: "2019-11-24T12:13:23.064Z", name: "Maura Carey", identification: "17215896114", amount: -927.43, status: "completed", action: true, }, { id: "361402213NT", date: "2019-11-24T12:13:23.064Z", name: "Maura Carey", identification: "17215896114", amount: -927.43, status: "completed", action: true, }, { id: "361402213NT", date: "2019-11-24T12:13:23.064Z", name: "Maura Carey", identification: "17215896114", amount: -927.43, status: "completed", action: true, }, ]; return (

{t("TITLE")}

} content={
{t("TITLE_TABLE")} 1 pendiente, 4 completadas
{columns.map((column, index) => ( {column} ))} {rows.map((row, index) => ( {Object.entries(row).map(([key, value]) => { switch (key) { case "id": { return ( {value} ); } case "date": { return ( { // @ts-ignore format(new Date(value), "dd/MM/yyyy") } ); } case "amount": { return ( {value.toLocaleString("en-US", { style: "currency", currency: "USD", })} ); } case "status": { return ( {value} ); } case "action": { return ( ); } default: { return ( {value} ); } } })} ))}
} /> ); }; export default ListInvoiceRender;