Files
mareike/app/Domains/Event/Views/Partials/ParticipantsByAddon.vue
T
2026-08-12 17:18:45 +02:00

68 lines
1.6 KiB
Vue

<script setup>
import {computed, inject} from "vue";
import ParticipantsList from "./ParticipantsList.vue";
const props = defineProps({
data: {
type: Object,
default: () => ({participants: {}, event: {}, listType: ''}),
},
});
// Von TabbedPage bereitgestellt: erlaubt den Sprung zum Übersicht-Tab (Index 0), wo die
// Zusatzoptionen konfiguriert werden.
const selectTab = inject('selectTab', null);
const hasAddons = computed(() => (props.data?.event?.addons?.length ?? 0) > 0);
function goToOverview() {
if (selectTab) {
selectTab(0);
}
}
</script>
<template>
<ParticipantsList v-if="hasAddons" :data="data" :show-group-mail="false"/>
<div v-else class="no-addons">
<h3>Keine Zusatzoptionen angelegt</h3>
<p>
Für diese Veranstaltung sind noch keine Zusatzoptionen angelegt. Sobald du unter
<strong>Übersicht Zusatzoptionen</strong> Zusätze definierst, werden die Teilnehmenden hier nach
ihren gebuchten Zusätzen gruppiert.
</p>
<button v-if="selectTab" type="button" class="button" @click="goToOverview">
Zu den Zusatzoptionen
</button>
</div>
</template>
<style scoped>
.no-addons {
max-width: 640px;
margin: 20px auto;
padding: 24px;
background: #f8fafc;
border: 1px solid #e5e7eb;
border-radius: 10px;
text-align: center;
}
.no-addons p {
color: #4b5563;
line-height: 1.6;
}
.button {
margin-top: 12px;
padding: 8px 18px;
background: #2563eb;
color: #fff;
border: none;
border-radius: 8px;
font-weight: 600;
cursor: pointer;
}
</style>