-
{stats}
+
{stats}
{`(${trend === 'negative' ? '-' : '+'}${trendNumber})`}
diff --git a/src/components/report/ReportItem.tsx b/src/components/report/ReportItem.tsx
index bfa61ec..42c570f 100644
--- a/src/components/report/ReportItem.tsx
+++ b/src/components/report/ReportItem.tsx
@@ -4,7 +4,8 @@ import { Box, Typography, Paper } from '@mui/material'
// Types
type ReportItemHeaderProps = {
title: string
- date: string
+ date?: string
+ amount?: number
}
type ReportItemSubheaderProps = {
@@ -34,14 +35,14 @@ const formatCurrency = (amount: number) => {
}
// ReportItemHeader Component
-export const ReportItemHeader: React.FC
= ({ title, date }) => {
+export const ReportItemHeader: React.FC = ({ title, date, amount }) => {
return (
{title}
- {date}
+ {amount ? formatCurrency(amount) : date}
)
diff --git a/src/views/apps/report/profit-loss/ReportProfitLossCard.tsx b/src/views/apps/report/profit-loss/ReportProfitLossCard.tsx
new file mode 100644
index 0000000..a114637
--- /dev/null
+++ b/src/views/apps/report/profit-loss/ReportProfitLossCard.tsx
@@ -0,0 +1,98 @@
+// 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: 'Pendapatan',
+ stats: '29.004.775',
+ avatarIcon: 'tabler-trending-down',
+ avatarColor: 'error',
+ trend: 'negative',
+ trendNumber: '48,8%',
+ subtitle: 'vs Bulan Lalu'
+ },
+ {
+ title: 'Margin Laba Bersih',
+ stats: '38%',
+ avatarIcon: 'tabler-gauge',
+ avatarColor: 'success',
+ trend: 'positive',
+ trendNumber: 'Bulan Ini',
+ subtitle: 'Bulan Ini'
+ },
+ {
+ title: 'Laba Kotor',
+ stats: '21.076.389',
+ avatarIcon: 'tabler-trending-down',
+ avatarColor: 'error',
+ trend: 'negative',
+ trendNumber: '43,5%',
+ subtitle: 'vs bulan lalu'
+ },
+ {
+ title: 'Laba Bersih',
+ stats: '11.111.074',
+ avatarIcon: 'tabler-trending-down',
+ avatarColor: 'error',
+ trend: 'negative',
+ trendNumber: '36,8%',
+ subtitle: 'vs bulan lalu'
+ },
+ {
+ title: 'Margin Laba Kotor',
+ stats: '73%',
+ avatarIcon: 'tabler-gauge',
+ avatarColor: 'success',
+ trend: 'positive',
+ trendNumber: 'Bulan Ini',
+ subtitle: 'Bulan Ini'
+ },
+ {
+ title: 'Biaya Operasional',
+ stats: '9.965.315',
+ avatarIcon: 'tabler-trending-down',
+ avatarColor: 'error',
+ trend: 'negative',
+ trendNumber: '49,4%',
+ subtitle: 'vs Bulan Lalu'
+ },
+ {
+ title: 'Rasio Biaya Operasional',
+ stats: '61,7%',
+ avatarIcon: 'tabler-gauge',
+ avatarColor: 'success',
+ trend: 'positive',
+ trendNumber: 'Bulan Ini',
+ subtitle: 'Bulan Ini'
+ },
+ {
+ title: 'EBITDA',
+ stats: '11.032.696',
+ avatarIcon: 'tabler-trending-down',
+ avatarColor: 'error',
+ trend: 'negative',
+ trendNumber: '37,3%',
+ subtitle: 'vs bulan lalu'
+ }
+]
+
+const ReportProfitLossCard = () => {
+ return (
+
+ {data.map((item, i) => (
+
+
+
+ ))}
+
+ )
+}
+
+export default ReportProfitLossCard
diff --git a/src/views/apps/report/profit-loss/ReportProfitLossContent.tsx b/src/views/apps/report/profit-loss/ReportProfitLossContent.tsx
new file mode 100644
index 0000000..8bb09ee
--- /dev/null
+++ b/src/views/apps/report/profit-loss/ReportProfitLossContent.tsx
@@ -0,0 +1,117 @@
+'use client'
+
+import DateRangePicker from '@/components/RangeDatePicker'
+import { ReportItem, ReportItemFooter, ReportItemHeader, ReportItemSubheader } from '@/components/report/ReportItem'
+import { Button, Card, CardContent, Paper } from '@mui/material'
+import { useState } from 'react'
+
+const ReportProfitLossContent = () => {
+ const [startDate, setStartDate] = useState(new Date())
+ const [endDate, setEndDate] = useState(new Date())
+
+ return (
+
+
+
+ }
+ className='max-sm:is-full'
+ >
+ Ekspor
+
+
+
+
+
+
+
+ {}} />
+
+ {}}
+ />
+ {}} />
+ {}}
+ />
+
+
+
+
+ {}} />
+ {}} />
+
+
+
+
+
+
+
+
+ {}} />
+ {}}
+ />
+ {}} />
+ {}}
+ />
+ {}} />
+ {}} />
+ {}} />
+ {}} />
+ {}} />
+ {}} />
+ {}} />
+ {}} />
+ {}} />
+ {}} />
+ {}}
+ />
+ {}} />
+ {}} />
+ {}} />
+
+
+ {}}
+ />
+ {}} />
+ {}} />
+ {}} />
+
+
+
+
+
+
+ )
+}
+
+export default ReportProfitLossContent