147 lines
7.3 KiB
PHP
147 lines
7.3 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', '자금계획일정')
|
|
|
|
@section('content')
|
|
<div class="container mx-auto px-4 py-6">
|
|
{{-- 페이지 헤더 --}}
|
|
<div class="flex flex-col lg:flex-row lg:justify-between lg:items-center gap-4 mb-6">
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-gray-800">자금계획일정</h1>
|
|
<p class="text-sm text-gray-500 mt-1">{{ $year }}년 {{ $month }}월 현재</p>
|
|
</div>
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
<a href="{{ route('finance.fund-schedules.create') }}"
|
|
class="inline-flex items-center gap-2 px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg transition-colors">
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
|
|
</svg>
|
|
일정 등록
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 월별 요약 카드 --}}
|
|
<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-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($summary['income']['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="M12 4v16m8-8H4"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<p class="text-xs text-gray-400 mt-1">{{ $summary['income']['count'] }}건</p>
|
|
</div>
|
|
|
|
{{-- 지급 예정 --}}
|
|
<div class="bg-white rounded-lg shadow-sm p-4 border-l-4 border-red-500">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<p class="text-sm text-gray-500">지급 예정</p>
|
|
<p class="text-xl font-bold text-red-600">{{ number_format($summary['expense']['total']) }}원</p>
|
|
</div>
|
|
<div class="w-10 h-10 bg-red-100 rounded-full flex items-center justify-center">
|
|
<svg class="w-5 h-5 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 12H4"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<p class="text-xs text-gray-400 mt-1">{{ $summary['expense']['count'] }}건</p>
|
|
</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 {{ $summary['net'] >= 0 ? 'text-blue-600' : 'text-orange-600' }}">
|
|
{{ $summary['net'] >= 0 ? '+' : '' }}{{ number_format($summary['net']) }}원
|
|
</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="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
</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">총 일정</p>
|
|
<p class="text-xl font-bold text-purple-600">{{ $summary['total_count'] }}건</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="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 캘린더 섹션 --}}
|
|
<div class="bg-white rounded-lg shadow-sm overflow-hidden">
|
|
<div class="px-6 py-4 border-b border-gray-200 flex items-center justify-between">
|
|
<h2 class="text-lg font-semibold text-gray-800">자금 일정 달력</h2>
|
|
|
|
{{-- 월 네비게이션 --}}
|
|
<div class="flex items-center gap-2">
|
|
@php
|
|
$prevMonth = $month - 1;
|
|
$prevYear = $year;
|
|
if ($prevMonth < 1) {
|
|
$prevMonth = 12;
|
|
$prevYear--;
|
|
}
|
|
$nextMonth = $month + 1;
|
|
$nextYear = $year;
|
|
if ($nextMonth > 12) {
|
|
$nextMonth = 1;
|
|
$nextYear++;
|
|
}
|
|
@endphp
|
|
<a href="{{ route('finance.fund-schedules.index', ['year' => $prevYear, 'month' => $prevMonth]) }}"
|
|
class="p-2 hover:bg-gray-100 rounded-lg transition-colors">
|
|
<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="M15 19l-7-7 7-7"/>
|
|
</svg>
|
|
</a>
|
|
<span class="px-4 py-2 font-medium text-gray-700">{{ $year }}년 {{ str_pad($month, 2, '0', STR_PAD_LEFT) }}월</span>
|
|
<a href="{{ route('finance.fund-schedules.index', ['year' => $nextYear, 'month' => $nextMonth]) }}"
|
|
class="p-2 hover:bg-gray-100 rounded-lg transition-colors">
|
|
<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 5l7 7-7 7"/>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 캘린더 그리드 --}}
|
|
<div id="calendar-container">
|
|
@include('finance.fund-schedules.partials.calendar', ['year' => $year, 'month' => $month, 'calendarData' => $calendarData])
|
|
</div>
|
|
</div>
|
|
|
|
{{-- 범례 --}}
|
|
<div class="mt-4 flex items-center gap-6 text-sm text-gray-600">
|
|
<div class="flex items-center gap-2">
|
|
<span class="w-4 h-4 bg-green-100 border border-green-300 rounded"></span>
|
|
<span>입금 예정</span>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<span class="w-4 h-4 bg-red-100 border border-red-300 rounded"></span>
|
|
<span>지급 예정</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|