{{ auth()->user()->tenant_name }} - Dashboard @php $totalEmployees = $employee_stat->total ?? 0; @endphp @php $labels = $vacancyCounts->pluck('class_name'); $usedCounts = $vacancyCounts->pluck('user_count'); $availableCounts = $vacancyCounts->pluck('available_count'); // dd($availableCounts); $total_count = $vacancyCounts->pluck('user_count'); @endphp
Employees Overview
{{--
Total Department

{{ $total_department ?? 0 }}

--}} {{--
Non Divyang Employees

{{ $employee_stat->non_divyang ?? 0 }}

--}}
Retiring Employees in Next 6 Months

{{ $retire_employess ?? 0 }}

Attendance Overview
{{-- Todays present --}}
Today's Present
@php $todaysPresentCount = $todayPunchData->where('check_in', '!=', '0000-00-00 00:00:00')->count(); $todaysPresentPercent = $totalEmployees ? round(($todaysPresentCount / $totalEmployees) * 100) : '0'; $todaysAbsentCount = $totalEmployees - $todaysPresentCount; @endphp
{{-- Todays absent --}}
Today's Absent
{{-- Todays present --}}
Yesterday Present
@php $yesterdayPresentCount = $yesterdayPunchData->where('check_in', '!=', '0000-00-00 00:00:00')->count(); $yesterdayPresentPercent = $totalEmployees ? round(($yesterdayPresentCount / $totalEmployees) * 100) : '0'; $yesterdayAbsentCount = $totalEmployees - $yesterdayPresentCount; @endphp
{{-- Todays absent --}}
Yesterday Absent
{{-- Todays present --}}
Day Before Yesterday Present
@php $dayBeforeYesterdayPresentCount = $dayBeforeYesterdayPunchData->where('check_in', '!=', '0000-00-00 00:00:00')->count(); $dayBeforeYesterdayPresentPercent = $totalEmployees ? round(($dayBeforeYesterdayPresentCount / $totalEmployees) * 100) : '0'; $dayBeforeYesterdayAbsentCount = $totalEmployees - $dayBeforeYesterdayPresentCount; @endphp
{{-- dayBeforeYesterday absent --}}
Day Before Yesterday Absent
Working Positions Overview
@foreach ($vacancyCounts as $vacancy)
{{-- Show 3 charts per row (12 / 4 = 3) --}}
{{ $vacancy->class_name }}
@endforeach
@push('scripts') @foreach ($vacancyCounts as $vacancy) @endforeach @endpush