@extends('layouts.app')
@section('title', 'Proposals')
@section('page-title', 'Proposals')
@section('page-subtitle', $campaign->name)
@section('topbar-actions')
← Back to Campaign
@endsection
@push('styles')
@endpush
@section('content')
@php
$pending = $proposals->where('status', 'pending')->count();
$approved = $proposals->where('status', 'approved')->count();
$rejected = $proposals->where('status', 'rejected')->count();
$trim = fn ($n) => rtrim(rtrim(number_format((float) $n, 2), '0'), '.');
$genderColours = ['Male' => '#34BDEB', 'Female' => '#8b5cf6', 'Other' => '#f59e0b'];
@endphp
{{ $proposals->count() }}
{{ \Illuminate\Support\Str::plural('proposal', $proposals->count()) }}
{{ $pending }}
waiting on you
{{ $approved }}
approved
{{ $rejected }}
rejected
@forelse ($proposals as $p)
@php
$short = $campaign->min_followers && $p->follower_count < $campaign->min_followers;
$place = collect([
$p->audience_cities ? implode(', ', $p->audience_cities) : null,
$p->audience_states ? implode(', ', $p->audience_states) : null,
$p->location_countries ? implode(', ', $p->location_countries) : null,
])->filter()->implode(' · ');
$ages = collect($p->audience_age_distribution ?? [])->filter(fn ($v) => $v > 0);
$ageMax = $ages->max() ?: 100;
$genders = collect($p->audience_gender_distribution ?? [])->filter(fn ($v) => $v > 0);
@endphp
{{-- channel header --}}
{{ strtoupper(mb_substr($p->user->name ?? '?', 0, 1)) }}
{{ $p->user->name ?? 'Unknown' }}
{{ $p->user->email ?? '' }} · applied {{ $p->created_at->diffForHumans() }}
{{ $p->statusLabel() }}
{{-- headline cards --}}
{{ number_format($p->follower_count) }}
followers
@if ($short)
below the {{ number_format($campaign->min_followers) }} minimum
@endif
{{ $trim($p->engagement_rate) }}%
engagement
{{ number_format($p->avg_views) }}
average views
{{ $p->avg_monthly_reach ? number_format($p->avg_monthly_reach) : '—' }}
monthly reach
{{-- left --}}
Who watches
Countries
{{ $p->audience_countries ? implode(', ', $p->audience_countries) : '—' }}
Top locations
{{ $place ?: '—' }}
Languages
{{ $p->audience_languages ? implode(', ', $p->audience_languages) : '—' }}
@if ($p->audience_interests)
Interests
@foreach ($p->audience_interests as $i)
{{ $i }}
@endforeach
@endif
What they post
@if ($p->content_categories)
Categories
@foreach ($p->content_categories as $c)
{{ $c }}
@endforeach
@endif
@if ($p->content_types)
Formats
@foreach ($p->content_types as $t)
{{ $t }}
@endforeach
@endif
Typical post
{{ number_format($p->avg_likes) }}
likes
{{ number_format($p->avg_comments) }}
comments
{{ $p->avg_shares ? number_format($p->avg_shares) : '—' }}
shares
{{ $p->avg_saves ? number_format($p->avg_saves) : '—' }}
saves
{{ $p->avg_story_views ? number_format($p->avg_story_views) : '—' }}
story views
{{ $p->avg_reel_video_views ? number_format($p->avg_reel_video_views) : '—' }}
reel views
{{-- right --}}
@if ($ages->count())
Age
@foreach ($ages as $range => $pct)
@endforeach
@foreach ($ages as $range => $pct)
{{ $range }}
@endforeach
@endif
@if ($genders->count())
@php
$total = max($genders->sum(), 0.0001);
$circ = 2 * M_PI * 54;
$offset = 0;
@endphp
Gender
@foreach ($genders as $g => $pct)
{{ $g }}
{{ $trim($pct) }}%
@endforeach
@endif
@if ($p->review_note)
{{ $p->review_note }}
@if ($p->reviewed_at)
— {{ $p->reviewed_at->format('d M Y') }}
@endif
@endif
@if ($p->isPending())
@endif
@empty
No proposals yet
Influencers who apply to this campaign will show up here.
@endforelse
@endsection