Files
lernapp/resources/views/admin/rewards/create.blade.php
T

39 lines
2.4 KiB
PHP

@extends('layouts.admin')
@section('title','Neue Belohnung')
@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">Neue Belohnung</h2>
<form method="POST" action="{{ route('admin.rewards.store') }}" class="space-y-4">
@csrf
<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','🎁') }}" 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') }}" 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') }}" 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') }}" 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 <span class="text-slate-400">(optional)</span></label>
<input name="minutes" type="number" min="1" value="{{ old('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>
<button type="submit" class="w-full bg-violet-600 hover:bg-violet-700 text-white py-2 rounded-lg font-medium text-sm">Belohnung erstellen</button>
</form>
</div>
</div>
@endsection