Project & Earnings Overview

Active projects and monthly earnings per team

{{-- Filters --}}
@php $teams = $this->getComputedData(); @endphp @if(empty($teams))
No data available.
@else
@foreach($teams as $t)
{{-- Team Header --}}

{{ $t['team']->name }}

{{ date('F', mktime(0,0,0,$month,1)) }} {{ $year }}

{{ $t['active_count'] }} Active @if($t['total_hrs_week']) {{ $t['total_hrs_week'] }} hrs/wk @endif @php $earnBg = $t['earn_rate'] >= 80 ? 'bg-success-100 text-success-700 dark:bg-success-900 dark:text-success-300' : ($t['earn_rate'] >= 50 ? 'bg-warning-100 text-warning-700 dark:bg-warning-900 dark:text-warning-300' : 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400'); @endphp Earn Rate: {{ $t['earn_rate'] }}%
{{-- Earnings Summary Bar --}}

Earned ({{ date('F', mktime(0,0,0,$month,1)) }})

${{ number_format($t['earned'], 0) }}

Potential

${{ number_format($t['potential'], 0) }}

Earn Rate

{{ $t['earn_rate'] }}%
{{-- Projects Table --}} @if($t['projects']->isEmpty())
No projects found for this team.
@else
@foreach($t['projects'] as $project) @php $statusConfig = match($project->status) { 'in_progress' => ['label' => 'In Progress', 'class' => 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300'], 'in_review' => ['label' => 'In Review', 'class' => 'bg-lime-100 text-lime-700 dark:bg-lime-900 dark:text-lime-300'], 'hold' => ['label' => 'Hold', 'class' => 'bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-300'], 'completed' => ['label' => 'Completed', 'class' => 'bg-success-100 text-success-700 dark:bg-success-900 dark:text-success-300'], default => ['label' => 'Pending', 'class' => 'bg-warning-100 text-warning-700 dark:bg-warning-900 dark:text-warning-300'], }; @endphp @endforeach
Project PM Status Type Hrs/Wk
{{ $project->name }} {{ $project->projectManager?->name ?? '—' }} {{ $statusConfig['label'] }} {{ $project->project_type ?? '—' }} {{ $project->total_hour_per_week ? $project->total_hour_per_week . 'h' : '—' }}
{{ $t['projects']->count() }} projects @foreach(['in_progress' => 'In Progress', 'in_review' => 'In Review', 'hold' => 'Hold', 'pending' => 'Pending'] as $st => $stLabel) @if(($t['status_counts'][$st] ?? 0) > 0) {{ $t['status_counts'][$st] }} {{ $stLabel }} @endif @endforeach {{ $t['total_hrs_week'] ? $t['total_hrs_week'] . 'h' : '—' }}
@endif
@endforeach
@endif