From 92640e9237c4742e493d6740cb07a526e67d32bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Mon, 2 Feb 2026 17:28:04 +0900 Subject: [PATCH] =?UTF-8?q?debug:=EB=A7=A4=EB=8B=88=EC=A0=80=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EB=A1=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80=20(?= =?UTF-8?q?=EC=9E=84=EC=8B=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Sales/SalesDashboardController.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/Http/Controllers/Sales/SalesDashboardController.php b/app/Http/Controllers/Sales/SalesDashboardController.php index 27045ff2..3f93de03 100644 --- a/app/Http/Controllers/Sales/SalesDashboardController.php +++ b/app/Http/Controllers/Sales/SalesDashboardController.php @@ -784,6 +784,11 @@ public function searchManagers(Request $request): JsonResponse { $query = $request->input('q', ''); + // 디버깅: 전체 매니저 수 확인 + $totalManagers = User::whereHas('userRoles.role', fn($q) => $q->where('name', 'manager')) + ->where('is_active', true) + ->count(); + $managers = User::whereHas('userRoles.role', fn($q) => $q->where('name', 'manager')) ->where('is_active', true) ->where('id', '!=', auth()->id()) @@ -796,6 +801,14 @@ public function searchManagers(Request $request): JsonResponse ->limit(10) ->get(['id', 'name', 'email']); + \Log::info('searchManagers 호출', [ + 'query' => $query, + 'auth_id' => auth()->id(), + 'total_managers' => $totalManagers, + 'result_count' => $managers->count(), + 'results' => $managers->pluck('name')->toArray(), + ]); + return response()->json([ 'success' => true, 'managers' => $managers,