resolveBusiness($request); if (! $business) { return $this->jsonError('کسب‌وکار یافت نشد.', 404); } return $this->jsonSuccess([ 'stats' => $this->dashboardService->getStats($business), 'recent_activities' => $this->dashboardService->getRecentActivities($business), 'charts' => $this->dashboardService->getChartData($business), ]); } public function calendar(Request $request) { $business = $this->resolveBusiness($request); if (! $business) { return $this->jsonError('کسب‌وکار یافت نشد.', 404); } $start = $request->get('start', now()->startOfMonth()->toDateString()); $end = $request->get('end', now()->endOfMonth()->toDateString()); return $this->jsonSuccess( $this->dashboardService->getCalendarEvents($business, $start, $end) ); } }