@extends('layouts.admin') @section('title', 'Risk Monitoring') @section('breadcrumb', 'Risk Monitoring') @section('content')

Risk Monitoring

{{ $scores->total() }} countries with risk assessments

{{-- AVG SCORE CARDS --}}
@foreach([ ['label' => 'Avg Weather Score', 'value' => $avgScores['weather'], 'icon' => 'bi-cloud-lightning', 'color' => '#38BDF8'], ['label' => 'Avg Inflation Score', 'value' => $avgScores['inflation'], 'icon' => 'bi-graph-up-arrow', 'color' => '#F59E0B'], ['label' => 'Avg Currency Score', 'value' => $avgScores['currency'], 'icon' => 'bi-currency-exchange', 'color' => '#34D399'], ['label' => 'Avg News Score', 'value' => $avgScores['news'], 'icon' => 'bi-newspaper', 'color' => '#F87171'], ] as $avg)
{{ $avg['value'] }}
{{ $avg['label'] }}
@endforeach
{{-- FILTERS --}}
@if($search || $riskLevel) Clear @endif
{{-- TABLE --}}
@foreach($scores as $s) @endforeach
Country Weather Inflation Currency News Total Score Risk Level Last Calc Recalculate
{{ $s->country?->country_name }}
{{ number_format($s->weather_score, 1) }}
{{ number_format($s->inflation_score, 1) }}
{{ number_format($s->currency_score, 1) }}
{{ number_format($s->news_score, 1) }}
{{ number_format($s->total_score, 1) }} {{ $s->risk_level }} {{ $s->calculated_at?->diffForHumans() ?? '—' }}
@if($scores->hasPages())
{{ $scores->links() }}
@endif
@endsection @push('scripts') @endpush