@extends('layouts.dashboard') @section('content')

🎨 Design Team Report

@php $currentMonth = request('month', now()->format('m')); $currentYear = request('year', now()->format('Y')); @endphp

📊 Overview

Total Projects
{{ $totalProjects }}
Total Budget
${{ number_format($totalBudget, 2) }}
Estimated Hours
{{ $totalEstimatedHours ? $totalEstimatedHours . ' hrs' : '-' }}
Worked Hours
{{ $totalWorkedHours ? $totalWorkedHours . ' hrs' : '-' }}

👥 Employee Statistics

@foreach($employeeStats as $stat)
{{ $stat['name'] }}
{{ $stat['hours'] > 0 ? $stat['hours'] . ' hrs' : '0 hrs' }}
@endforeach

📁 Projects List

@foreach($employees as $employee) @endforeach @php $totalEmployeeHours = []; foreach($employees as $employee) { $totalEmployeeHours[$employee->id] = 0; } $totalProjectBudget = 0; $totalEstimatedHours = 0; $totalWorkedHours = 0; @endphp @foreach($projects as $project) @php $status = strtolower($project->project_status); $rowClass = match ($status) { 'paused' => 'bg-red-50 text-red-700 font-semibold', 'complete' => 'bg-green-50 text-green-700 font-semibold', default => '', }; @endphp @foreach($employees as $employee) @php $assignedHours = $employee->dsrs->where('project_id', $project->id)->sum('hours'); $totalEmployeeHours[$employee->id] += $assignedHours; @endphp @endforeach @php $totalProjectBudget += $project->price; $totalEstimatedHours += $project->estimated_hours; $totalWorkedHours += $project->dsrs->sum('hours'); @endphp @endforeach @foreach($employees as $employee) @endforeach
Project Name Budget Estimated Hours Worked Hours{{ $employee->name }}
{{ $project->name_or_url ?? '-' }} ${{ number_format($project->price, 2) }} {{ $project->estimated_hours ? $project->estimated_hours . ' hrs' : '-' }} {{ $project->dsrs->sum('hours') ? $project->dsrs->sum('hours') . ' hrs' : '-' }}{{ $assignedHours > 0 ? $assignedHours . ' hrs' : '-' }}
Totals: ${{ number_format($totalProjectBudget, 2) }} {{ $totalEstimatedHours ? $totalEstimatedHours . ' hrs' : '-' }} {{ $totalWorkedHours ? $totalWorkedHours . ' hrs' : '-' }} {{ $totalEmployeeHours[$employee->id] > 0 ? $totalEmployeeHours[$employee->id] . ' hrs' : '-' }}
@endsection