diff --git a/admin/app/admin/students.rb b/admin/app/admin/students.rb
index a022aa727..75c099455 100644
--- a/admin/app/admin/students.rb
+++ b/admin/app/admin/students.rb
@@ -6,12 +6,13 @@ ActiveAdmin.register JamRuby::User, :as => 'Students' do
config.batch_actions = false
config.per_page = 100
config.paginate = true
+ config.filters = false
- def booked_anything(scope)
+ def booked_anything(scope)
scope.joins(:student_lesson_bookings).where('lesson_bookings.active = true').uniq
end
- scope("Default", default: true) { |scope| booked_anything(scope).order('ready_for_session_at IS NULL DESC') }
+ scope("Default", default: true) { |scope| scope.where('is_a_student = true OR ((select count(id) from lesson_bookings where lesson_bookings.user_id = users.id) > 0)').order('users.ready_for_session_at IS NULL DESC') }
index do
column "Name" do |user|
@@ -45,8 +46,8 @@ ActiveAdmin.register JamRuby::User, :as => 'Students' do
end
end
column "School" do |user|
- if teacher.school
- teacher.school.name
+ if user.school
+ user.school.name
end
end
end
diff --git a/ruby/Gemfile b/ruby/Gemfile
index 27fdc30a6..03fd91455 100644
--- a/ruby/Gemfile
+++ b/ruby/Gemfile
@@ -49,7 +49,7 @@ gem 'rest-client'
gem 'iso-639'
gem 'rubyzip'
gem 'sanitize'
-gem 'influxdb'
+#gem 'influxdb'
gem 'recurly'
gem 'sendgrid_toolkit', '>= 1.1.1'
gem 'stripe'
diff --git a/ruby/lib/jam_ruby/lib/stats.rb b/ruby/lib/jam_ruby/lib/stats.rb
index a687f00a7..69020c5ce 100644
--- a/ruby/lib/jam_ruby/lib/stats.rb
+++ b/ruby/lib/jam_ruby/lib/stats.rb
@@ -1,5 +1,5 @@
-require 'influxdb'
+#require 'influxdb'
# monkey patch InfluxDB client to clear the queue when asked to stop
=begin
diff --git a/ruby/lib/jam_ruby/models/instrument.rb b/ruby/lib/jam_ruby/models/instrument.rb
index 3f11a01e5..be18c5eb5 100644
--- a/ruby/lib/jam_ruby/models/instrument.rb
+++ b/ruby/lib/jam_ruby/models/instrument.rb
@@ -47,7 +47,7 @@ module JamRuby
has_and_belongs_to_many :teachers, :class_name => "JamRuby::Teacher", :join_table => "teachers_instruments"
def self.standard_list
- return Instrument.where('instruments.popularity > 0').order('instruments.popularity DESC, instruments.description ASC')
+ return Instrument.where('instruments.popularity > 0').order('instruments.description ASC')
end
def self.jam_track_list
diff --git a/ruby/lib/jam_ruby/models/lesson_booking.rb b/ruby/lib/jam_ruby/models/lesson_booking.rb
index 713882015..b42d72be9 100644
--- a/ruby/lib/jam_ruby/models/lesson_booking.rb
+++ b/ruby/lib/jam_ruby/models/lesson_booking.rb
@@ -264,7 +264,6 @@ module JamRuby
start_day = first_day
if last_session
- puts "last session causing a scoot"
start_day = last_session.scheduled_start.to_date + 1
end
diff --git a/ruby/lib/jam_ruby/models/lesson_session_monthly_price.rb b/ruby/lib/jam_ruby/models/lesson_session_monthly_price.rb
index f1f667549..b2eae100c 100644
--- a/ruby/lib/jam_ruby/models/lesson_session_monthly_price.rb
+++ b/ruby/lib/jam_ruby/models/lesson_session_monthly_price.rb
@@ -17,12 +17,9 @@ module JamRuby
true_start = session.scheduled_start.to_date
end
- puts "filter out anything before start #{true_start}"
# filter out anything before the start day
times.select! { |time| time.to_date >= true_start }
- puts "times #{times.length}"
-
result = nil
if times.length == 0
result = 0
diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb
index e9f287d3b..849828f8f 100644
--- a/ruby/lib/jam_ruby/models/user.rb
+++ b/ruby/lib/jam_ruby/models/user.rb
@@ -101,7 +101,7 @@ module JamRuby
has_many :followers, :as => :followable, :class_name => "JamRuby::Follow", :dependent => :destroy
# text messages
- has_many :text_messages, :class_name => "JamRuby:TextMessage", :foreign_key => "target_user_id"
+ has_many :text_messages, :class_name => "JamRuby::TextMessage", :foreign_key => "target_user_id"
# notifications
has_many :notifications, :class_name => "JamRuby::Notification", :foreign_key => "target_user_id"
diff --git a/web/app/assets/javascripts/accounts_profile.js b/web/app/assets/javascripts/accounts_profile.js
index 99b6581cf..e9a874de8 100644
--- a/web/app/assets/javascripts/accounts_profile.js
+++ b/web/app/assets/javascripts/accounts_profile.js
@@ -44,6 +44,12 @@
}
resetForm();
renderAccountProfile();
+
+ setTimeout(function() {
+ var $header = $('#account-edit-profile-form h2')
+ console.log("header ", $header, $screen)
+ context.JK.HelpBubbleHelper.teacherMusicianProfile($header, $screen);
+ }, 2000)
}
function resetForm() {
@@ -80,8 +86,6 @@
$('select#user_birth_date_2i', content_root).val(parseInt(birthDateMonth));
$('select#user_birth_date_3i', content_root).val(parseInt(birthDateDay));
}
-
- context.JK.dropdown($('select', content_root));
}
function populateAccountProfileLocation(userDetail, regions, cities) {
@@ -126,8 +130,6 @@
countrySelect.val(userCountry);
countrySelect.attr("disabled", null)
-
- context.JK.dropdown(countrySelect);
}
@@ -169,8 +171,6 @@
countrySelect.val(userCountry);
countrySelect.attr("disabled", null);
-
- context.JK.dropdown(countrySelect);
}
function populateRegions(regions, userRegion) {
@@ -193,8 +193,6 @@
regionSelect.val(userRegion)
regionSelect.attr("disabled", null)
-
- context.JK.dropdown(regionSelect);
}
function populateCities(cities, userCity) {
@@ -217,8 +215,6 @@
citySelect.val(userCity);
citySelect.attr("disabled", null);
-
- context.JK.dropdown(citySelect);
}
/****************** MAIN PORTION OF SCREEN *****************/
@@ -249,8 +245,6 @@
selectLocation = new context.JK.SelectLocation(getCountryElement(), getRegionElement(), getCityElement(), app);
selectLocation.load(userDetail.country, userDetail.state, userDetail.city)
});
-
- context.JK.dropdown($('select'), $screen);
}
function navToAccount() {
@@ -436,7 +430,6 @@
else {
cityElement.children().remove();
cityElement.append($(nilOptionStr).text(nilOptionText));
- context.JK.dropdown(cityElement);
}
}
diff --git a/web/app/assets/javascripts/accounts_profile_experience.js b/web/app/assets/javascripts/accounts_profile_experience.js
index 1f032cb5d..c058edb1f 100644
--- a/web/app/assets/javascripts/accounts_profile_experience.js
+++ b/web/app/assets/javascripts/accounts_profile_experience.js
@@ -64,8 +64,6 @@
$screen.find('select[name=skill_level]').val(userDetail.skill_level);
$screen.find('select[name=concert_count]').val(userDetail.concert_count);
$screen.find('select[name=studio_session_count]').val(userDetail.studio_session_count);
-
- context.JK.dropdown($('select', $screen));
}
function isUserInstrument(instrument, userInstruments) {
@@ -159,8 +157,6 @@
var userDetail = userDetailResponse[0];
populateAccountProfile(userDetail, instrumentsResponse[0]);
});
-
- context.JK.dropdown($('select'), $screen);
}
function navigateTo(targetLocation) {
diff --git a/web/app/assets/javascripts/helpBubbleHelper.js b/web/app/assets/javascripts/helpBubbleHelper.js
index b348ed629..f9419b189 100644
--- a/web/app/assets/javascripts/helpBubbleHelper.js
+++ b/web/app/assets/javascripts/helpBubbleHelper.js
@@ -28,8 +28,7 @@
}
function bigHelpOptions(options) {
- return {positions: options.positions, offsetParent: options.offsetParent,
- width:options.width,
+ var defaults = {
spikeGirth: 15,
spikeLength: 20,
fill: 'white',
@@ -40,8 +39,27 @@
fontSize: '20px',
backgroundColor:'transparent',
color:'#ed3618'}}
+
+ return $.extend({}, defaults, options)
}
+ function bigHelpDarkOptions(options) {
+ var defaults = {
+ spikeGirth: 15,
+ spikeLength: 20,
+ fill: '#242323',
+ cornerRadius:8,
+ strokeWidth: 2,
+ cssStyles: {
+ fontWeight:'bold',
+ fontSize: '20px',
+ backgroundColor:'transparent',
+ color:'#ed3618'}}
+
+ return $.extend({}, defaults, options)
+ }
+
+
function clearJamTrackGuideTimeout() {
if(jamTrackGuideTimeout) {
clearTimeout(jamTrackGuideTimeout);
@@ -135,4 +153,8 @@
return context.JK.prodBubble($element, 'jamtrack-web-play', {}, bigHelpOptions({positions:['bottom'], offsetParent: $offsetParent}))
}
+ helpBubble.teacherMusicianProfile = function($element, $offsetParent) {
+ return context.JK.prodBubble($element, 'teacher-musician-profile', {}, bigHelpDarkOptions({spikeGirth:0, spikeLength: 0, duration:60000, offsetParent:$offsetParent, width:385, positions:['top', 'right', 'bottom']}))
+ }
+
})(window, jQuery);
\ No newline at end of file
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 a722c935b..e96a1c6d1 100644
--- a/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee
+++ b/web/app/assets/javascripts/react-components/JamClassScreen.js.jsx.coffee
@@ -339,41 +339,32 @@ UserStore = context.UserStore
SEARCH TEACHERS
`
- learnMoreLink = `LEARN MORE `
- learnMoreAboutJamClass = `
- JamClass is the best way to take music lessons, offering significant advantages over both traditional
- face-to-face lessons
- and online skype lessons.
-
`
- signupTestDrive = `
-
sign up for testdrive
-
- There are two awesome, painless ways to get started with JamClass.
-
+ if @state.user?['can_buy_test_drive?']
+ rightContent = `
-
- Sign up for TestDrive and take 4 full 30-minute lessons - one each from 4 different instructors - for just
- $49.99.
- You wouldn't marry the first person you date, right? Find the best teacher for you. It's the most important
- factor in the success for your lessons!
-
+
+ JamClass is the best way to teach or take online music lessons. Learn more about teaching or taking lessons.
+
-
- Or take one JamClass lesson free. It's on us! We're confident you'll take more.
-
+
TestDrive offers 3 unbeatable options for students to try JamClass online lessons, and to find the best teacher:
+
+ Take 4 full 30-minute lessons from 4 different teachers. Just $49.99 . Great for making sure you click with the best teacher for you.
+ Take 2 full 30-minute lessons from 2 different teachers. Just $29.99 . Two lessons for the price of one or try two different teachers.
+ Take 1 full 30-minute lesson for $9.99 . Great value for the online experience if you're sure which teacher you want.
+
-
- Sign up for TestDrive using the button below, or to take one free lesson, search our teachers, and click the
- Book Free Lesson on your favorite.
-
+
+
`
+ else
+ rightContent = `
`
-
-
`
else
searchTeachers = `
stripe status
@@ -381,12 +372,6 @@ UserStore = context.UserStore
`
- learnMoreLink = `LEARN MORE `
- learnMoreAboutJamClass = `
- JamClass is the best way to teach music lessons, offering significant advantages over both traditional
- face-to-face lessons
- and online skype lessons.
-
`
if this.state.user?
teacherProfileUri = "/client#/profile/teacher/#{this.state.user.id}"
pct = Math.round(this.state.user.teacher?.profile_pct)
@@ -400,10 +385,16 @@ UserStore = context.UserStore
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)
- signupTestDrive = `
+ rightContent = `
`
classes = []
@@ -458,26 +449,7 @@ UserStore = context.UserStore
{searchTeachers}
-
-
learn about jamclass
-
- {learnMoreAboutJamClass}
-
-
- {learnMoreLink}
-
-
- {signupTestDrive}
-
-
get ready for your first lesson
-
-
Be sure to set up and test the JamKazam app in an online music session a few days before
- your first lesson! We're happy to help, and we'll even get in a session with you to make sure everything
- is working properly. Ping us at support@jamkazam.com anytime, and
- read our
- JamClass user guide to learn how to use all the lesson features.
-
-
+ {rightContent}
`
diff --git a/web/app/assets/javascripts/react-components/TeacherProfile.js.jsx.coffee b/web/app/assets/javascripts/react-components/TeacherProfile.js.jsx.coffee
index 45861f89f..533b3539a 100644
--- a/web/app/assets/javascripts/react-components/TeacherProfile.js.jsx.coffee
+++ b/web/app/assets/javascripts/react-components/TeacherProfile.js.jsx.coffee
@@ -65,6 +65,8 @@ proficiencyDescriptionMap = {
componentDidUpdate:() ->
@starbox()
+ context.JK.popExternalLinks(@root)
+
starbox:() ->
$ratings = @root.find('.ratings-box')
$ratings.each((i, value) =>
@@ -176,15 +178,15 @@ proficiencyDescriptionMap = {
embedId = @getYoutubeId(videoUrl)
embedUrl = "//www.youtube.com/embed/#{embedId}"
+ video = `
+
+ `
+
return ``
@@ -285,16 +287,11 @@ proficiencyDescriptionMap = {
studioSessions = "Has played an unknown # of studio sessions"
- gigTable = `
-
-
- {gigs}
-
-
- {studioSessions}
-
-
-
`
+ gigTable =
+ `
+
{gigs}
+
{studioSessions}
+
`
display_instruments = []
for instrument in user.instruments
@@ -320,7 +317,7 @@ proficiencyDescriptionMap = {
createPresence: (className, url, img) ->
`
-
+
`
@@ -592,25 +589,25 @@ proficiencyDescriptionMap = {
@prices()
profileLeft: () ->
+
+ if this.state.user.age?
+ age = `{this.state.user.age} years old
`
+ else
+ age = null
+
`
{this.state.user.city}
{this.state.user.state}
{this.state.user.country}
-
{this.state.user.age} years old
+ {age}
Last Signed In:
{"very recently"}
-
-
-
Background Check:
-
last verified
-
3 months ago
-
`
diff --git a/web/app/assets/javascripts/selectLocation.js b/web/app/assets/javascripts/selectLocation.js
index 93cde1b12..2d33ad2d8 100644
--- a/web/app/assets/javascripts/selectLocation.js
+++ b/web/app/assets/javascripts/selectLocation.js
@@ -36,12 +36,7 @@
}
},
selectCountry: function (country) {
- if(this.useEasyDropdown) {
- this.$countries.easyDropDown('select', country, true)
- }
- else {
- this.$countries.val(country)
- }
+ this.$countries.val(country)
},
ready: function() {
return this.$deferred;
@@ -119,7 +114,7 @@
// only update region
if (selectedCountry) {
// set city disabled while updating
- regionElement.attr('disabled', true).easyDropDown('disable');
+ regionElement.attr('disabled', true)
this.loadingRegionsData = true;
regionElement.children().remove()
@@ -146,7 +141,7 @@
// only update cities
if (selectedCountry && selectedRegion) {
// set city disabled while updating
- cityElement.attr('disabled', true).easyDropDown('disable');
+ cityElement.attr('disabled', true)
this.loadingCitiesData = true;
cityElement.children().remove()
@@ -165,9 +160,6 @@
else {
cityElement.children().remove();
cityElement.append($(this.nilOptionStr).text(this.nilOptionText));
- if(this.useEasyDropdown) {
- context.JK.dropdown(cityElement);
- }
}
},
@@ -218,10 +210,7 @@
}
this.$countries.val(this.country);
- this.$countries.attr("disabled", null).easyDropDown('enable');
- if(this.useEasyDropdown) {
- context.JK.dropdown(this.$countries);
- }
+ this.$countries.attr("disabled", null)
},
writeRegion: function (index, region) {
@@ -244,11 +233,7 @@
$.each(regions, this.writeRegion.bind(this))
this.$regions.val(userRegion)
- this.$regions.attr("disabled", null).easyDropDown('enable');
-
- if(this.useEasyDropdown) {
- context.JK.dropdown(this.$regions);
- }
+ this.$regions.attr("disabled", null)
},
writeCity: function (index, city) {
@@ -271,11 +256,7 @@
$.each(cities, this.writeCity.bind(this))
this.$cities.val(userCity)
- this.$cities.attr("disabled", null).easyDropDown('enable');
-
- if(this.useEasyDropdown) {
- context.JK.dropdown(this.$cities);
- }
+ this.$cities.attr("disabled", null)
},
regionListFailure: function (jqXHR, textStatus, errorThrown) {
diff --git a/web/app/assets/javascripts/utils.js b/web/app/assets/javascripts/utils.js
index c59991f5d..22eb158fd 100644
--- a/web/app/assets/javascripts/utils.js
+++ b/web/app/assets/javascripts/utils.js
@@ -133,8 +133,6 @@
options = {};
}
-
-
if(options.persist) {
var timeout = null;
@@ -178,6 +176,7 @@
holder = holder.append(helpText).html()
}
+ console.log("hoverBubble: " + options.duration)
context.JK.hoverBubble($element, holder, options);
}
@@ -215,6 +214,7 @@
options['clickAnywhereToClose'] = false
if(!options['duration']) options['duration'] = 6000;
+ console.log("options: " + options.duration)
var existingTimer = $element.data("prodTimer");
if(existingTimer) {
clearTimeout(existingTimer);
@@ -1154,6 +1154,7 @@
if(!$parent) $parent = $('body');
// Allow any a link with a rel="external" attribute to launch
// the link in the default browser, using jamClient:
+ $parent.off('click');
$parent.on('click', 'a[rel="external"]', popOpenBrowser);
}
diff --git a/web/app/assets/stylesheets/client/common.css.scss b/web/app/assets/stylesheets/client/common.css.scss
index 7441918f3..d3a9974f4 100644
--- a/web/app/assets/stylesheets/client/common.css.scss
+++ b/web/app/assets/stylesheets/client/common.css.scss
@@ -63,6 +63,23 @@ $labelFontSize: 12px;
font-size: $labelFontSize;
}
+
+select {
+
+ border: 0 !important; /*Removes border*/
+ -webkit-appearance: none; /*Removes default chrome and safari style*/
+ -moz-appearance: none; /* Removes Default Firefox style*/
+ appearance: none;
+ background: url('/assets/down_arrow_black_pad.png') no-repeat; /*Adds background-image*/
+ background-position: right center; /*Position of the background-image*/
+ text-indent: 0.01px; /* Removes default arrow from firefox*/
+ text-overflow: ""; /*Removes default arrow from firefox*/
+ cursor: pointer;
+ padding-right:20px;
+ &::-ms-expand {
+ display: none;
+ }
+}
@mixin border_box_sizing {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
diff --git a/web/app/assets/stylesheets/client/help.css.scss b/web/app/assets/stylesheets/client/help.css.scss
index 8e1e75bc3..cf239ca8b 100644
--- a/web/app/assets/stylesheets/client/help.css.scss
+++ b/web/app/assets/stylesheets/client/help.css.scss
@@ -62,6 +62,26 @@ body.jam, body.web, .dialog{
font-size:20px;
}
}
+
+ a {
+ color:$latencyBadgeFair;
+ }
+ }
+
+ .big-dark-help {
+ font-size:20px;
+ color: $ColorTextTypical;
+ p {color:$ColorTextTypical}
+
+ &.jamtrack-web-play {
+ p {
+ font-size:20px;
+ }
+ }
+
+ a {
+ color:$latencyBadgeFair;
+ }
}
.larger-text {
diff --git a/web/app/assets/stylesheets/client/react-components/JamClassScreen.css.scss b/web/app/assets/stylesheets/client/react-components/JamClassScreen.css.scss
index 86872a706..e19a71f4f 100644
--- a/web/app/assets/stylesheets/client/react-components/JamClassScreen.css.scss
+++ b/web/app/assets/stylesheets/client/react-components/JamClassScreen.css.scss
@@ -11,6 +11,14 @@
@include border_box_sizing;
}
+ ol {
+ li {
+ margin-left:15px;
+ margin-bottom:20px;
+ list-style:decimal;
+ color:$ColorTextTypical;
+ }
+ }
h2 {
font-size: 20px;
font-weight:700;
@@ -29,6 +37,16 @@
float:right;
width:30%;
padding-left:20px;
+
+ .jamclass-section {
+ padding-top:36px;
+ }
+ }
+ span.price {
+ color:white;
+ }
+ .test-drive-main {
+ margin-bottom:30px !important;
}
p {
line-height:125% !important;
@@ -166,6 +184,10 @@
.field.stripe-connect label {
color: $ColorTextTypical;
}
+ button.stripe-connect {
+ margin-top:20px;
+ }
+
.field.stripe-connect .view-payments {
display:block;
margin: 0 auto;
@@ -174,7 +196,7 @@
.view-teacher-profile {
display:block;
width:112px;
- margin: 20px auto 0;
+ margin: 30px auto 50px;
}
a.missing-profile {
display:block;
diff --git a/web/app/assets/stylesheets/client/react-components/TeacherProfile.css.scss b/web/app/assets/stylesheets/client/react-components/TeacherProfile.css.scss
index 637c7459c..66c256f58 100644
--- a/web/app/assets/stylesheets/client/react-components/TeacherProfile.css.scss
+++ b/web/app/assets/stylesheets/client/react-components/TeacherProfile.css.scss
@@ -112,15 +112,30 @@
text-align:right;
}
}
- &.giginfo {
- top: 10px;
- position: relative;
- min-width: 200px;
- width:auto;
+ }
+
+ .giginfo {
+ padding-top: 20px;
+ position: relative;
+ min-width: 200px;
+ width:auto;
+ .gigs {
+ margin-bottom:10px;
}
}
}
+ .video-thumbnail {
+ width:100%;
+ padding-top:53.33%;
+ margin:25px 0;
+ background:url(//img.youtube.com/vi/askHvcCoNfw/maxresdefault.jpg) no-repeat center;
+
+ img.play {
+ margin:-35.75% auto 0;
+ }
+ }
+
.online-presence-option, .performance-sample-option {
display:block;
vertical-align:middle;
diff --git a/web/app/assets/stylesheets/client/react-components/TeacherSearch.css.scss b/web/app/assets/stylesheets/client/react-components/TeacherSearch.css.scss
index e84079a3f..26bcb1dd2 100644
--- a/web/app/assets/stylesheets/client/react-components/TeacherSearch.css.scss
+++ b/web/app/assets/stylesheets/client/react-components/TeacherSearch.css.scss
@@ -107,3 +107,5 @@
margin-bottom: 20px;
}
}
+
+
diff --git a/web/app/views/api_users/show.rabl b/web/app/views/api_users/show.rabl
index 11cf23d4c..d9df9fd03 100644
--- a/web/app/views/api_users/show.rabl
+++ b/web/app/views/api_users/show.rabl
@@ -28,7 +28,7 @@ end
# give back more info if the user being fetched is yourself
if current_user && @user == current_user
- attributes :email, :original_fpfile, :cropped_fpfile, :crop_selection, :session_settings, :show_whats_next, :show_whats_next_count, :subscribe_email, :auth_twitter, :new_notifications, :sales_count, :reuse_card, :purchased_jamtracks_count, :first_downloaded_client_at, :created_at, :first_opened_jamtrack_web_player, :gifted_jamtracks, :has_redeemable_jamtrack, :remaining, :has_stored_credit_card?, :remaining_test_drives
+ attributes :email, :original_fpfile, :cropped_fpfile, :crop_selection, :session_settings, :show_whats_next, :show_whats_next_count, :subscribe_email, :auth_twitter, :new_notifications, :sales_count, :reuse_card, :purchased_jamtracks_count, :first_downloaded_client_at, :created_at, :first_opened_jamtrack_web_player, :gifted_jamtracks, :has_redeemable_jamtrack, :remaining, :has_stored_credit_card?, :remaining_test_drives, :can_buy_test_drive?
node :owned_school_id do |user|
user.owned_school.id if user.owned_school
diff --git a/web/app/views/clients/_account_profile.html.erb b/web/app/views/clients/_account_profile.html.erb
index 7d7f08256..7aefd3c0a 100644
--- a/web/app/views/clients/_account_profile.html.erb
+++ b/web/app/views/clients/_account_profile.html.erb
@@ -64,13 +64,13 @@
Male
Female
- -
+ -
Birth Date:
- <%= date_select("user", "birth_date", :use_short_month => true, :start_year => 1900, :end_year => Time.now.year - 18, :order => [:month, :day, :year], :default => -25.years.from_now, :html=>{:class => "account-profile-birthdate"} ) %>
+ <%= date_select("user", "birth_date", :use_short_month => true, :start_year => 1900, :end_year => Time.now.year - 18, :order => [:month, :day, :year], :default => -30.years.from_now, :html=>{:class => "account-profile-birthdate"} ) %>
diff --git a/web/app/views/clients/_account_profile_experience.html.erb b/web/app/views/clients/_account_profile_experience.html.erb
index 6485b118f..d6f0809a6 100644
--- a/web/app/views/clients/_account_profile_experience.html.erb
+++ b/web/app/views/clients/_account_profile_experience.html.erb
@@ -35,6 +35,7 @@
Status
+ select an option
Amateur
Professional
@@ -43,6 +44,7 @@
Concert Gigs Played
+ select an option
zero
under 10
10 to 50
@@ -54,6 +56,7 @@
Studio Sessions Played
+ select an option
zero
under 10
10 to 50
diff --git a/web/app/views/clients/_help.html.slim b/web/app/views/clients/_help.html.slim
index 4440cd476..143a643dd 100644
--- a/web/app/views/clients/_help.html.slim
+++ b/web/app/views/clients/_help.html.slim
@@ -385,4 +385,11 @@ script type="text/template" id="template-help-no-audio-help"
p Usually audio streaming just works, but in some cases router configurations do not allow audio streams to reach your computer.
- p This article describes how you can configure your router to allow the streamed audio to get through to you.
\ No newline at end of file
+ p This article describes how you can configure your router to allow the streamed audio to get through to you.
+
+
+script type="text/template" id="template-help-teacher-musician-profile"
+ .teacher-musician-profile.big-dark-help
+ p
+ a href="https://jamkazam.desk.com/customer/en/portal/articles/2405835-creating-your-teacher-profile#EditProfile" rel="external" Click here
+ | for a help article that explains how to fill out your musician profile.
\ No newline at end of file
diff --git a/web/spec/features/book_monthly_recurring_lesson_spec.rb b/web/spec/features/book_monthly_recurring_lesson_spec.rb
index 99fd7a5f5..5b9987014 100644
--- a/web/spec/features/book_monthly_recurring_lesson_spec.rb
+++ b/web/spec/features/book_monthly_recurring_lesson_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe "Book Single Recurring Lesson", :js => true, :type => :feature, :capybara_feature => true do
+describe "Book Monthly Recurring Lesson", :js => true, :type => :feature, :capybara_feature => true do
subject { page }
@@ -40,7 +40,8 @@ describe "Book Single Recurring Lesson", :js => true, :type => :feature, :capyba
visit "/client#/teachers/search"
- Timecop.travel(Date.new(2016, 04, 01))
+ # let's do a time half-way into the month, so we can prove some pro-rating
+ Timecop.travel(Date.new(2016, 04, 15))
find('.teacher-search-result[data-teacher-id="' + teacher_user.id + '"] .try-normal').trigger(:click)
@@ -185,7 +186,14 @@ describe "Book Single Recurring Lesson", :js => true, :type => :feature, :capyba
teacher_distribution = lesson_package_purchase.teacher_distribution
teacher_distribution.amount_in_cents.should eql 3000 / 2
teacher_distribution.ready.should be_true
- teacher_distribution.ready.should be_true
+ teacher_distribution.distributed.should be_false
+ lesson_package_purchase.lesson_payment_charge.billed.should be_true
+ lesson_package_purchase.lesson_payment_charge.amount_in_cents.should eql 3000/2 + (3000/2 * 0.0825).round
+ lesson_package_purchase.lesson_payment_charge.fee_in_cents.should eql 0
+ lesson_package_purchase.lesson_payment_charge.stripe_charge_id.should_not be_nil
+ lesson_package_purchase.lesson_payment_charge.post_processed.should be_true
+ lesson_package_purchase.lesson_payment_charge.sent_billing_notices.should be_true
+ lesson_package_purchase.lesson_payment_charge.billing_attempts.should eql 1
lesson_session1.reload
lesson_session1.teacher_distribution.should be_nil
@@ -200,11 +208,13 @@ describe "Book Single Recurring Lesson", :js => true, :type => :feature, :capyba
lesson_package_purchase = user.lesson_purchases.last
teacher_distribution = lesson_package_purchase.teacher_distribution
teacher_distribution.amount_in_cents.should eql 3000
-
-
-
-
-
+ teacher_distribution.ready.should be_true
+ lesson_package_purchase.lesson_payment_charge.amount_in_cents.should eql 3000 + (3000 * 0.0825).round
+ lesson_package_purchase.lesson_payment_charge.fee_in_cents.should eql 0
+ lesson_package_purchase.lesson_payment_charge.stripe_charge_id.should_not be_nil
+ lesson_package_purchase.lesson_payment_charge.post_processed.should be_true
+ lesson_package_purchase.lesson_payment_charge.sent_billing_notices.should be_true
+ lesson_package_purchase.lesson_payment_charge.billing_attempts.should eql 1
end
end
diff --git a/web/spec/features/book_recurring_lesson_spec.rb b/web/spec/features/book_recurring_lesson_spec.rb
index 00a3b0fff..038689ca4 100644
--- a/web/spec/features/book_recurring_lesson_spec.rb
+++ b/web/spec/features/book_recurring_lesson_spec.rb
@@ -174,6 +174,13 @@ describe "Book Single Recurring Lesson", :js => true, :type => :feature, :capyba
lesson_session1.billing_attempts.should be_true
lesson_session1.billed.should eql true
lesson_session1.success.should be_true
+ lesson_session1.lesson_payment_charge.billed.should be_true
+ lesson_session1.lesson_payment_charge.amount_in_cents.should eql 3000
+ lesson_session1.lesson_payment_charge.fee_in_cents.should eql 0
+ lesson_session1.lesson_payment_charge.stripe_charge_id.should_not be_nil
+ lesson_session1.lesson_payment_charge.post_processed.should be_true
+ lesson_session1.lesson_payment_charge.sent_billing_notices.should be_true
+ lesson_session1.lesson_payment_charge.billing_attempts.should eql 1
LessonBooking.hourly_check