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">
|
<div class="billing-options-element">
|
||||||
<!-- Credit Card -->
|
<!-- Credit Card -->
|
||||||
<div class="panel">
|
<div style="margin-bottom: 20px">
|
||||||
<div class="panel-title">
|
<div class="panel-title">
|
||||||
Credit Card
|
Credit Card
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<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="current-card" ng-show="currentCard && !changingCard">
|
||||||
<div class="alert alert-warning" ng-if="currentCard.last4 && isExpiringSoon(currentCard)">
|
<div class="alert alert-warning" ng-if="currentCard.last4 && isExpiringSoon(currentCard)">
|
||||||
Your current credit card is expiring soon!
|
Your current credit card is expiring soon!
|
||||||
|
@ -29,10 +29,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Options -->
|
<!-- Options -->
|
||||||
<div class="panel">
|
<div style="margin-bottom: 20px">
|
||||||
<div class="panel-title">
|
<div class="panel-title">
|
||||||
Billing Options
|
Billing Options
|
||||||
<div class="quay-spinner" ng-show="working"></div>
|
<div class="cor-loader-inline" ng-show="working"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="settings-option">
|
<div class="settings-option">
|
||||||
|
|
|
@ -11,6 +11,9 @@ angular.module('quay').directive('planManager', function () {
|
||||||
scope: {
|
scope: {
|
||||||
'user': '=user',
|
'user': '=user',
|
||||||
'organization': '=organization',
|
'organization': '=organization',
|
||||||
|
|
||||||
|
'hasSubscription': '=hasSubscription',
|
||||||
|
|
||||||
'readyForPlan': '&readyForPlan',
|
'readyForPlan': '&readyForPlan',
|
||||||
'planChanged': '&planChanged'
|
'planChanged': '&planChanged'
|
||||||
},
|
},
|
||||||
|
@ -68,6 +71,7 @@ angular.module('quay').directive('planManager', function () {
|
||||||
|
|
||||||
$scope.planChanging = false;
|
$scope.planChanging = false;
|
||||||
$scope.planLoading = false;
|
$scope.planLoading = false;
|
||||||
|
$scope.hasSubscription = subscribedPlan.stripeId != PlanService.getFreePlan();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,10 @@
|
||||||
<div id="usage" class="tab-pane" quay-require="['BILLING']">
|
<div id="usage" class="tab-pane" quay-require="['BILLING']">
|
||||||
<h3>Plan Usage and Billing</h3>
|
<h3>Plan Usage and Billing</h3>
|
||||||
<div ng-if="isAdmin">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,9 @@
|
||||||
<!-- Plan and Usage -->
|
<!-- Plan and Usage -->
|
||||||
<div id="usage" class="tab-pane" quay-require="['BILLING']">
|
<div id="usage" class="tab-pane" quay-require="['BILLING']">
|
||||||
<h3>Plan Usage and Billing</h3>
|
<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>
|
</div>
|
||||||
|
|
||||||
<!-- Billing Invoices -->
|
<!-- Billing Invoices -->
|
||||||
|
|
Reference in a new issue