@extends('layouts.app') @section('title', 'Connect - Dashboard') @section('content')

Welcome back, {{ auth()->user()->name }}!

Here is a quick overview of your organization today.

@can('employees.create') Add Employee @endcan
{{ $stats['total_employees'] }}
Total Employees
{{ $stats['on_leave_today'] }}
On Leave Today
{{ $stats['pending_leaves'] }}
Pending Leaves
{{ $stats['pending_loans'] }}
Pending Loans

Workforce Compliance Health

{{ $stats['compliance_score'] }}%
{{ $stats['compliance_score'] >= 90 ? 'Excellent' : ($stats['compliance_score'] >= 75 ? 'Fair' : 'Critical') }}
{{ $stats['valid_documents'] }} Valid {{ $stats['expired_documents'] }} Expired
@if($expiredCompanyDocs->isNotEmpty() || $expiredEmployeeDocs->isNotEmpty() || count($expiredEmployeeCoreDocs) > 0)

Compliance & Document Expiry Warnings

{{ $expiredCompanyDocs->count() + $expiredEmployeeDocs->count() + count($expiredEmployeeCoreDocs) }} Alerts
@foreach($expiredCompanyDocs as $doc) @php $isExpired = $doc->expiry_date->isPast(); $daysLeft = $isExpired ? 0 : now()->startOfDay()->diffInDays($doc->expiry_date->startOfDay()); @endphp @endforeach @foreach($expiredEmployeeDocs as $doc) @php $isExpired = $doc->expiry_date->isPast(); $daysLeft = $isExpired ? 0 : now()->startOfDay()->diffInDays($doc->expiry_date->startOfDay()); @endphp @endforeach @foreach($expiredEmployeeCoreDocs as $doc) @endforeach
Category Subject Document / Field Expiry Date Days Remaining Status Action
Company {{ $doc->company->name }} {{ $doc->document_name }} {{ $doc->expiry_date->format('d-M-Y') }} {{ $isExpired ? 'Expired' : $daysLeft . ' days' }} {{ $isExpired ? 'Expired' : 'Expiring Soon' }} Resolve
Employee File {{ $doc->employee->fullName }} {{ $doc->documentType->name }} {{ $doc->expiry_date->format('d-M-Y') }} {{ $isExpired ? 'Expired' : $daysLeft . ' days' }} {{ $isExpired ? 'Expired' : 'Expiring Soon' }} Resolve
Employee Profile {{ $doc['employee_name'] }} {{ $doc['document_type'] }} {{ $doc['expiry_date']->format('d-M-Y') }} {{ $doc['is_expired'] ? 'Expired' : $doc['days_left'] . ' days' }} {{ $doc['is_expired'] ? 'Expired' : 'Expiring Soon' }} Update
@endif

Department Headcount

Approved Leaves by Type

Company Announcements

@if($announcements->isEmpty())

No active announcements at the moment.

@else
@foreach($announcements as $announcement)

{{ $announcement->title }}

{{ $announcement->content }}

{{ $announcement->published_at ? $announcement->published_at->format('d-M-Y H:i') : $announcement->created_at->format('d-M-Y H:i') }}
@endforeach
@endif

Recently Joined Employees

@if($recentEmployees->isEmpty()) @else @foreach($recentEmployees as $employee) @endforeach @endif
Name Code Department Designation Joining Date
No employees registered yet.
{{ $employee->first_name }} {{ $employee->last_name }}
{{ $employee->email }}
{{ $employee->employee_code }} {{ $employee->department ? $employee->department->name : '-' }} {{ $employee->designation ? $employee->designation->name : '-' }} {{ \Carbon\Carbon::parse($employee->date_of_joining)->format('d-M-Y') }}

Recent Activities

@if($recentLogs->isEmpty())

No recent activity logs.

@else
    @foreach($recentLogs as $log)
  • {{ $log->action }}
    {{ $log->description }}
    {{ $log->created_at->diffForHumans() }} by {{ $log->user ? $log->user->name : 'System' }}
  • @endforeach
@endif

Did you know?

You can customize your organization logo, branding colors, default timezone, and office settings in the settings panel.

@can('settings.view') Edit Settings @endcan
@endsection @section('scripts') @endsection