feat:영업관리 대시보드 수익 및 테넌트 관리 섹션 추가
- tenantStats 데이터 추가 (관리 테넌트, 총 가입비 실적, 누적 가입비 수당, 확정 가입비 수당) - 실적 데이터 없음 안내 섹션 추가 - 수익 및 테넌트 관리 통계 카드 4개 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -65,10 +65,19 @@ public function index(Request $request): View
|
||||
// 총 가입비 대비 수당
|
||||
$totalCommissionRatio = 0;
|
||||
|
||||
// 수익 및 테넌트 관리 통계 (임시 데이터 - 추후 실제 데이터로 교체)
|
||||
$tenantStats = [
|
||||
'total_tenants' => 0, // 관리 테넌트
|
||||
'total_membership_revenue' => 0, // 총 가입비 실적
|
||||
'total_commission_accumulated' => 0, // 누적 가입비 수당
|
||||
'confirmed_commission' => 0, // 확정 가입비 수당
|
||||
];
|
||||
|
||||
return view('sales.dashboard.index', compact(
|
||||
'stats',
|
||||
'commissionByRole',
|
||||
'totalCommissionRatio',
|
||||
'tenantStats',
|
||||
'period',
|
||||
'year',
|
||||
'month',
|
||||
|
||||
@@ -217,6 +217,100 @@ class="px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 실적 데이터 없음 안내 (데이터가 없을 때만 표시) -->
|
||||
@if($stats['total_contracts'] == 0)
|
||||
<div class="bg-white rounded-xl shadow-sm p-12">
|
||||
<div class="flex flex-col items-center justify-center text-center">
|
||||
<div class="w-20 h-20 bg-blue-50 rounded-full flex items-center justify-center mb-6">
|
||||
<svg class="w-10 h-10 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4" />
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-gray-800 mb-2">실적 데이터가 존재하지 않습니다</h3>
|
||||
<p class="text-gray-500 mb-2">선택한 기간 내에 등록된 계약 정보나 조직 구성 데이터가 없습니다.</p>
|
||||
<p class="text-gray-500 mb-6">아직 실적이 발생하지 않았거나, 시스템 동기화 중일 수 있습니다.</p>
|
||||
<button type="button"
|
||||
onclick="location.reload()"
|
||||
class="inline-flex items-center gap-2 px-6 py-3 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
실적 데이터 새로고침
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- 수익 및 테넌트 관리 -->
|
||||
<div class="bg-white rounded-xl shadow-sm p-6">
|
||||
<div class="flex items-center gap-3 mb-6">
|
||||
<div class="p-2 bg-blue-100 rounded-lg">
|
||||
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||
</svg>
|
||||
</div>
|
||||
<h2 class="text-xl font-bold text-gray-800">수익 및 테넌트 관리</h2>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
||||
<!-- 관리 테넌트 -->
|
||||
<div class="bg-white border border-gray-200 rounded-xl p-5 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-start justify-between mb-3">
|
||||
<span class="text-sm text-gray-500">관리 테넌트</span>
|
||||
<div class="p-2 bg-blue-50 rounded-lg">
|
||||
<svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-3xl font-bold text-gray-900">{{ number_format($tenantStats['total_tenants'] ?? 0) }}개</p>
|
||||
<p class="text-xs text-gray-400 mt-1">등록된 총 업체 수</p>
|
||||
</div>
|
||||
|
||||
<!-- 총 가입비 실적 -->
|
||||
<div class="bg-white border border-gray-200 rounded-xl p-5 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-start justify-between mb-3">
|
||||
<span class="text-sm text-gray-500">총 가입비 실적</span>
|
||||
<div class="p-2 bg-blue-50 rounded-lg">
|
||||
<svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-3xl font-bold text-gray-900">₩{{ number_format($tenantStats['total_membership_revenue'] ?? 0) }}</p>
|
||||
<p class="text-xs text-gray-400 mt-1">전체 가입비 합계</p>
|
||||
</div>
|
||||
|
||||
<!-- 누적 가입비 수당 -->
|
||||
<div class="bg-white border border-gray-200 rounded-xl p-5 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-start justify-between mb-3">
|
||||
<span class="text-sm text-gray-500">누적 가입비 수당</span>
|
||||
<div class="p-2 bg-blue-50 rounded-lg">
|
||||
<svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-3xl font-bold text-gray-900">₩{{ number_format($tenantStats['total_commission_accumulated'] ?? 0) }}</p>
|
||||
<p class="text-xs text-gray-400 mt-1">전체 가입비 수당 합계</p>
|
||||
</div>
|
||||
|
||||
<!-- 확정 가입비 수당 (지급대상) -->
|
||||
<div class="bg-green-50 border border-green-200 rounded-xl p-5 hover:shadow-md transition-shadow">
|
||||
<div class="flex items-start justify-between mb-3">
|
||||
<span class="text-sm text-green-700">확정 가입비 수당 (지급대상)</span>
|
||||
<div class="p-2 bg-green-100 rounded-lg">
|
||||
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-3xl font-bold text-green-700">₩{{ number_format($tenantStats['confirmed_commission'] ?? 0) }}</p>
|
||||
<p class="text-xs text-green-600 mt-1">운영팀 승인 완료된 금액 (지급: 계약 익월 말일)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
|
||||
Reference in New Issue
Block a user