@extends('layouts.staff') @section('content')

Welcome, {{ auth()->user()->name }}!

Here's your daily overview

@php $employee = \App\Models\Employee::where('user_id', auth()->id())->first(); @endphp @if($employee)
🆔 Employee No: {{ $employee->employee_no }}
@endif

Today's Summary

Today's Status
@php $todayAttendance = \App\Models\Attendance::where('user_id', auth()->id()) ->whereDate('attendance_date', today()) ->first(); @endphp {{ $todayAttendance ? 'Checked In' : 'Not Checked In' }}
@if($todayAttendance)
at {{ $todayAttendance->check_in_time->format('H:i') }}
@endif
This Month's Attendance
{{ \App\Models\Attendance::where('user_id', auth()->id()) ->whereMonth('attendance_date', now()->month) ->count() }} days
Pending Leave Requests
{{ \App\Models\Leave::where('user_id', auth()->id()) ->where('status', 'pending') ->count() }}

Quick Actions

@if(!$todayAttendance)
📍 Check In Now
Record your attendance for today
@else
✅ Already Checked In
You're all set for today!
@endif
📝 Apply for Leave
Submit a new leave request

My Records

📅 My Attendance
View your attendance history
🏖️ My Leave Requests
Track your leave applications
🕒 Work Schedule
Check your work shifts
👤 My Profile
Update your information
@if(\App\Models\Attendance::where('user_id', auth()->id())->exists())

Recent Attendance

@foreach(\App\Models\Attendance::where('user_id', auth()->id())->latest()->take(5)->get() as $attendance) @endforeach
Date Check-In Time Status
{{ $attendance->attendance_date->format('M d, Y') }} {{ $attendance->check_in_time->format('H:i') }} Present
@endif @endsection