2020-02-18 08:57:00 +01:00
|
|
|
<template>
|
|
|
|
<router-link
|
2022-07-12 10:55:28 +02:00
|
|
|
class="block md:flex gap-x-2 gap-y-3 bg-white dark:bg-violet-2 rounded-lg shadow-md w-full"
|
2021-11-07 21:02:06 +01:00
|
|
|
dir="auto"
|
2020-02-18 08:57:00 +01:00
|
|
|
:to="{ name: RouteName.EVENT, params: { uuid: event.uuid } }"
|
|
|
|
>
|
2021-11-02 19:47:54 +01:00
|
|
|
<div class="event-preview mr-0 ml-0">
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="relative w-full">
|
|
|
|
<div class="flex absolute bottom-2 left-2 z-10 date-component">
|
|
|
|
<date-calendar-icon :date="event.beginsOn.toString()" :small="true" />
|
2021-11-02 19:47:54 +01:00
|
|
|
</div>
|
|
|
|
<lazy-image-wrapper
|
|
|
|
:picture="event.picture"
|
|
|
|
:rounded="true"
|
2022-10-11 17:48:58 +02:00
|
|
|
class="object-cover flex-none h-40 md:w-48 rounded-t-lg md:rounded-none md:rounded-l-lg"
|
2021-11-02 19:47:54 +01:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-10-11 17:48:58 +02:00
|
|
|
<div class="p-2">
|
2022-07-12 10:55:28 +02:00
|
|
|
<h3
|
2022-10-11 17:48:58 +02:00
|
|
|
class="pb-2 text-lg leading-6 line-clamp-3 font-bold text-violet-title dark:text-white"
|
2022-07-12 10:55:28 +02:00
|
|
|
:lang="event.language"
|
|
|
|
dir="auto"
|
|
|
|
>
|
2022-08-26 16:08:58 +02:00
|
|
|
<tag
|
2022-07-12 10:55:28 +02:00
|
|
|
variant="info"
|
2021-11-26 14:46:25 +01:00
|
|
|
class="mr-1"
|
|
|
|
v-if="event.status === EventStatus.TENTATIVE"
|
|
|
|
>
|
|
|
|
{{ $t("Tentative") }}
|
2022-08-26 16:08:58 +02:00
|
|
|
</tag>
|
|
|
|
<tag
|
2022-07-12 10:55:28 +02:00
|
|
|
variant="danger"
|
2021-11-26 14:46:25 +01:00
|
|
|
class="mr-1"
|
|
|
|
v-if="event.status === EventStatus.CANCELLED"
|
|
|
|
>
|
|
|
|
{{ $t("Cancelled") }}
|
2022-08-26 16:08:58 +02:00
|
|
|
</tag>
|
2022-10-11 17:48:58 +02:00
|
|
|
<tag
|
|
|
|
class="mr-2 font-normal"
|
|
|
|
variant="warning"
|
|
|
|
size="medium"
|
|
|
|
v-if="event.draft"
|
|
|
|
>{{ $t("Draft") }}</tag
|
|
|
|
>
|
2021-11-02 19:47:54 +01:00
|
|
|
{{ event.title }}
|
|
|
|
</h3>
|
2021-11-06 11:15:16 +01:00
|
|
|
<inline-address
|
2021-11-02 19:47:54 +01:00
|
|
|
v-if="event.physicalAddress"
|
2022-07-12 10:55:28 +02:00
|
|
|
class=""
|
2021-11-02 19:47:54 +01:00
|
|
|
:physical-address="event.physicalAddress"
|
|
|
|
/>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="" v-else-if="event.options && event.options.isOnline">
|
2022-07-12 10:55:28 +02:00
|
|
|
<Video />
|
2021-11-02 19:47:54 +01:00
|
|
|
<span>{{ $t("Online") }}</span>
|
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="flex gap-1" v-if="showOrganizer">
|
|
|
|
<figure class="" v-if="organizer(event) && organizer(event)?.avatar">
|
|
|
|
<img
|
|
|
|
class="rounded-full"
|
|
|
|
:src="organizer(event)?.avatar?.url"
|
|
|
|
alt=""
|
|
|
|
width="24"
|
|
|
|
height="24"
|
|
|
|
/>
|
2021-11-02 19:47:54 +01:00
|
|
|
</figure>
|
2022-07-12 10:55:28 +02:00
|
|
|
<AccountCircle v-else :size="24" />
|
|
|
|
<span class="">
|
2021-11-02 19:47:54 +01:00
|
|
|
{{ organizerDisplayName(event) }}
|
|
|
|
</span>
|
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<p class="flex gap-1">
|
|
|
|
<AccountMultiple />
|
2020-09-02 17:42:17 +02:00
|
|
|
<span v-if="event.options.maximumAttendeeCapacity !== 0">
|
|
|
|
{{
|
2022-07-12 10:55:28 +02:00
|
|
|
$t(
|
2020-09-02 17:42:17 +02:00
|
|
|
"{available}/{capacity} available places",
|
|
|
|
{
|
|
|
|
available:
|
2020-11-30 10:24:11 +01:00
|
|
|
event.options.maximumAttendeeCapacity -
|
|
|
|
event.participantStats.participant,
|
2020-09-02 17:42:17 +02:00
|
|
|
capacity: event.options.maximumAttendeeCapacity,
|
2022-07-12 10:55:28 +02:00
|
|
|
},
|
|
|
|
event.options.maximumAttendeeCapacity -
|
|
|
|
event.participantStats.participant
|
2020-09-02 17:42:17 +02:00
|
|
|
)
|
|
|
|
}}
|
|
|
|
</span>
|
|
|
|
<span v-else>
|
|
|
|
{{
|
2022-07-12 10:55:28 +02:00
|
|
|
$t(
|
|
|
|
"{count} participants",
|
|
|
|
{
|
|
|
|
count: event.participantStats.participant,
|
|
|
|
},
|
|
|
|
event.participantStats.participant
|
|
|
|
)
|
2020-09-02 17:42:17 +02:00
|
|
|
}}
|
|
|
|
</span>
|
|
|
|
<span v-if="event.participantStats.notApproved > 0">
|
2022-07-12 10:55:28 +02:00
|
|
|
<o-button
|
2022-08-26 16:08:58 +02:00
|
|
|
variant="text"
|
2020-09-02 17:42:17 +02:00
|
|
|
@click="
|
|
|
|
gotToWithCheck(participation, {
|
|
|
|
name: RouteName.PARTICIPATIONS,
|
|
|
|
query: { role: ParticipantRole.NOT_APPROVED },
|
|
|
|
params: { eventId: event.uuid },
|
|
|
|
})
|
|
|
|
"
|
|
|
|
>
|
|
|
|
{{
|
2022-07-12 10:55:28 +02:00
|
|
|
$t(
|
2020-11-30 10:24:11 +01:00
|
|
|
"{count} requests waiting",
|
2022-07-12 10:55:28 +02:00
|
|
|
|
2020-11-30 10:24:11 +01:00
|
|
|
{
|
|
|
|
count: event.participantStats.notApproved,
|
2022-07-12 10:55:28 +02:00
|
|
|
},
|
|
|
|
event.participantStats.notApproved
|
2020-11-30 10:24:11 +01:00
|
|
|
)
|
2020-09-02 17:42:17 +02:00
|
|
|
}}
|
2022-07-12 10:55:28 +02:00
|
|
|
</o-button>
|
2020-09-02 17:42:17 +02:00
|
|
|
</span>
|
|
|
|
</p>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
2021-11-02 19:47:54 +01:00
|
|
|
import { IEvent, organizer, organizerDisplayName } from "@/types/event.model";
|
2020-02-18 08:57:00 +01:00
|
|
|
import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue";
|
2021-11-26 14:46:25 +01:00
|
|
|
import { EventStatus, ParticipantRole } from "@/types/enums";
|
2020-02-18 08:57:00 +01:00
|
|
|
import RouteName from "../../router/name";
|
2021-11-02 19:47:54 +01:00
|
|
|
import LazyImageWrapper from "@/components/Image/LazyImageWrapper.vue";
|
2021-11-06 11:15:16 +01:00
|
|
|
import InlineAddress from "@/components/Address/InlineAddress.vue";
|
2022-07-12 10:55:28 +02:00
|
|
|
import Video from "vue-material-design-icons/Video.vue";
|
|
|
|
import AccountCircle from "vue-material-design-icons/AccountCircle.vue";
|
|
|
|
import AccountMultiple from "vue-material-design-icons/AccountMultiple.vue";
|
2022-09-20 16:53:26 +02:00
|
|
|
import Tag from "@/components/TagElement.vue";
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
withDefaults(
|
|
|
|
defineProps<{
|
|
|
|
event: IEvent;
|
|
|
|
showOrganizer?: boolean;
|
|
|
|
}>(),
|
|
|
|
{ showOrganizer: false }
|
|
|
|
);
|
2020-02-18 08:57:00 +01:00
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2021-11-04 18:14:36 +01:00
|
|
|
@use "@/styles/_mixins" as *;
|
2021-11-02 19:47:54 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
.event-minimalist-card-wrapper {
|
2022-07-12 10:55:28 +02:00
|
|
|
// display: grid;
|
|
|
|
// grid-gap: 5px 10px;
|
2021-11-02 19:47:54 +01:00
|
|
|
grid-template-areas: "preview" "body";
|
2022-07-12 10:55:28 +02:00
|
|
|
// color: initial;
|
2021-11-02 19:47:54 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// @include desktop {
|
|
|
|
grid-template-columns: 200px 3fr;
|
|
|
|
grid-template-areas: "preview body";
|
|
|
|
// }
|
2021-11-02 19:47:54 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// .event-preview {
|
|
|
|
// & > div {
|
|
|
|
// position: relative;
|
|
|
|
// height: 120px;
|
|
|
|
// width: 100%;
|
2021-11-02 19:47:54 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// div.date-component {
|
|
|
|
// display: flex;
|
|
|
|
// position: absolute;
|
|
|
|
// bottom: 5px;
|
|
|
|
// left: 5px;
|
|
|
|
// z-index: 1;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// .calendar-icon {
|
|
|
|
// @include margin-right(1rem);
|
|
|
|
// }
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
</style>
|