@extends('layouts.portal') @section('title', 'Enrollments') @section('subtitle', 'Activate, complete or cancel learner enrollments and watch payment progress.') @section('actions') Add learner & enroll@endsection @section('content') @php $tabs = ['' => 'All', 'awaiting' => 'Awaiting fee', 'pending' => 'Pending', 'active' => 'Active', 'completed' => 'Completed', 'cancelled' => 'Cancelled']; $cur = $filters['status'] ?? ''; $keep = collect($filters)->except('status')->filter()->all(); @endphp @if($enrollments->isEmpty())
@else
@foreach($enrollments as $e) @php $net = $e->netFee(); $pp = $net > 0 ? min(100, (int) round((float) $e->paid_amount / $net * 100)) : 100; $manageable = in_array($e->status, ['pending', 'active'], true); @endphp @endforeach
LearnerCourse · batchStatusPayment progressActions
{{ $e->user?->initials() ?? '?' }}
@if($e->user){{ $e->user->name }}
{{ $e->user->email }}
@elseRemoved user@endif
{{ $e->batch?->course?->title ?? 'Course removed' }}
{{ $e->batch?->batch_code }}
{{ $e->status === 'completed' && $e->completed_at ? 'Completed '.$e->completed_at->format('d M Y') : ($e->status === 'cancelled' && $e->cancelled_at ? 'Cancelled '.$e->cancelled_at->format('d M Y') : 'Enrolled '.$e->created_at->format('d M Y')) }}
@if($e->fee_status === 'awaiting') Fee on request
Applied {{ $e->created_at->diffForHumans() }}@if($e->application_note) · “{{ \Illuminate\Support\Str::limit($e->application_note, 40) }}”@endif
@else @if(in_array($e->fee_status, ['sponsored', 'waived'], true)){{ $e->fee_status === 'sponsored' ? 'Sponsored'.($e->sponsor ? ' · '.$e->sponsor : '') : 'Fee waived' }}@endif
{{ money($e->paid_amount) }} / {{ money($net) }} · {{ $pp }}%@if((float) $e->discount > 0) (disc.)@endif
@endif
@if($manageable)
@if($e->fee_status === 'awaiting') Set fee @elseif($e->status === 'pending')
@csrf
@endif @if($e->fee_status !== 'awaiting' && (float) $e->paid_amount <= 0)@endif @if($net > 0)@endif
@endif
@csrf
0 selected
{{ $enrollments->links() }} @foreach($enrollments as $e) @continue(! in_array($e->status, ['pending', 'active'], true)) @php $net = $e->netFee(); $pp = $net > 0 ? min(100, (int) round((float) $e->paid_amount / $net * 100)) : 100; $minAtt = $e->batch?->minAttendance() ?? 75; @endphp @endforeach @endif @endsection @push('scripts')@endpush