mirror of
https://github.com/bitwarden/server.git
synced 2026-02-10 19:03:18 +08:00
97 lines
3.2 KiB
Plaintext
97 lines
3.2 KiB
Plaintext
@using Bit.Core.Models.Table
|
|
|
|
@model TaxRatesModel
|
|
@{
|
|
ViewData["Title"] = "Tax Rates";
|
|
}
|
|
|
|
<h1>Manage Tax Rates</h1>
|
|
|
|
<a class="btn btn-primary mb-2" asp-controller="Tools" asp-action="TaxRateAddEdit">Add a Rate</a>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 190px;">Id</th>
|
|
<th style="width: 80px;">Country</th>
|
|
<th style="width: 80px;">State</th>
|
|
<th style="width: 150px;">Postal Code</th>
|
|
<th style="width: 160px;">Tax Rate</th>
|
|
<th style="width: 80px;"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if(!Model.Items.Any())
|
|
{
|
|
<tr>
|
|
<td colspan="6">No results to list.</td>
|
|
</tr>
|
|
}
|
|
else
|
|
{
|
|
@foreach(var rate in Model.Items)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@{
|
|
var taxRateToEdit = new Dictionary<string, string>
|
|
{
|
|
{ "id", rate.Id },
|
|
{ "stripeTaxRateId", rate.Id }
|
|
};
|
|
}
|
|
<a asp-controller="Tools" asp-action="TaxRateAddEdit" asp-all-route-data="taxRateToEdit">@rate.Id</a>
|
|
</td>
|
|
<td>
|
|
@rate.Country
|
|
</td>
|
|
<td>
|
|
@rate.State
|
|
</td>
|
|
<td>
|
|
@rate.PostalCode
|
|
</td>
|
|
<td>
|
|
@rate.Rate%
|
|
</td>
|
|
<td>
|
|
<a class="delete-button" data-id="@rate.Id" asp-controller="Tools" asp-action="TaxRateArchive" asp-route-stripeTaxRateId="@rate.Id">
|
|
<i class="fa fa-trash fa-lg fa-fw"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<nav>
|
|
<ul class="pagination">
|
|
@if(Model.PreviousPage.HasValue)
|
|
{
|
|
<li class="page-item">
|
|
<a class="page-link" asp-controller="Tools" asp-action="TaxRate" asp-route-page="@Model.PreviousPage.Value" asp-route-count="@Model.Count">Previous</a>
|
|
</li>
|
|
}
|
|
else
|
|
{
|
|
<li class="page-item disabled">
|
|
<a class="page-link" href="#" tabindex="-1">Previous</a>
|
|
</li>
|
|
}
|
|
@if(Model.NextPage.HasValue)
|
|
{
|
|
<li class="page-item">
|
|
<a class="page-link" asp-controller="Tools" asp-action="TaxRate" asp-route-page="@Model.NextPage.Value" asp-route-count="@Model.Count">Next</a>
|
|
</li>
|
|
}
|
|
else
|
|
{
|
|
<li class="page-item disabled">
|
|
<a class="page-link" href="#" tabindex="-1">Next</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</nav>
|