// ** MUI Imports import Grid from '@mui/material/Grid' import Card from '@mui/material/Card' import Table from '@mui/material/Table' import Divider from '@mui/material/Divider' import TableRow from '@mui/material/TableRow' import TableHead from '@mui/material/TableHead' import TableBody from '@mui/material/TableBody' import Typography from '@mui/material/Typography' import Box, { BoxProps } from '@mui/material/Box' import CardContent from '@mui/material/CardContent' import { styled, useTheme } from '@mui/material/styles' import TableContainer from '@mui/material/TableContainer' import TableCell, { TableCellBaseProps } from '@mui/material/TableCell' // ** Configs import themeConfig from 'src/configs/themeConfig' // ** Types import { SingleInvoiceType } from 'src/types/apps/invoiceTypes' interface Props { data: SingleInvoiceType } const MUITableCell = styled(TableCell)(({ theme }) => ({ borderBottom: 0, padding: `${theme.spacing(1, 0)} !important` })) const CalcWrapper = styled(Box)(({ theme }) => ({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', '&:not(:last-of-type)': { marginBottom: theme.spacing(2) } })) const PreviewCard = ({ data }: Props) => { // ** Hook const theme = useTheme() if (data) { return ( {themeConfig.templateName} Office 149, 450 South Brand Brooklyn San Diego County, CA 91905, USA +1 (123) 456 7891, +44 (876) 543 2198 Invoice {`#${data.invoice.id}`} Date Issued: {data.invoice.issuedDate} Date Due: {data.invoice.dueDate}
`${theme.spacing(6.5)} !important`, mb: theme => `${theme.spacing(5.5)} !important` }} /> Invoice To: {data.invoice.name} {data.invoice.company} {data.invoice.address} {data.invoice.contact} {data.invoice.companyEmail}
Bill To: Total Due: {data.paymentDetails.totalDue} Bank name: {data.paymentDetails.bankName} Country: {data.paymentDetails.country} IBAN: {data.paymentDetails.iban} SWIFT code: {data.paymentDetails.swiftCode}
`${theme.spacing(6.5)} !important`, mb: '0 !important' }} /> Item Description hours qty Total Premium Branding Package Branding & Promotion 48 1 $32 Social Media Social media templates 42 1 $28 Web Design Web designing package 46 1 $24 SEO Search engine optimization 40 1 $22
Salesperson: Tommy Shelby Thanks for your business Subtotal: $1800 Discount: $28 Tax: 21% `${theme.spacing(5)} !important`, mb: theme => `${theme.spacing(3)} !important` }} /> Total: $1690 `${theme.spacing(4.5)} !important`, mb: '0 !important' }} /> Note: It was a pleasure working with you and your team. We hope you will keep us in mind for future freelance projects. Thank You!
) } else { return null } } export default PreviewCard