fix:매니저 드롭다운 API 호출 제거, 서버사이드 렌더링으로 변경

- 기존: 드롭다운 열 때 API 호출 → 로딩 스피너 문제
- 변경: 컨트롤러에서 allManagers 전달 → 즉시 렌더링
- 로딩 상태 제거로 UX 개선

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
pro
2026-01-29 07:05:45 +09:00
parent f1f9ff4148
commit 0a0afe1df0
2 changed files with 48 additions and 71 deletions

View File

@@ -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',