Purchase Overview Page

This commit is contained in:
efrilm 2025-09-09 16:17:25 +07:00
parent 5dc62b8390
commit 849013a08a
14 changed files with 1024 additions and 3 deletions

View File

@ -0,0 +1,86 @@
'use client'
import Grid from '@mui/material/Grid2'
import { TextField, Typography, useTheme } from '@mui/material'
import { useState } from 'react'
import { formatDateDDMMYYYY, formatForInputDate } from '@/utils/transform'
import PurchaseOverviewLeft from '@/views/apps/purchase/overview/overview-left'
import PurchaseOverviewRight from '@/views/apps/purchase/overview/overview-right'
const PurchaseOverviewPage = () => {
const theme = useTheme()
const today = new Date()
const monthAgo = new Date()
monthAgo.setDate(today.getDate() - 30)
const [filter, setFilter] = useState({
date_from: formatDateDDMMYYYY(monthAgo),
date_to: formatDateDDMMYYYY(today)
})
return (
<>
<Grid container spacing={6}>
<Grid size={{ xs: 12 }}>
<div className='flex gap-4 items-center justify-between'>
<Typography variant='h1' className='text-3xl font-bold text-gray-900 mb-2'>
Overview Pembelian
</Typography>
<div className='flex items-center gap-4'>
<TextField
type='date'
value={formatForInputDate(today || new Date())}
onChange={e => {
setFilter({
...filter,
date_from: formatDateDDMMYYYY(new Date(e.target.value))
})
}}
size='small'
sx={{
'& .MuiOutlinedInput-root': {
'&.Mui-focused fieldset': {
borderColor: 'primary.main'
},
'& fieldset': {
borderColor: theme.palette.mode === 'dark' ? 'rgba(231, 227, 252, 0.22)' : theme.palette.divider
}
}
}}
/>
<Typography>-</Typography>
<TextField
type='date'
value={today}
onChange={e => {}}
size='small'
sx={{
'& .MuiOutlinedInput-root': {
'&.Mui-focused fieldset': {
borderColor: 'primary.main'
},
'& fieldset': {
borderColor: theme.palette.mode === 'dark' ? 'rgba(231, 227, 252, 0.22)' : theme.palette.divider
}
}
}}
/>
</div>
</div>
</Grid>
</Grid>
<Grid container spacing={6} className='mt-5'>
<Grid size={{ xs: 12, lg: 8, md: 7 }}>
<PurchaseOverviewRight />
</Grid>
<Grid size={{ xs: 12, lg: 4, md: 5 }}>
<PurchaseOverviewLeft />
</Grid>
</Grid>
</>
)
}
export default PurchaseOverviewPage

View File

@ -26,7 +26,7 @@ const SalesOverviewPage = () => {
<Grid size={{ xs: 12 }}>
<div className='flex gap-4 items-center justify-between'>
<Typography variant='h1' className='text-3xl font-bold text-gray-900 mb-2'>
Orders Analysis Dashboard
Overview Penjualan
</Typography>
<div className='flex items-center gap-4'>
<TextField

View File

@ -95,6 +95,9 @@ const VerticalMenu = ({ dictionary, scrollMenu }: Props) => {
<MenuItem href={`/${locale}/apps/sales/overview`}>{dictionary['navigation'].overview}</MenuItem>
{/* <MenuItem href={`/${locale}/apps/user/view`}>{dictionary['navigation'].view}</MenuItem> */}
</SubMenu>
<SubMenu label={dictionary['navigation'].purchase_text} icon={<i className='tabler-user' />}>
<MenuItem href={`/${locale}/apps/purchase/overview`}>{dictionary['navigation'].overview}</MenuItem>
</SubMenu>
<SubMenu label={dictionary['navigation'].inventory} icon={<i className='tabler-salad' />}>
<SubMenu label={dictionary['navigation'].products}>
<MenuItem href={`/${locale}/apps/inventory/products/list`}>{dictionary['navigation'].list}</MenuItem>

View File

@ -113,6 +113,7 @@
"disabledMenu": "Disabled Menu",
"dailyReport": "Daily Report",
"vendor": "Vendor",
"sales": "Sales"
"sales": "Sales",
"purchase_text": "Purchase"
}
}

