diff --git a/app/Http/Controllers/Sales/SalesDashboardController.php b/app/Http/Controllers/Sales/SalesDashboardController.php index b00e74b9..b869b689 100644 --- a/app/Http/Controllers/Sales/SalesDashboardController.php +++ b/app/Http/Controllers/Sales/SalesDashboardController.php @@ -278,6 +278,12 @@ public function refreshTenantList(Request $request): View // 두 목록 합치기 (중복 제거) $convertedTenantIds = array_unique(array_merge($registeredTenantIds, $managedTenantIds)); + // 3) 내가 등록한 가망고객 (아직 전환되지 않은 것 - active 상태) + $prospects = TenantProspect::whereIn('registered_by', $partnerIds) + ->whereIn('status', [TenantProspect::STATUS_ACTIVE, TenantProspect::STATUS_EXPIRED]) + ->orderBy('created_at', 'desc') + ->get(); + // 전환된 테넌트만 조회 (최신순, 페이지네이션) $tenants = Tenant::whereIn('id', $convertedTenantIds) ->orderBy('created_at', 'desc') @@ -298,6 +304,7 @@ public function refreshTenantList(Request $request): View return view('sales.dashboard.partials.tenant-list', compact( 'tenants', + 'prospects', 'managements', 'allManagers' )); diff --git a/resources/views/sales/dashboard/partials/tenant-list.blade.php b/resources/views/sales/dashboard/partials/tenant-list.blade.php index d6d7139a..aba3851d 100644 --- a/resources/views/sales/dashboard/partials/tenant-list.blade.php +++ b/resources/views/sales/dashboard/partials/tenant-list.blade.php @@ -121,23 +121,45 @@ class="inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium bg-g -
-
+
+ {{-- 영업/매니저 프로그레스 바 (컴팩트) --}} +
{{-- 영업 --}} -
- 영업 -
-
+
+ +
+
- {{ $prospectProgress['sales']['percentage'] }}% + {{ $prospectProgress['sales']['percentage'] }}%
{{-- 매니저 --}} -
- 매니 -
-
+
+ +
+
- {{ $prospectProgress['manager']['percentage'] }}% + {{ $prospectProgress['manager']['percentage'] }}% +
+
+ + {{-- 구분선 --}} +
+ + {{-- 개발 진행 상태 (가망고객은 아직 개발 전) --}} +
+
+ {{-- 비활성 프로그래스 바 --}} +
+
+ @for($i = 0; $i < 8; $i++) +
+ @endfor +
+
+ {{-- 대기 배지 --}} + + 계약 전환 필요 +
@@ -253,61 +275,82 @@ class="inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium bg-g
- -
- {{-- 좌측: 영업/매니저 프로그레스 바 --}} -
+ +
+ {{-- 좌측: 영업/매니저 프로그레스 바 (컴팩트) --}} +
{{-- 영업 --}} -
- 영업 -
-
+
+ +
+
- {{ $progress['sales']['percentage'] }}% + {{ $progress['sales']['percentage'] }}%
{{-- 매니저 --}} -
- 매니 -
-
+
+ +
+
- {{ $progress['manager']['percentage'] }}% + {{ $progress['manager']['percentage'] }}%
- {{-- 우측: 본사 7단계 진행 상태 --}} -
+ + {{-- 구분선 --}} +
+ + {{-- 우측: 개발 진행 상태 (7단계 + 상태 배지) --}} +
@if($isHqEnabled) -
-
- @foreach($hqStatuses as $statusKey => $statusLabel) - @php - $stepNum = $hqStatusOrder[$statusKey]; - $isCompleted = $stepNum < $currentHqStep; - $isCurrent = $stepNum === $currentHqStep; - @endphp -
-
-
- {{ $statusLabel }} +
+ {{-- 7단계 프로그래스 바 --}} +
+
+ @foreach($hqStatuses as $statusKey => $statusLabel) + @php + $stepNum = $hqStatusOrder[$statusKey]; + $isCompleted = $stepNum < $currentHqStep; + $isCurrent = $stepNum === $currentHqStep; + @endphp +
+
+
+ {{ $stepNum + 1 }}. {{ $statusLabel }} +
-
- @endforeach + @endforeach +
-
{{ $management->hq_status_label }}
+ {{-- 현재 상태 배지 --}} + + {{ $management->hq_status_label }} +
@else -
-
- @foreach($hqStatuses as $statusKey => $statusLabel) -
-
-
- {{ $statusLabel }} +
+ {{-- 비활성 프로그래스 바 --}} +
+
+ @foreach($hqStatuses as $statusKey => $statusLabel) +
+
+
+ {{ $hqStatusOrder[$statusKey] + 1 }}. {{ $statusLabel }} +
-
- @endforeach + @endforeach +
-
대기
+ {{-- 대기 배지 --}} + + 영업/매니저 완료 후 시작 +
@endif