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 67326cd01..6d0c6a288 100644 --- a/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee @@ -17,22 +17,22 @@ LessonTimerActions = context.LessonTimerActions Reflux.listenTo(LessonTimerStore, "onLessonTimersChanged") ] - lookup : { - name_specified: {name: 'Profile', profile: ''}, - experiences_teaching: {name: 'Experience', teacher_profile: "experience"}, - experiences_education: {name: 'Experience', teacher_profile: "experience" }, - experiences_award: {name: 'Experience', teacher_profile: "experience" }, - has_stripe_account: {name: 'Stripe', text: "Press the 'Stripe Connect' button in the bottom-left of the page"}, - has_teacher_bio: {name: 'Introduction', teacher_profile: "introduction"}, - intro_video: {name: 'Introduction', teacher_profile: "introduction"}, - years_teaching: {name: 'Introduction', teacher_profile: "introduction"}, - years_playing: {name: 'Introduction', teacher_profile: "introduction"}, - instruments_or_subject: {name: 'Basics', teacher_profile: "basics"}, - genres: {name: 'Basics', teacher_profile: "basics"}, - languages: {name: 'Basics', teacher_profile: "basics"}, - teaches_ages_specified: {name: 'Basics', teacher_profile: "basics"}, + lookup: { + name_specified: {name: 'Profile', profile: ''}, + experiences_teaching: {name: 'Experience', teacher_profile: "experience"}, + experiences_education: {name: 'Experience', teacher_profile: "experience"}, + experiences_award: {name: 'Experience', teacher_profile: "experience"}, + has_stripe_account: {name: 'Stripe', text: "Press the 'Stripe Connect' button in the bottom-left of the page"}, + has_teacher_bio: {name: 'Introduction', teacher_profile: "introduction"}, + intro_video: {name: 'Introduction', teacher_profile: "introduction"}, + years_teaching: {name: 'Introduction', teacher_profile: "introduction"}, + years_playing: {name: 'Introduction', teacher_profile: "introduction"}, + instruments_or_subject: {name: 'Basics', teacher_profile: "basics"}, + genres: {name: 'Basics', teacher_profile: "basics"}, + languages: {name: 'Basics', teacher_profile: "basics"}, + teaches_ages_specified: {name: 'Basics', teacher_profile: "basics"}, teaching_level_specified: {name: 'Basics', teacher_profile: "basics"}, - has_pricing_specified: {name: 'Pricing', teacher_profile: "pricing"} + has_pricing_specified: {name: 'Pricing', teacher_profile: "pricing"} } needsFetching: false @@ -79,7 +79,6 @@ LessonTimerActions = context.LessonTimerActions context.JK.popExternalLinks(@root) lessonSessionActionSelected: (e, data) -> - lessonId = data.options.id lesson = @findLesson(lessonId) @@ -90,15 +89,24 @@ LessonTimerActions = context.LessonTimerActions @app.layout.showDialog('chat-dialog', {d1: 'lesson_' + lessonId}) else if data.lessonAction == 'cancel' @cancelLesson(lesson) - # @@app.layout.showDialog('cancel-lesson-dialog', {d1: lessonId}) + # @@app.layout.showDialog('cancel-lesson-dialog', {d1: lessonId}) else if data.lessonAction == 'join' SessionActions.enterSession(lesson.music_session.id) else if data.lessonAction == 'reschedule' @rescheduleLesson(lesson) else if data.lessonAction == 'start-5-min' - rest.lessonStartTime({id: lessonId, minutes: 5}).done((response) => (@app.layout.notify({title: 'Start Time Set', text: "Start time for session set to 5 mins from now"}))) + rest.lessonStartTime({id: lessonId, minutes: 5}).done((response) => (@app.layout.notify({ + title: 'Start Time Set', + text: "Start time for session set to 5 mins from now" + }))) else if data.lessonAction == 'start-35-ago' - rest.lessonStartTime({id: lessonId, minutes: -35}).done((response) => (@app.layout.notify({title: 'Start Time Set', text: "Start time for session set to 35 mins ago"}))) + rest.lessonStartTime({ + id: lessonId, + minutes: -35 + }).done((response) => (@app.layout.notify({ + title: 'Start Time Set', + text: "Start time for session set to 35 mins ago" + }))) else if data.lessonAction == 'enter-payment' window.location.href = "/client#/jamclass/lesson-payment/lesson-booking_#{lessonId}" else @@ -124,14 +132,18 @@ LessonTimerActions = context.LessonTimerActions if recurring if @viewerStudent() - context.JK.Banner.showAlert("Policy Issue", "
We’re sorry, but you cannot reschedule this recurring lesson right now because it is less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost. You may reschedule this recurring lesson anytime starting from the end of this next scheduled lesson, so please plan to do it then.
") + context.JK.Banner.showAlert("Policy Issue", + "We’re sorry, but you cannot reschedule this recurring lesson right now because it is less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost. You may reschedule this recurring lesson anytime starting from the end of this next scheduled lesson, so please plan to do it then.
") else - context.JK.Banner.showAlert("Policy Issue", "We’re sorry, but you cannot reschedule this recurring lesson right now because it is less than 24 hours before the lesson start time. This is not allowed in the terms of service. You may reschedule this recurring lesson anytime starting from the end of this next scheduled lesson, so please plan to do it then.
") + context.JK.Banner.showAlert("Policy Issue", + "We’re sorry, but you cannot reschedule this recurring lesson right now because it is less than 24 hours before the lesson start time. This is not allowed in the terms of service. You may reschedule this recurring lesson anytime starting from the end of this next scheduled lesson, so please plan to do it then.
") else if @viewerStudent() - context.JK.Banner.showAlert("Policy Issue", "We’re sorry, but you cannot reschedule a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.
") + context.JK.Banner.showAlert("Policy Issue", + "We’re sorry, but you cannot reschedule a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.
") else - context.JK.Banner.showAlert("Policy Issue", "We’re sorry, but you cannot reschedule a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service.
") + context.JK.Banner.showAlert("Policy Issue", + "We’re sorry, but you cannot reschedule a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service.
") else @app.ajaxError(jqXHR) )) @@ -152,12 +164,14 @@ LessonTimerActions = context.LessonTimerActions request.lesson_session_id = lesson.id request.update_all = update_all - rest.cancelLessonBooking(request).done((response) => @cancelLessonBookingDone(response, lesson)).fail((response) => @cancelLessonBookingFail(response)) + rest.cancelLessonBooking(request).done((response) => @cancelLessonBookingDone(response, + lesson)).fail((response) => @cancelLessonBookingFail(response)) cancelLessonBookingDone: (booking, lesson) -> if booking.focused_lesson.teacher_short_canceled if @teacherViewing() - context.JK.Banner.showAlert('late cancellation warning', 'Cancelling a lesson less than 24 hours before it’s scheduled to start should be avoided, as it’s an inconvenience to the student. Repeated violations of this policy will negatively affect your teacher score.') + context.JK.Banner.showAlert('late cancellation warning', + 'Cancelling a lesson less than 24 hours before it’s scheduled to start should be avoided, as it’s an inconvenience to the student. Repeated violations of this policy will negatively affect your teacher score.') @refreshLesson(lesson.id) @@ -165,7 +179,8 @@ LessonTimerActions = context.LessonTimerActions @app.ajaxError(jqXHR) cancelSelected: (lesson, recurring) -> - rest.checkLessonCancel({id: lesson.id, update_all: recurring}).done((response) => (@issueCancelLesson(lesson, recurring))).fail((jqXHR) => (@cancelSelectedFail(jqXHR))) + rest.checkLessonCancel({id: lesson.id, update_all: recurring}).done((response) => (@issueCancelLesson(lesson, + recurring))).fail((jqXHR) => (@cancelSelectedFail(jqXHR))) cancelSelectedFailed: (jqXHR) -> if jqXHR.status == 422 @@ -174,32 +189,54 @@ LessonTimerActions = context.LessonTimerActions if @viewerStudent() buttons = [] buttons.push({name: 'CLOSE', buttonStyle: 'button-grey'}) - buttons.push({name: 'CANCEL RECURRING LESSONS', buttonStyle: 'button-orange', click:(() => (@issueCancelLesson(lesson, true)))}) - context.JK.Banner.show({title: "Policy Issue", html: "You may cancel this recurring series of lessons, but it is too late to cancel the next scheduled lesson because it is less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.", buttons: buttons}) + buttons.push({ + name: 'CANCEL RECURRING LESSONS', + buttonStyle: 'button-orange', + click: (() => (@issueCancelLesson(lesson, true))) + }) + context.JK.Banner.show({ + title: "Policy Issue", + html: "You may cancel this recurring series of lessons, but it is too late to cancel the next scheduled lesson because it is less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.", + buttons: buttons + }) else # path should not be taken - context.JK.Banner.showAlert("Policy Issue", "We’re sorry, but you cannot cancel a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.
") + context.JK.Banner.showAlert("Policy Issue", + "We’re sorry, but you cannot cancel a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.
") else if @viewerStudent() - context.JK.Banner.showAlert("Policy Issue", "We’re sorry, but you cannot cancel a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.
") + context.JK.Banner.showAlert("Policy Issue", + "We’re sorry, but you cannot cancel a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service because the instructor cannot reasonably be expected to be able to backfill the time slot that has been lost.
") else # path should not be taken - context.JK.Banner.showAlert("Policy Issue", "We’re sorry, but you cannot cancel a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service.
") + context.JK.Banner.showAlert("Policy Issue", + "We’re sorry, but you cannot cancel a lesson less than 24 hours before the lesson start time. This is not allowed in the terms of service.
") else @app.ajaxError(jqXHR) rescheduleLesson: (lesson) -> if lesson.recurring buttons = [] - buttons.push({name: 'THIS SESSION', buttonStyle: 'button-orange', click:(() => (@rescheduleSelected(lesson, false)))}) - buttons.push({name: 'ALL SESSIONS', buttonStyle: 'button-orange', click:(() => (@rescheduleSelected(lesson, true)))}) - context.JK.Banner.show({title: 'Rescheduling Selection', html:'Do you wish to all reschedule all lessons or just the one selected?', buttons: buttons}) + buttons.push({ + name: 'THIS SESSION', + buttonStyle: 'button-orange', + click: (() => (@rescheduleSelected(lesson, false))) + }) + buttons.push({ + name: 'ALL SESSIONS', + buttonStyle: 'button-orange', + click: (() => (@rescheduleSelected(lesson, true))) + }) + context.JK.Banner.show({ + title: 'Rescheduling Selection', + html: 'Do you wish to all reschedule all lessons or just the one selected?', + buttons: buttons + }) else @rescheduleSelected(lesson, false) cancelLesson: (lesson) -> - if lesson.isRequested confirmTitle = 'Confirm Decline' verbLower = 'decline' @@ -209,11 +246,23 @@ LessonTimerActions = context.LessonTimerActions if !lesson.isRequested || lesson.recurring buttons = [] buttons.push({name: 'CANCEL', buttonStyle: 'button-grey'}) - buttons.push({name: 'THIS SESSION', buttonStyle: 'button-orange', click:(() => (@cancelSelected(lesson, false)))}) - buttons.push({name: 'ALL SESSIONS', buttonStyle: 'button-orange', click:(() => (@cancelSelected(lesson, true)))}) - context.JK.Banner.show({title: 'Select One', html:"Do you wish to all #{verbLower} all lessons or just the one selected?", buttons: buttons}) + buttons.push({ + name: 'THIS SESSION', + buttonStyle: 'button-orange', + click: (() => (@cancelSelected(lesson, false))) + }) + buttons.push({name: 'ALL SESSIONS', buttonStyle: 'button-orange', click: (() => (@cancelSelected(lesson, true)))}) + context.JK.Banner.show({ + title: 'Select One', + html: "Do you wish to all #{verbLower} all lessons or just the one selected?", + buttons: buttons + }) else - context.JK.Banner.showYesNo({title: confirmTitle, html:"Are you sure you want to #{verbLower} this lesson?", yes: () =>(@cancelSelected(lesson, lesson.recurring))}) + context.JK.Banner.showYesNo({ + title: confirmTitle, + html: "Are you sure you want to #{verbLower} this lesson?", + yes: () => (@cancelSelected(lesson, lesson.recurring)) + }) getInitialState: () -> { @@ -234,7 +283,8 @@ LessonTimerActions = context.LessonTimerActions checkStripeSuccessReturn: () -> if $.QueryString['stripe-success']? if $.QueryString['stripe-success'] == 'true' - context.JK.Banner.showNotice('stripe connected', 'Congratulations, you have successfully connected your Stripe account, so payments for student lessons can now be processed.') + context.JK.Banner.showNotice('stripe connected', + 'Congratulations, you have successfully connected your Stripe account, so payments for student lessons can now be processed.') if window.history.replaceState #ie9 proofing window.history.replaceState({}, "", "/client#/jamclass") @@ -262,7 +312,6 @@ LessonTimerActions = context.LessonTimerActions [] postProcess: (data) -> - for lesson in data.entries # calculate: @@ -293,7 +342,6 @@ LessonTimerActions = context.LessonTimerActions updatedLessonSessionReadDone: (lesson_session) -> # update lesson session data in local state - @updateLessonState(lesson_session) # if this is a not-confirmed lesson, send them to the view statu screen @@ -314,7 +362,6 @@ LessonTimerActions = context.LessonTimerActions $this.btOn() constructMissingLinks: (user) -> - links = [] matches = {} @@ -326,11 +373,13 @@ LessonTimerActions = context.LessonTimerActions for name, data of matches if !data.text? - links.push(`{data.name}`) + links.push(`{data.name}`) for name, data of matches if data.text? - links.push(`{data.name}`) + links.push(`{data.name}`) `- JamClass is the best way to teach or take online music lessons. Learn more about teaching or taking lessons. + JamClass is the best way to teach or take online music lessons.
+TestDrive offers 3 unbeatable options for students to try JamClass online lessons, and to find the best teacher:
-TestDrive lets you try:
+To get started, click the Search Teachers button to the left. When you find a teacher you like, click the Book TestDrive Lesson button, and follow the on-screen instructions to choose the 4-, 2-, or 1-teacher offer.
Read our JamClass user guide for students to learn how to get the most out of your online lessons! -
-If you have any problems, please email us at support@jamkazam.com. We're here to help make your lessons a great experience.
-Read our JamClass user guide for students to learn how to get the most out of your online lessons! +
+ +If you have any problems, please email us at support@jamkazam.com. + We're here to help make your lessons a great experience.
+Your teacher profile is {pct}% complete.
` else - pctCompleteMsg = `Your teacher profile is {pct}% complete. The following sections of your profile are missing information. Click any of these links to view and add missing information:
` + pctCompleteMsg = `Your teacher profile is {pct}% complete. The following sections + of your profile are missing information. Click any of these links to view and add missing information:
` missingLinks = @constructMissingLinks(this.state.user) rightContent = `- Read our JamClass user guide for teachers to learn how to get the most out of the JamClass technology and marketplace. + Read our JamClass user guide for teachers to learn how to get the most out of the JamClass + technology and marketplace.
+- If you have any problems, please email us support@jamkazam.com. We're here to help you build your lesson business. -
+ If you have any problems, please email us support@jamkazam.com. + We're here to help you build your lesson business. +