- 월간 캘린더 뷰 (사원별 필터, 날짜 클릭 등록, HTMX 월 이동) - 일괄 등록 (다수 사원 체크박스 선택 후 일괄 등록, upsert 처리) - 사원별 월간 요약 (상태별 카운트 + 총 근무시간 집계 테이블) - 초과근무 알림 (주 48h 경고 / 52h 위험 배너) - 근태 승인 워크플로우 (신청→승인→근태 레코드 자동 생성) - 자동 결근 처리 (매일 23:50 스케줄러, 주말 제외) - 연차 관리 연동 (휴가 등록 시 leave_balances 자동 차감) - GPS 출퇴근 UI (테이블 GPS 아이콘 + 상세 모달) - 탭 네비게이션 (목록/캘린더/요약/승인) HTMX 기반 전환
59 lines
3.0 KiB
PHP
59 lines
3.0 KiB
PHP
{{-- 사원별 월간 요약 (HTMX로 로드) --}}
|
|
@php
|
|
use App\Models\HR\Attendance;
|
|
@endphp
|
|
|
|
<div class="px-6 py-4 border-b border-gray-200">
|
|
<h3 class="text-lg font-semibold text-gray-800">{{ $year }}년 {{ $month }}월 사원별 요약</h3>
|
|
</div>
|
|
|
|
@if(empty($summary))
|
|
<div class="px-6 py-12 text-center">
|
|
<svg class="w-12 h-12 text-gray-300 mx-auto mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
|
</svg>
|
|
<p class="text-gray-500">해당 월의 근태 데이터가 없습니다.</p>
|
|
</div>
|
|
@else
|
|
<x-table-swipe>
|
|
<table class="min-w-full">
|
|
<thead class="bg-gray-50 border-b border-gray-200">
|
|
<tr>
|
|
<th class="px-6 py-3 text-left text-sm font-semibold text-gray-600">사원</th>
|
|
<th class="px-6 py-3 text-left text-sm font-semibold text-gray-600">부서</th>
|
|
<th class="px-4 py-3 text-center text-sm font-semibold text-gray-600">근무일</th>
|
|
<th class="px-4 py-3 text-center text-sm font-semibold text-gray-600">총근무(h)</th>
|
|
@foreach(Attendance::STATUS_MAP as $key => $label)
|
|
<th class="px-3 py-3 text-center text-sm font-semibold text-gray-600">{{ $label }}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-white divide-y divide-gray-100">
|
|
@foreach($summary as $item)
|
|
<tr class="hover:bg-gray-50 transition-colors">
|
|
<td class="px-6 py-3 whitespace-nowrap">
|
|
<div class="flex items-center gap-2">
|
|
<div class="shrink-0 w-7 h-7 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-xs font-medium">
|
|
{{ mb_substr($item['name'], 0, 1) }}
|
|
</div>
|
|
<span class="text-sm font-medium text-gray-900">{{ $item['name'] }}</span>
|
|
</div>
|
|
</td>
|
|
<td class="px-6 py-3 whitespace-nowrap text-sm text-gray-700">{{ $item['department'] }}</td>
|
|
<td class="px-4 py-3 text-center text-sm font-medium text-gray-700">{{ $item['total_days'] }}일</td>
|
|
<td class="px-4 py-3 text-center text-sm font-medium text-gray-700">
|
|
{{ $item['total_minutes'] > 0 ? round($item['total_minutes'] / 60, 1) : '-' }}
|
|
</td>
|
|
@foreach(Attendance::STATUS_MAP as $key => $label)
|
|
@php $cnt = $item['statuses'][$key] ?? 0; @endphp
|
|
<td class="px-3 py-3 text-center text-sm {{ $cnt > 0 ? 'font-medium text-gray-800' : 'text-gray-300' }}">
|
|
{{ $cnt ?: '-' }}
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</x-table-swipe>
|
|
@endif
|