@php use Illuminate\Support\Str; $configData = Helper::appClasses(); @endphp @extends('layouts/layoutMaster') @section('title', __('Employee Dashboard')) @section('vendor-style') @vite([ 'resources/assets/vendor/libs/apex-charts/apex-charts.scss' ]) @endsection @section('page-style') @vite([ 'resources/assets/vendor/scss/pages/card-analytics.scss' ]) @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/apex-charts/apexcharts.js' ]) @endsection @section('content')

{{ __('Welcome back,') }} {{ $user->getFullName() }}! 👋

{{ __('Here\'s what\'s happening with your work today.') }}

welcome
{{ __('Quick Actions') }}
@if(!$todayAttendance)
@csrf
@elseif($todayAttendance && !$todayAttendance->check_out_time)
@csrf
@else @endif
{{ __('This Week Hours') }}

@php $weeklyHours = floor($weeklyWorkingHours); $weeklyMinutes = round(($weeklyWorkingHours - $weeklyHours) * 60); @endphp @if($weeklyHours > 0) {{ $weeklyHours }}h {{ $weeklyMinutes }}m @else {{ $weeklyMinutes }}m @endif

{{ __('This week') }}
{{ __('This Month Hours') }}

@php $monthlyHours = floor($monthlyWorkingHours); $monthlyMinutes = round(($monthlyWorkingHours - $monthlyHours) * 60); @endphp @if($monthlyHours > 0) {{ $monthlyHours }}h {{ $monthlyMinutes }}m @else {{ $monthlyMinutes }}m @endif

{{ __('This month') }}
{{ __('Total Leaves') }}

{{ $totalLeaves }}

{{ $approvedLeaves }} {{ __('approved') }}, {{ $pendingLeaves }} {{ __('pending') }}
@if($addonService->isAddonEnabled('FieldTask'))
{{ __('My Tasks') }}

{{ $totalTasks }}

{{ $completedTasks }} {{ __('completed') }}, {{ $pendingTasks }} {{ __('pending') }}
@endif
{{ __('Recent Activities') }}
{{ __("Today's Attendance") }}
@if($todayAttendance && $todayAttendance->check_in_time)
{{ __('Check In Time') }}

{{ $todayAttendance->check_in_time->format('h:i A') }}

@if($todayAttendance->check_out_time)
{{ __('Check Out Time') }}

{{ $todayAttendance->check_out_time->format('h:i A') }}

{{ __('Total Hours') }}

@php $totalHours = floor($todayAttendance->check_in_time->diffInHours($todayAttendance->check_out_time)); $totalMinutes = $todayAttendance->check_in_time->diffInMinutes($todayAttendance->check_out_time) % 60; @endphp @if($totalHours > 0) {{ $totalHours }}h {{ $totalMinutes }}m @else {{ $totalMinutes }}m @endif

{{ __('Completed') }} @else
{{ __('Currently Working') }}

@php $currentHours = floor($todayAttendance->check_in_time->diffInHours(now())); $currentMinutes = $todayAttendance->check_in_time->diffInMinutes(now()) % 60; @endphp @if($currentHours > 0) {{ $currentHours }}h {{ $currentMinutes }}m @else {{ $currentMinutes }}m @endif

{{ __('In Progress') }} @endif
@else
{{ __('Not Checked In') }}

{{ __('You haven\'t checked in today yet.') }}

@csrf
@endif
@if($todayAttendance && $todayAttendance->check_in_time && !$todayAttendance->check_out_time) @endif @endsection