mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
add billing info to admin edit page
This commit is contained in:
@ -74,8 +74,10 @@
|
||||
|
||||
<h1>Organization <small>@Model.Organization.Name</small></h1>
|
||||
|
||||
<h2>Information</h2>
|
||||
<h2>Organization Information</h2>
|
||||
@await Html.PartialAsync("_ViewInformation", Model)
|
||||
<h2>Billing Information</h2>
|
||||
@await Html.PartialAsync("_BillingInformation", Model.BillingInfo)
|
||||
<form method="post" id="edit-form">
|
||||
<h2>General</h2>
|
||||
<div class="row">
|
||||
|
54
src/Admin/Views/Shared/_BillingInformation.cshtml
Normal file
54
src/Admin/Views/Shared/_BillingInformation.cshtml
Normal file
@ -0,0 +1,54 @@
|
||||
@model Bit.Core.Models.Business.BillingInfo
|
||||
<dl class="row">
|
||||
<dt class="col-sm-4 col-lg-3">Account @(Model.Balance <= 0 ? "Credit" : "Balance")</dt>
|
||||
<dd class="col-sm-8 col-lg-9">@Math.Abs(Model.Balance).ToString("C")</dd>
|
||||
|
||||
<dt class="col-sm-4 col-lg-3">Invoices</dt>
|
||||
<dd class="col-sm-8 col-lg-9">
|
||||
@if(Model.Invoices?.Any() ?? false)
|
||||
{
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach(var invoice in Model.Invoices)
|
||||
{
|
||||
<tr>
|
||||
<td>@invoice.Date</td>
|
||||
<td><a target="_blank" href="@invoice.Url" title="View Invoice">@invoice.Number</a></td>
|
||||
<td>@invoice.Amount.ToString("C")</td>
|
||||
<td>@(invoice.Paid ? "Paid" : "Unpaid")</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
@: No invoices.
|
||||
}
|
||||
</dd>
|
||||
|
||||
<dt class="col-sm-4 col-lg-3">Transactions</dt>
|
||||
<dd class="col-sm-8 col-lg-9">
|
||||
@if(Model.Transactions?.Any() ?? false)
|
||||
{
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach(var transaction in Model.Transactions)
|
||||
{
|
||||
<tr>
|
||||
<td>@transaction.CreatedDate</td>
|
||||
<td>@transaction.Type.ToString()</td>
|
||||
<td>@transaction.PaymentMethodType.ToString()</td>
|
||||
<td>@transaction.Details</td>
|
||||
<td>@transaction.Amount.ToString("C")</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
@: No transactions.
|
||||
}
|
||||
</dd>
|
||||
</dl>
|
@ -56,8 +56,10 @@
|
||||
|
||||
<h1>User <small>@Model.User.Email</small></h1>
|
||||
|
||||
<h2>Information</h2>
|
||||
<h2>User Information</h2>
|
||||
@await Html.PartialAsync("_ViewInformation", Model)
|
||||
<h2>Billing Information</h2>
|
||||
@await Html.PartialAsync("_BillingInformation", Model.BillingInfo)
|
||||
<form method="post" id="edit-form">
|
||||
<h2>General</h2>
|
||||
<div class="row">
|
||||
|
Reference in New Issue
Block a user