@extends('admin.layouts.app') @section('title',get_setting('site_name').' | Admin Dashboard') @section('content')
@foreach([ ['key' => 'total', 'label' => __('Total Employee'), 'icon' => 'fas fa-users', 'color' => 'text-dark', 'data' => $statsTotal], ['key' => 'active', 'label' => __('Active Employee'), 'icon' => 'fas fa-user-check', 'color' => 'text-success', 'data' => $statsActiveEmployees], ['key' => 'inactive', 'label' => __('Inactive Employee'), 'icon' => 'fas fa-user-slash', 'color' => 'text-danger', 'data' => $statsInactiveEmployees], ['key' => 'present', 'label' => __('Present'), 'icon' => 'fas fa-user-check', 'color' => 'text-success', 'data' => $statsPresent], ['key' => 'absent', 'label' => __('Absent'), 'icon' => 'fas fa-user-slash', 'color' => 'text-danger', 'data' => $statsAbsent], ['key' => 'movement', 'label' => __('Movement'), 'icon' => 'fas fa-running', 'color' => 'text-info', 'data' => $statsMovement], ['key' => 'leave', 'label' => __('Leave'), 'icon' => 'fas fa-procedures', 'color' => 'text-stat-leave', 'data' => $statsLeave], ['key' => 'late', 'label' => __('Late'), 'icon' => 'fas fa-clock', 'color' => 'text-warning', 'data' => $statsLate], ['key' => 'Extra late', 'label' => __('Extra Late'), 'icon' => 'fas fa-clock', 'color' => 'text-primary', 'data' => $statsExtra], ] as $stat)

{{ $stat['data']['total'] }}

{{ $stat['label'] }}

{{ __('Male') }} : {{ $stat['data']['male'] }} {{ __('Female') }} : {{ $stat['data']['female'] }}

@endforeach
@if(!empty($moduleMiniCards))
@foreach($moduleMiniCards as $mini)

{{ $mini['value'] }}

@if(!empty($mini['route'])) {{ $mini['label'] }} @else
{{ $mini['label'] }}
@endif
@endforeach
@endif
@foreach([ [ 'value' => 0, 'label' => __('Pending Break Time Reconciliation'), 'icon' => 'fas fa-tasks', 'color' => 'text-gradient-success', 'modal' => null, ], [ 'value' => $statsResigned, 'label' => __('Resigned'), 'icon' => 'fas fa-person-walking-arrow-right', 'color' => 'text-gradient-warning', 'modal' => 'ResignedModal', ], [ 'value' => $statsTermination, 'label' => __('Termination'), 'icon' => 'fas fa-user-times', 'color' => 'text-gradient-danger', 'modal' => 'TerminationModal', ], [ 'value' => $statsRetirement, 'label' => __('Retirement'), 'icon' => 'fas fa-umbrella-beach', 'color' => 'text-gradient-primary', 'modal' => 'RetirementModal', ], [ 'value' => $pendingLeaveApplications, 'label' => __('Pending Leave Applications'), 'icon' => 'fas fa-envelope-open-text', 'color' => 'text-gradient-primary', 'modal' => null, ], [ 'value' => $assetsTotal, 'label' => __('Assets (Items)'), 'icon' => 'fas fa-boxes', 'color' => 'text-gradient-warning', 'modal' => null, ], [ 'value' => $assetsAssignedActive, 'label' => __('Assigned Assets'), 'icon' => 'fas fa-hand-holding', 'color' => 'text-gradient-success', 'modal' => null, ], [ 'value' => count($upcomingbirthdays), 'label' => __('Upcoming Birthdays'), 'icon' => 'far fa-gem', 'color' => 'text-gradient-danger', 'modal' => 'UpcomingBirthdayModal', ], [ 'value' => 1, 'label' => __('Pending Attendance Approval'), 'icon' => 'fas fa-users', 'color' => 'text-gradient-warning', 'modal' => null, ], [ 'value' => 1, 'label' => __('Pending Attendance Reconciliation'), 'icon' => 'fas fa-database', 'color' => 'text-gradient-primary', 'modal' => null, ], ] as $mini)

{{ $mini['value'] }}

@if(!empty($mini['modal'])) @else
{{ $mini['label'] }}
@endif
@endforeach
{{ __('Daily Attendance') }}
{{ __('Date') }}: {{ $attDate }}
{{ __('Clear') }}
@forelse($dailyAttendanceRows as $row) @php $staff = $row['staff']; $attendance = $row['attendance']; $displayStatus = $row['status']; @endphp @if($attendance !== null) @else @endif @empty @endforelse
{{ __('Employee') }} {{ __('Department') }} {{ __('In Time') }} {{ __('Out Time') }} {{ __('Status') }} {{ __('Action') }}
{{ $staff->user->name }} {{ $staff->user->name }} ({{ $staff->warehouse->name ?? '-' }}) {{ $staff->department->name ?? '—' }}
{{ __('No employees match the selected filters.') }}
Attendance Missed
@php // Try to retrieve the data from the cache; otherwise, execute the query and store the result in the cache. $missingAttendances = cache()->remember('missingAttendances', now()->addHours(1), function () { return \App\Models\Attendance::where(function ($query) { $query->whereNull('signIn')->orWhereNull('signOut')->whereYear('date', date('Y')); })->orderBy('id','DESC') ->get(); }); @endphp @foreach($missingAttendances as $attendanceMissing) @if($attendanceMissing->date!=date('Y-m-d') && $attendanceMissing->staff->user->is_active==1) @endif @endforeach
Date Name In Time Out Time Action
{{date('D, M d',strtotime($attendanceMissing->date))}} {{!empty($attendanceMissing->staff->user)?$attendanceMissing->staff->user->name:''}}

Holiday Calendar

@endsection @section('modal') @endsection @section('script')