View File

@ -113,6 +113,7 @@
"disabledMenu": "Menu Nonaktif",
"dailyReport": "Laporan Harian",
"vendor": "Vendor",
"sales": "Penjualan"
"sales": "Penjualan",
"purchase_text": "Pembelian"
}
}

View File

@ -0,0 +1,106 @@
'use client'
// Next Imports
import dynamic from 'next/dynamic'
// MUI Imports
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
// Third Party Imports
import type { ApexOptions } from 'apexcharts'
// Components Imports
import OptionMenu from '@core/components/option-menu'
// Styled Component Imports
const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
// Vars
const series = [52.2]
const PurchasePaymentRatioGaugeChart = () => {
const options: ApexOptions = {
chart: {
type: 'radialBar',
sparkline: {
enabled: true
}
},
plotOptions: {
radialBar: {
startAngle: -90,
endAngle: 90,
track: {
background: '#e7e7e7',
strokeWidth: '97%',
margin: 5,
dropShadow: {
enabled: false
}
},
hollow: {
margin: 15,
size: '70%'
},
dataLabels: {
name: {
show: false
},
value: {
offsetY: -10,
fontSize: '32px',
fontWeight: 'bold',
color: '#1f2937',
formatter: function (val) {
return val + '%'
}
}
}
}
},
grid: {
padding: {
top: -10
}
},
fill: {
type: 'gradient',
gradient: {
shade: 'light',
shadeIntensity: 0.4,
inverseColors: false,
opacityFrom: 1,
opacityTo: 1,
stops: [0, 50, 53, 91]
}
},
colors: ['#3b82f6'],
stroke: {
dashArray: 4
},
labels: ['Rasio Lunas']
}
return (
<Card>
<CardHeader title='Rasio Lunas' action={<OptionMenu options={['View More', 'Delete']} />} />
<CardContent className='flex flex-col items-center pb-6'>
<AppReactApexCharts
id='rasio-lunas-gauge'
type='radialBar'
height={280}
width='100%'
series={series}
options={options}
/>
<div className='text-sm text-gray-500 text-center mt-4 max-w-xs'>
Tagihan Pembelian lunas vs total Tagihan Pembelian bulan ini
</div>
</CardContent>
</Card>
)
}
export default PurchasePaymentRatioGaugeChart

View File

