@extends('employee.layouts.app') @section('title', get_setting('site_name').' Employee Dashboard') @section('content') @php $defaultAvatar = asset('storage/uploads/user-icon.png'); $userImage = auth()->user()->image ? asset('storage/'.auth()->user()->image) : $defaultAvatar; $hour = (int) date('G'); $greeting = $hour < 12 ? __('Good morning') : ($hour < 17 ? __('Good afternoon') : __('Good evening')); @endphp

{{ $greeting }}, {{ auth()->user()->name }}

{{ __('Here is your overview for today') }} — {{ now()->format('l, F j, Y') }}

{{ __('Apply for leave') }}
{{-- Sidebar --}}
{{ auth()->user()->name }}
{{ auth()->user()->name }}
{{ auth()->user()->staff->designation->name }}
{{ __('Joined on') }} {{ auth()->user()->staff->joing_date }}
{{ __('Department') }} {{ auth()->user()->staff->department->name }}
{{ __('Branch') }} {{ auth()->user()->staff->warehouse->name }}
{{ __("Today's attendance") }} {{ now()->format('M d, Y') }}
{{ __('In time') }}
@if($todayAttendance !== null)
{{ date('h:i A', strtotime($todayAttendance->signIn)) }}
@elseif(!empty($weekendAttendanceBlocked))
{{ __('Weekend — attendance blocked') }}
@else @endif
{{ __('Out time') }}
@if($todayAttendance !== null && $todayAttendance->signOut !== null)
{{ date('h:i A', strtotime($todayAttendance->signOut)) }}
@else @endif
{{-- Main content --}}
@if(!empty($employeeModuleStats) || !empty($dashboardQuickStats))
@foreach($employeeModuleStats ?? [] as $m) @endforeach @foreach($dashboardQuickStats ?? [] as $stat) @endif
@endforeach
@endif
{{ __('Missed attendances') }}
@forelse($missAttendances as $missAttendance) @empty @endforelse
{{ __('Date') }} {{ __('In time') }} {{ __('Out time') }}
{{ $missAttendance->date }} @if($missAttendance->signIn != null) {{ date('h:i A', strtotime($missAttendance->signIn)) }} @else @endif @if($missAttendance->signOut != null) {{ date('h:i A', strtotime($missAttendance->signOut)) }} @else @endif
{{ __('No missed attendance records.') }}
{{ __('Leave summary') }} ({{ date('Y') }}) {{ __('View all') }}
@forelse($leaveSummary as $row) @empty @endforelse
{{ __('Leave type') }} {{ __('Allowed') }} {{ __('Adjustment') }} {{ __('Taken') }} {{ __('Remaining') }} {{ __('Usage') }}
{{ $row['name'] }} {{ $row['allowed'] }} {{ $row['adjustment'] }} {{ $row['taken'] }} {{ $row['remaining'] }}
{{ $row['usage_pct'] }}%
{{ __('No leave types configured.') }}
{{ __('Monthly attendance summary') }}
{{ __('Present') }} {{ __('Delay') }} {{ __('Extra delay') }} {{ __('Leave') }} {{ __('Half leave') }} {{ __('Weekend') }} {{ __('Holiday') }}
@endsection @section('modal') @endsection @section('script') @endsection