@forelse($taskGroups as $taskGroup) @component('components.tile') @foreach($taskGroup->tasks as $task) @php $total = $compliance['total']->firstWhere('task_id', $task->id)->total ?? 0; $out = $compliance['overdue']->firstWhere('task_id', $task->id)->total ?? 0; $in = $total - $out; if ($total > 0) { $percent = floor(100 - ($out/$total*100)); } else { $percent = '-'; } @endphp @endforeach
{{ $taskGroup->title }} Total Non In %
{{ $task->title }}
{{ $total }} {{ $out }} {{ $in }} {{ $percent }}
@endcomponent @empty @endforelse