fix(front): Fix event list month order

Closes #1244

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-04-21 10:18:22 +02:00
parent 35b07dceaa
commit 63c9ed62de
7 changed files with 68 additions and 31 deletions

View File

@@ -48,8 +48,10 @@
t("Past events")
}}</o-switch>
<grouped-multi-event-minimalist-card
class="mb-6"
:events="group.organizedEvents.elements"
:isCurrentActorMember="isCurrentActorMember"
:order="showPassedEvents ? 'DESC' : 'ASC'"
/>
<empty-content
v-if="
@@ -77,6 +79,7 @@
</template>
</empty-content>
<o-pagination
v-if="group.organizedEvents.total > EVENTS_PAGE_LIMIT"
class="mt-4"
:total="group.organizedEvents.total"
v-model:current="page"
@@ -150,6 +153,8 @@ const variables = computed(() => ({
name: route.params.preferredUsername as string,
beforeDateTime: showPassedEvents.value ? new Date() : null,
afterDateTime: showPassedEvents.value ? null : new Date(),
order: "BEGINS_ON",
orderDirection: showPassedEvents.value ? "DESC" : "ASC",
organisedEventsPage: page.value,
organisedEventsLimit: EVENTS_PAGE_LIMIT,
}));

View File

@@ -431,8 +431,8 @@ const eventDeleted = (eventid: string): void => {
}),
});
if (!upcomingEventsData) return;
let loggedUser = upcomingEventsData?.loggedUser;
let participations = loggedUser?.participations;
const loggedUser = upcomingEventsData?.loggedUser;
const participations = loggedUser?.participations;
apollo.client.cache.writeQuery<{ loggedUser: IUser }>({
query: LOGGED_USER_UPCOMING_EVENTS,
variables: () => ({