My Progress
{{-- Summary Cards --}}
@php
$total = $total ?? 0;
$completed = $completed ?? 0;
$completionRate = $completionRate ?? 0;
$averageScore = $averageScore ?? 0;
$summary = [
['icon'=>'bi-clock-fill','label'=>'Completion Rate','value'=>$completionRate,'suffix'=>'%','note'=>'All modules','color'=>'bg-light-green'],
['icon'=>'bi-book','label'=>'Modules','value'=>"$completed/$total",'note'=>'Modules done','color'=>'bg-nyota-red'],
['icon'=>'bi-star-fill','label'=>'Average Score','value'=>number_format($averageScore,1),'suffix'=>'%','note'=>'Across modules','color'=>'bg-nyota-black'],
['icon'=>'bi-clipboard-check','label'=>'Performance Level','value'=>($averageScore >= 80 ? 'Excellent' : ($averageScore >= 60 ? 'Good' : 'Improving')),'note'=>'Overall evaluation','color'=>'bg-nyota-olive'],
];
@endphp
@foreach($summary as $card)
{{ $card['label'] }}
{{ $card['value'] }}{{ $card['suffix'] ?? '' }}
{{ $card['note'] }}
@endforeach
{{-- Download PDF Button --}}
{{-- Activities Table --}}
@if($activities->count() > 0)
| # |
Module Title |
Description |
Status |
Progress |
Date Assigned |
Download |
@foreach($activities as $index => $activity)
| {{ $index + 1 }} |
{{ $activity['title'] }} |
{{ $activity['description'] }} |
{{ ucfirst(str_replace('-', ' ', $activity['status'])) }}
|
{{ $activity['score'] ?? 0 }}%
|
{{ \Carbon\Carbon::parse($activity['date'])->format('d M Y') }} |
@if(!empty($activity['file_url']))
Download
@else
N/A
@endif
|
@endforeach
@else
No activities have been assigned to you yet.
@endif
{{-- Custom Styles --}}
@endsection