Sprava eventu

This commit is contained in:
Michal Kváček
2023-09-19 06:33:17 +02:00
parent 0c91ff7838
commit 6fbaef4a1e
25 changed files with 533 additions and 30 deletions
+32
View File
@@ -0,0 +1,32 @@
<script setup>
import AvatarsGroup from "components/AvatarsGroup.vue";
const props = defineProps({
items: {
type: Array,
required: true
}
});
const getCoverPhotos = (item) => item.flights.filter(f => !!f.coverPhoto).map(f => f.coverPhoto.thumbnailUrl);
</script>
<template>
<q-list bordered separator>
<q-item clickable v-ripple v-for="event of items" :key="event" :to="{name: 'eventDetail', params: {id: event.id }}">
<q-item-section>
<q-item-label>
<q-avatar icon="event" color="primary" text-color="white" v-if="event.flights.length === 0"/>
<AvatarsGroup :avatars="getCoverPhotos(event)" v-else/>
{{ event.name }}
</q-item-label>
<q-item-label lines="4" caption>
<article v-html="event.description"/>
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</template>