- Orders Analysis Dashboard
+ Overview Penjualan
{
{/* */}
+ }>
+
+
}>
diff --git a/src/data/dictionaries/en.json b/src/data/dictionaries/en.json
index 30b4549..c20fde3 100644
--- a/src/data/dictionaries/en.json
+++ b/src/data/dictionaries/en.json
@@ -113,6 +113,7 @@
"disabledMenu": "Disabled Menu",
"dailyReport": "Daily Report",
"vendor": "Vendor",
- "sales": "Sales"
+ "sales": "Sales",
+ "purchase_text": "Purchase"
}
}
diff --git a/src/data/dictionaries/id.json b/src/data/dictionaries/id.json
index 6dd0497..7c4c7fe 100644
--- a/src/data/dictionaries/id.json
+++ b/src/data/dictionaries/id.json
@@ -113,6 +113,7 @@
"disabledMenu": "Menu Nonaktif",
"dailyReport": "Laporan Harian",
"vendor": "Vendor",
- "sales": "Penjualan"
+ "sales": "Penjualan",
+ "purchase_text": "Pembelian"
}
}
diff --git a/src/views/apps/purchase/overview/overview-left/PurchasePaymentRatioGaugeChart.tsx b/src/views/apps/purchase/overview/overview-left/PurchasePaymentRatioGaugeChart.tsx
new file mode 100644
index 0000000..ce31584
--- /dev/null
+++ b/src/views/apps/purchase/overview/overview-left/PurchasePaymentRatioGaugeChart.tsx
@@ -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 (
+
+ } />
+
+
+
+ Tagihan Pembelian lunas vs total Tagihan Pembelian bulan ini
+
+
+
+ )
+}
+
+export default PurchasePaymentRatioGaugeChart
diff --git a/src/views/apps/purchase/overview/overview-left/PurchaseProductChart.tsx b/src/views/apps/purchase/overview/overview-left/PurchaseProductChart.tsx
new file mode 100644
index 0000000..589da6f
--- /dev/null
+++ b/src/views/apps/purchase/overview/overview-left/PurchaseProductChart.tsx
@@ -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 (
+
+
+
+
+
+ }
+ />
+
+ {/* Toggle Buttons */}
+
+
+
+
+
+
+
+ {/* Content based on active view */}
+ {activeView === 'chart' ? (
+ // Donut Chart View (Slide 1)
+
+ ) : (
+ // Table View (Slide 2)
+
+
+
+
+ Kategori
+
+ Jml
+
+
+ Nilai
+
+
+
+
+ {productData.map((row, index) => (
+
+ {row.kategori}
+ {row.jumlah}
+ {formatCurrency(row.nilai)}
+
+ ))}
+
+
+
+ Total
+
+ {totalJumlah}
+
+
+ {formatCurrency(totalNilai)}
+
+
+
+
+
+ )}
+
+ {/* Two dot indicators at bottom */}
+
+
setActiveView('chart')}
+ >
+
setActiveView('table')}
+ >
+
+
+
+ )
+}
+
+export default PurchaseProductSalesChart
diff --git a/src/views/apps/purchase/overview/overview-left/PurchaseVendorSalesChart.tsx b/src/views/apps/purchase/overview/overview-left/PurchaseVendorSalesChart.tsx
new file mode 100644
index 0000000..f915817
--- /dev/null
+++ b/src/views/apps/purchase/overview/overview-left/PurchaseVendorSalesChart.tsx
@@ -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 (
+
+
+
+
+
+ }
+ />
+