From 97c0827dc0415be0b6fbfa85199467515ecd1d79 Mon Sep 17 00:00:00 2001 From: Matt McNaney Date: Mon, 21 Sep 2020 12:31:32 -0400 Subject: [PATCH] Changed old logic for pulling the current conference Session had old code for conference selection. That was coded out but the old selection code was left behind. --- javascript/Session/index.jsx | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/javascript/Session/index.jsx b/javascript/Session/index.jsx index f839403..65191de 100644 --- a/javascript/Session/index.jsx +++ b/javascript/Session/index.jsx @@ -210,18 +210,15 @@ export default class Session extends Listing { }, ] this.state.currentConference = {} - this.state.currentConferenceKey = 0 this.locations = [] - this.conferences = [] this.state.resource = Object.assign({}, this.defaultResource) - this.setCurrentConference = this.setCurrentConference.bind(this) this.activeButton = this.activeButton.bind(this) } componentDidMount() { loadLocations(this) - this.loadConferences() + this.loadConference() super.componentDidMount() } @@ -293,14 +290,13 @@ export default class Session extends Listing { super.load({conferenceId: this.props.conferenceId}) } - loadConferences() { + loadConference() { $.ajax({ - url: 'conference/Admin/Conference', + url: 'conference/Admin/Conference/' + this.props.conferenceId, dataType: 'json', type: 'get', success: (data) => { - this.conferences = data.listing - this.setState({currentConference: data.listing[0]}) + this.setState({currentConference: data}) }, error: () => { this.setMessage('Could not access server') @@ -308,15 +304,6 @@ export default class Session extends Listing { }) } - setCurrentConference(e) { - const currentConferenceKey = e.target.value - const currentConference = Object.assign( - {}, - this.conferences[currentConferenceKey] - ) - this.setState({currentConferenceKey, currentConference}) - } - form() { return (