From d5cf8f6886c4c30982f42cef9fc10dbc2635f06a Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 9 Dec 2015 13:58:26 +0000 Subject: [PATCH 1/3] simplified cancelation logic --- services/web/app/views/subscriptions/dashboard.jade | 6 +++--- .../public/coffee/main/subscription-dashboard.coffee | 11 +++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/services/web/app/views/subscriptions/dashboard.jade b/services/web/app/views/subscriptions/dashboard.jade index 7e9741b5fe..a6abb75649 100644 --- a/services/web/app/views/subscriptions/dashboard.jade +++ b/services/web/app/views/subscriptions/dashboard.jade @@ -111,7 +111,7 @@ block content span(ng-if="sixpackOpt == 'downgrade-options'") - div(ng-show="isMonthlyCollab && stillInFreeTrial", style="text-align: center") + div(ng-show="showExtendFreeTrial", style="text-align: center") p !{translate("have_more_days_to_try", {days:14})} button(type="submit", ng-click="exendTrial()", ng-disabled='inflight').btn.btn-success #{translate("ill_take_it")} p @@ -120,7 +120,7 @@ block content a(href, ng-click="cancelSubscription()", ng-disabled='inflight') #{translate("no_thanks_cancel_now")} - div(ng-show="isMonthlyCollab && !stillInFreeTrial", style="text-align: center") + div(ng-show="showDowngradeToStudent", style="text-align: center") span(ng-controller="ChangePlanFormController") p !{translate("interested_in_cheaper_plan",{price:'{{studentPrice}}'})} @@ -130,7 +130,7 @@ block content p a(href, ng-click="cancelSubscription()", ng-disabled='inflight') #{translate("no_thanks_cancel_now")} - div(ng-show="!isMonthlyCollab && !stillInFreeTrial") + div(ng-show="showBasicCancel") p #{translate("sure_you_want_to_cancel")} a(href="/project").btn.btn-info #{translate("i_want_to_stay")} |   diff --git a/services/web/public/coffee/main/subscription-dashboard.coffee b/services/web/public/coffee/main/subscription-dashboard.coffee index c9e61cb9e8..2071d6fec7 100644 --- a/services/web/public/coffee/main/subscription-dashboard.coffee +++ b/services/web/public/coffee/main/subscription-dashboard.coffee @@ -85,8 +85,15 @@ define [ freeTrialExpiresUnderSevenDays = freeTrialEndDate < sevenDaysTime $scope.view = 'overview' - $scope.isMonthlyCollab = subscription?.planCode?.indexOf("collaborator") != -1 and subscription?.planCode?.indexOf("ann") == -1 - $scope.stillInFreeTrial = freeTrialInFuture and freeTrialExpiresUnderSevenDays + isMonthlyCollab = subscription?.planCode?.indexOf("collaborator") != -1 and subscription?.planCode?.indexOf("ann") == -1 + stillInFreeTrial = freeTrialInFuture and freeTrialExpiresUnderSevenDays + + if isMonthlyCollab and stillInFreeTrial + $scope.showExtendFreeTrial = true + else if isMonthlyCollab and !stillInFreeTrial + $scope.showDowngradeToStudent = true + else + $scope.showBasicCancel = true setupReturly() From 297e33f1a0b3b8df1dea5be6ed358761fdc467a3 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 9 Dec 2015 14:44:26 +0000 Subject: [PATCH 2/3] remove unneeded hide on cancelation basic --- services/web/app/views/subscriptions/dashboard.jade | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services/web/app/views/subscriptions/dashboard.jade b/services/web/app/views/subscriptions/dashboard.jade index a6abb75649..34f552760b 100644 --- a/services/web/app/views/subscriptions/dashboard.jade +++ b/services/web/app/views/subscriptions/dashboard.jade @@ -137,11 +137,10 @@ block content a(ng-click="cancelSubscription()", ng-disabled='inflight').btn.btn-primary #{translate("cancel_my_account")} span(ng-if="sixpackOpt == 'basic'") - div(ng-show="!isMonthlyCollab && !stillInFreeTrial") - p #{translate("sure_you_want_to_cancel")} - a(href="/project").btn.btn-info #{translate("i_want_to_stay")} - |   - a(ng-click="cancelSubscription()", ng-disabled='inflight').btn.btn-primary #{translate("cancel_my_account")} + p #{translate("sure_you_want_to_cancel")} + a(href="/project").btn.btn-info #{translate("i_want_to_stay")} + |   + a(ng-click="cancelSubscription()", ng-disabled='inflight').btn.btn-primary #{translate("cancel_my_account")} script(type="text/javascript"). $('#cancelSubscription').on("click", function() { From ba6c361afa17226db0268f4c54df6f855edcdab2 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 10 Dec 2015 14:18:20 +0000 Subject: [PATCH 3/3] decrease sentry sample rate to 1% --- services/web/app/views/sentry.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/views/sentry.jade b/services/web/app/views/sentry.jade index 397e5bfafc..9fe5dd3b7d 100644 --- a/services/web/app/views/sentry.jade +++ b/services/web/app/views/sentry.jade @@ -57,7 +57,7 @@ ], shouldSendCallback: function(data) { // only send a fraction of errors - var sampleRate = 0.05; + var sampleRate = 0.01; return (Math.random() <= sampleRate); }, dataCallback: function(data) {