Skip to content

fix: Show speakers menu only when speakers present #5171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/components/public/side-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class SideMenu extends Component {
}

async checkSpeakers() {
this.showSpeakers = this.showSpeakers || (await this.loader.load(`/events/${this.event.id}/speakers?fields[speaker]=id&page[size]=1&filters=${JSON.stringify(SPEAKERS_FILTER)}`)).data.length;
this.showSpeakers = this.showSpeakers || (await this.loader.load(`/events/${this.event.id}/speakers?fields[speaker]=id&page[size]=1&filter=${JSON.stringify(SPEAKERS_FILTER)}`)).data.length;
}

async checkSessions() {
Expand All @@ -42,7 +42,7 @@ export default class SideMenu extends Component {
}
]
}];
this.showSessions = this.showSessions || (await this.loader.load(`/events/${this.event.id}/sessions?fields[session]=id&page[size]=1&filters=${JSON.stringify(filters)}`)).data.length;
this.showSessions = this.showSessions || (await this.loader.load(`/events/${this.event.id}/sessions?fields[session]=id&page[size]=1&filter=${JSON.stringify(filters)}`)).data.length;
}

@action
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/public/side-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
</LinkTo>
{{/if}}
{{/if}}
{{#if (and this.showSessions this.isSchedulePublished)}}
{{#if (and this.isSchedulePublished this.showSessions)}}
<LinkTo @route="public.sessions" class="item">
{{t 'Schedule'}}
</LinkTo>
{{/if}}
{{#if (and this.showSessions this.isSchedulePublished)}}
{{#if (and this.isSchedulePublished this.showSessions)}}
<LinkTo @route="public.schedule" class="item">
{{t 'Calendar'}}
</LinkTo>
Expand Down