copy()->startOfMonth(); $endOfMonth = $now->copy()->endOfMonth(); $startOfDay = Carbon::today()->startOfDay(); $endOfDay = Carbon::today()->endOfDay(); return Inertia::render('admin/Dashboard', [ 'topSuppliers' => $this->dashboardService->getTopSuppliers(), 'topCustomers' => $this->dashboardService->getTopCustomers(), 'topProducts' => $this->dashboardService->getTopProducts(), 'purchaseSummary' => $this->dashboardService->getPurchaseSummary($startOfDay, $endOfDay), 'cuttingSummary' => $this->dashboardService->getCuttingSummary(), 'cuttingByStatus' => $this->dashboardService->getCuttingByStatus(), 'orderStats' => $this->dashboardService->getOrderStats(), 'revenueSummary' => $this->dashboardService->getRevenueSummary($startOfDay, $endOfDay), 'marketplaceSummary' => $this->dashboardService->getMarketplaceSummary(), 'cashAccounts' => $this->dashboardService->getCashAccounts(), 'cashSummary' => $this->dashboardService->getCashSummary($startOfDay, $endOfDay), 'monthlyCashFlow' => $this->dashboardService->getMonthlyCashFlow(), 'monthlyExpenses' => $this->dashboardService->getMonthlyExpenses($startOfDay, $endOfDay), 'kasbonSummary' => $this->dashboardService->getKasbonSummary($startOfDay, $endOfDay), 'payrollSummary' => $this->dashboardService->getPayrollSummary($startOfMonth, $endOfMonth), 'employeeSummary' => $this->dashboardService->getEmployeeSummary(), 'attendanceToday' => $this->dashboardService->getAttendanceToday($startOfDay, $endOfDay), 'monthlyRevenueTrend' => $this->dashboardService->getMonthlyRevenueTrend(), 'monthlyPurchaseTrend' => $this->dashboardService->getMonthlyPurchaseTrend(), ]); } }