Files
sam-manage/resources/views/sales/dashboard/partials/stats.blade.php
pro 0e88660c89 feat:영업관리 대시보드 HTMX 부분 새로고침 구현
- 기간별 조회 및 실적 새로고침 시 전체 페이지가 아닌 데이터 영역만 갱신
- partial 뷰 분리 (stats, commission-by-role, tenant-stats, no-data)
- 컨트롤러에 refresh 메서드 추가
- 로딩 인디케이터 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 19:28:48 +09:00

76 lines
5.0 KiB
PHP

{{-- 전체 누적 실적 --}}
<div class="bg-white rounded-xl shadow-sm p-6">
<h2 class="text-lg font-bold text-gray-800 mb-4">전체 누적 실적</h2>
<div class="grid grid-cols-1 md:grid-cols-5 gap-4">
<!-- 가입비 -->
<div class="bg-white border border-gray-200 rounded-xl p-4 hover:shadow-md transition-shadow">
<div class="flex items-start justify-between">
<span class="text-sm text-gray-500"> 가입비</span>
<div class="p-2 bg-gray-100 rounded-lg">
<svg class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" />
</svg>
</div>
</div>
<p class="text-2xl font-bold text-gray-900 mt-2">{{ number_format($stats['total_membership_fee']) }}</p>
<p class="text-xs text-gray-400 mt-1">전체 누적 가입비</p>
</div>
<!-- 수당 -->
<div class="bg-blue-50 border border-blue-200 rounded-xl p-4 hover:shadow-md transition-shadow">
<div class="flex items-start justify-between">
<span class="text-sm text-blue-600"> 수당</span>
<div class="p-2 bg-blue-100 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="M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z" />
</svg>
</div>
</div>
<p class="text-2xl font-bold text-blue-700 mt-2">{{ number_format($stats['total_commission']) }}</p>
<p class="text-xs text-blue-500 mt-1">지급 승인 완료 기준 ({{ $stats['commission_rate'] }}%)</p>
</div>
<!-- 전체 건수 -->
<div class="bg-white border border-gray-200 rounded-xl p-4 hover:shadow-md transition-shadow">
<div class="flex items-start justify-between">
<span class="text-sm text-gray-500">전체 건수</span>
<div class="p-2 bg-gray-100 rounded-lg">
<svg class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 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>
</div>
<p class="text-2xl font-bold text-gray-900 mt-2">{{ number_format($stats['total_contracts']) }}</p>
<p class="text-xs text-gray-400 mt-1">전체 계약 건수</p>
</div>
<!-- 가입 승인 대기 -->
<div class="bg-white border border-gray-200 rounded-xl p-4 hover:shadow-md transition-shadow">
<div class="flex items-start justify-between">
<span class="text-sm text-gray-500">가입 승인 대기</span>
<div class="p-2 bg-gray-100 rounded-lg">
<svg class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
</svg>
</div>
</div>
<p class="text-2xl font-bold text-gray-900 mt-2">{{ number_format($stats['pending_membership_approval']) }}</p>
<p class="text-xs text-gray-400 mt-1">조직 가입 승인 대기</p>
</div>
<!-- 지급 승인 대기 -->
<div class="bg-white border border-gray-200 rounded-xl p-4 hover:shadow-md transition-shadow">
<div class="flex items-start justify-between">
<span class="text-sm text-gray-500">지급 승인 대기</span>
<div class="p-2 bg-gray-100 rounded-lg">
<svg class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" />
</svg>
</div>
</div>
<p class="text-2xl font-bold text-gray-900 mt-2">{{ number_format($stats['pending_payment_approval']) }}</p>
<p class="text-xs text-gray-400 mt-1">조직 지급 승인 대기</p>
</div>
</div>
</div>