source: src/sections/invoice/invoice-analytic.tsx@ 5d6f37a

main
Last change on this file since 5d6f37a was 5d6f37a, checked in by Naum Shapkarovski <naumshapkarovski@…>, 7 weeks ago

add customer

  • Property mode set to 100644
File size: 2.0 KB
Line 
1// @mui
2import { alpha } from '@mui/material/styles';
3import Box from '@mui/material/Box';
4import Stack from '@mui/material/Stack';
5import Typography from '@mui/material/Typography';
6import CircularProgress from '@mui/material/CircularProgress';
7// utils
8import { fShortenNumber, fCurrency } from 'src/utils/format-number';
9// components
10import Iconify from 'src/components/iconify';
11
12// ----------------------------------------------------------------------
13
14interface StatusTotals {
15 EUR: number;
16 USD: number;
17}
18
19type Props = {
20 icon: string;
21 title: string;
22 total: number;
23 percent: number;
24 price: StatusTotals;
25 color?: string;
26};
27
28export default function InvoiceAnalytic({ title, total, icon, color, percent, price }: Props) {
29 return (
30 <Stack
31 spacing={2.5}
32 direction="row"
33 alignItems="center"
34 justifyContent="center"
35 sx={{ width: 1, minWidth: 200 }}
36 >
37 <Stack alignItems="center" justifyContent="center" sx={{ position: 'relative' }}>
38 <Iconify icon={icon} width={32} sx={{ color, position: 'absolute' }} />
39
40 <CircularProgress
41 variant="determinate"
42 value={percent}
43 size={56}
44 thickness={2}
45 sx={{ color, opacity: 0.48 }}
46 />
47
48 <CircularProgress
49 variant="determinate"
50 value={100}
51 size={56}
52 thickness={3}
53 sx={{
54 top: 0,
55 left: 0,
56 opacity: 0.48,
57 position: 'absolute',
58 color: (theme) => alpha(theme.palette.grey[500], 0.16),
59 }}
60 />
61 </Stack>
62
63 <Stack spacing={0.5}>
64 <Typography variant="subtitle1">{title}</Typography>
65
66 <Box component="span" sx={{ color: 'text.disabled', typography: 'body2' }}>
67 {fShortenNumber(total)} invoices
68 </Box>
69
70 <Typography variant="subtitle2">{fCurrency(price.USD, 'USD')}</Typography>
71 <Typography variant="subtitle2">{fCurrency(price.EUR, 'EUR')}</Typography>
72 </Stack>
73 </Stack>
74 );
75}
Note: See TracBrowser for help on using the repository browser.