mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
invoice link for charges
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
.module('bit.organization')
|
.module('bit.organization')
|
||||||
|
|
||||||
.controller('organizationBillingController', function ($scope, apiService, $state, $uibModal, toastr, $analytics,
|
.controller('organizationBillingController', function ($scope, apiService, $state, $uibModal, toastr, $analytics,
|
||||||
appSettings) {
|
appSettings, tokenService, $window) {
|
||||||
$scope.selfHosted = appSettings.selfHosted;
|
$scope.selfHosted = appSettings.selfHosted;
|
||||||
$scope.charges = [];
|
$scope.charges = [];
|
||||||
$scope.paymentSource = null;
|
$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() {
|
function load() {
|
||||||
apiService.organizations.getBilling({ id: $state.params.orgId }, function (org) {
|
apiService.organizations.getBilling({ id: $state.params.orgId }, function (org) {
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|||||||
@@ -201,6 +201,11 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="charge in charges">
|
<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">
|
<td style="width: 200px">
|
||||||
{{charge.date | date: 'mediumDate'}}
|
{{charge.date | date: 'mediumDate'}}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user