1
0
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:
Kyle Spearrin
2019-02-25 10:39:04 -05:00
parent b229985256
commit 7ee8c0a240
9 changed files with 106 additions and 6 deletions

View File

@ -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">

View 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>

View File

@ -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">