2024-09-18 09:28:59 +02:00
|
|
|
<template>
|
|
|
|
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
|
|
|
|
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
2024-09-26 13:16:31 +02:00
|
|
|
<EnvelopeIcon class="h-5 w-5 pr-1 box-content" v-if="communication.isNewsletterMain" />
|
|
|
|
<p class="grow">{{ communication.type.type }} {{ communication.preferred ? "(bevorzugt)" : "" }}</p>
|
|
|
|
<PencilIcon class="w-5 h-5" />
|
2024-09-18 09:28:59 +02:00
|
|
|
</div>
|
|
|
|
<div class="p-2">
|
|
|
|
<p v-for="field in communication.type.fields" :key="field">{{ field }}: {{ communication[field] || "--" }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineComponent, type PropType } from "vue";
|
|
|
|
import { mapState, mapActions } from "pinia";
|
|
|
|
import type { CommunicationViewModel } from "@/viewmodels/admin/communication.models";
|
2024-09-26 13:16:31 +02:00
|
|
|
import { EnvelopeIcon, PencilIcon } from "@heroicons/vue/24/outline";
|
2024-09-18 09:28:59 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
|
|
|
communication: {
|
|
|
|
type: Object as PropType<CommunicationViewModel>,
|
|
|
|
default: {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|