Support oft parent groups
This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
import {reactive} from "vue";
|
||||
import ErrorText from "../../../../../../Views/Components/ErrorText.vue";
|
||||
|
||||
const props = defineProps({ formData: Object, localGroups: Array })
|
||||
const props = defineProps({ formData: Object, event: Object, localGroups: Array })
|
||||
const emit = defineEmits(['next', 'back'])
|
||||
|
||||
// Bezeichnung der Auswahl (z. B. „Stamm" oder „Bund"), je nach Einstellung der Veranstaltung.
|
||||
const localGroupLabel = props.event?.participantGroupLabel ?? 'Stamm'
|
||||
|
||||
const errors = reactive({
|
||||
vorname: '',
|
||||
nachname: '',
|
||||
@@ -46,7 +49,7 @@ const next = () => {
|
||||
}
|
||||
|
||||
if (props.formData.localGroup === '-1') {
|
||||
errors.localGroup = 'Bitte den Stamm auswählen.'
|
||||
errors.localGroup = 'Bitte bei „' + localGroupLabel + '" eine Auswahl treffen.'
|
||||
hasError = true
|
||||
}
|
||||
|
||||
@@ -90,7 +93,7 @@ const next = () => {
|
||||
<tr><td>Nachname:</td><td><input type="text" v-model="props.formData.nachname" /><ErrorText :message="errors.nachname"/></td></tr>
|
||||
<tr><td>Pfadiname:</td><td><input type="text" v-model="props.formData.pfadiname" /></td></tr>
|
||||
<tr>
|
||||
<td>Stamm:</td>
|
||||
<td>{{ localGroupLabel }}:</td>
|
||||
<td>
|
||||
<select v-model="props.formData.localGroup">
|
||||
<option value="-1">Bitte wählen</option>
|
||||
|
||||
Reference in New Issue
Block a user