Files
sam-manage/resources/views/finance/settlement/partials/commission/stats-cards.blade.php
김보곤 7bc412d9a1 feat:통합 정산관리 페이지 구현 (5개 탭 기반)
- SettlementController 신규 생성 (통합 정산관리 메인 + 탭별 HTMX)
- 5개 탭: 수당정산, 파트너별현황(NEW), 컨설팅비용, 고객사정산, 구독관리
- 수당정산 탭: 기존 영업수수료정산 이관 + 유치수당 컬럼/수당유형 필터 추가
- 파트너별 현황 탭: SalesPartner 수당 집계 + 필터/페이지네이션
- 컨설팅/고객사/구독 탭: React → Blade+Alpine.js 전환 (기존 API 재사용)
- 통합 통계카드 (미지급수당/승인대기/이번달예정/누적지급)
- 기존 4개 URL → 통합 페이지 리다이렉트
- SalesPartner 모델에 commissions 관계 추가
- SalesCommissionService에 commission_type 필터 + referrerPartner eager load 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:53:13 +09:00

77 lines
4.3 KiB
PHP

{{-- 수당 유형별 통계 카드 --}}
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
{{-- 지급 대기 --}}
<div class="bg-white rounded-lg shadow-sm p-4 border-l-4 border-yellow-500">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">지급 대기</p>
<p class="text-xl font-bold text-yellow-600">{{ number_format($stats['pending']['partner_total'] + $stats['pending']['manager_total']) }}</p>
</div>
<div class="w-10 h-10 bg-yellow-100 rounded-full flex items-center justify-center">
<svg class="w-5 h-5 text-yellow-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
</div>
<div class="text-xs text-gray-400 mt-1">
<span>{{ $stats['pending']['count'] }}</span>
<span class="mx-1">|</span>
<span>파트너: {{ number_format($stats['pending']['partner_total']) }}</span>
<span class="mx-1">/</span>
<span>매니저: {{ number_format($stats['pending']['manager_total']) }}</span>
</div>
</div>
{{-- 승인 완료 --}}
<div class="bg-white rounded-lg shadow-sm p-4 border-l-4 border-blue-500">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">승인 완료</p>
<p class="text-xl font-bold text-blue-600">{{ number_format($stats['approved']['partner_total'] + $stats['approved']['manager_total']) }}</p>
</div>
<div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center">
<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 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
</div>
<p class="text-xs text-gray-400 mt-1">{{ $stats['approved']['count'] }}</p>
</div>
{{-- 지급 완료 --}}
<div class="bg-white rounded-lg shadow-sm p-4 border-l-4 border-green-500">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">지급 완료</p>
<p class="text-xl font-bold text-green-600">{{ number_format($stats['paid']['partner_total'] + $stats['paid']['manager_total']) }}</p>
</div>
<div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center">
<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="M5 13l4 4L19 7"/>
</svg>
</div>
</div>
<p class="text-xs text-gray-400 mt-1">{{ $stats['paid']['count'] }}</p>
</div>
{{-- 해당 수당 --}}
<div class="bg-white rounded-lg shadow-sm p-4 border-l-4 border-purple-500">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">{{ $year }} {{ $month }} 수당</p>
<p class="text-xl font-bold text-purple-600">{{ number_format($stats['total']['partner_commission'] + $stats['total']['manager_commission']) }}</p>
</div>
<div class="w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center">
<svg class="w-5 h-5 text-purple-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>
<div class="text-xs text-gray-400 mt-1">
<span>파트너: {{ number_format($stats['total']['partner_commission']) }}</span>
<span class="mx-1">|</span>
<span>매니저: {{ number_format($stats['total']['manager_commission']) }}</span>
</div>
</div>
</div>