Skip to content
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

fix: loading of session form in wizard step 5 #5843

Merged
merged 11 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 10 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
12 changes: 11 additions & 1 deletion app/routes/events/view/edit/sessions-speakers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class SessionsSpeakersRoute extends Route.extend(EventWizardMixin
const tracksPromise = data.event.get('tracks');
const microlocationsPromise = data.event.get('microlocations');
const sessionTypesPromise = data.event.get('sessionTypes');
const speakersCallPromise = this.getOrCreate(data.event, 'speakersCall', 'speakers-call');
const speakersCallPromise = this.getOrCreateCFS(data.event);
iamareebjamal marked this conversation as resolved.
Show resolved Hide resolved
// Only get session/speaker custom forms.
const customFormFilterOptions = [{
or: [
Expand Down Expand Up @@ -46,4 +46,14 @@ export default class SessionsSpeakersRoute extends Route.extend(EventWizardMixin
customForms
};
}

async getOrCreateCFS(event) {
try {
return await event.get('speakersCall');
} catch {
return this.store.createRecord('speakers-call', {
event
});
}
}
}
2 changes: 1 addition & 1 deletion app/routes/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class IndexRoute extends Route {
include : 'sessions.track',
'page[size]' : 0
});
const sponsorsPromise = event.query('sponsors', { 'page[size]' : 0 });
const sponsorsPromise = event.query('sponsors', { 'page[size]': 0 });
const taxPromise = event.get('tax');

const [tickets, featuredSpeakers, sponsors, tax] = (await allSettled([ticketsPromise, featuredSpeakersPromise, sponsorsPromise, taxPromise]))
Expand Down