@extends('layouts.child') @section('content')

🎁 Belohnungen

🪙 {{ auth()->user()->points }}
@foreach($rewards as $r) @php $canAfford = auth()->user()->points >= $r->points_cost @endphp
{{ $r->icon }}
{{ $r->name }}
@if($r->description)
{{ $r->description }}
@endif @if($r->minutes)
⏱ {{ $r->minutes }} Minuten
@endif
🪙 {{ $r->points_cost }}
@if($canAfford)
@csrf
@else
Noch {{ $r->points_cost - auth()->user()->points }} fehlen
@endif
@endforeach
@if($history->count())

📋 Meine Einlösungen

@foreach($history as $red)
{{ $red->reward->icon }}
{{ $red->reward->name }}
{{ $red->created_at->format('d.m.Y') }}
{{ $red->status==='approved' ? '✅ Freigegeben' : ($red->status==='rejected' ? '❌ Abgelehnt' : '⏳ Warten...') }}
@endforeach
@endif @endsection