@ -0,0 +1,218 @@
'use client'
// React Imports
import { useState } from 'react'
// Next Imports
import dynamic from 'next/dynamic'
// MUI Imports
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
import Button from '@mui/material/Button'
import ButtonGroup from '@mui/material/ButtonGroup'
import Table from '@mui/material/Table'
import TableBody from '@mui/material/TableBody'
import TableCell from '@mui/material/TableCell'
import TableContainer from '@mui/material/TableContainer'
import TableHead from '@mui/material/TableHead'
import TableRow from '@mui/material/TableRow'
import TableFooter from '@mui/material/TableFooter'
import Typography from '@mui/material/Typography'
// Third Party Imports
import type { ApexOptions } from 'apexcharts'
// Components Imports
import OptionMenu from '@core/components/option-menu'
// Styled Component Imports
const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
// Data
const productData = [
{ kategori: 'Dress', jumlah: 174, nilai: 70629279 },
{ kategori: 'Tshirt', jumlah: 163, nilai: 31667892 },
{ kategori: 'Shoes', jumlah: 27, nilai: 13473000 },
{ kategori: 'Misc', jumlah: 128, nilai: 123937 }
]
const totalJumlah = productData.reduce((sum, item) => sum + item.jumlah, 0)
const totalNilai = productData.reduce((sum, item) => sum + item.nilai, 0)
// Chart series and colors
const series = productData.map(item => item.nilai)
const colors = ['#FF6B9D', '#FFD93D', '#6BCF7F', '#4D96FF']
const PurchaseProductSalesChart = () => {
const [activeView, setActiveView] = useState<'chart' | 'table'>('chart')
const options: ApexOptions = {
chart: {
type: 'donut'
},
labels: productData.map(item => item.kategori),
colors: colors,
legend: {
position: 'bottom',
horizontalAlign: 'center',
fontSize: '14px',
markers: {
width: 12,
height: 12,
radius: 2
},
itemMargin: {
horizontal: 15,
vertical: 5
}
},
plotOptions: {
pie: {
donut: {
size: '70%'
}
}
},
dataLabels: {
enabled: false
},
tooltip: {
y: {
formatter: function (val) {
return 'Rp ' + val.toLocaleString('id-ID')
}
}
},
stroke: {
width: 2,
colors: ['#fff']
}
}
const formatCurrency = (amount: number): string => {
return amount.toLocaleString('id-ID')
}
return (
<Card className='mt-5'>
<CardHeader
title='Total Pembelian Bulan Ini'
action={
<div className='flex items-center gap-2'>
<div className='w-4 h-4 bg-gray-300 rounded cursor-pointer'></div>
<OptionMenu options={['View More', 'Delete']} />
</div>
}
/>
<CardContent>
{/* Toggle Buttons */}
<div className='flex justify-center mb-6'>
<ButtonGroup size='small'>
<Button
variant={activeView === 'chart' ? 'contained' : 'outlined'}
onClick={() => setActiveView('chart')}
sx={{
minWidth: '120px',
backgroundColor: activeView === 'chart' ? '#36175e' : 'transparent',
color: activeView === 'chart' ? 'white' : '#36175e',
borderColor: '#36175e',
'&:hover': {
backgroundColor: activeView === 'chart' ? '#36175e' : 'rgba(25, 118, 210, 0.04)'
}
}}
>
Jenis Produk
</Button>
<Button
variant={activeView === 'table' ? 'contained' : 'outlined'}
onClick={() => setActiveView('table')}
sx={{
minWidth: '120px',
backgroundColor: activeView === 'table' ? '#36175e' : 'transparent',
color: activeView === 'table' ? 'white' : '#36175e',
borderColor: '#36175e',
'&:hover': {
backgroundColor: activeView === 'table' ? '#36175e' : 'rgba(25, 118, 210, 0.04)'
}
}}
>
Kategori
</Button>
</ButtonGroup>
</div>
{/* Content based on active view */}
{activeView === 'chart' ? (
// Donut Chart View (Slide 1)
<div className='flex flex-col items-center'>
<AppReactApexCharts
id='product-sales-donut'
type='donut'
height={350}
width='100%'
series={series}
options={options}
/>
</div>
) : (
// Table View (Slide 2)
<TableContainer>
<Table>
<TableHead>
<TableRow>
<TableCell sx={{ fontWeight: 600 }}>Kategori</TableCell>
<TableCell align='center' sx={{ fontWeight: 600 }}>
Jml
</TableCell>
<TableCell align='right' sx={{ fontWeight: 600 }}>
Nilai
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{productData.map((row, index) => (
<TableRow key={index}>
<TableCell>{row.kategori}</TableCell>
<TableCell align='center'>{row.jumlah}</TableCell>
<TableCell align='right'>{formatCurrency(row.nilai)}</TableCell>
</TableRow>
))}
</TableBody>
<TableFooter>
<TableRow sx={{ backgroundColor: '#f5f5f5' }}>
<TableCell sx={{ fontWeight: 700, fontSize: '14px' }}>Total</TableCell>
<TableCell align='center' sx={{ fontWeight: 700, fontSize: '14px' }}>
{totalJumlah}
</TableCell>
<TableCell align='right' sx={{ fontWeight: 700, fontSize: '14px' }}>
{formatCurrency(totalNilai)}
</TableCell>
</TableRow>
</TableFooter>
</Table>
</TableContainer>
)}
{/* Two dot indicators at bottom */}
<div className='flex justify-center items-center gap-2 mt-6'>
<div
className={`w-3 h-3 rounded-full cursor-pointer transition-colors ${
activeView === 'chart' ? 'bg-primary' : 'bg-gray-300'
}`}
onClick={() => setActiveView('chart')}
></div>
<div
className={`w-3 h-3 rounded-full cursor-pointer transition-colors ${
activeView === 'table' ? 'bg-primary' : 'bg-gray-300'
}`}
onClick={() => setActiveView('table')}
></div>
</div>
</CardContent>
</Card>
)
}
export default PurchaseProductSalesChart

