@php $reports = $this->directReportsBandwidth(); $overCount = $reports->where('status', 'over')->count(); $teamAvg = $this->teamAverageBandwidth($reports); [$weekStart, $weekEnd] = $this->currentWeekRange(); $pillClasses = [ 'warning' => 'bg-warning-50 text-warning-600 dark:bg-warning-500/10 dark:text-warning-400', 'ok' => 'bg-success-50 text-success-600 dark:bg-success-500/10 dark:text-success-400', 'over' => 'bg-danger-50 text-danger-600 dark:bg-danger-500/10 dark:text-danger-400', ]; $barClasses = [ 'warning' => 'bg-warning-500', 'ok' => 'bg-success-500', 'over' => 'bg-danger-500', ]; $labels = ['warning' => 'Limite', 'ok' => 'Équilibrée', 'over' => 'Surchargée']; @endphp
{{ $this->periodLabel() }}
Synthèse
{{ $teamAvg['percent'] }}% de charge moyenne
{{ $reports->count() }} personne{{(($reports->count() > 1) ? 's' : '') }} sous ta responsabilité directe
@if ($overCount > 0) {{ $overCount }} en surcharge @endif
Détail de mon équipe
@forelse ($reports as $report) @php $person = $report['person']; @endphp
{{ $person->initials }} {{ $person->full_name }}
{{ $labels[$report['status']] }}
@php $reportPercent = $report['capacity'] > 0 ? min(100, (int) round($report['hours'] / $report['capacity'] * 100)) : 0; @endphp
{{ rtrim(rtrim(number_format($report['hours'], 1), '0'), '.') }}h / {{ rtrim(rtrim(number_format($report['capacity'], 1), '0'), '.') }}h
@if ($report['subteam'])
Son équipe : {{ $report['subteam']['count'].' personne'.(($report['subteam']['count'] > 1) ? 's' : '') }} @php $reportPercent = $report['subteam']['capacity'] > 0 ? min(100, (int) round($report['subteam']['hours'] / $report['subteam']['capacity'] * 100)) : 0; @endphp {{ $reportPercent."%" }}
@endif
@empty
Personne sous ta responsabilité directe.
@endforelse