@extends('layouts.app') @section('title', 'Home – ' . \App\Models\Setting::get('app_name','ZURITYM')) @section('content') {{-- Wallet Bar --}}
Your Balance
{{ number_format($user->points) }} pts
≈ GH₵{{ number_format($cedisValue, 2) }}
Level
{{ $user->level }}
Redeem
{{-- Daily Bonuses --}}
Daily Bonuses
{{-- Daily Login --}}
🎁
Daily Login
+{{ \App\Models\Setting::get('daily_login_points',10) }} pts
@if($canDaily) @else @endif
{{-- Spin --}}
🎡
Spin & Earn
Up to 1000 pts
@if($canSpin) Spin Now @else @endif
{{-- Quick Actions --}}
Quick Actions
@php $actions = [ ['icon'=>'👁','label'=>'View & Earn', 'route'=>route('promotions.browse'), 'color'=>'#1A73E8'], ['icon'=>'🎮','label'=>'Games', 'route'=>route('games.index'), 'color'=>'#8B5CF6'], ['icon'=>'📣','label'=>'Promote', 'route'=>route('promotions.create'), 'color'=>'#EF4444'], ['icon'=>'🛒','label'=>'Buy Points', 'route'=>route('buy-points.index'), 'color'=>'#F59E0B'], ['icon'=>'▶','label'=>'Videos', 'route'=>route('tasks.index').'?type=video', 'color'=>'#22C55E'], ['icon'=>'🎫','label'=>'Offers', 'route'=>route('tasks.index').'?type=offer', 'color'=>'#0088CC'], ['icon'=>'🎡','label'=>'Spin', 'route'=>route('spin.index'), 'color'=>'#F59E0B'], ['icon'=>'👥','label'=>'Invite', 'route'=>route('profile.index').'#referral', 'color'=>'#16A34A'], ]; @endphp @foreach($actions as $a)
{{ $a['icon'] }}
{{ $a['label'] }}
@endforeach
{{-- Featured Tasks --}}
Tasks See All
@foreach($tasks as $task)
{{ match($task->type) { 'video'=>'▶', 'visit'=>'🌐', 'daily'=>'📅', 'game'=>'🎮', 'quiz'=>'🧩', default=>'⭐' } }}
{{ $task->title }}
{{ $task->description }}
+{{ $task->points }}
points
@endforeach
{{-- Leaderboard Preview --}}
🏆 Top Earners Full List
@foreach($leaderboard->take(5) as $i => $u)
{{ match($i){ 0=>'🥇',1=>'🥈',2=>'🥉',default=>($i+1) } }}
{{ $u->name }} @if($u->id === auth()->id()) (You) @endif
{{ number_format($u->total_earned_points) }} pts
@endforeach
{{-- Recent Transactions --}} @if($recentTx->isNotEmpty())
Recent Activity All
@foreach($recentTx as $tx)
{{ $tx->points>0 ? '⬆' : '⬇' }}
{{ $tx->description }}
{{ $tx->created_at->diffForHumans() }}
{{ $tx->points>0?'+':'' }}{{ number_format($tx->points) }} pts
@endforeach
@endif
@endsection @push('scripts') @endpush