Refactor training time input fields in Einstellungen component to improve layout and usability. Add optional information field for training times and ensure proper handling of group data. Update rendering logic in Training component to display additional information if provided.
This commit is contained in:
@@ -211,22 +211,31 @@
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
||||
/>
|
||||
</div>
|
||||
<div class="sm:col-span-2">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700 mb-2">Gruppe</label>
|
||||
<div class="flex space-x-2">
|
||||
<input
|
||||
v-model="zeit.gruppe"
|
||||
type="text"
|
||||
class="flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
||||
/>
|
||||
<button
|
||||
@click="removeTrainingTime(index)"
|
||||
class="px-3 py-2 text-red-600 hover:bg-red-50 rounded-lg transition-colors"
|
||||
title="Löschen"
|
||||
>
|
||||
<Trash2 :size="18" />
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
v-model="zeit.gruppe"
|
||||
type="text"
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<label class="block text-sm font-medium text-gray-700 mb-2">Zusätzliche Information (optional)</label>
|
||||
<div class="flex space-x-2">
|
||||
<input
|
||||
v-model="zeit.info"
|
||||
type="text"
|
||||
placeholder="z.B. 'Nur in der Schulzeit', 'Ab 10 Jahren', etc."
|
||||
class="flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
||||
/>
|
||||
<button
|
||||
@click="removeTrainingTime(index)"
|
||||
class="px-3 py-2 text-red-600 hover:bg-red-50 rounded-lg transition-colors"
|
||||
title="Löschen"
|
||||
>
|
||||
<Trash2 :size="18" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -584,7 +593,8 @@ const addTrainingTime = () => {
|
||||
tag: 'Montag',
|
||||
von: '19:00',
|
||||
bis: '22:00',
|
||||
gruppe: `Gruppe ${naechsteGruppeNummer}`
|
||||
gruppe: `Gruppe ${naechsteGruppeNummer}`,
|
||||
info: ''
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user