@extends('layouts.dashboard') @section('title', __('My Achievements')) @section('page_title', __('My Achievements')) @section('content')
@include('partials.dashboard.stat-card', [ 'label' => 'Total Points', 'value' => number_format($totalPoints), 'icon' => 'bi-star-fill', 'color' => 'warning', ])
@include('partials.dashboard.stat-card', [ 'label' => 'Badges Earned', 'value' => $earnedCount . ' / ' . $badges->count(), 'icon' => 'bi-patch-check-fill', 'color' => 'success', ])
@include('partials.dashboard.stat-card', [ 'label' => 'Leaderboard', 'value' => __('View Ranking'), 'icon' => 'bi-trophy-fill', 'color' => 'primary', ])
{{ __('Badges') }}
@if($badges->isEmpty())

{{ __('No badges have been set up yet.') }}

@else
@foreach($badges as $badge)
{{ $badge->name }}
@if($badge->description)
{{ $badge->description }}
@endif
@if($badge->unlocked) {{ __('Earned') }} @else {{ __('Locked') }} @endif
{{ __('Requires') }} {{ $badge->condition_value }} {{ status_label($badge->condition_type) }}
@endforeach
@endif
{{ __('Recent Points') }}
    @forelse($history as $entry)
  • {{ __((string) $entry->reason) }}
    {{ $entry->created_at?->diffForHumans() }}
    +{{ $entry->points }}
  • @empty
  • {{ __('No points earned yet.') }}
  • @endforelse
@endsection