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:
parent
a5c2fc7185
commit
8f66c39ff5
4 changed files with 13 additions and 10 deletions
|
@ -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()">
|
||||
|
|
Reference in a new issue