@extends('layouts.gamification') @section('title', 'Достижения') @section('gami-active', 'achievements') @push('styles') @endpush @section('content')
🏆 Достижения
@foreach ($achievements as $a) @php $isUnlocked = $a->completed_at !== null; $isClaimed = $a->claimed_at !== null; $progress = (int) ($a->progress ?? 0); $target = (int) $a->condition_value; @endphp
{{ $a->icon }}
{{ $a->name }}
{{ $a->description }}
{{ min($progress, $target) }} / {{ $target }} @if ($isClaimed) ✅ получено @elseif ($isUnlocked) @else {{ (int) $a->coin_reward }} 🪙 @endif
@endforeach
{{-- position:fixed, so its spot in the DOM doesn't affect where it renders. --}}
@endsection @push('scripts') @endpush