feat: Fragen nach Fach getrennt mit Tab-Navigation

This commit is contained in:
root
2026-05-05 15:14:45 +00:00
parent 03b59f3e77
commit 9986f69e9e
4 changed files with 67 additions and 36 deletions
@@ -2,7 +2,7 @@
@section('title','Neue Frage')
@section('content')
<div class="max-w-2xl">
<a href="{{ route('admin.questions.index') }}" class="text-sm text-slate-500 hover:text-slate-700 mb-4 inline-block"> Zurück</a>
<a href="{{ route('admin.questions.index', ['subject'=>$activeSubject->id]) }}" 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" x-data="{type:'multiple_choice'}">
<h2 class="font-semibold text-slate-800 mb-5">Neue Frage erstellen</h2>
<form method="POST" action="{{ route('admin.questions.store') }}" class="space-y-5">
@@ -11,7 +11,7 @@
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Fach</label>
<select name="subject_id" 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">
@foreach($subjects as $s)<option value="{{ $s->id }}">{{ $s->icon }} {{ $s->name }}</option>@endforeach
@foreach($subjects as $s)<option value="{{ $s->id }}" {{ $s->id==$activeSubject->id?'selected':'' }}>{{ $s->icon }} {{ $s->name }}</option>@endforeach
</select>
</div>
<div>