@extends('layouts.app') @section('title', '出勤工時統計') @push('styles') @endpush @section('content')

出勤工時統計

返回簽到退紀錄
{{-- 篩選 --}}
{{-- 班制說明 --}}
@foreach($groupSettings as $gid => $gcfg) @if($gid === 'friday_early_enabled') @continue @endif {{ $gid }} 組:上班 {{ $gcfg['start'] }},下班 {{ $gcfg['end'] }}@if($groupSettings['friday_early_enabled'])(週五 {{ $gcfg['friday_end'] }})@endif @if(!$loop->last) @endif @endforeach 工時計算為當日第一次上班簽到至最後一次下班簽退之差。 ⚙ 修改設定
@if($statsRows->isEmpty())
查無資料
@elseif($userId && $statsRows->count() === 1) {{-- ── 個人詳細檢視 ── --}} @php $row = $statsRows->first(); $u = $row['user']; @endphp
{{ $u->name }} {{ $u->work_schedule_group ?? 'A' }} 組 {{ $u->department }} @if($row['late_count'] > 0) 遲到 {{ $row['late_count'] }} 次 @endif @if($row['early_count'] > 0) 早退 {{ $row['early_count'] }} 次 @endif @if($row['missing_in'] > 0) 未簽到 {{ $row['missing_in'] }} 次 @endif @if($row['missing_out'] > 0) 未退卡 {{ $row['missing_out'] }} 次 @endif @if($row['no_show_count'] > 0) 未出勤 {{ $row['no_show_count'] }} 天 @endif @if($row['late_count'] == 0 && $row['early_count'] == 0 && $row['missing_in'] == 0 && $row['missing_out'] == 0 && $row['no_show_count'] == 0) 出勤正常 @endif
@foreach($row['day_details'] as $date => $dd) @php $rowClass = 'day-row-weekend'; if (!$dd['is_weekend']) { if ($dd['is_future']) $rowClass = 'day-row-future'; elseif ($dd['in_progress']) $rowClass = 'day-row-progress'; elseif ($dd['no_show']) $rowClass = 'day-row-noshow'; elseif ($dd['missing_in'] || $dd['missing_out']) $rowClass = 'day-row-miss'; elseif ($dd['late'] || $dd['early']) $rowClass = 'day-row-late'; else $rowClass = ''; } @endphp @endforeach
日期 星期 上班打卡 下班打卡 工時 狀態
{{ $date }} {{ $dd['weekday'] }} @if($dd['in']) {{ $dd['in'] }} @elseif($dd['missing_in']) 未簽到 @else @endif @if($dd['out']) {{ $dd['out'] }} @elseif($dd['in_progress']) 上班中… @elseif($dd['missing_out']) 未退卡 @else @endif @if($dd['minutes'] !== null) {{ intdiv($dd['minutes'],60) }}h {{ $dd['minutes']%60 }}m @else — @endif @if($dd['no_show']) 未出勤 @elseif($dd['is_future']) @elseif($dd['is_weekend']) 假日 @else @if($dd['late']) 遲到 @endif @if($dd['early']) 早退 @endif @if($dd['missing_in']) 未簽到 @endif @if($dd['missing_out']) 未退卡 @endif @if($dd['biz'] > 0) 公出 {{ $dd['biz'] }} 次 @endif @if(!$dd['late'] && !$dd['early'] && !$dd['missing_in'] && !$dd['missing_out'] && $dd['in']) 正常 @endif @endif
{{-- 摘要 footer --}}
@else {{-- ── 多人摘要表 ── --}}
{{ $month }} 月份出勤摘要 共 {{ $statsRows->count() }} 人
@foreach($statsRows as $row) @php $u = $row['user']; @endphp @endforeach
姓名 部門 班制 出勤天數 累計工時 遲到 早退 未簽到 未退卡 公出天數
{{ $u->name }} {{ $u->department ?? '—' }} {{ $u->work_schedule_group ?? 'A' }} 組 {{ $row['work_days'] }} 天 {{ $row['total_time'] }} @if($row['late_count'] > 0) {{ $row['late_count'] }} 次 @elseif($row['work_days'] > 0) O @else @endif @if($row['early_count'] > 0) {{ $row['early_count'] }} 次 @elseif($row['work_days'] > 0) O @else @endif @if($row['missing_in'] > 0) {{ $row['missing_in'] }} 次 @elseif($row['work_days'] > 0) O @else @endif @if($row['missing_out'] > 0) {{ $row['missing_out'] }} 次 @elseif($row['work_days'] > 0) O @else @endif @if($row['business_days'] > 0) {{ $row['business_days'] }} 天 @else @endif 詳細
@endif
@endsection @push('scripts') @endpush