diff --git a/app/Http/Controllers/Sales/SalesDashboardController.php b/app/Http/Controllers/Sales/SalesDashboardController.php new file mode 100644 index 00000000..9bd86f78 --- /dev/null +++ b/app/Http/Controllers/Sales/SalesDashboardController.php @@ -0,0 +1,68 @@ +input('period', 'month'); // month or custom + $year = $request->input('year', now()->year); + $month = $request->input('month', now()->month); + + // 통계 데이터 (임시 데이터 - 추후 실제 데이터로 교체) + $stats = [ + 'total_membership_fee' => 0, // 총 가입비 + 'total_commission' => 0, // 총 수당 + 'commission_rate' => 0, // 지급 승인 완료 비율 + 'total_contracts' => 0, // 전체 건수 + 'pending_membership_approval' => 0, // 가입 승인 대기 + 'pending_payment_approval' => 0, // 지급 승인 대기 + ]; + + // 역할별 수당 상세 + $commissionByRole = [ + [ + 'name' => '판매자', + 'rate' => 20, + 'amount' => 0, + 'color' => 'green', + ], + [ + 'name' => '관리자', + 'rate' => 5, + 'amount' => 0, + 'color' => 'blue', + ], + [ + 'name' => '매뉴제작 협업수당', + 'rate' => null, // 별도 + 'amount' => null, // 운영팀 산정 + 'color' => 'red', + ], + ]; + + // 총 가입비 대비 수당 + $totalCommissionRatio = 0; + + return view('sales.dashboard.index', compact( + 'stats', + 'commissionByRole', + 'totalCommissionRatio', + 'period', + 'year', + 'month' + )); + } +} diff --git a/resources/views/sales/dashboard/index.blade.php b/resources/views/sales/dashboard/index.blade.php new file mode 100644 index 00000000..2d83b3c3 --- /dev/null +++ b/resources/views/sales/dashboard/index.blade.php @@ -0,0 +1,207 @@ +@extends('layouts.app') + +@section('title', '영업관리 대시보드') + +@section('content') +
* 가입비 수당은 가입비 완료 후 지급됩니다.
+₩{{ number_format($stats['total_membership_fee']) }}
+전체 누적 가입비
+₩{{ number_format($stats['total_commission']) }}
+지급 승인 완료 기준 ({{ $stats['commission_rate'] }}%)
+{{ number_format($stats['total_contracts']) }}건
+전체 계약 건수
+{{ number_format($stats['pending_membership_approval']) }}건
+조직 내 가입 승인 대기
+{{ number_format($stats['pending_payment_approval']) }}건
+조직 내 지급 승인 대기
+₩{{ number_format($role['amount']) }}
+ @else +운영팀 산정
+ @endif +₩{{ number_format($totalCommissionRatio) }}
+총 가입비 대비 수당
+