Show the billing options in the user and org views
This commit is contained in:
parent
7ea02c186a
commit
2105ad90a0
4 changed files with 15 additions and 6 deletions
|
@ -1,11 +1,11 @@
|
|||
<div class="billing-options-element">
|
||||
<!-- Credit Card -->
|
||||
<div class="panel">
|
||||
<div style="margin-bottom: 20px">
|
||||
<div class="panel-title">
|
||||
Credit Card
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="quay-spinner" ng-show="!currentCard || changingCard"></div>
|
||||
<div class="cor-loader-inline" ng-show="!currentCard || changingCard"></div>
|
||||
<div class="current-card" ng-show="currentCard && !changingCard">
|
||||
<div class="alert alert-warning" ng-if="currentCard.last4 && isExpiringSoon(currentCard)">
|
||||
Your current credit card is expiring soon!
|
||||
|
@ -29,10 +29,10 @@
|
|||
</div>
|
||||
|
||||
<!-- Options -->
|
||||
<div class="panel">
|
||||
<div style="margin-bottom: 20px">
|
||||
<div class="panel-title">
|
||||
Billing Options
|
||||
<div class="quay-spinner" ng-show="working"></div>
|
||||
<div class="cor-loader-inline" ng-show="working"></div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="settings-option">
|
||||
|
|
|
@ -11,6 +11,9 @@ angular.module('quay').directive('planManager', function () {
|
|||
scope: {
|
||||
'user': '=user',
|
||||
'organization': '=organization',
|
||||
|
||||
'hasSubscription': '=hasSubscription',
|
||||
|
||||
'readyForPlan': '&readyForPlan',
|
||||
'planChanged': '&planChanged'
|
||||
},
|
||||
|
@ -68,6 +71,7 @@ angular.module('quay').directive('planManager', function () {
|
|||
|
||||
$scope.planChanging = false;
|
||||
$scope.planLoading = false;
|
||||
$scope.hasSubscription = subscribedPlan.stripeId != PlanService.getFreePlan();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -110,7 +110,10 @@
|
|||
<div id="usage" class="tab-pane" quay-require="['BILLING']">
|
||||
<h3>Plan Usage and Billing</h3>
|
||||
<div ng-if="isAdmin">
|
||||
<div class="plan-manager" organization="organization.name"></div>
|
||||
<div class="plan-manager" organization="organization.name"
|
||||
has-subscription="hasSubscription"></div>
|
||||
<hr ng-show="hasSubscription">
|
||||
<div class="billing-options" organization="organization" ng-show="hasSubscription"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@
|
|||
<!-- Plan and Usage -->
|
||||
<div id="usage" class="tab-pane" quay-require="['BILLING']">
|
||||
<h3>Plan Usage and Billing</h3>
|
||||
<div class="plan-manager" user="viewuser"></div>
|
||||
<div class="plan-manager" user="viewuser" has-subscription="hasSubscription"></div>
|
||||
<hr ng-show="hasSubscription">
|
||||
<div class="billing-options" user="viewuser" ng-show="hasSubscription"></div>
|
||||
</div>
|
||||
|
||||
<!-- Billing Invoices -->
|
||||
|
|
Reference in a new issue