@if(session()->has('apply_success')) @endif @isset($volunteer_applications) @foreach($volunteer_applications as $application) @if($application->term->eventOptions()->doesntExist()) @continue @else @once

@svg('img/icons/application') Applications

@endonce @endif

{{ $application->term->full_name }} {{($user->campGroupIsAmbiguous() ? '('.$application->term->campGroup->name . ')' : '')}}

@if(!$application->isSubmitted())
@php $event_options = \App\Models\EventOption::query() ->whereIn('event_id', $application->term->events->pluck('id')) ->orderBy('start') ->get() @endphp @foreach($event_options as $event_option)
{{ $event_option->full_name }} {{ $event_option->start->year }} {{ $event_option->getStartEndLabel() }}
@endforeach
@endif
@if(!$application->isSubmitted())
@svg('img/icons/right-arrow', 'text-blue-500')
@endif

Application forms

@include('term-volunteer-application-forms.partials.due-forms-date-message', ['application', $application]) @php $percentages = floor(100 / count($application->getTopicsData()) * collect($application->getTopicsData())->filter(fn($app) => $app['is_completed'])->count()); @endphp @if($application->isSubmitted()) @if(!$application->assessment == \App\Enums\VolunteerApplicationAssessment::FitForLeadership) Submitted and awaiting review @else Approved @endif @else @if(intval($percentages) === 100) Awaiting submission @else {{$percentages}}% complete @endif @endif
@endforeach @endisset @php $ready_terms = \App\Models\Term::getReadyForApplyingTerms(auth()->user()); $upcoming_terms = $user->getUpcomingTerms(); $terms = $ready_terms->merge($upcoming_terms); @endphp @if($terms->count())

Current and upcoming terms

@foreach ($terms as $term)

{{ ($user->campGroupIsAmbiguous() ? $term->campGroup->name . ' ' : '') . $term->full_name }}

@if($term->ready_date)Applications open {{ $term->ready_date?->format('F Y') }}@endif @if($term->is_ready)
Now open for applications
@endif
@if(!$term->is_ready) @svg('img/icons/lock') @endif
@if($term->is_ready)
@csrf
@endif @if($term->events()->count())
Show event list
@svg('img/icons/down-arrow', 'text-blue-500')
@php $event_options = \App\Models\EventOption::query() ->whereIn('event_id', $term->events->pluck('id')) ->orderBy('start') ->get() @endphp @foreach($event_options as $event_option)
{{ $event_option->full_name }} {{ $event_option->start->year }} {{ $event_option->getStartEndLabel() }}
@endforeach
@endif
@endforeach
@endif