'use client' import DateRangePicker from '@/components/RangeDatePicker' import { ReportItem, ReportItemFooter, ReportItemHeader, ReportItemSubheader } from '@/components/report/ReportItem' import { ProfitLossReport } from '@/types/services/analytic' import { Button, Card, CardContent, Box } from '@mui/material' interface ReportProfitLossContentProps { profitData: ProfitLossReport | undefined startDate: Date | null endDate: Date | null onStartDateChange: (date: Date | null) => void onEndDateChange: (date: Date | null) => void } // Utility function to format date for display const formatDisplayDate = (dateString: string) => { const date = new Date(dateString) return date.toLocaleDateString('id-ID', { day: '2-digit', month: '2-digit', year: 'numeric' }) } const ReportProfitLossContent = ({ profitData, startDate, endDate, onStartDateChange, onEndDateChange }: ReportProfitLossContentProps) => { const handleExport = () => { // TODO: Implement export functionality console.log('Export data:', profitData) } return (
{profitData ? ( <> {/* Summary Section */} {}} /> {}} /> {/* Daily Data Breakdown Section */} {profitData.data && profitData.data.length > 0 && ( <> {profitData.data.map((dailyData, index) => (
{}} /> {}} /> {}} /> {}} /> {}} /> {}} />
))} )} {/* Operational Costs Section */} {}} /> {}} /> ) : ( No data available )}
) } export default ReportProfitLossContent