Show cancelled status on cancelled events

Closes #478

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-12-01 12:33:17 +01:00
parent 2a9e95bf7f
commit 9683df9040
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -10,7 +10,16 @@
event.picture ? event.picture.url : '/img/mobilizon_default_card.png'
}')`"
>
<div class="tag-container" v-if="event.tags">
<div
class="tag-container"
v-if="event.tags || event.status !== EventStatus.CONFIRMED"
>
<b-tag type="is-info" v-if="event.status === EventStatus.TENTATIVE">
{{ $t("Tentative") }}
</b-tag>
<b-tag type="is-danger" v-if="event.status === EventStatus.CANCELLED">
{{ $t("Cancelled") }}
</b-tag>
<router-link
:to="{ name: RouteName.TAG, params: { tag: tag.title } }"
v-for="tag in event.tags.slice(0, 3)"
@ -84,7 +93,7 @@ import { IEvent, IEventCardOptions } from "@/types/event.model";
import { Component, Prop, Vue } from "vue-property-decorator";
import DateCalendarIcon from "@/components/Event/DateCalendarIcon.vue";
import { Actor, Person } from "@/types/actor";
import { ParticipantRole } from "@/types/enums";
import { EventStatus, ParticipantRole } from "@/types/enums";
import RouteName from "../../router/name";
@Component({
@ -99,6 +108,8 @@ export default class EventCard extends Vue {
ParticipantRole = ParticipantRole;
EventStatus = EventStatus;
RouteName = RouteName;
defaultOptions: IEventCardOptions = {