Fix showing past events on group page
Closes #1172 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
5225431d60
commit
e32611c968
@ -123,7 +123,7 @@ const { result: membershipsResult } = useQuery<{
|
|||||||
() => ({ enabled: currentActor.value?.id !== undefined })
|
() => ({ enabled: currentActor.value?.id !== undefined })
|
||||||
);
|
);
|
||||||
const memberships = computed(
|
const memberships = computed(
|
||||||
() => membershipsResult.value?.person.memberships.elements
|
() => membershipsResult.value?.person.memberships?.elements
|
||||||
);
|
);
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -543,7 +543,7 @@
|
|||||||
:to="{
|
:to="{
|
||||||
name: RouteName.GROUP_EVENTS,
|
name: RouteName.GROUP_EVENTS,
|
||||||
params: { preferredUsername: usernameWithDomain(group) },
|
params: { preferredUsername: usernameWithDomain(group) },
|
||||||
query: { future: false },
|
query: { showPassedEvents: true },
|
||||||
}"
|
}"
|
||||||
>{{ t("View past events") }}</o-button
|
>{{ t("View past events") }}</o-button
|
||||||
>
|
>
|
||||||
@ -559,7 +559,9 @@
|
|||||||
:to="{
|
:to="{
|
||||||
name: RouteName.GROUP_EVENTS,
|
name: RouteName.GROUP_EVENTS,
|
||||||
params: { preferredUsername: usernameWithDomain(group) },
|
params: { preferredUsername: usernameWithDomain(group) },
|
||||||
query: { future: organizedEvents.elements.length > 0 },
|
query: {
|
||||||
|
showPassedEvents: organizedEvents.elements.length === 0,
|
||||||
|
},
|
||||||
}"
|
}"
|
||||||
>{{ t("View all events") }}</o-button
|
>{{ t("View all events") }}</o-button
|
||||||
>
|
>
|
||||||
@ -696,7 +698,7 @@ const {
|
|||||||
group,
|
group,
|
||||||
loading: groupLoading,
|
loading: groupLoading,
|
||||||
refetch: refetchGroup,
|
refetch: refetchGroup,
|
||||||
} = useGroup(props.preferredUsername);
|
} = useGroup(props.preferredUsername, { afterDateTime: new Date() });
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { t } = useI18n({ useScope: "global" });
|
const { t } = useI18n({ useScope: "global" });
|
||||||
|
Loading…
Reference in New Issue
Block a user