diff --git a/js/src/components/Event/EventCard.vue b/js/src/components/Event/EventCard.vue
index 0947637d..68fa7d80 100644
--- a/js/src/components/Event/EventCard.vue
+++ b/js/src/components/Event/EventCard.vue
@@ -10,7 +10,16 @@
event.picture ? event.picture.url : '/img/mobilizon_default_card.png'
}')`"
>
-
+
+
+ {{ $t("Tentative") }}
+
+
+ {{ $t("Cancelled") }}
+
{
@@ -1205,6 +1198,29 @@ export default class Event extends EventMixin {
}
return null;
}
+
+ get shouldShowParticipationButton(): boolean {
+ // So that people can cancel their participation
+ if (
+ this.actorIsParticipant ||
+ (this.config.anonymous.participation.allowed &&
+ this.anonymousParticipation)
+ )
+ return true;
+
+ // You can participate to draft or cancelled events
+ if (this.event.draft || this.event.status === EventStatus.CANCELLED)
+ return false;
+
+ // Organizer can't participate
+ if (this.actorIsOrganizer) return false;
+
+ // If capacity is OK
+ if (this.eventCapacityOK) return true;
+
+ // Else
+ return false;
+ }
}