@extends('backend.layouts.layout') @section('content')

Dashboard

Last updated: {{ now()->format('h:i A') }}
Total Tasks Today
{{ $stats['total_tasks_today'] ?? 0 }}
@php $change = $stats['change_from_yesterday'] ?? 0; $icon = $change >= 0 ? '↑' : '↓'; $class = $change >= 0 ? 'text-success' : 'text-danger'; @endphp {{ $icon }} {{ abs($change) }} from yesterday
Completed
{{ $stats['completed_tasks'] ?? 0 }}
{{ $stats['completion_rate'] ?? 0 }}% completion rate
In Progress
{{ $stats['in_progress_tasks'] ?? 0 }}
{{ $stats['overdue_tasks'] ?? 0 }} overdue
Active Employees
{{ $stats['active_employees'] ?? 0 }}
{{ $stats['on_leave_employees'] ?? 0 }} on leave
Today's Schedule
{{ count($todaySchedule ?? []) }} tasks
@forelse($todaySchedule as $task) @empty @endforelse
Task Client Employee Time Status Priority
{{ $task['task_name'] }}
@if($task['properties']->isNotEmpty()) {{ $task['properties']->first()['property_name'] }} @endif
{{ $task['client'] }}
{{ $task['employee'] }}
{{ $task['estimated_duration'] }} hrs
{{ $task['scheduled_time'] }} {{ ucfirst($task['status']) }} @php $priorityColors = [ 'high' => 'danger', 'medium' => 'warning', 'low' => 'info' ]; @endphp {{ ucfirst($task['priority']) }}

No tasks scheduled for today

Quick Stats
{{ $stats['total_clients'] ?? 0 }}
Total Clients
{{ $stats['active_properties'] ?? 0 }}
Active Properties
{{ $stats['completion_rate'] ?? 0 }}%
Today's Rate
{{ $stats['overdue_tasks'] ?? 0 }}
Overdue Tasks
@if(!empty($topPerformers) && count($topPerformers) > 0)
Top Performers Today
@foreach($topPerformers as $index => $employee)
{{ $employee['name'] }}
{{ $employee['role'] }}
{{ $employee['completed_tasks'] }} tasks
@endforeach
@endif
Quick Actions
Recent Activity
@forelse($recentActivity as $activity)
{{ $activity['title'] }}
{{ $activity['description'] }}
{{ $activity['timestamp'] }}
@empty

No recent activity

@endforelse
@endsection @push('styles') @endpush @push('scripts') @endpush