@forelse($progressItems as $item)
@php
$tenant = $item->tenant;
$prospect = $item->tenantProspect;
$companyName = $tenant?->company_name ?? $prospect?->company_name ?? '알 수 없음';
$representativeName = $tenant?->representative_name ?? $prospect?->ceo_name ?? '-';
$businessNumber = $tenant?->business_number ?? $prospect?->business_number ?? '-';
$currentHqStep = $hqStatusOrder[$item->hq_status ?? 'pending'] ?? 0;
// 담당자 정보 (영업파트너 또는 가망고객 등록자)
$salesPersonName = $item->salesPartner?->user?->name ?? $prospect?->registeredBy?->name ?? '-';
$managerName = $item->manager?->name ?? $salesPersonName; // 매니저 없으면 영업담당자와 동일
@endphp
{{ $companyName }}
{{ $representativeName }} | {{ $businessNumber }}
{{ $item->updated_at->format('m/d') }}
{{-- 8단계 프로그레스 바 --}}
@foreach($hqStatuses as $statusKey => $statusLabel)
@php
$stepNum = $hqStatusOrder[$statusKey];
$isCompleted = $stepNum < $currentHqStep;
$isCurrent = $stepNum === $currentHqStep;
@endphp
@endforeach
{{ $item->hq_status_label }}
{{-- 상태 변경 드롭다운 --}}
{{-- 담당자 정보 --}}
영업: {{ $salesPersonName }}
|
매니저: {{ $managerName }}
{{-- 버튼 --}}
@empty
@endforelse