| @foreach ($data['days'] as $d) | {{ $d->translatedFormat('D') }} {{ $d->format('d.m') }} |
@endforeach
|---|---|
|
{{ $row['post']->name }}
|
@foreach ($row['days'] as $cell)
@php
$h = (float) $cell['hours'];
$ratio = min(1, $h / max(0.001, $data['capacity']));
// Heatmap color: green → yellow → red as ratio grows.
if ($h <= 0) {
$bg = '#f3f4f6'; $fg = '#9ca3af';
} else {
$r = (int) (255 * $ratio);
$g = (int) (200 * (1 - $ratio));
$bg = "rgba({$r},{$g},80,0.18)";
$fg = "rgba({$r},{$g},80,1)";
}
@endphp
@if ($h > 0)
{{ number_format($h, 1) }}h
{{ $cell['count'] }} progr.
@else
—
@endif
|
@endforeach