@extends('admin.layouts.app') @section('title',get_setting('site_name').' | Admin Dashboard') @section('content')
@if(\App\Support\BranchWiseFeature::missingBranchAssignment())
{{ __('Your branch is not assigned. Contact HQ admin to assign a warehouse/branch.') }}
@endif @php $todayAtt = $attDate ?? now()->toDateString(); $dashboardStatRoutes = [ 'total' => route('staffs.index'), 'active' => route('staffs.index'), 'inactive' => route('inactive.staffs'), 'present' => route('dashboard', ['att_date' => $todayAtt, 'daily_status' => 'P']).'#daily-attendance', 'absent' => route('dashboard', ['att_date' => $todayAtt, 'daily_status' => 'A']).'#daily-attendance', 'movement' => auth()->user()?->can('Visit-list') ? route('admin.visit.application', ['movement_date' => $todayAtt, 'status' => '1']) : null, 'leave' => route('dashboard', ['att_date' => $todayAtt, 'daily_status' => 'L']).'#daily-attendance', 'late' => route('dashboard', ['att_date' => $todayAtt, 'daily_status' => 'D']).'#daily-attendance', 'Extra late' => route('dashboard', ['att_date' => $todayAtt, 'daily_status' => 'E']).'#daily-attendance', ]; $inactiveSettlementPendingTotal = (int) ($statsInactiveSettlementPending['total'] ?? 0); @endphp @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) @php $statRoute = $dashboardStatRoutes[$stat['key']] ?? null; @endphp
@if($statRoute) @else @endif
@endforeach @foreach($fundLoanCards as $loanCard)

{{ $loanCard['value'] }}

{{ $loanCard['label'] }}

{{ $loanCard['sublabel'] }}

@endforeach
@if(!empty($moduleMiniCards) || !empty($probationaryStaffCard))
@foreach($moduleMiniCards as $mini)
@if(!empty($mini['route'])) @else @endif
@endforeach @if(!empty($probationaryStaffCard))

{{ $probationaryStaffCard['value'] }}

{{ $probationaryStaffCard['label'] }}
@endif
@endif
@foreach($secondaryMiniCards as $mini)
@if(!empty($mini['route'])) @elseif(!empty($mini['modal'])) @else
@endif
@endforeach
{{ __('Daily Attendance') }}
{{ __('Date') }}: {{ $attDate }}
@unless(\App\Support\BranchWiseFeature::appliesToUser())
@endunless
{{ __('Clear') }}
@forelse($dailyAttendancePaginator 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.') }}
@if($dailyAttendancePaginator->hasPages())
{{ $dailyAttendancePaginator->links() }}
@endif
{{ __('Attendance Missed') }}
{{ __('This month') }}

{{ __('Incomplete in/out for the current month (excluding today).') }}

@unless(\App\Support\BranchWiseFeature::appliesToUser()) @endunless @forelse($missingAttendances as $attendanceMissing) @unless(\App\Support\BranchWiseFeature::appliesToUser()) @endunless @empty @endforelse
{{ __('Date') }} {{ __('Name') }}{{ __('Branch') }}{{ __('In Time') }} {{ __('Out Time') }} {{ __('Action') }}
{{ date('D, M d', strtotime($attendanceMissing->date)) }} {{ $attendanceMissing->staff->user->name ?? '' }}{{ $attendanceMissing->staff->warehouse->name ?? '—' }}
{{ __('No missed attendance records.') }}

Holiday Calendar

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