mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
invoice link for charges
This commit is contained in:
parent
b52ecd8085
commit
c60a596995
@ -2,7 +2,7 @@
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationBillingController', function ($scope, apiService, $state, $uibModal, toastr, $analytics,
|
||||
appSettings) {
|
||||
appSettings, tokenService, $window) {
|
||||
$scope.selfHosted = appSettings.selfHosted;
|
||||
$scope.charges = [];
|
||||
$scope.paymentSource = null;
|
||||
@ -208,6 +208,15 @@
|
||||
});
|
||||
};
|
||||
|
||||
$scope.viewInvoice = function (charge) {
|
||||
if ($scope.selfHosted) {
|
||||
return;
|
||||
}
|
||||
var url = appSettings.apiUri + '/organizations/' + $state.params.orgId +
|
||||
'/billing-invoice/' + charge.invoiceId + '?access_token=' + tokenService.getToken();
|
||||
$window.open(url);
|
||||
}
|
||||
|
||||
function load() {
|
||||
apiService.organizations.getBilling({ id: $state.params.orgId }, function (org) {
|
||||
$scope.loading = false;
|
||||
|
@ -201,6 +201,11 @@
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr ng-repeat="charge in charges">
|
||||
<td style="width: 30px">
|
||||
<a href="#" stop-click ng-click="viewInvoice(charge)" title="Invoice">
|
||||
<i class="fa fa-file-pdf-o"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 200px">
|
||||
{{charge.date | date: 'mediumDate'}}
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user