From 7fbd04f4eef0abba78504f7a09fd73c1fd83edc4 Mon Sep 17 00:00:00 2001 From: pro Date: Tue, 27 Jan 2026 19:06:36 +0900 Subject: [PATCH] =?UTF-8?q?fix:=EC=98=81=EC=97=85=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20=EA=B8=B0=EA=B0=84=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sales/SalesDashboardController.php | 13 ++- .../views/sales/dashboard/index.blade.php | 87 +++++++++++++++++-- 2 files changed, 91 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Sales/SalesDashboardController.php b/app/Http/Controllers/Sales/SalesDashboardController.php index 9bd86f78..03536e45 100644 --- a/app/Http/Controllers/Sales/SalesDashboardController.php +++ b/app/Http/Controllers/Sales/SalesDashboardController.php @@ -21,6 +21,15 @@ public function index(Request $request): View $year = $request->input('year', now()->year); $month = $request->input('month', now()->month); + // 기간 설정 모드일 경우 + if ($period === 'custom') { + $startDate = $request->input('start_date', now()->startOfMonth()->format('Y-m-d')); + $endDate = $request->input('end_date', now()->format('Y-m-d')); + } else { + $startDate = now()->startOfMonth()->format('Y-m-d'); + $endDate = now()->endOfMonth()->format('Y-m-d'); + } + // 통계 데이터 (임시 데이터 - 추후 실제 데이터로 교체) $stats = [ 'total_membership_fee' => 0, // 총 가입비 @@ -62,7 +71,9 @@ public function index(Request $request): View 'totalCommissionRatio', 'period', 'year', - 'month' + 'month', + 'startDate', + 'endDate' )); } } diff --git a/resources/views/sales/dashboard/index.blade.php b/resources/views/sales/dashboard/index.blade.php index 2d83b3c3..2d6c1a15 100644 --- a/resources/views/sales/dashboard/index.blade.php +++ b/resources/views/sales/dashboard/index.blade.php @@ -109,20 +109,44 @@

기간별 조회

-
+
- {{ $year }}년 {{ $month }}월 + + +
+ {{ $year }}년 {{ $month }}월 +
+ + +
+ + ~ + + +
@@ -197,9 +221,56 @@ class="px-4 py-2 text-sm font-medium rounded-md {{ $period === 'custom' ? 'bg-bl @push('scripts')