2020-02-18 08:57:00 +01:00
|
|
|
<template>
|
|
|
|
<router-link
|
|
|
|
class="event-minimalist-card-wrapper"
|
|
|
|
:to="{ name: RouteName.EVENT, params: { uuid: event.uuid } }"
|
|
|
|
>
|
2021-06-10 10:05:47 +02:00
|
|
|
<date-calendar-icon
|
|
|
|
class="calendar-icon"
|
|
|
|
:date="event.beginsOn"
|
|
|
|
:small="true"
|
|
|
|
/>
|
2020-02-18 08:57:00 +01:00
|
|
|
<div class="title-info-wrapper">
|
|
|
|
<p class="event-minimalist-title">{{ event.title }}</p>
|
|
|
|
<p v-if="event.physicalAddress" class="has-text-grey">
|
|
|
|
{{ event.physicalAddress.description }}
|
|
|
|
</p>
|
2020-09-02 17:42:17 +02:00
|
|
|
<p v-else>
|
|
|
|
<span v-if="event.options.maximumAttendeeCapacity !== 0">
|
|
|
|
{{
|
|
|
|
$tc(
|
|
|
|
"{available}/{capacity} available places",
|
2020-11-30 10:24:11 +01:00
|
|
|
event.options.maximumAttendeeCapacity -
|
|
|
|
event.participantStats.participant,
|
2020-09-02 17:42:17 +02:00
|
|
|
{
|
|
|
|
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,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
</span>
|
|
|
|
<span v-else>
|
|
|
|
{{
|
|
|
|
$tc("{count} participants", event.participantStats.participant, {
|
|
|
|
count: event.participantStats.participant,
|
|
|
|
})
|
|
|
|
}}
|
|
|
|
</span>
|
|
|
|
<span v-if="event.participantStats.notApproved > 0">
|
|
|
|
<b-button
|
|
|
|
type="is-text"
|
|
|
|
@click="
|
|
|
|
gotToWithCheck(participation, {
|
|
|
|
name: RouteName.PARTICIPATIONS,
|
|
|
|
query: { role: ParticipantRole.NOT_APPROVED },
|
|
|
|
params: { eventId: event.uuid },
|
|
|
|
})
|
|
|
|
"
|
|
|
|
>
|
|
|
|
{{
|
2020-11-30 10:24:11 +01:00
|
|
|
$tc(
|
|
|
|
"{count} requests waiting",
|
|
|
|
event.participantStats.notApproved,
|
|
|
|
{
|
|
|
|
count: event.participantStats.notApproved,
|
|
|
|
}
|
|
|
|
)
|
2020-09-02 17:42:17 +02:00
|
|
|
}}
|
|
|
|
</b-button>
|
|
|
|
</span>
|
|
|
|
</p>
|
2020-02-18 08:57:00 +01:00
|
|
|
</div>
|
|
|
|
</router-link>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
|
|
import { IEvent } from "@/types/event.model";
|
|
|
|
import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue";
|
2020-11-27 19:27:44 +01:00
|
|
|
import { ParticipantRole } from "@/types/enums";
|
2020-02-18 08:57:00 +01:00
|
|
|
import RouteName from "../../router/name";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
components: {
|
|
|
|
DateCalendarIcon,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class EventMinimalistCard extends Vue {
|
|
|
|
@Prop({ required: true, type: Object }) event!: IEvent;
|
|
|
|
|
|
|
|
RouteName = RouteName;
|
2020-11-06 11:34:32 +01:00
|
|
|
|
|
|
|
ParticipantRole = ParticipantRole;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.event-minimalist-card-wrapper {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
color: initial;
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
|
|
.calendar-icon {
|
|
|
|
margin-right: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title-info-wrapper {
|
|
|
|
flex: 2;
|
|
|
|
|
|
|
|
.event-minimalist-title {
|
|
|
|
color: #3c376e;
|
2020-11-30 10:24:11 +01:00
|
|
|
font-family: "Liberation Sans", "Helvetica Neue", Roboto, Helvetica, Arial,
|
|
|
|
serif;
|
2020-02-18 08:57:00 +01:00
|
|
|
font-size: 1.25rem;
|
|
|
|
font-weight: 700;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|