View File

@ -0,0 +1,187 @@
'use client'
// React Imports
import { useState } from 'react'
// Next Imports
import dynamic from 'next/dynamic'
// MUI Imports
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
import Button from '@mui/material/Button'
import ButtonGroup from '@mui/material/ButtonGroup'
import Table from '@mui/material/Table'
import TableBody from '@mui/material/TableBody'
import TableCell from '@mui/material/TableCell'
import TableContainer from '@mui/material/TableContainer'
import TableHead from '@mui/material/TableHead'
import TableRow from '@mui/material/TableRow'
import TableFooter from '@mui/material/TableFooter'
import Typography from '@mui/material/Typography'
// Third Party Imports
import type { ApexOptions } from 'apexcharts'
// Components Imports
import OptionMenu from '@core/components/option-menu'
// Styled Component Imports
const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
// Data
const customerData = [
{ pelanggan: 'Mumpuni Imam Rajata...', perusahaan: 'Fa Hassanah', nilai: 14117300 },
{ pelanggan: 'Balangga Saefullah M...', perusahaan: 'CV Siregar Prasetya Tbk', nilai: 12520640 },
{ pelanggan: 'Jais Mursita Adrians...', perusahaan: 'UD Sinaga Waluyo', nilai: 12174120 },
{ pelanggan: 'Paramita Wijayanti M...', perusahaan: 'PD Waluyo Yuniar', nilai: 11001060 },
{ pelanggan: 'Putri Puji Pertiwi S...', perusahaan: 'CV Wahyudin Tbk', nilai: 9175560 },
{ pelanggan: 'Lainnya', perusahaan: '', nilai: 63285770 }
]
const totalNilai = customerData.reduce((sum, item) => sum + item.nilai, 0)
// Chart series and colors
const series = customerData.map(item => item.nilai)
const colors = ['#FF6B9D', '#FFD93D', '#6BCF7F', '#4D96FF', '#B39DDB', '#E91E63']
const PurchaseVendorSalesChart = () => {
const [activeView, setActiveView] = useState<'chart' | 'table'>('chart')
const options: ApexOptions = {
chart: {
type: 'donut'
},
labels: customerData.map(item => item.pelanggan),
colors: colors,
legend: {
position: 'bottom',
horizontalAlign: 'center',
fontSize: '14px',
markers: {
width: 12,
height: 12,
radius: 2
},
itemMargin: {
horizontal: 15,
vertical: 5
}
},
plotOptions: {
pie: {
donut: {
size: '70%'
}
}
},
dataLabels: {
enabled: false
},
tooltip: {
y: {
formatter: function (val) {
return 'Rp ' + val.toLocaleString('id-ID')
}
}
},
stroke: {
width: 2,
colors: ['#fff']
}
}
const formatCurrency = (amount: number): string => {
return amount.toLocaleString('id-ID')
}
return (
<Card className='mt-5'>
<CardHeader
title='Pembelian Per Vendor Bulan Ini'
action={
<div className='flex items-center gap-2'>
<div className='w-4 h-4 bg-gray-300 rounded cursor-pointer'></div>
<OptionMenu options={['View More', 'Delete']} />
</div>
}
/>
<CardContent>
{/* Content based on active view */}
{activeView === 'chart' ? (
// Donut Chart View (Slide 1)
<div className='flex flex-col items-center'>
<AppReactApexCharts
id='customer-sales-donut'
type='donut'
height={350}
width='100%'
series={series}
options={options}
/>
</div>
) : (
// Table View (Slide 2)
<TableContainer>
<Table>
<TableHead>
<TableRow>
<TableCell sx={{ fontWeight: 600 }}>Vendor</TableCell>
<TableCell align='right' sx={{ fontWeight: 600 }}>
Nilai
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{customerData.map((row, index) => (
<TableRow key={index}>
<TableCell>
<div>
<Typography variant='body2' sx={{ fontWeight: 500 }}>
{row.pelanggan}
</Typography>
{row.perusahaan && (
<Typography variant='caption' color='text.secondary'>
{row.perusahaan}
</Typography>
)}
</div>
</TableCell>
<TableCell align='right'>{formatCurrency(row.nilai)}</TableCell>
</TableRow>
))}
</TableBody>
<TableFooter>
<TableRow sx={{ backgroundColor: '#f5f5f5' }}>
<TableCell sx={{ fontWeight: 700, fontSize: '14px' }}>Total</TableCell>
<TableCell align='right' sx={{ fontWeight: 700, fontSize: '14px' }}>
{formatCurrency(totalNilai)}
</TableCell>
</TableRow>
</TableFooter>
</Table>
</TableContainer>
)}
{/* Two dot indicators at bottom */}
<div className='flex justify-center items-center gap-2 mt-6'>
<div
className={`w-3 h-3 rounded-full cursor-pointer transition-colors ${
activeView === 'chart' ? 'bg-blue-500' : 'bg-gray-300'
}`}
onClick={() => setActiveView('chart')}
></div>
<div
className={`w-3 h-3 rounded-full cursor-pointer transition-colors ${
activeView === 'table' ? 'bg-blue-500' : 'bg-gray-300'
}`}
onClick={() => setActiveView('table')}
></div>
</div>
</CardContent>
</Card>
)
}
export default PurchaseVendorSalesChart

