2024-01-31 07:20:36 +00:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
|
|
// material-ui
|
|
|
|
|
import { Box, Chip, Grid, Stack, Typography } from '@mui/material';
|
|
|
|
|
|
|
|
|
|
// project import
|
|
|
|
|
import MainCard from 'components/cards/MainCard';
|
|
|
|
|
|
|
|
|
|
// assets
|
|
|
|
|
import { RiseOutlined, FallOutlined } from '@ant-design/icons';
|
|
|
|
|
|
|
|
|
|
// ==============================|| STATISTICS - ECOMMERCE CARD ||============================== //
|
|
|
|
|
|
|
|
|
|
const AnalyticEcommerce = ({ color, title, count, percentage, isLoss, extra }) => (
|
|
|
|
|
<MainCard contentSX={{ p: 2.25 }}>
|
|
|
|
|
<Stack spacing={0.5}>
|
|
|
|
|
<Typography variant="h6" color="textSecondary">
|
|
|
|
|
{title}
|
|
|
|
|
</Typography>
|
|
|
|
|
<Grid container alignItems="center">
|
|
|
|
|
<Grid item>
|
|
|
|
|
<Typography variant="h4" color="inherit">
|
|
|
|
|
{count}
|
|
|
|
|
</Typography>
|
|
|
|
|
</Grid>
|
|
|
|
|
{percentage && (
|
|
|
|
|
<Grid item>
|
|
|
|
|
<Chip
|
|
|
|
|
variant="combined"
|
|
|
|
|
color={color}
|
|
|
|
|
icon={
|
|
|
|
|
<>
|
|
|
|
|
{!isLoss && <RiseOutlined style={{ fontSize: '0.75rem', color: 'inherit' }} />}
|
|
|
|
|
{isLoss && <FallOutlined style={{ fontSize: '0.75rem', color: 'inherit' }} />}
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
label={`${percentage}%`}
|
|
|
|
|
sx={{ ml: 1.25, pl: 1 }}
|
|
|
|
|
size="small"
|
|
|
|
|
/>
|
|
|
|
|
</Grid>
|
|
|
|
|
)}
|
|
|
|
|
</Grid>
|
|
|
|
|
</Stack>
|
|
|
|
|
<Box sx={{ pt: 2.25 }}>
|
|
|
|
|
<Typography variant="caption" color="textSecondary">
|
2024-02-06 08:35:59 +00:00
|
|
|
지난달{' '}
|
2024-01-31 07:20:36 +00:00
|
|
|
<Typography component="span" variant="caption" sx={{ color: `${color || 'primary'}.main` }}>
|
|
|
|
|
{extra}
|
|
|
|
|
</Typography>{' '}
|
2024-02-07 05:57:15 +00:00
|
|
|
건이 기록되었습니다.
|
2024-01-31 07:20:36 +00:00
|
|
|
</Typography>
|
|
|
|
|
</Box>
|
|
|
|
|
</MainCard>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
AnalyticEcommerce.propTypes = {
|
|
|
|
|
color: PropTypes.string,
|
|
|
|
|
title: PropTypes.string,
|
|
|
|
|
count: PropTypes.string,
|
|
|
|
|
percentage: PropTypes.number,
|
|
|
|
|
isLoss: PropTypes.bool,
|
|
|
|
|
extra: PropTypes.oneOfType([PropTypes.node, PropTypes.string])
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
AnalyticEcommerce.defaultProps = {
|
|
|
|
|
color: 'primary'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default AnalyticEcommerce;
|