@php $d = $this->getData(); $countries = $d['countries']; $skills = $d['skills']; $maxTotal = $d['maxTotal']; $maxRevenue = $d['maxRevenue']; $totalProposals = $d['totalProposals']; $totalWon = $d['totalWon']; $overallWinRate = $d['overallWinRate']; $bestCountry = $d['bestCountry']; $atRiskCount = $d['atRiskCount']; $tierConfig = [ 'good' => ['bg' => 'bg-emerald-50', 'border' => 'border-emerald-200', 'badge' => 'bg-emerald-100 text-emerald-700', 'ring' => '#10b981', 'track' => '#d1fae5', 'label' => 'Good'], 'warning' => ['bg' => 'bg-amber-50', 'border' => 'border-amber-200', 'badge' => 'bg-amber-100 text-amber-700', 'ring' => '#f59e0b', 'track' => '#fef3c7', 'label' => 'Review'], 'danger' => ['bg' => 'bg-rose-50', 'border' => 'border-rose-200', 'badge' => 'bg-rose-100 text-rose-700', 'ring' => '#f43f5e', 'track' => '#ffe4e6', 'label' => 'Needs Attention'], ]; @endphp Proposal Stats Country performance scorecards and skill demand analysis.
{{-- Summary Bar --}}
Total: {{ number_format($totalProposals) }}
Won: {{ $totalWon }}
$overallWinRate >= 20, 'bg-amber-50 border-amber-200' => $overallWinRate >= 10 && $overallWinRate < 20, 'bg-rose-50 border-rose-200' => $overallWinRate < 10, ])> Win rate: {{ $overallWinRate }}%
@if ($bestCountry)
Best market: {{ $bestCountry['name'] }} ({{ $bestCountry['winRate'] }}% win rate)
@endif @if ($atRiskCount > 0)
{{ $atRiskCount }} market{{ $atRiskCount > 1 ? 's' : '' }} need attention
@endif
{{-- Tabs --}}
{{-- Countries Tab --}}
@if (count($countries) === 0)

No country data available

Add proposals with country information

@else
@foreach ($countries as $country) @php $tc = $tierConfig[$country['tier']]; $circumference = 2 * M_PI * 28; $offset = $circumference - ($country['score'] / 100) * $circumference; $metrics = [ ['label' => 'Proposals', 'raw' => $country['total'], 'max' => $maxTotal, 'value' => number_format($country['total']), 'sub' => null], ['label' => 'Won', 'raw' => $country['won'], 'max' => $maxTotal, 'value' => number_format($country['won']), 'sub' => null], ['label' => 'Revenue', 'raw' => $country['revenue'], 'max' => $maxRevenue, 'value' => '$' . number_format($country['revenue']), 'sub' => null], ['label' => 'Avg Price', 'raw' => $country['avgPrice'],'max' => max(1, collect($countries)->max('avgPrice')), 'value' => '$' . number_format($country['avgPrice']), 'sub' => null], ]; $barColor = match ($country['tier']) { 'good' => 'bg-emerald-400', 'warning' => 'bg-amber-400', default => 'bg-rose-400', }; @endphp
{{-- Header --}}

{{ $country['name'] }}

{{ $tc['label'] }}
{{-- Score Ring --}}
{{ $country['score'] }} / 100
{{-- Win Rate Highlight --}}
$country['winRate'] >= 20, 'bg-amber-100/60' => $country['winRate'] >= 10 && $country['winRate'] < 20, 'bg-rose-100/60' => $country['winRate'] < 10, ])> Win Rate $country['winRate'] >= 20, 'text-amber-700' => $country['winRate'] >= 10 && $country['winRate'] < 20, 'text-rose-700' => $country['winRate'] < 10, ])>{{ $country['winRate'] }}%
{{-- Metrics --}}
@foreach ($metrics as $m) @php $pct = $m['max'] > 0 ? min(100, round($m['raw'] / $m['max'] * 100)) : 0; @endphp
{{ $m['label'] }} {{ $m['value'] }}
@endforeach
{{-- Insights --}} @if (count($country['insights']) > 0)
@foreach ($country['insights'] as $insight)
{{ $insight }}
@endforeach
@else
Strong market performance
@endif
@endforeach
{{-- Legend --}}
Good (≥70)
Review (40–69)
Needs Attention (<40)
Score = win rate (45%) + volume (30%) + avg price (25%)
@endif
{{-- Skills Tab --}}
@if (count($skills) === 0)

No skill data available

Tag proposals with skills to see analysis

@else
@foreach ($skills as $i => $skill) @php $barColor = match ($skill['tier']) { 'good' => 'bg-emerald-400', 'warning' => 'bg-amber-400', default => 'bg-rose-400', }; $winBadge = match ($skill['tier']) { 'good' => 'bg-emerald-100 text-emerald-700', 'warning' => 'bg-amber-100 text-amber-700', default => 'bg-rose-100 text-rose-700', }; @endphp
#{{ $i + 1 }} {{ $skill['name'] }}
{{ $skill['total'] }} proposals {{ $skill['winRate'] }}% won
${{ number_format($skill['revenue']) }}
@endforeach
Win rate ≥ 20%
10–19%
< 10%
Bar = demand relative to top skill. Revenue = total from won proposals.
@endif