feat: Lernapp mit Mathe/Deutsch/Englisch, Münzsystem und Belohnungen

This commit is contained in:
root
2026-05-05 14:41:09 +00:00
parent 21e40cd2da
commit bd1640994c
45 changed files with 1522 additions and 58 deletions
@@ -0,0 +1,42 @@
@extends('layouts.admin')
@section('title','Belohnung bearbeiten')
@section('content')
<div class="max-w-lg">
<a href="{{ route('admin.rewards.index') }}" class="text-sm text-slate-500 hover:text-slate-700 mb-4 inline-block"> Zurück</a>
<div class="bg-white rounded-xl shadow-sm border border-slate-200 p-6">
<h2 class="font-semibold text-slate-800 mb-5">Belohnung bearbeiten</h2>
<form method="POST" action="{{ route('admin.rewards.update',$reward) }}" class="space-y-4">
@csrf @method('PUT')
<div class="grid grid-cols-4 gap-3">
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Icon</label>
<input name="icon" value="{{ old('icon',$reward->icon) }}" required maxlength="4" class="w-full border border-slate-300 rounded-lg px-3 py-2 text-center text-xl focus:ring-2 focus:ring-violet-500 outline-none">
</div>
<div class="col-span-3">
<label class="block text-sm font-medium text-slate-700 mb-1">Name</label>
<input name="name" value="{{ old('name',$reward->name) }}" required class="w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-violet-500 outline-none">
</div>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Beschreibung</label>
<input name="description" value="{{ old('description',$reward->description) }}" class="w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-violet-500 outline-none">
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">🪙 Münzenpreis</label>
<input name="points_cost" type="number" min="1" value="{{ old('points_cost',$reward->points_cost) }}" required class="w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-violet-500 outline-none">
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Minuten</label>
<input name="minutes" type="number" min="1" value="{{ old('minutes',$reward->minutes) }}" class="w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-violet-500 outline-none">
</div>
</div>
<div class="flex items-center gap-3">
<input type="checkbox" name="active" id="active" value="1" {{ $reward->active?'checked':'' }} class="accent-violet-600">
<label for="active" class="text-sm font-medium text-slate-700">Belohnung aktiv</label>
</div>
<button type="submit" class="w-full bg-violet-600 hover:bg-violet-700 text-white py-2 rounded-lg font-medium text-sm">Speichern</button>
</form>
</div>
</div>
@endsection