ff-admin/src/views/admin/configuration/newsletterConfig/NewsletterConfig.vue

47 lines
1.8 KiB
Vue
Raw Normal View History

2024-12-26 12:04:00 +01:00
<template>
<MainTemplate>
<template #topBar>
<div class="flex flex-row items-center justify-between pt-5 pb-3 px-7">
<h1 class="font-bold text-xl h-8">Newsletter Konfiguration</h1>
</div>
</template>
<template #main>
<p>
2025-02-15 11:08:09 +01:00
Ein Newsletter kann als pdf exportiert oder per Mail versandt werden. <br />
Die Entscheidung für den Export geschieht anhand der Einstellung "Newsletter hier hin versenden?". <br />
Wird keine Adresse gefunden oder sind die Typen mit den falschen Versandoptionen konfiguriert, erstellt das
System als Fallback pdfs mit nur dem Namen des Mitglieds.
2024-12-26 12:04:00 +01:00
</p>
<NewsletterConfigListItem v-for="comType in communicationTypes" :key="comType.id" :comType="comType" />
</template>
</MainTemplate>
</template>
<script setup lang="ts">
2025-02-15 11:08:09 +01:00
import { defineComponent } from "vue";
2024-12-26 12:04:00 +01:00
import { mapState, mapActions } from "pinia";
import MainTemplate from "@/templates/Main.vue";
import { useAbilityStore } from "@/stores/ability";
2025-02-15 11:08:09 +01:00
import { useCommunicationTypeStore } from "@/stores/admin/configuration/communicationType";
import { useNewsletterConfigStore } from "@/stores/admin/configuration/newsletterConfig";
import NewsletterConfigListItem from "@/components/admin/configuration/newsletterConfig/NewsletterConfigListItem.vue";
2024-12-26 12:04:00 +01:00
</script>
<script lang="ts">
export default defineComponent({
computed: {
...mapState(useCommunicationTypeStore, ["communicationTypes"]),
2025-02-15 11:08:09 +01:00
...mapState(useNewsletterConfigStore, ["config"]),
2024-12-26 12:04:00 +01:00
...mapState(useAbilityStore, ["can"]),
},
mounted() {
this.fetchCommunicationTypes();
2025-02-15 11:08:09 +01:00
this.fetchNewsletterConfigs();
2024-12-26 12:04:00 +01:00
},
methods: {
...mapActions(useCommunicationTypeStore, ["fetchCommunicationTypes"]),
2025-02-15 11:08:09 +01:00
...mapActions(useNewsletterConfigStore, ["fetchNewsletterConfigs"]),
2024-12-26 12:04:00 +01:00
},
});
</script>