@extends('Staff.layout') @section('title', 'Dashboard') @section('content')

Pending Tasks

{{ $pending_tasks }}

New Tasks

{{ $new_tasks }}

Completed Tasks

{{ $completed_tasks }}

Hold Tasks

{{ $hold_tasks }}

Project Status
@foreach($projectData as $data) @php // Keep the collection type consistent whether the // controller passed an array or an Eloquent/Support // collection, and derive a stable color per developer // from their name so it never shifts between the // compact row (original order) and the modal (sorted // by count). $devList = collect($data['developerBugCounts']); $visibleDevs = $devList->take(3); $remainingCount = $devList->count() - $visibleDevs->count(); $devColor = fn($name) => crc32($name) % 5; @endphp
Project : {{ $data['project']->project_name }}
Pending : {{ $data['pendingTasks'] }}
Hold : {{ $data['holdTasks'] }}
Completed : {{ $data['completedTasks'] }}
{{ $data['progressPercent'] }}%
{{ $data['completedTasks'] }} / {{ $data['totalTasks'] }}
Bug Status
{{ $data['bugProgressPercent'] }}%
{{ $data['completedBugs'] + $data['testingBugs'] }} / {{ $data['totalBugs'] }}
Developers Included
@forelse($visibleDevs as $dev)
{{ strtoupper(substr($dev['name'], 0, 1)) }} {{ $dev['name'] }} {{ $dev['count'] }}
@empty No developers assigned yet @endforelse @if($remainingCount > 0) @endif
@endforeach
@endsection