Support oft parent groups
This commit is contained in:
@@ -16,8 +16,13 @@ const emit = defineEmits(['close'])
|
||||
const dynmicProps = reactive({
|
||||
localGroups: [],
|
||||
eatingHabits:[],
|
||||
participantGroupTypes: [],
|
||||
localGroupLabelPlural: 'Stämme',
|
||||
});
|
||||
|
||||
// Umstellen zwischen Local und Parent Group nur, solange es keine Anmeldungen gibt.
|
||||
const participantGroupTypeLocked = (props.event.totalParticipantCount ?? 0) > 0
|
||||
|
||||
const contributingLocalGroups = ref([])
|
||||
const eatingHabits = ref([]);
|
||||
|
||||
@@ -41,6 +46,7 @@ const emit = defineEmits(['close'])
|
||||
swimmingPermissionRequired: props.event.swimmingPermissionRequired,
|
||||
flatSupport: props.event.flatSupportEdit,
|
||||
supportPerson: props.event.supportPersonIndex,
|
||||
participantGroupType: props.event.participantGroupType ?? 'local_group',
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
@@ -76,6 +82,7 @@ const emit = defineEmits(['close'])
|
||||
supportPerson: formData.supportPerson,
|
||||
contributingLocalGroups: contributingLocalGroups.value,
|
||||
eatingHabits: eatingHabits.value,
|
||||
participantGroupType: formData.participantGroupType,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -173,6 +180,18 @@ const emit = defineEmits(['close'])
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Bei der Anmeldung abfragen</th>
|
||||
<td>
|
||||
<select v-model="formData.participantGroupType" class="width-full" :disabled="participantGroupTypeLocked">
|
||||
<option v-for="type in dynmicProps.participantGroupTypes" :key="type.value" :value="type.value">{{ type.label }}</option>
|
||||
</select>
|
||||
<span v-if="participantGroupTypeLocked" style="font-size: 0.8rem; color: #6b7280;">
|
||||
Nicht mehr änderbar, da bereits Anmeldungen vorliegen.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Mindestalter für Alkoholkonsum</th>
|
||||
<td>
|
||||
@@ -223,7 +242,7 @@ const emit = defineEmits(['close'])
|
||||
<div class="right">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Teilnehmende Stämme</th>
|
||||
<th>Teilnehmende {{ dynmicProps.localGroupLabelPlural }}</th>
|
||||
</tr>
|
||||
<tr v-for="localGroup in dynmicProps.localGroups">
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user