@extends('layouts/contentNavbarLayout') @section('title', 'Personal Challenges') @section('vendor-style') @endsection @section('page-style') @endsection @section('content')

Personal Challenges

Manage personal challenges for individual progress

@if(session('success')) @endif @if(session('error')) @endif
{{ $challenges->total() }}
Total Challenges
{{ $challenges->where('status', 'active')->count() }}
Active Challenges
{{ $challenges->sum('users_count') }}
Total Participants
{{ $challenges->where('frequency', 'daily')->count() }}
Daily Challenges
@forelse($challenges as $challenge)
@if($challenge->status === 'active') Active @elseif($challenge->status === 'finished') Finished @elseif($challenge->status === 'canceled') Canceled @elseif($challenge->status === 'inactive') Inactive @endif
{{ ucfirst($challenge->frequency) }}
@if($challenge->image) {{ $challenge->title }} @else
@endif
{{ $challenge->title }}

{{ Str::limit($challenge->description, 100) }}

{{ $challenge->users_count }} participants
{{ \Carbon\Carbon::parse($challenge->start_date)->format('M d') }}
@if($challenge->is_steps_goal)
{{ number_format($challenge->steps_goal) }} steps
@endif @if($challenge->is_points_prize)
{{ $challenge->points_prize }} points
@endif
@if($challenge->is_steps_goal)
Goal Progress {{ number_format($challenge->steps_goal) }} steps
@endif
@empty
No Personal Challenges Found

Get started by creating your first personal challenge for users to compete with themselves.

Create First Challenge
@endforelse
@if($challenges->hasPages())
{{ $challenges->appends(request()->query())->links() }}
@endif
@endsection