VRFS-4123 put disconnected msg above broadcast

This commit is contained in:
Seth Call 2016-05-24 14:25:50 -05:00
parent af897048ad
commit 0528f09e27
10 changed files with 29 additions and 12 deletions

View File

@ -352,4 +352,5 @@ lesson_booking_schools_2.sql
phantom_accounts.sql
lesson_booking_success.sql
user_origin.sql
remove_stripe_acct_id.sql
remove_stripe_acct_id.sql
track_user_on_lesson.sql

View File

@ -0,0 +1,3 @@
ALTER TABLE lesson_sessions ADD COLUMN user_id VARCHAR(64) REFERENCES users(id);
UPDATE lesson_sessions SET user_id = (select user_id from music_sessions where lesson_sessions.id = music_sessions.lesson_session_id) where user_id is NULL;
ALTER TABLE lesson_sessions ALTER COLUMN user_id SET NOT NULL;

View File

@ -400,7 +400,12 @@ module JamRuby
end
def scheduled_start
music_session.scheduled_start
if music_session
music_session.scheduled_start
else
raise "lesson session #{id} has no music session in scheduled_start"
end
end
def send_counter(countered_lesson, countered_slot)

View File

@ -1013,7 +1013,7 @@ SQL
def self.purgeable_sessions
sessions = []
sql =<<SQL
(started_at IS NULL AND
(started_at IS NULL AND
(created_at <= NOW() - interval '#{UNSTARTED_INTERVAL_DAYS_PURGE} days' OR
scheduled_start <= NOW() - interval '#{UNSTARTED_INTERVAL_DAYS_PURGE} days'))
OR
@ -1023,7 +1023,7 @@ OR
(recurring_mode = '#{RECURRING_WEEKLY}' AND
scheduled_start <= NOW() - interval '#{UNSTARTED_INTERVAL_DAYS_PURGE_RECUR} days')
SQL
self.where("started_at IS NULL").where(sql).find_each do |ms|
self.where("lesson_session_id is NULL").where("started_at IS NULL").where(sql).find_each do |ms|
block_given? ? yield(ms) : sessions << ms
end
sessions

View File

@ -38,7 +38,7 @@ module JamRuby
elsif is_normal?
!lesson_session.billing_should_retry
else
! lesson_package_purchase.billing_should_retry
!lesson_package_purchase.billing_should_retry
end
end
@ -139,11 +139,16 @@ module JamRuby
end
def description
if lesson_session
lesson_session.timed_description
else
lesson_package_purchase.timed_description
begin
if lesson_session
lesson_session.timed_description
else
lesson_package_purchase.timed_description
end
rescue
"temp fix"
end
end
end
end

View File

@ -40,6 +40,9 @@ profileUtils = context.JK.ProfileUtils
else
shouldShowName = @state.shouldShowName
if userState?.user?.teacher?
@setState({selected: 'payments to you'})
@setState({user: userState?.user, shouldShowName: shouldShowName})

View File

@ -32,7 +32,7 @@ UserStore = context.UserStore
if this.props.purpose == 'jamclass-home'
return `<div>
<p>Your Stripe account is properly set up and connected to enable transfer of student payments. To view lesson payment history, click the button below.</p>
<a className="button-orange view-payments" href="/client?payments-to-you#/accounts/payment-history">VIEW PAYMENTS</a>
<a className="button-orange view-payments" href="/client#/account/payment-history">VIEW PAYMENTS</a>
</div>`
else
return `<div>You have successfully connected your Stripe account for payments. If you need to make any changes to your Stripe account, please go to the <a href="https://dashboard.stripe.com/" target="_blank">Stripe website</a> and sign in using your Stripe credentials there to make any changes needed.</div>`

View File

@ -24,7 +24,6 @@ teacherActions = window.JK.Actions.Teacher
@iCheckIgnore = true
console.log("CHOICE", choice)
if $candidate.attr('type') == 'radio'
if choice?
$found = @root.find(selector + '[value="' + choice + '"]')

View File

@ -6,6 +6,7 @@
&.active {
display:block;
z-index:1000;
}
}

View File

@ -12,7 +12,7 @@ child(:teacher_payment => :teacher_payment) {
attributes :real_distribution_in_cents, :created_at
child(:teacher_payment_charge => :teacher_payment_charge) {
attributes last_billing_attempt_at
attributes :last_billing_attempt_at
}
}