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,12 +211,22 @@
|
|||||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
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="sm:col-span-2">
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-2">Gruppe</label>
|
<label class="block text-sm font-medium text-gray-700 mb-2">Gruppe</label>
|
||||||
<div class="flex space-x-2">
|
|
||||||
<input
|
<input
|
||||||
v-model="zeit.gruppe"
|
v-model="zeit.gruppe"
|
||||||
type="text"
|
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"
|
class="flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
@@ -232,7 +242,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Trainer -->
|
<!-- Trainer -->
|
||||||
<div v-if="activeTab === 'trainer'">
|
<div v-if="activeTab === 'trainer'">
|
||||||
@@ -584,7 +593,8 @@ const addTrainingTime = () => {
|
|||||||
tag: 'Montag',
|
tag: 'Montag',
|
||||||
von: '19:00',
|
von: '19:00',
|
||||||
bis: '22:00',
|
bis: '22:00',
|
||||||
gruppe: `Gruppe ${naechsteGruppeNummer}`
|
gruppe: `Gruppe ${naechsteGruppeNummer}`,
|
||||||
|
info: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,13 +44,17 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3 class="text-xl font-display font-bold text-gray-900 mb-2">{{ gruppe }}</h3>
|
<h3 class="text-xl font-display font-bold text-gray-900 mb-2">{{ gruppe }}</h3>
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
<p
|
<div
|
||||||
v-for="zeit in zeiten"
|
v-for="zeit in zeiten"
|
||||||
:key="zeit.id"
|
:key="zeit.id"
|
||||||
class="text-lg font-semibold text-primary-600"
|
|
||||||
>
|
>
|
||||||
|
<p class="text-lg font-semibold text-primary-600">
|
||||||
{{ zeit.tag }}: {{ zeit.von }} - {{ zeit.bis }} Uhr
|
{{ zeit.tag }}: {{ zeit.von }} - {{ zeit.bis }} Uhr
|
||||||
</p>
|
</p>
|
||||||
|
<p v-if="zeit.info" class="text-sm text-gray-600 mt-1 italic">
|
||||||
|
{{ zeit.info }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Clock :size="32" class="text-primary-600" />
|
<Clock :size="32" class="text-primary-600" />
|
||||||
|
|||||||
Reference in New Issue
Block a user