Target Bonuses

@php $userPlanId = auth()->user()->plan_id ?? null; @endphp @if ($userPlanId == 1)
You are currently on the Free Plan. You are not eligible for Target Bonuses.
To unlock bonuses, please upgrade your plan.
Upgrade Plan
@endif

Achieve your team earning targets to unlock exciting bonuses!

Total Team Earnings: ${{ number_format($teamEarnings, 2) }}
@foreach ($targetBonuses as $index => $bonus)
@php $userBonus = $userTargetBonuses->where('target_bonus_id', $bonus->id)->first(); $isUnlocked = $teamEarnings >= $bonus->target_amount && !$userBonus; $progress = min(($teamEarnings / $bonus->target_amount) * 100, 100); @endphp
@if ($index === 0) Top Target @endif @if ($isUnlocked) Unlocked @endif

Target Bonus #{{ $index + 1 }}

Target: ${{ number_format($bonus->target_amount, 2) }}

Bonus: ${{ number_format($bonus->bonus_amount, 2) }}

{{ number_format($progress, 1) }}% Complete
@if ($userBonus) @else
@csrf
@endif
@endforeach @if ($targetBonuses->isEmpty())

No target bonuses available at the moment.

@endif