{{-- resources/views/punchcard/mobile.blade.php --}} @extends('layout2') @section('pageTitle', "首頁|".config('globals.app_name')) @section('content')
{{-- AppBar:登入者名稱 --}}
{{ config('globals.app_name') }}打卡系統
👤 {{ $user['name'] ?? '登入者' }}
{{-- 今日卡片 --}}

今天打卡

{{ $todayText ?? date('Y/m/d') }}
{{-- 狀態(你可以用後端判斷塞字串) --}}
{{ $badgeText }}
現在時間
--:--:--
上班時間
{{ $clockIn ?? '--:--' }}
下班時間
{{ $clockOut ?? '--:--' }}
今日工時
{{ $workHours ?? '--:--' }}
@php $canClockIn = true; $canClockOut = false; if($clockIn != ''){ $canClockIn = false; } else{ $clockInAction = 'process/clockInAction'; } if($canClockIn == false && $clockOut == ''){ $canClockOut = true; $clockOutAction = 'process/clockOutAction'; } @endphp {{-- 打卡按鈕 --}}
@csrf
@csrf
{{--
只需一指完成打卡;按鈕會依狀態自動鎖定避免誤按。
--}}
{{-- 打卡紀錄 --}}

打卡紀錄

最近 {{ $rangeDays ?? 7 }} 天
@forelse(($records ?? []) as $r)
{{ $r['date'] }}
上 {{ $r['in'] ?? '--:--' }} ・下 {{ $r['out'] ?? '--:--' }} ・工時 {{ $r['hours'] ?? '--:--' }}
{{ $r['status_text'] ?? '—' }}
@empty
目前沒有紀錄
@endforelse