@foreach($errors->all() as $e)
{{ $e }}
@endforeach
@endif
{{-- Header --}}
Prediction
{{ $r['prediction']['target_year'] ?? 'โ' }} ยท {{ $r['prediction']['target_session'] ?? 'โ' }}
@php
$conf = $r['prediction']['confidence'] ?? 'n/a';
$confColor = match($conf) {
'high' => 'bg-emerald-500/20 text-emerald-200 border-emerald-400/40',
'medium' => 'bg-amber-500/20 text-amber-200 border-amber-400/40',
default => 'bg-rose-500/20 text-rose-200 border-rose-400/40',
};
@endphp
{{ $conf }} confidence
{{-- Category Cut-off --}}
@php
$cut = $r['prediction']['predicted_cutoff'] ?? [];
$ci = $r['prediction']['confidence_interval'] ?? [];
$cats = [
'general' => ['label' => 'General', 'color' => 'from-cyan-400 to-blue-500'],
'obc' => ['label' => 'OBC', 'color' => 'from-emerald-400 to-teal-500'],
'sc' => ['label' => 'SC', 'color' => 'from-amber-400 to-orange-500'],
'st' => ['label' => 'ST', 'color' => 'from-pink-400 to-rose-500'],
];
@endphp
@foreach($cats as $key => $meta)
@php
$val = $cut[$key] ?? null;
$range = $ci[$key] ?? 0;
$min = $val !== null ? $val - $range : null;
$max = $val !== null ? $val + $range : null;
@endphp
{{ $meta['label'] }}
{{ $val ?? 'โ' }}
@if($val !== null && $range)
Range: {{ $min }} โ {{ $max }}
@endif
@endforeach
{{-- โญ NEW: Cut-off Factors Breakdown --}}
@if(!empty($r['cut_off_factors']))
@php $cf = $r['cut_off_factors']; @endphp
Prediction Breakdown (how it was calculated)
@php
$cats = ['general' => 'General', 'obc' => 'OBC', 'sc' => 'SC', 'st' => 'ST'];
$base = $cf['base_value'] ?? [];
$diff = $cf['difficulty_impact'] ?? [];
$comp = $cf['competition_impact'] ?? [];
$trend = $cf['trend_impact'] ?? [];
@endphp
| Factor |
General |
OBC |
SC |
ST |
| Base (last year) |
@foreach($cats as $k => $l)
{{ $base[$k] ?? 'โ' }} |
@endforeach
| Difficulty impact |
@foreach($cats as $k => $l)
@php $v = $diff[$k] ?? 0; @endphp
{{ $v >= 0 ? '+' : '' }}{{ $v }}
|
@endforeach
| Competition impact |
@foreach($cats as $k => $l)
@php $v = $comp[$k] ?? 0; @endphp
{{ $v >= 0 ? '+' : '' }}{{ $v }}
|
@endforeach
| Trend impact |
@foreach($cats as $k => $l)
@php $v = $trend[$k] ?? 0; @endphp
{{ $v >= 0 ? '+' : '' }}{{ $v }}
|
@endforeach
| Final Predicted |
@foreach($cats as $k => $l)
{{ $r['prediction']['predicted_cutoff'][$k] ?? 'โ' }}
|
@endforeach
@if(!empty($cf['explanation']))
Reason: {{ $cf['explanation'] }}
@endif
@endif
{{-- Trend Chart --}}
@if(!empty($r['yearly_cutoff_table']))
@endif
{{-- Subject + Topic Charts --}}
@if(!empty($r['subject_weightage']))
@endif
@if(!empty($r['topic_weightage']))
๐ฏ Topic Weightage (Top 10)
@endif
{{-- Subject-Topic Breakdown --}}
@if(!empty($r['subject_topic_breakdown']))
๐ Subject-wise Topic Breakdown
@foreach($r['subject_topic_breakdown'] as $group)
{{ $group['subject'] ?? 'โ' }}
{{ $group['weightage'] ?? 0 }}%
@foreach($group['topics'] ?? [] as $topic)
-
{{ $topic['name'] ?? 'โ' }}
{{ $topic['weightage'] ?? 0 }}%
@endforeach
@endforeach
@endif
{{-- Important + Ignored --}}
@if(!empty($r['important_topics']))
โ
Important Topics
@foreach($r['important_topics'] as $t)
-
{{ $t['topic'] ?? 'โ' }} ยท {{ $t['subject'] ?? '' }}
{{ $t['weightage'] ?? 0 }}%
@endforeach
@endif
@if(!empty($r['ignored_topics']))
โ ๏ธ Ignored Topics
@foreach($r['ignored_topics'] as $t)
-
{{ $t['topic'] ?? 'โ' }} ยท {{ $t['subject'] ?? '' }}
{{ $t['weightage'] ?? 0 }}%
@endforeach
@endif
{{-- Reasoning --}}
@if(!empty($r['prediction']['reasoning']))
AI Reasoning
{{ $r['prediction']['reasoning'] }}
@endif
@endif
@endsection