forked from potsda.mn/mobilizon
Fix events not showing on homepage
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
0b8538a65b
commit
24461be703
|
@ -823,5 +823,6 @@
|
|||
"Do you wish to {create_group} or {explore_groups}?": "Do you wish to {create_group} or {explore_groups}?",
|
||||
"Type or select a date…": "Type or select a date…",
|
||||
"Getting there": "Getting there",
|
||||
"Groups are not enabled on this instance.": "Groups are not enabled on this instance."
|
||||
"Groups are not enabled on this instance.": "Groups are not enabled on this instance.",
|
||||
"The events you created are not shown here.": "The events you created are not shown here."
|
||||
}
|
||||
|
|
|
@ -917,5 +917,6 @@
|
|||
"Do you wish to {create_group} or {explore_groups}?": "Voulez-vous {create_group} ou {explore_groups} ?",
|
||||
"Type or select a date…": "Entrez ou sélectionnez une date…",
|
||||
"Getting there": "S'y rendre",
|
||||
"Groups are not enabled on this instance.": "Les groupes ne sont pas activés sur cette instance."
|
||||
"Groups are not enabled on this instance.": "Les groupes ne sont pas activés sur cette instance.",
|
||||
"The events you created are not shown here.": "Les événements que vous avez créé ne s'affichent pas ici."
|
||||
}
|
||||
|
|
|
@ -259,9 +259,13 @@
|
|||
<EventCard :event="event" />
|
||||
</div>
|
||||
</div>
|
||||
<b-message v-else type="is-danger">{{
|
||||
$t("No events found")
|
||||
}}</b-message>
|
||||
<b-message v-else type="is-danger"
|
||||
>{{ $t("No events found") }}<br />
|
||||
<b-icon size="is-small" icon="information-outline" />
|
||||
<small v-if="goingToEvents.size > 0 || lastWeekEvents.length > 0">{{
|
||||
$t("The events you created are not shown here.")
|
||||
}}</small>
|
||||
</b-message>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -444,7 +448,7 @@ export default class Home extends Vue {
|
|||
);
|
||||
}
|
||||
|
||||
get goingToEvents(): Map<string, Map<string, IParticipant>> {
|
||||
get thisWeekGoingToEvents(): IParticipant[] {
|
||||
const res = this.currentUserParticipations.filter(
|
||||
({ event, role }) =>
|
||||
event.beginsOn != null &&
|
||||
|
@ -456,8 +460,11 @@ export default class Home extends Vue {
|
|||
(a: IParticipant, b: IParticipant) =>
|
||||
a.event.beginsOn.getTime() - b.event.beginsOn.getTime()
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
return res.reduce(
|
||||
get goingToEvents(): Map<string, Map<string, IParticipant>> {
|
||||
return this.thisWeekGoingToEvents.reduce(
|
||||
(
|
||||
acc: Map<string, Map<string, IParticipant>>,
|
||||
participation: IParticipant
|
||||
|
@ -496,7 +503,7 @@ export default class Home extends Vue {
|
|||
get filteredFeaturedEvents(): IEvent[] {
|
||||
return this.events.elements.filter(
|
||||
({ id }) =>
|
||||
!this.currentUserParticipations
|
||||
!this.thisWeekGoingToEvents
|
||||
.filter(
|
||||
(participation) => participation.role === ParticipantRole.CREATOR
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue