@if (($tipeIntern == 'all' || $tipeIntern == 'intern_it') && $aktif->count())
Intern IT
@foreach ($aktif->chunk(ceil($aktif->count() / 2)) as $chunk)
@foreach ($chunk as $r)
@php
$isDanger = !isset($r->has_start_today) || (int) $r->has_start_today !== 1;
@endphp
@if ($isDanger)
{{ $r->name }}
@else
{{ $r->name }}
@endif
@foreach ($blocks as $b)
@php
$fill = 0;
if ($r->total_poin >= $b) {
$fill = 100;
} elseif ($r->total_poin >= $b - 10) {
$fill = (($r->total_poin - ($b - 10)) / 10) * 100;
}
$fillShown = $isDanger && $fill == 0 ? 2 : $fill;
@endphp
@endforeach
@if ($isDanger)
{{ number_format(($r->total_poin / 80) * 100, 1) }}% -
{{ $r->total_poin }}
@else
{{ number_format(($r->total_poin / 80) * 100, 1) }}% - {{ $r->total_poin }}
@endif
@endforeach
@endforeach
@endif
@if (($tipeIntern == 'all' || $tipeIntern == 'internship') && $intern->count())
Internship
@foreach ($internGrouped as $mentorName => $internList)
@php
$borderColors = [
'#e57373',
'#ffb74d',
'#ffd54f',
'#81c784',
'#64b5f6',
'#ba68c8',
'#f06292',
'#4db6ac',
];
$borderColor = $borderColors[$loop->index % count($borderColors)];
@endphp
Mentor: {{ $mentorName ?? 'Belum Ada Mentor' }}
{{ $internList->count() }} orang
@foreach ($internList->chunk(ceil($internList->count() / 2)) as $chunk)
@foreach ($chunk as $r)
@php
$isDanger = !isset($r->has_start_today) || (int) $r->has_start_today !== 1;
@endphp
@if ($isDanger)
{{ $r->name }}
@else
{{ $r->name }}
@endif
@foreach ($blocks as $b)
@php
$fill = 0;
if ($r->total_poin >= $b) {
$fill = 100;
} elseif ($r->total_poin >= $b - 10) {
$fill = (($r->total_poin - ($b - 10)) / 10) * 100;
}
$fillShown = $isDanger && $fill == 0 ? 2 : $fill;
@endphp
@endforeach
@if ($isDanger)
{{ number_format(($r->total_poin / 80) * 100, 1) }}% -
{{ $r->total_poin }}
@else
{{ number_format(($r->total_poin / 80) * 100, 1) }}% - {{ $r->total_poin }}
@endif
@endforeach
@endforeach
@if (!$loop->last)
@endif
@endforeach
@endif
@if (($tipeIntern == 'all' || $tipeIntern == 'intern_univ') && $internUniv->count())
Internship Universitas
@foreach ($internUnivGrouped as $mentorName => $internUnivList)
@php
$borderColors = [
'#e57373',
'#ffb74d',
'#ffd54f',
'#81c784',
'#64b5f6',
'#ba68c8',
'#f06292',
'#4db6ac',
];
$borderColor = $borderColors[$loop->index % count($borderColors)];
@endphp
{{--
Mentor: {{ $mentorName ?? 'Belum Ada Mentor' }}
{{ $internUnivList->count() }} orang
--}}
@foreach ($internUnivList->chunk(ceil($internUnivList->count() / 2)) as $chunk)
@foreach ($chunk as $r)
@php
$isDanger = !isset($r->has_start_today) || (int) $r->has_start_today !== 1;
@endphp
@if ($isDanger)
{{ $r->name }}
@else
{{ $r->name }}
@endif
@foreach ($blocks as $b)
@php
$fill = 0;
if ($r->total_poin >= $b) {
$fill = 100;
} elseif ($r->total_poin >= $b - 10) {
$fill = (($r->total_poin - ($b - 10)) / 10) * 100;
}
$fillShown = $isDanger && $fill == 0 ? 2 : $fill;
@endphp
@endforeach
@if ($isDanger)
{{ number_format(($r->total_poin / 80) * 100, 1) }}% -
{{ $r->total_poin }}
@else
{{ number_format(($r->total_poin / 80) * 100, 1) }}% -
{{ $r->total_poin }}
@endif
@endforeach
@endforeach
@if (!$loop->last)
@endif
@endforeach
@endif
{{-- ========== NON AKTIF (ALWAYS SHOW) ========== --}}
@if ($nonaktif->count())
Non Aktif
@foreach ($nonaktif->chunk(ceil($nonaktif->count() / 2)) as $chunk)
@foreach ($chunk as $r)
@php
$isDanger = !isset($r->has_start_today) || (int) $r->has_start_today !== 1;
@endphp
@if ($isDanger)
{{ $r->name }}
@else
{{ $r->name }}
@endif
@foreach ($blocks as $b)
@php
$fill = 0;
if ($r->total_poin >= $b) {
$fill = 100;
} elseif ($r->total_poin >= $b - 10) {
$fill = (($r->total_poin - ($b - 10)) / 10) * 100;
}
$fillShown = $isDanger && $fill == 0 ? 2 : $fill;
@endphp
@endforeach
@if ($isDanger)
{{ number_format(($r->total_poin / 80) * 100, 1) }}% -
{{ $r->total_poin }}
@else
{{ number_format(($r->total_poin / 80) * 100, 1) }}% - {{ $r->total_poin }}
@endif
@endforeach
@endforeach
@endif