@extends('layouts.app')
@section('title','Dashboard')
@push('styles')
@endpush
@section('content')
@php
$coins = $user->getCoins();
$hour = (int) date('H');
$greet = $hour < 12 ? 'Good morning' : ($hour < 17 ? 'Good afternoon' : 'Good evening');
$firstName = explode(' ', $user->name)[0];
@endphp
@if(!$user->transaction_pin)
๐
Secure Your Wallet โ Set Transaction PIN
Required for withdrawals and transfers.
Set PIN
@endif
{{-- National Day Banners --}}
@if(isset($todayDays) && $todayDays->count())
@foreach($todayDays as $nd)
{{ $nd->emoji }}
{{ $nd->title }}
{{ $nd->banner_message ?? $nd->description }}
@if($nd->bonus_coins > 0)
๐ +{{ $nd->bonus_coins }} Bonus NC Today!
@endif
@endforeach
@endif
{{ $user->streak_days >= 7 ? '๐ฅ' : 'โก' }}
Daily Check-in Streak
Streak: {{ $user->streak_days }} days
ยท Best: {{ $user->longest_streak }}
ยท Today: +{{ $user->streakReward() }} NC
@if($user->checkedInToday())
Checked in!
@else
Check In (+{{ $user->streakReward() }} NC)
@endif
@if(isset($activePickup) && $activePickup && $activePickup->collector)
@if($activePickup->collector->avatar)
@else
{{ strtoupper(substr($activePickup->collector->name,0,2)) }}
@endif
๐ My Pickup Collector
{{ $activePickup->collector->name }}
Status: {{ ucfirst(str_replace('_',' ',$activePickup->status)) }}
ยท {{ ucfirst($activePickup->waste_category) }} pickup
@endif
@if($user->accountManager)
{{ strtoupper(substr($user->accountManager->name,0,2)) }}
๐ค Your Account Manager
{{ $user->accountManager->name }}
Chat
@endif
{{ $greet }}, {{ $firstName }} ๐
{{ number_format($coins) }} NC
โ โฆ{{ number_format($coins * 10) }} ยท Nabola Coins Balance
{{ number_format($coins) }}
Total Coins
{{ number_format($user->total_kg_recycled,1) }}
kg Recycled
{{ number_format($user->getCo2Saved(),1) }}
kg COโ Saved
{{ $user->wasteLogs()->where('status','confirmed')->count() }}
Confirmed Pickups
{{-- Next milestone progress --}}
@if($nextMilestone)
Next Milestone: {{ $nextMilestone }}kg Recycled
{{ number_format($totalKg,1) }} / {{ $nextMilestone }} kg ยท {{ $milestoneProgress }}%
{{ number_format($nextMilestone - $totalKg, 1) }} kg to go โ keep recycling to unlock your next badge!
@endif
{{-- Profile completeness nudge --}}
@if($profilePct < 80)
๐ค
Complete your profile โ {{ $profilePct }}% done
Add your photo, bio, and location to unlock full features
Complete Profile โ
@endif
@if($user->total_kg_recycled > 0)
๐
Your Environmental Impact
{{ number_format($user->total_kg_recycled,1) }} kg recycled ยท
{{ number_format($user->getCo2Saved(),1) }} kg COโ saved ยท
โ {{ $user->getTreesEquivalent() }} trees
๐ Get Certificate โ
@endif
{{-- Premium perks banner --}}
@if($user->isPremium())
โญ
Premium Member Active
10% off marketplace ยท Priority pickups ยท Unlimited transfers ยท Expires {{ $user->premium_expires_at->format('d M Y') }}
Shop with Discount โ
@elseif(!$user->isPremium())
Upgrade to Premium โ 10% off marketplace, priority pickups, unlimited transfers
Upgrade โ
@endif
{{-- โโ HIRED JOBS BANNER โโ --}}
@if(isset($hiredJobs) && $hiredJobs->count())
@foreach($hiredJobs as $app)
๐
You Got the Job!
{{ $app->job->title }}
{{ $app->job->location }}
ยท {{ \App\Models\JobListing::typeLabel($app->job->type) }}
@if($app->job->salary_range) ยท {{ $app->job->salary_range }} @endif
@if($app->admin_notes)
{{ $app->admin_notes }}
@endif
@endforeach
@endif
{{-- โโ SHORTLISTED APPLICATIONS โโ --}}
@if(isset($pendingApplications) && $pendingApplications->where('status','shortlisted')->count())
โญ
You've been shortlisted!
{{ $pendingApplications->where('status','shortlisted')->count() }} application(s) shortlisted โ the employer will contact you soon.
View Applications โ
@endif
@forelse($txns as $t)
@php $isEarn = $t->type === 'earn'; @endphp
{{ $t->description ?: ucfirst($t->type) }}
{{ $t->created_at->diffForHumans() }}
{{ $isEarn ? '+' : '-' }}{{ number_format($t->coins) }} NC
@empty
No transactions yet.
@endforelse
Quick Actions
@if($activeChallenges > 0)
@endif
@forelse($logs as $log)
{{ ucfirst($log->type) }} ยท {{ ucfirst($log->waste_category) }}
{{ $log->created_at->format('d M Y') }}{{ $log->weight_kg ? ' ยท '.$log->weight_kg.' kg' : '' }}
{{ ucfirst($log->status) }}
@if($log->coins_earned > 0)
+{{ $log->coins_earned }} @endif
@empty
No waste logs yet.
@endforelse
@if(isset($miniCats) && $miniCats->count() > 0)
@php $catColors=['plastic'=>'#60a5fa','paper'=>'#fbbf24','metal'=>'#a78bfa','e-waste'=>'#f87171','organic'=>'#34d399','glass'=>'#fb923c','other'=>'#9ca3af']; @endphp
@foreach($miniCats->sortByDesc('total_kg') as $cat)
@php $c=$catColors[$cat->waste_category]??'#9ca3af'; @endphp
{{ $cat->waste_category }}
{{ number_format($cat->total_kg,1) }} kg
@endforeach
@endif
{{-- โโ AI FORECAST CARD โโ --}}
@if(isset($aiForecast) && $aiForecast['avg_per_day'] > 0)
๐
AI Earnings Forecast
At your current pace you'll earn
~{{ number_format($aiForecast['forecast_7_days']) }} NC
this week โ โฆ{{ number_format($aiForecast['naira_forecast']) }}
@if($aiForecast['days_to_milestone'])
ยท {{ $aiForecast['days_to_milestone'] }} days to {{ $aiForecast['next_milestone'] }}kg milestone
@endif
Full Insights โ
@endif
{{-- โโ AI PERSONAL CHALLENGE โโ --}}
@if(isset($aiChallenge) && $aiChallenge)
{{ $aiChallenge['emoji'] }}
๐ค AI Challenge
{{ $aiChallenge['title'] }}
Earn +{{ $aiChallenge['reward'] }} NC ยท {{ $aiChallenge['reason'] }}
Start
@endif
@push('scripts')
@endpush
@endsection