fix:매니저 드롭다운 API 호출 제거, 서버사이드 렌더링으로 변경
- 기존: 드롭다운 열 때 API 호출 → 로딩 스피너 문제 - 변경: 컨트롤러에서 allManagers 전달 → 즉시 렌더링 - 로딩 상태 제거로 UX 개선 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,12 @@ private function getDashboardData(Request $request): array
|
||||
->get()
|
||||
->keyBy('tenant_id');
|
||||
|
||||
// HQ 매니저 목록 (드롭다운용) - 본인 제외
|
||||
$allManagers = User::whereHas('tenants', function ($query) {
|
||||
$query->where('tenant_type', 'HQ');
|
||||
})->where('id', '!=', auth()->id())
|
||||
->get(['id', 'name', 'email']);
|
||||
|
||||
return compact(
|
||||
'stats',
|
||||
'commissionByRole',
|
||||
@@ -124,6 +130,7 @@ private function getDashboardData(Request $request): array
|
||||
'tenantStats',
|
||||
'tenants',
|
||||
'managements',
|
||||
'allManagers',
|
||||
'period',
|
||||
'year',
|
||||
'month',
|
||||
|
||||
Reference in New Issue
Block a user