@extends('layouts.dashboard') @section('title', 'Proj Mgr - Sprints') @section('content') @php $totalSprints = $sprints->count(); $activeSprints = $sprints->where('status', 'active')->count(); $planningSprints = $sprints->where('status', 'planning')->count(); $completedSprints = $sprints->where('status', 'completed')->count(); @endphp
{{ $totalSprints }} {{ Str::plural('sprint', $totalSprints) }} {{ $activeSprints }} active {{ $planningSprints }} planning {{ $completedSprints }} completed
@if(session('success'))
{{ session('success') }}
@endif @if($sprints->isEmpty())

No sprints yet

Create a sprint and assign tasks to it

Create First Sprint
@else
to
@foreach($sprints as $sprint) @php $statusColor = match($sprint->status) { 'active' => 'bg-green-100 text-green-800', 'completed' => 'bg-blue-100 text-blue-800', default => 'bg-yellow-100 text-yellow-800', }; $statusStripe = match($sprint->status) { 'active' => 'bg-green-500', 'completed' => 'bg-blue-500', default => 'bg-yellow-400', }; $taskCount = $sprint->tasks_count; $doneCount = $sprint->tasks->where('task_status', 'approved')->count(); $progress = $taskCount > 0 ? round(($doneCount / $taskCount) * 100) : 0; @endphp
{{ $sprint->name }} {{ ucfirst($sprint->status) }}
@if($sprint->goal)

{{ $sprint->goal }}

@endif
{{ $sprint->start_date->format('M d') }} – {{ $sprint->end_date->format('M d, Y') }} {{ $taskCount }} {{ Str::plural('task', $taskCount) }}
@if($taskCount > 0)
{{ $doneCount }} / {{ $taskCount }} done {{ $progress }}%
@else

No tasks yet

@endif
View Edit
@csrf @method('DELETE')
@endforeach
@foreach($sprints as $sprint) @php $statusColor = match($sprint->status) { 'active' => 'bg-green-100 text-green-800', 'completed' => 'bg-blue-100 text-blue-800', default => 'bg-yellow-100 text-yellow-800', }; $statusStripe = match($sprint->status) { 'active' => 'bg-green-500', 'completed' => 'bg-blue-500', default => 'bg-yellow-400', }; $taskCount = $sprint->tasks_count; $doneCount = $sprint->tasks->where('task_status', 'approved')->count(); $progress = $taskCount > 0 ? round(($doneCount / $taskCount) * 100) : 0; @endphp
{{ $sprint->name }} {{ ucfirst($sprint->status) }}
@if($sprint->goal)

{{ $sprint->goal }}

@endif
{{ $sprint->start_date->format('M d') }} – {{ $sprint->end_date->format('M d, Y') }} {{ $taskCount }} {{ Str::plural('task', $taskCount) }} {{ $doneCount }} done
View Edit
@csrf @method('DELETE')
@if($taskCount > 0)
Progress {{ $progress }}%
@endif
@endforeach
@endif
@push('scripts') @endpush @endsection