feat: ingredient product

This commit is contained in:
ferdiansyah783
2025-08-12 21:29:24 +07:00
parent c3780af341
commit f3dfad4cb3
36 changed files with 1731 additions and 465 deletions
@@ -16,6 +16,7 @@ import { formatShortCurrency } from '../../../utils/transform'
type Props = {
title: string
value: number
isCurrency: boolean
isLoading: boolean
avatarIcon: string
avatarSkin?: CustomAvatarProps['skin']
@@ -26,12 +27,12 @@ type Props = {
const DistributedBarChartOrder = ({
title,
value,
isCurrency = false,
isLoading,
avatarIcon,
avatarSkin,
avatarColor
}: Props) => {
if (isLoading) {
return <Skeleton sx={{ bgcolor: 'grey.100' }} variant='rectangular' width={300} height={118} />
}
@@ -45,7 +46,7 @@ const DistributedBarChartOrder = ({
{title}
</Typography>
<Typography color='text.primary' variant='h4'>
{formatShortCurrency(value)}
{isCurrency ? 'Rp ' + formatShortCurrency(value) : formatShortCurrency(value)}
</Typography>
</div>
<CustomAvatar variant='rounded' skin={avatarSkin} size={52} color={avatarColor}>