1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 10:33:57 +00:00

cancel/uncancel sub

This commit is contained in:
Kyle Spearrin
2017-04-10 16:43:24 -04:00
parent 4209d91c43
commit 80ca89b3f6
3 changed files with 45 additions and 9 deletions

View File

@@ -10,6 +10,12 @@
<h3 class="box-title">Plan</h3>
</div>
<div class="box-body">
<div class="alert alert-warning" ng-if="subscription && subscription.cancelled">
The subscription to this organization has been canceled.
</div>
<div class="alert alert-warning" ng-if="subscription && subscription.markedForCancel">
The subscription to this organization has been marked for cancellation at the end of the current billing period.
</div>
<div class="row">
<div class="col-sm-6">
<dl>
@@ -22,9 +28,9 @@
<div class="col-sm-6">
<dl>
<dt>Status</dt>
<dd style="text-transform: capitalize;">{{subscription.status || '-'}}</dd>
<dd style="text-transform: capitalize;">{{(subscription && subscription.status) || '-'}}</dd>
<dt>Next Charge</dt>
<dd>{{nextBill ? ((nextBill.date | date: format: mediumDate) + ', ' + (nextBill.amount | currency:'$')) : '-'}}</dd>
<dd>{{nextInvoice ? ((nextInvoice.date | date: format: mediumDate) + ', ' + (nextInvoice.amount | currency:'$')) : '-'}}</dd>
</dl>
</div>
</div>
@@ -54,9 +60,14 @@
<button type="button" class="btn btn-default btn-flat" ng-click="changePlan()">
Change Plan
</button>
<button type="button" class="btn btn-default btn-flat" ng-click="cancel()" ng-if="!noSubscription">
<button type="button" class="btn btn-default btn-flat" ng-click="cancel()"
ng-if="!noSubscription && !subscription.cancelled && !subscription.markedForCancel">
Cancel Plan
</button>
<button type="button" class="btn btn-default btn-flat" ng-click="uncancel()"
ng-if="!noSubscription && subscription.markedForCancel">
Uncancel Plan
</button>
</div>
</div>
<div class="box">