View File

@ -0,0 +1,15 @@
import PurchasePaymentRatioGaugeChart from './PurchasePaymentRatioGaugeChart'
import PurchaseProductSalesChart from './PurchaseProductChart'
import PurchaseVendorSalesChart from './PurchaseVendorSalesChart'
const PurchaseOverviewLeft = () => {
return (
<>
<PurchasePaymentRatioGaugeChart />
<PurchaseProductSalesChart />
<PurchaseVendorSalesChart />
</>
)
}
export default PurchaseOverviewLeft

View File

@ -0,0 +1,160 @@
'use client'
// Next Imports
import dynamic from 'next/dynamic'
// MUI Imports
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
// Third Party Imports
import type { ApexOptions } from 'apexcharts'
// Components Imports
import OptionMenu from '@core/components/option-menu'
// Styled Component Imports
const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
// Styles Imports
import './styles.css'
// Vars
const colors = {
tagihanPembelian: '#28C76F',
pembayaranPembelian: '#EA5455'
}
const labelColor = 'var(--mui-palette-text-disabled)'
const bodyColor = 'var(--mui-palette-text-secondary)'
const borderColor = 'var(--mui-palette-divider)'
const series = [
{
name: 'Tagihan Pembelian',
type: 'column',
data: [1250, 1180, 1350, 1450, 1200, 1520, 1380, 1150, 1650, 1400, 1290, 1700]
},
{
name: 'Pembayaran Pembelian',
type: 'column',
data: [950, 880, 1050, 1150, 900, 1220, 1080, 850, 1350, 1100, 990, 1400]
}
]
const PurchaseBillPaymentChart = () => {
const options: ApexOptions = {
chart: {
parentHeightOffset: 0,
stacked: false,
toolbar: {
show: false
},
zoom: {
enabled: false
}
},
tooltip: {
enabled: true,
y: {
formatter: function (val) {
return 'Rp ' + val.toLocaleString('id-ID') + '.000'
}
}
},
plotOptions: {
bar: {
horizontal: false,
columnWidth: '60%',
borderRadius: 4
}
},
dataLabels: {
enabled: false
},
xaxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des'],
labels: {
style: {
colors: labelColor,
fontSize: '13px',
fontFamily: 'Public Sans',
fontWeight: 400
}
},
axisBorder: {
show: false
},
axisTicks: {
show: false
}
},
yaxis: {
tickAmount: 5,
max: 1800,
min: 0,
labels: {
style: {
colors: labelColor,
fontSize: '13px',
fontFamily: 'Public Sans',
fontWeight: 400
},
formatter(val: number) {
return 'Rp ' + val + 'rb'
}
}
},
legend: {
markers: {
width: 8,
height: 8,
offsetX: -3,
radius: 12
},
height: 33,
offsetY: 10,
itemMargin: {
horizontal: 10,
vertical: 0
},
fontSize: '13px',
fontFamily: 'Public Sans',
fontWeight: 400,
labels: {
colors: bodyColor,
useSeriesColors: false
}
},
grid: {
borderColor,
strokeDashArray: 6
},
colors: [colors.tagihanPembelian, colors.pembayaranPembelian],
fill: {
opacity: 1
}
}
return (
<Card className='mt-5'>
<CardHeader
title='Tagihan Pembelian & Pembayaran Pembelian'
action={<OptionMenu options={['View More', 'Delete']} />}
/>
<CardContent>
<AppReactApexCharts
id='tagihan-pembayaran-pembelian'
type='bar'
height={360}
width='100%'
series={series}
options={options}
/>
</CardContent>
</Card>
)
}
export default PurchaseBillPaymentChart

