Use the customer information, not an existing subscription, to determine whether the button should say "Start Free Trial" or "Subscribe"

This commit is contained in:
Joseph Schorr 2014-04-23 01:17:34 -04:00
parent a5c2fc7185
commit 8f66c39ff5
4 changed files with 13 additions and 10 deletions

View file

@ -29,11 +29,6 @@
<span class="usage-caption" ng-show="chart">Repository Usage</span>
</div>
<!-- Next billing info -->
<div class="alert alert-info" ng-show="subscription.trialEnd == null && subscription.currentPeriodEnd != null">
Next billing period: <strong>{{ parseDate(subscription.currentPeriodEnd) | date }}</strong>
</div>
<!-- Plans Table -->
<table class="table table-hover plans-list-table" ng-show="!planLoading">
<thead>
@ -67,8 +62,8 @@
ng-click="changeSubscription(plan.stripeId)">
<span class="quay-spinner" ng-show="planChanging"></span>
<span ng-show="!planChanging && subscribedPlan.price != 0">Change</span>
<span ng-show="!planChanging && subscribedPlan.price == 0 && !hasSubscription">Start Trial</span>
<span ng-show="!planChanging && subscribedPlan.price == 0 && hasSubscription">Subscribe</span>
<span ng-show="!planChanging && subscribedPlan.price == 0 && !isExistingCustomer">Start Free Trial</span>
<span ng-show="!planChanging && subscribedPlan.price == 0 && isExistingCustomer">Subscribe</span>
</button>
<button class="btn btn-danger" ng-show="subscription.plan === plan.stripeId && plan.price > 0"
ng-click="cancelSubscription()">