From cdadc8bff49eb41e6ec958b9482aeabf69e2be5e Mon Sep 17 00:00:00 2001 From: Seth Call Date: Thu, 19 May 2016 14:45:26 -0500 Subject: [PATCH] VRFS-4083 - switched sender name in email --- ruby/lib/jam_ruby/app/mailers/user_mailer.rb | 30 +++++++++---------- .../LessonBooking.js.jsx.coffee | 1 + 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb index 967f7e27f..695979454 100644 --- a/ruby/lib/jam_ruby/app/mailers/user_mailer.rb +++ b/ruby/lib/jam_ruby/app/mailers/user_mailer.rb @@ -681,14 +681,14 @@ module JamRuby def student_lesson_accepted(lesson_session, message, slot) @slot = slot - if slot.is_teacher_created? + if slot.is_teacher_approved? @target = lesson_session.student @sender = lesson_session.teacher - @subject = "Your have confirmed a lesson!" + @subject = "Your lesson request is confirmed!" else @target = lesson_session.teacher @sender = lesson_session.student - @subject = "Your lesson request is confirmed!" + @subject = "Your have confirmed a lesson!" end @lesson_session = lesson_session @message = message @@ -709,14 +709,14 @@ module JamRuby def teacher_lesson_accepted(lesson_session, message, slot) @slot = slot - if slot.is_teacher_created? + if slot.is_teacher_approved? @target = lesson_session.student @sender = lesson_session.teacher - @subject = "Your lesson time change is confirmed by #{lesson_session.student.name}!" + @subject = "You have confirmed a lesson!" else @target = lesson_session.teacher @sender = lesson_session.student - @subject = "You have confirmed a lesson!" + @subject = "Your lesson time change is confirmed by #{lesson_session.student.name}!" end @lesson_session = lesson_session @@ -739,13 +739,13 @@ module JamRuby def student_lesson_update_all(lesson_session, message, slot) @slot = slot if slot.is_teacher_created? - @target = lesson_session.student - @sender = lesson_session.teacher - subject = "All lesson times changed with #{lesson_session.student.name}!" - else @target = lesson_session.teacher @sender = lesson_session.student - subject = "All lesson times changed with #{lesson_session.student.name}!" + subject = "All lesson times changed with #{lesson_session.teacher.name}!" + else + @target = lesson_session.student + @sender = lesson_session.teacher + subject = "All lesson times changed with #{lesson_session.teacher.name}!" end @lesson_session = lesson_session @message = message @@ -767,13 +767,13 @@ module JamRuby def teacher_lesson_update_all(lesson_session, message, slot) @slot = slot if slot.is_teacher_created? - @target = lesson_session.student - @sender = lesson_session.teacher - subject = "All lesson times changed with #{lesson_session.student.name}!" - else @target = lesson_session.teacher @sender = lesson_session.student subject = "All lesson times changed with #{lesson_session.student.name}!" + else + @target = lesson_session.student + @sender = lesson_session.teacher + subject = "All lesson times changed with #{lesson_session.student.name}!" end @lesson_session = lesson_session diff --git a/web/app/assets/javascripts/react-components/LessonBooking.js.jsx.coffee b/web/app/assets/javascripts/react-components/LessonBooking.js.jsx.coffee index a00e44487..3c17455b9 100644 --- a/web/app/assets/javascripts/react-components/LessonBooking.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/LessonBooking.js.jsx.coffee @@ -710,6 +710,7 @@ UserStore = context.UserStore {this.userHeader(this.myself())} Your request has been sent. You will receive an email when {this.teacher().name} responds. + ` joinSessionNow: (e) ->