View File

@ -0,0 +1,62 @@
// MUI Imports
import Grid from '@mui/material/Grid2'
// Type Imports
import type { UserDataType } from '@components/card-statistics/HorizontalWithSubtitle'
// Component Imports
import HorizontalWithSubtitle from '@components/card-statistics/HorizontalWithSubtitle'
// Vars
const data: UserDataType[] = [
{
title: 'PEMBELIAN',
stats: '12.932.460',
avatarIcon: 'tabler-trending-up',
avatarColor: 'success',
trend: 'positive',
trendNumber: '114,7%',
subtitle: '15 Tagihan Pembelian Bulan Ini'
},
{
title: 'PEMBAYARAN PEMBELIAN DIKIRIM',
stats: '2.573.790',
avatarIcon: 'tabler-trending-down',
avatarColor: 'error',
trend: 'negative',
trendNumber: '34,0%',
subtitle: '5 Tagihan Pembelian Bulan Ini'
},
{
title: 'MENUNGGU PEMBAYARAN PEMBELIAN',
stats: '10.358.670',
avatarIcon: 'tabler-trending-up',
avatarColor: 'success',
trend: 'positive',
trendNumber: '380,6%',
subtitle: '10 Tagihan Pembelian'
},
{
title: 'JATUH TEMPO TAGIHAN PEMBELIAN',
stats: '6.033.000',
avatarIcon: 'tabler-clock-exclamation',
avatarColor: 'error',
trend: 'neutral',
trendNumber: '100%',
subtitle: '6 Tagihan Pembelian'
}
]
const PurchaseOverviewCards = () => {
return (
<Grid container spacing={6}>
{data.map((item, i) => (
<Grid key={i} size={{ xs: 12, sm: 6 }}>
<HorizontalWithSubtitle {...item} />
</Grid>
))}
</Grid>
)
}
export default PurchaseOverviewCards

