fix(admin): Restore visibility of the last published event

- Don't expect event.options to be always here in EventCard
- Add event.options in Dashboard graphql query

Solves #1663
This commit is contained in:
Massedil
2025-02-07 15:34:27 +01:00
parent fbcca23057
commit e4cf73b9a7
2 changed files with 7 additions and 2 deletions

View File

@@ -79,9 +79,9 @@
> >
<start-time-icon <start-time-icon
:small="true" :small="true"
v-if="!mergedOptions.hideDate && event.options.showStartTime" v-if="!mergedOptions.hideDate && event.options?.showStartTime"
:date="event.beginsOn.toString()" :date="event.beginsOn.toString()"
:timezone="event.options.timezone" :timezone="event.options?.timezone"
/> />
</div> </div>
<span <span

View File

@@ -1,5 +1,6 @@
import gql from "graphql-tag"; import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor"; import { ACTOR_FRAGMENT } from "./actor";
import { EVENT_OPTIONS_FRAGMENT } from "./event_options";
export const DASHBOARD = gql` export const DASHBOARD = gql`
query Dashboard { query Dashboard {
@@ -9,6 +10,9 @@ export const DASHBOARD = gql`
uuid uuid
title title
beginsOn beginsOn
options {
...EventOptions
}
picture { picture {
id id
alt alt
@@ -35,6 +39,7 @@ export const DASHBOARD = gql`
} }
} }
${ACTOR_FRAGMENT} ${ACTOR_FRAGMENT}
${EVENT_OPTIONS_FRAGMENT}
`; `;
export const RELAY_FRAGMENT = gql` export const RELAY_FRAGMENT = gql`