From 3bc73afb88b15d0978f0ed84735f890e95ea9f6e Mon Sep 17 00:00:00 2001 From: Seth Call Date: Tue, 5 Jan 2021 09:22:45 -0600 Subject: [PATCH] stonk --- ruby/lib/jam_ruby/models/user.rb | 2 +- .../javascripts/support/react-components/SupportPage.js.jsx | 3 +++ web/app/controllers/supports_controller.rb | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb index 40bd1f9e1..04b8a2cbc 100644 --- a/ruby/lib/jam_ruby/models/user.rb +++ b/ruby/lib/jam_ruby/models/user.rb @@ -2864,7 +2864,7 @@ module JamRuby def has_support? # early exit if in trial (excepting credit card and no Admin Override) - return true if !subscription_trial_ended? || subscription_sync_code == 'in_trial' + return true if !subscription_trial_ended? # let admins test feature without subscription return true if admin diff --git a/web/app/assets/javascripts/support/react-components/SupportPage.js.jsx b/web/app/assets/javascripts/support/react-components/SupportPage.js.jsx index 090560843..8f0f333cb 100644 --- a/web/app/assets/javascripts/support/react-components/SupportPage.js.jsx +++ b/web/app/assets/javascripts/support/react-components/SupportPage.js.jsx @@ -16,6 +16,9 @@ window.SupportPage = React.createClass({ // You just need to add '&disable[fieldName]=true' or '&disable[custom_field][fieldName]=true' depending on whether the field is default or custom. + if(gon.in_trial) { + display = 'Trial' + } var src = `https://jamkazam.freshdesk.com/widgets/feedback_widget/new?&helpdesk_ticket[requester]=${encodeURIComponent(gon.email)}&disable[requester]=true&helpdesk_ticket[custom_field][cf_plan_1596882]=${encodeURIComponent(display)}&disable[custom_field][cf_plan_1596882]=true&widgetType=embedded&formTitle=JamKazam+Support&submitTitle=Send+Feedback&submitThanks=Thank+you+for+your+message.+We+will+use+our+best+efforts+to+reply+within+24+hours.` // helpdesk_ticket_cf_plan_1596882 diff --git a/web/app/controllers/supports_controller.rb b/web/app/controllers/supports_controller.rb index 37df40973..268276878 100644 --- a/web/app/controllers/supports_controller.rb +++ b/web/app/controllers/supports_controller.rb @@ -8,7 +8,7 @@ class SupportsController < ApplicationController end gon.has_support = current_user.has_support? gon.email = current_user.email - gon.in_trial = !current_user.subscription_trial_ended? || current_user.subscription_sync_code == 'in_trial' + gon.in_trial = !current_user.subscription_trial_ended? gon.plan_code = current_user.subscription_plan_code @title = "Help Desk"