View File

@ -0,0 +1,152 @@
'use client'
// Next Imports
import dynamic from 'next/dynamic'
// MUI Imports
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
// Third Party Imports
import type { ApexOptions } from 'apexcharts'
// Components Imports
import OptionMenu from '@core/components/option-menu'
// Styled Component Imports
const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
// Styles Imports
import './styles.css'
// Vars
const labelColor = 'var(--mui-palette-text-disabled)'
const bodyColor = 'var(--mui-palette-text-secondary)'
const borderColor = 'var(--mui-palette-divider)'
const series = [
{
name: 'Pembayaran Diterima',
data: [0, 0, 0, 0, 0, 67000000]
}
]
const PurchasePaymentReceivedChart = () => {
const options: ApexOptions = {
chart: {
parentHeightOffset: 0,
toolbar: {
show: false
},
zoom: {
enabled: false
}
},
stroke: {
width: 3,
curve: 'smooth'
},
markers: {
size: 6,
colors: ['#00CFE8'],
strokeColors: '#fff',
strokeWidth: 2,
hover: {
size: 8
}
},
tooltip: {
enabled: true,
y: {
formatter: function (val) {
return 'Rp ' + val.toLocaleString('id-ID')
}
}
},
dataLabels: {
enabled: false
},
xaxis: {
categories: ['2020', '2021', '2022', '2023', '2024', '2025'],
labels: {
style: {
colors: labelColor,
fontSize: '13px',
fontFamily: 'Public Sans',
fontWeight: 400
}
},
axisBorder: {
show: false
},
axisTicks: {
show: false
}
},
yaxis: {
tickAmount: 7,
max: 70000000,
min: 0,
labels: {
style: {
colors: labelColor,
fontSize: '13px',
fontFamily: 'Public Sans',
fontWeight: 400
},
formatter(val: number) {
if (val === 0) return '0'
return (val / 1000000).toFixed(0) + '.000.000'
}
}
},
legend: {
show: false
},
grid: {
borderColor,
strokeDashArray: 6,
xaxis: {
lines: {
show: true
}
},
yaxis: {
lines: {
show: true
}
}
},
colors: ['#00CFE8'],
fill: {
opacity: 1
}
}
return (
<Card className='mt-5'>
<CardHeader
title='Pembayaran'
action={
<div className='flex items-center gap-2'>
<div className='w-4 h-4 bg-gray-300 rounded cursor-pointer'></div>
<OptionMenu options={['View More', 'Delete']} />
</div>
}
/>
<CardContent>
<AppReactApexCharts
id='pembayaran-diterima'
type='line'
height={360}
width='100%'
series={series}
options={options}
/>
</CardContent>
</Card>
)
}
export default PurchasePaymentReceivedChart

View File

@ -0,0 +1,15 @@
import PurchaseBillPaymentChart from './PurchaseBillPaymentChart'
import PurchaseOverviewCards from './PurchaseOverviewCards'
import PurchasePaymentReceivedChart from './PurchasePaymentReceivedChart'
const PurchaseOverviewRight = () => {
return (
<>
<PurchaseOverviewCards />
<PurchaseBillPaymentChart />
<PurchasePaymentReceivedChart />
</>
)
}
export default PurchaseOverviewRight

View File

@ -0,0 +1,15 @@
#tagihan-pembayaran-pembelian .apexcharts-legend .apexcharts-legend-series {
border: 1px solid var(--mui-palette-divider);
border-radius: var(--mui-shape-borderRadius);
block-size: 83%;
padding-block: 4px;
padding-inline: 16px;
}
#pembayaran-diterima .apexcharts-legend .apexcharts-legend-series {
border: 1px solid var(--mui-palette-divider);
border-radius: var(--mui-shape-borderRadius);
block-size: 83%;
padding-block: 4px;
padding-inline: 16px;
}