diff --git a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb index 44410c3e8..967f7e27f 100644 --- a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb +++ b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb @@ -1676,7 +1676,7 @@ module JamRuby @session_date = @lesson_session.slot.pretty_scheduled_start(true) email = @student.email - @subject = "Your lesson with #{@student.first_name} on JamKazam is starting soon" + @subject = "Your lesson with #{@teacher.first_name} on JamKazam is starting soon" unique_args = {:type => "send_starting_notice_student"} sendgrid_category "Notification" diff --git a/web/app/assets/javascripts/everywhere/everywhere.js b/web/app/assets/javascripts/everywhere/everywhere.js index 80c5f8ccd..234b7d105 100644 --- a/web/app/assets/javascripts/everywhere/everywhere.js +++ b/web/app/assets/javascripts/everywhere/everywhere.js @@ -265,11 +265,12 @@ "shoppingCart", "checkoutPayment", "checkoutOrder", "redeemComplete", "checkoutComplete", "teachers/setup/introduction", "teachers/setup/basics", "teachers/setup/experience", "teachers/setup/pricing", "account/profile", "account/profile/experience", "account/profile/interests", "account/profile/samples", - "jamclass"] + "jamclass", "jamclass/searchOptions", "teachers/search", "profile/teacher", "jamclass/test-drive-selection", "jamclass/book-lesson"] $(document).on(context.JK.EVENTS.SCREEN_CHANGED, function(e, data) { var show = false; + console.log("data.newScreen", data.newScreen) if (data.newScreen && activate.indexOf(data.newScreen) > -1) { show = true; } diff --git a/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee b/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee index d1e771d83..fff56dea6 100644 --- a/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee @@ -2,6 +2,7 @@ context = window rest = context.JK.Rest() logger = context.JK.logger +SessionActions = context.SessionActions UserStore = context.UserStore LessonTimerStore = context.LessonTimerStore LessonTimerActions = context.LessonTimerActions @@ -81,7 +82,7 @@ LessonTimerActions = context.LessonTimerActions @cancelLesson(lesson) # @@app.layout.showDialog('cancel-lesson-dialog', {d1: lessonId}) else if data.lessonAction == 'join' - window.location.href = '/client#/session/' + lesson.music_session.id + SessionActions.enterSession(lesson.music_session.id) else if data.lessonAction == 'reschedule' @rescheduleLesson(lesson) else if data.lessonAction == 'start-5-min' @@ -337,7 +338,7 @@ LessonTimerActions = context.LessonTimerActions joinLessonNow: (lesson, e) -> e.preventDefault(); - window.location.href = '/client#/session/' + lesson.music_session.id + SessionActions.enterSession(lesson.music_session.id) render: () -> disabled = @state.updating @@ -437,7 +438,7 @@ LessonTimerActions = context.LessonTimerActions else if lessonData.times.initialWindow minutes = -lessonData.times.until.minutes - if minutes == 1 + if minutes == 1 || minutes == 0 timeStmt = `This lesson just started. join lesson now` else timeStmt = `Started {minutes} minutes ago. join lesson now` diff --git a/web/app/assets/javascripts/react-components/JamTrackLandingScreen.js.jsx.coffee b/web/app/assets/javascripts/react-components/JamTrackLandingScreen.js.jsx.coffee index ab6a75e1e..50909d46e 100644 --- a/web/app/assets/javascripts/react-components/JamTrackLandingScreen.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/JamTrackLandingScreen.js.jsx.coffee @@ -266,7 +266,7 @@ rest = context.JK.Rest() rest.legacyCreateSession(data).done((response) => newSessionId = response.id context.JK.SessionUtils.setAutoOpenJamTrack(jamTrack) # so that the session screen will pick this up - context.location = '/client#/session/' + newSessionId + context.SessionActions.enterSession(newSessionId) # Re-loading the session settings will cause the form to reset with the right stuff in it. # This is an extra xhr call, but it keeps things to a single codepath #loadSessionSettings() diff --git a/web/app/assets/javascripts/react-components/TeacherSearchScreen.js.jsx.coffee b/web/app/assets/javascripts/react-components/TeacherSearchScreen.js.jsx.coffee index 956edcd95..4a759376d 100644 --- a/web/app/assets/javascripts/react-components/TeacherSearchScreen.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/TeacherSearchScreen.js.jsx.coffee @@ -214,7 +214,7 @@ ProfileActions = @ProfileActions summary = '' if searchOptions.onlyMySchool - summary += "my school teachers only" + summary += "From My School Only" instruments = searchOptions.instruments if instruments? && instruments.length > 0 @@ -222,7 +222,9 @@ ProfileActions = @ProfileActions bit = "Instrument = #{InstrumentStore.display(instruments[0])}" else instruments.length > 1 - bit = "Instruments = #{InstrumentStore.display(instruments[0])}..." + bit = "Instruments = #{InstrumentStore.display(instruments[0])} ... " + if summary.length > 0 + summary += ', ' summary += " #{bit}" subjects = searchOptions.subjects @@ -231,7 +233,9 @@ ProfileActions = @ProfileActions bit = "Subject = #{SubjectStore.display(subjects[0])}" else subjects.length > 1 - bit = "Subjects = #{SubjectStore.display(subjects[0])}..." + bit = "Subjects = #{SubjectStore.display(subjects[0])} ... " + if summary.length > 0 + summary += ', ' summary += " #{bit}" genres = searchOptions.genres @@ -240,18 +244,61 @@ ProfileActions = @ProfileActions bit = "Genre = #{GenreStore.display(genres[0])}" else genres.length > 1 - bit = "Genres = #{GenreStore.display(genres[0])}..." + bit = "Genres = #{GenreStore.display(genres[0])} ... " + if summary.length > 0 + summary += ', ' summary += " #{bit}" languages = searchOptions.languages if languages? && languages.length > 0 if languages.length == 1 - bit = "Genre = #{LanguageStore.display(languages[0])}" + bit = "Language = #{LanguageStore.display(languages[0])}" else languages.length > 1 - bit = "Genres = #{LanguageStore.display(languages[0])}..." + bit = "Languages = #{LanguageStore.display(languages[0])} ... " + if summary.length > 0 + summary += ', ' summary += " #{bit}" + if searchOptions.teaches_beginner || searchOptions.teaches_intermediate || searchOptions.teaches_advanced + bit = "Teaches " + qualifier = '' + if searchOptions.teaches_beginner + qualifier += "Beginner" + if searchOptions.teaches_intermediate + if qualifier.length > 0 + qualifier += ", " + qualifier += "Intermediate" + if searchOptions.teaches_advanced + if qualifier.length > 0 + qualifier += ", " + qualifier += "Advanced" + if summary.length > 0 + summary += ', ' + summary += " #{bit}#{qualifier}" + + if searchOptions.student_age? + if summary.length > 0 + summary += ', ' + summary += "Student Age = #{searchOptions.student_age}" + + if searchOptions.years_teaching? + if summary.length > 0 + summary += ', ' + summary += "Years Teaching = #{searchOptions.years_teaching}" + + if searchOptions.location?.country? + if summary.length > 0 + summary += ', ' + summary += "Country = #{searchOptions.location.country}" + + if searchOptions.location?.region? + + if summary.length > 0 + summary += ', ' + summary += "Region = #{searchOptions.location.region}" + + if summary.length == 0 summary = 'all teachers' @@ -309,11 +356,13 @@ ProfileActions = @ProfileActions