@extends('layouts.app') @section('title', 'Dashboard - ' . config('app.name')) @section('header-left')

Dashboard

@if(in_array(auth()->user()->role, ['owner', 'admin'])) @endif
@endsection @section('content') @php $hour = (int) now()->format('G'); $greeting = $hour < 12 ? 'morning' : ($hour < 17 ? 'afternoon' : 'evening'); @endphp {{-- Welcome --}}

Good {{ $greeting }}, {{ $user->name }}

{{ now()->format('l, F j, Y') }}

{{-- Stats cards --}}

Tasks due today

{{ $tasksDueTodayCount }}

Overdue tasks

{{ $overdueCount }}

Completed this week

{{ $completedThisWeekCount }}

Total active tasks

{{ $totalActiveCount }}

{{-- Today's Tasks --}}

Today's Tasks

View all
@if ($tasksDueToday->isEmpty())

No tasks due today.

@else @endif
{{-- Overdue --}}

Overdue

@if ($overdueTasks->isNotEmpty()) View all @endif
@if ($overdueTasks->isEmpty())

No overdue tasks.

@else @endif
{{-- Recent Activity --}}

Recent Activity

@if ($recentActivity->isEmpty())

No recent activity.

@else @endif
{{-- Team Overview (supervisors) --}} @if (!empty($teamOverview))

Team Overview

View Team Dashboard
@endif @include('partials.task-panel', ['projectId' => null]) @if(in_array(auth()->user()->role, ['owner', 'admin'])) @include('partials.create-task-modal', [ 'apiBase' => url('/api/v1'), 'csrf' => csrf_token(), ]) @endif @endsection @push('scripts') @include('partials.task-panel-script') @endpush