query('start_date') ? Carbon::parse($request->query('start_date'))->startOfDay() : null; $endDate = $request->query('end_date') ? Carbon::parse($request->query('end_date'))->endOfDay() : null; return Inertia::render('admin/Analysis', [ 'filters' => [ 'start_date' => $request->query('start_date', ''), 'end_date' => $request->query('end_date', ''), ], 'rawMaterialStock' => $this->dashboardService->getRawMaterialStock(), 'productStock' => $this->dashboardService->getProductStock(), 'kasbonSummary' => $this->dashboardService->getKasbonSummary($startDate, $endDate), 'leaveRequestSummary' => $this->dashboardService->getLeaveRequestSummary($startDate, $endDate), 'lowStockProducts' => $this->dashboardService->getLowStockProducts(), 'lowStockMaterials' => $this->dashboardService->getLowStockMaterials(), 'attendanceToday' => $this->dashboardService->getAttendanceToday($startDate, $endDate), 'cashAccounts' => $this->dashboardService->getCashAccounts(), 'cashSummary' => $this->dashboardService->getCashSummary($startDate, $endDate), 'purchaseSummary' => $this->dashboardService->getPurchaseSummary($startDate, $endDate), 'monthlyExpenses' => $this->dashboardService->getMonthlyExpenses($startDate, $endDate), 'revenueSummary' => $this->dashboardService->getRevenueSummary($startDate, $endDate), ]); } }