From 0c5dbe2c68e98d4525687836011c959271c8bcbb Mon Sep 17 00:00:00 2001 From: Seth Call Date: Thu, 22 Oct 2015 05:51:49 -0500 Subject: [PATCH] * VRFS-3647 - add search capability to jamtrack page, and VRFS-3676 - poke redeem users --- ruby/lib/jam_ruby/models/affiliate_partner.rb | 2 +- .../JamTrackAutoComplete.js.jsx.coffee | 5 +- .../JamTrackLandingScreen.js.jsx.coffee | 85 ++++++++++++++----- .../client/jamtrack_landing.css.scss | 12 ++- 4 files changed, 81 insertions(+), 23 deletions(-) diff --git a/ruby/lib/jam_ruby/models/affiliate_partner.rb b/ruby/lib/jam_ruby/models/affiliate_partner.rb index c0b67c2d5..db41ddd12 100644 --- a/ruby/lib/jam_ruby/models/affiliate_partner.rb +++ b/ruby/lib/jam_ruby/models/affiliate_partner.rb @@ -124,7 +124,7 @@ class JamRuby::AffiliatePartner < ActiveRecord::Base product_info = shopping_cart.product_info # subtract the total quantity from the freebie quantity, to see how much we should attribute to them real_quantity = product_info[:quantity].to_i - product_info[:marked_for_redeem].to_i - {fee_in_cents: (1.99 * 100 * real_quantity * rate).round} + {fee_in_cents: (1.99 * 100 * real_quantity * rate.to_f).round} else false end diff --git a/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee b/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee index f1bf96cc4..a38252509 100644 --- a/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/JamTrackAutoComplete.js.jsx.coffee @@ -9,6 +9,7 @@ MIX_MODES = context.JK.MIX_MODES logger: context.JK.logger + render: () -> window.JamTrackSearchInput = '' unless window.JamTrackSearchInput? # can't pass null to react-select @@ -16,7 +17,7 @@ MIX_MODES = context.JK.MIX_MODES searchValue = if @state.search == 'SEPARATOR' then '' else window.JamTrackSearchInput `