@extends('layouts/contentNavbarLayout') @section('title', $challenge->title . ' - Completions History') @section('vendor-style') @endsection @section('page-style') @endsection @section('content')

{{ $challenge->title }} - Completions

{{ ucfirst($challenge->frequency) }}

Complete history of all challenge completions by participants

{{ $challenge->completions->count() }}
Total Completions
{{ $challenge->completions->count() }}
Total Completions
{{ $challenge->completions->unique('user_id')->count() }}
Unique Participants
{{ number_format($challenge->completions->sum('steps')) }}
Total Steps
{{ number_format($challenge->completions->where('is_points_prize', true)->sum('points_prize')) }}
Points Awarded
Completion History

Chronological list of all challenge completions

@if($challenge->completions->count() > 0)
@if($challenge->is_points_prize) @endif @foreach($challenge->completions->sortByDesc('completion_date') as $completion) @if($challenge->is_points_prize) @endif @endforeach
Date Participant Steps FrequencyPointsPrize Description Completed
{{ \Carbon\Carbon::parse($completion->completion_date)->format('M d') }}
{{ \Carbon\Carbon::parse($completion->completion_date)->format('Y') }}
@if($completion->user->avatar) {{ $completion->user->name }} @else
{{ substr($completion->user->name, 0, 1) }}
@endif
{{ $completion->user->name }}
{{ $completion->user->email }}
@if($completion->steps) {{ number_format($completion->steps) }} @else - @endif {{ ucfirst($completion->frequency) }} @if($completion->is_points_prize && $completion->points_prize) +{{ $completion->points_prize }} @else - @endif @if($completion->prize_description) {{ Str::limit($completion->prize_description, 50) }} @else No description @endif
{{ \Carbon\Carbon::parse($completion->created_at)->locale('en')->diffForHumans() }}
@else
No Completions Yet

Once participants start completing the challenge, their progress will appear here.

Back to Challenge
@endif
@if($challenge->completions->count() > 0)
Recent Activity
@foreach($challenge->completions->sortByDesc('completion_date')->take(10) as $completion)
@if($completion->user->avatar) {{ $completion->user->name }} @else
{{ substr($completion->user->name, 0, 1) }}
@endif
{{ $completion->user->name }}
@if($completion->steps) {{ number_format($completion->steps) }} steps @endif @if($completion->is_points_prize && $completion->points_prize) +{{ $completion->points_prize }} points @endif
{{ \Carbon\Carbon::parse($completion->completion_date)->format('M d') }}
{{ \Carbon\Carbon::parse($completion->completion_date)->locale('en')->diffForHumans() }}
@endforeach
@endif @endsection