@php $f = $filters ?? []; $rangeKey = $f['range']['key'] ?? '90d'; $bucketCur = $f['bucket'] ?? 'daily'; $qCur = $f['q'] ?? ''; $deltaPct = $stats['deltaPct'] ?? 0; $deltaCls = $deltaPct >= 0 ? 'text-wa-deep' : 'text-accent-coral'; $deltaSign = $deltaPct > 0 ? '+' : ''; $rangeLabels = ['7d' => 'Last 7 days', '30d' => 'Last 30 days', '90d' => 'Last 90 days', 'all' => 'All time']; @endphp
{{ __('More / Refer & Earn') }}
{{ __('Refer &') }} {{ __('Earn') }}
Export CSV {{ __('Share on WhatsApp') }}
@php $fmt = fn ($minor) => \App\Support\FormatSettings::formatIn((int) $minor / 100, $defaultCurrency); $refMoney = $fmt($referrerRewardMinor); $friMoney = $fmt($refereeRewardMinor); $twoSided = ($refereeRewardMinor ?? 0) > 0; @endphp
{{-- Steps card --}}
{{ __('How it works') }}

{{ __('Invite friends, both of you earn') }}

@unless ($referralEnabled) {{ __('Programme off') }} @endunless
  1. 1
    {{ __('Share your link') }}

    {{ __('Send it on WhatsApp or copy it anywhere.') }}

  2. 2
    {{ __('Friend joins & tops up') }}

    {{ __('They sign up with your link and make their first paid top-up.') }}

  3. 3
    {{ __('You both earn') }}

    {{ __('You get') }} {!! $refMoney !!}@if ($twoSided), {{ __('they get') }} {!! $friMoney !!}@endif — {{ __('straight to your wallet.') }}

{{ __('Rewards are paid on the first paid top-up (not at signup). A pending invite expires after :days days.', ['days' => $referralWindowDays]) }}

{{-- Pipeline summary --}}
{{ __('Your pipeline') }}
{{ __('Joined') }}
{{ number_format($pipeline['joined']) }}
{{ __('Converted') }}
{{ number_format($pipeline['converted']) }}
{{ __('Pending') }}
{{ number_format($pipeline['pending']) }}
{{ __('Earned') }}
{!! $fmt($pipeline['earnedMinor']) !!}
{{ __('Signups (lifetime)') }} {{ $deltaSign }}{{ $deltaPct }}% vs prev
{{ number_format($stats['signupsLifetime']) }} {{ __('people') }}
{{ __('Credits earned') }} {{ __('lifetime') }}
{{ number_format($stats['creditsLifetime']) }} {{ __('credits') }}
{{ __('Signups (30d)') }} +{{ number_format($stats['credits30d']) }}
{{ number_format($stats['signups30d']) }} {{ __('last 30 days') }}
{{ __('Avg per referral') }} {{ __('credits') }}
{{ number_format($stats['avgPerSignup']) }} / {{ __('referral') }}
{{ __('Your code') }} {{ __('share to earn') }}
{{ $referralCode }}
{!! $refMoney !!} {{ __('per referral') }}
{{ __('Volume') }}

{{ __('Signups & credits over time') }}

@foreach (['daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly'] as $key => $label) @endforeach
{{ __('Top codes') }}

{{ $rangeKey }}

@forelse ($topCodes as $row)
{{ $row['code'] }} {{ number_format($row['signups']) }} signup{{ $row['signups'] === 1 ? '' : 's' }}
+{{ number_format($row['credits']) }} {{ __('credits') }}
@empty @include('user.partials.empty-state', [ 'message' => 'No signups found. Share your code to start earning.', ]) @endforelse
@include('user.affiliate-history._rows', ['rows' => $rows])
{{ __('When') }} {{ __('Referee') }} {{ __('Code used') }} {{ __('Credits') }} {{ __('Status') }} {{ __('Wallet tx') }}