@extends('user.layouts.app') @section('content')

Rewards

Take a look at your reward history

Reward banner

Perks Just For You

@if($currentTier)

{{ $currentTier['title'] }}

{{ $currentTier['discount_label'] }}
{!! $currentTier['description'] !!}
@else
No tier unlocked yet.
@endif
@foreach ($rewards as $reward)
🎁

{{ $reward->code }}

{{ $reward->title }}

Created {{ $reward->created_at->format('M d, Y') }}

Discount

{{ $reward->description }}

@if ($reward->pivot->status === 'unclaimed') @elseif ($reward->pivot->status === 'pending') @elseif ($reward->pivot->status === 'claimed') @endif
@endforeach @if ($rewards->isEmpty())

No rewards available yet.

@endif

{{$user->full_name}}

{{-- avatar --}}
{{ Str::substr(auth()->user()->first_name, 0, 1) }}

{{$user->email}}

Bonus Point

{{ $user->bonus_point }}

Value Amount

₦{{ number_format($user->total_spent, 2) }}

Current Tier

{{ $user->tier()->title ?? 'No Tier' }}

Next Tier

{{ $user->progressToNextTier()['next_tier']->title ?? '🎉 Max Tier Achieved' }}

@if ($user->progressToNextTier()['next_tier']) {{ $user->progressToNextTier()['points_remaining'] }} points away from next tier @else You’ve earned all available points 🚀 @endif

{{ $user->progressToNextTier()['points_progress'] }}%

@if ($user->progressToNextTier()['next_tier']) {{ $user->progressToNextTier()['purchases_remaining'] }} purchases away from next tier @else You’ve unlocked all tiers with your purchases 👑 @endif

{{ $user->progressToNextTier()['purchases_progress'] }}%
@endsection @push('script') @endpush