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-07-12 10:55:28 +02:00
|
|
|
class="object-cover flex-none h-32 md:w-48 rounded-t-lg md:rounded-none md:rounded-l-lg"
|
2021-11-02 19:47:54 +01:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-07-12 10:55:28 +02:00
|
|
|
<div class="title-info-wrapper p-2">
|
|
|
|
<h3
|
|
|
|
class="event-minimalist-title pb-2 text-lg leading-6 line-clamp-3 font-bold text-violet-title dark:text-white"
|
|
|
|
:lang="event.language"
|
|
|
|
dir="auto"
|
|
|
|
>
|
2021-11-26 14:46:25 +01:00
|
|
|
<b-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") }}
|
|
|
|
</b-tag>
|
|
|
|
<b-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") }}
|
|
|
|
</b-tag>
|
2021-11-02 19:47:54 +01:00
|
|
|
<b-tag
|
|
|
|
class="mr-2"
|
2022-07-12 10:55:28 +02:00
|
|
|
variant="warning"
|
2021-11-02 19:47:54 +01:00
|
|
|
size="is-medium"
|
|
|
|
v-if="event.draft"
|
|
|
|
>{{ $t("Draft") }}</b-tag
|
|
|
|
>
|
|
|
|
{{ 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
|
2020-09-02 17:42:17 +02:00
|
|
|
type="is-text"
|
|
|
|
@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";
|
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
|
|
|
|
|
|
|
.title-info-wrapper {
|
|
|
|
flex: 2;
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
// .event-minimalist-title {
|
|
|
|
// padding-bottom: 5px;
|
|
|
|
// font-size: 18px;
|
|
|
|
// line-height: 24px;
|
|
|
|
// display: -webkit-box;
|
|
|
|
// -webkit-line-clamp: 3;
|
|
|
|
// -webkit-box-orient: vertical;
|
|
|
|
// overflow: hidden;
|
|
|
|
// font-weight: bold;
|
2022-07-12 10:55:28 +02:00
|
|
|
d // }
|
2021-11-02 19:47:54 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
:deep(.icon) {
|
2021-11-02 19:47:54 +01:00
|
|
|
vertical-align: middle;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|