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

Company Challenges

Manage company-wide challenges

Total Challenges: {{ $challenges->total() }}
New Challenge
@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
{{ $challenge->title }}
{{ $challenge->title }}

{{ $challenge->company->name }}

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

{{ number_format($challenge->required_steps) }}
Required Steps
{{ $challenge->users_count }}
Participants
{{ $challenge->type }}
Type
Start Date {{ \Carbon\Carbon::parse($challenge->start_date)->format('M d, Y') }}
End Date {{ \Carbon\Carbon::parse($challenge->end_date)->format('M d, Y') }}
@if($challenge->is_points_prize)
{{ number_format($challenge->points_prize) }} Points @if($challenge->prize_description) {{ Str::limit($challenge->prize_description, 50) }} @endif
@endif
@empty

No Company Challenges Found

Create your first company challenge to get started!

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