year); $month = (int) request('month', now()->month); // 월별 일정 데이터 $calendarData = $this->fundScheduleService->getCalendarData($year, $month); // 월별 요약 $summary = $this->fundScheduleService->getMonthlySummary($year, $month); // 계좌 목록 (필터용) $accounts = BankAccount::active()->ordered()->get(['id', 'bank_name', 'account_number']); return view('finance.fund-schedules.index', compact( 'year', 'month', 'calendarData', 'summary', 'accounts' )); } /** * 자금계획일정 등록 폼 */ public function create(): View { $accounts = BankAccount::active()->ordered()->get(['id', 'bank_name', 'account_number', 'account_name']); $types = FundSchedule::getTypeOptions(); $statuses = FundSchedule::getStatusOptions(); $recurrenceOptions = FundSchedule::getRecurrenceOptions(); // 기본 날짜 (쿼리스트링에서) $defaultDate = request('date', now()->toDateString()); return view('finance.fund-schedules.create', compact( 'accounts', 'types', 'statuses', 'recurrenceOptions', 'defaultDate' )); } /** * 자금계획일정 수정 폼 */ public function edit(int $id): View { $schedule = $this->fundScheduleService->getScheduleById($id); if (! $schedule) { abort(404, '일정을 찾을 수 없습니다.'); } $accounts = BankAccount::active()->ordered()->get(['id', 'bank_name', 'account_number', 'account_name']); $types = FundSchedule::getTypeOptions(); $statuses = FundSchedule::getStatusOptions(); $recurrenceOptions = FundSchedule::getRecurrenceOptions(); return view('finance.fund-schedules.edit', compact( 'schedule', 'accounts', 'types', 'statuses', 'recurrenceOptions' )); } /** * 자금계획일정 상세 */ public function show(int $id): View { $schedule = $this->fundScheduleService->getScheduleById($id); if (! $schedule) { abort(404, '일정을 찾을 수 없습니다.'); } return view('finance.fund-schedules.show', compact('schedule')); } }