{{-- 근태현황 테이블 (HTMX로 로드) --}}
@php
use App\Models\HR\Attendance;
@endphp
근태 기록이 없습니다.
@forelse($attendances as $attendance)
@php
$profile = $attendance->user?->tenantProfiles?->first();
$department = $profile?->department;
$displayName = $profile?->display_name ?? $attendance->user?->name ?? '-';
$color = Attendance::STATUS_COLORS[$attendance->status] ?? 'gray';
$label = Attendance::STATUS_MAP[$attendance->status] ?? $attendance->status;
$checkIn = $attendance->check_in ? substr($attendance->check_in, 0, 5) : '-';
$checkOut = $attendance->check_out ? substr($attendance->check_out, 0, 5) : '-';
@endphp
날짜
사원
부서
상태
출근
퇴근
비고
GPS
작업
{{-- 체크박스 --}}
@empty
{{-- 날짜 --}}
{{ $attendance->base_date->format('m-d') }}
{{ ['일','월','화','수','목','금','토'][$attendance->base_date->dayOfWeek] }}
{{-- 사원 --}}
{{-- 부서 --}}
{{ $department?->name ?? '-' }}
{{-- 상태 --}}
{{ $label }}
{{-- 출근 --}}
{{ $checkIn }}
{{-- 퇴근 --}}
{{ $checkOut }}
{{-- 비고 --}}
{{ $attendance->remarks ?? '' }}
{{-- GPS --}}
@php $gpsData = $attendance->json_details['gps_data'] ?? null; @endphp
@if($gpsData)
@else
@endif
{{-- 작업 --}}
@endforelse