Browse Source
* Add Organizations to provider views Remove enabled/disabled toggle from provider. It's currently not used. * Remove provider Delete There are implications to deleting providers on the organizations they manage. We want to think through this flow before allowing delete from the admin portal. * Use toastr to display production exception messages. Update build actions to upgrade npm to v7. Use a custom error handler in production which displays a toast of the exception message and redirect to the offending page * Clarify provider create error messagepull/1505/head
16 changed files with 6464 additions and 58 deletions
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
using Microsoft.AspNetCore.Diagnostics; |
||||
using Microsoft.AspNetCore.Mvc; |
||||
|
||||
namespace Bit.Admin.Controllers |
||||
{ |
||||
public class ErrorController : Controller |
||||
{ |
||||
[Route("/error")] |
||||
public IActionResult Error(int? statusCode = null) |
||||
{ |
||||
var exceptionHandlerPathFeature = HttpContext.Features.Get<IExceptionHandlerPathFeature>(); |
||||
TempData["Error"] = HttpContext.Features.Get<IExceptionHandlerFeature>()?.Error.Message; |
||||
|
||||
if (exceptionHandlerPathFeature != null) |
||||
{ |
||||
return Redirect(exceptionHandlerPathFeature.Path); |
||||
} |
||||
else |
||||
{ |
||||
return Redirect("/Home"); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
@model ProviderViewModel |
||||
<h2>Provider Organizations</h2> |
||||
<div class="row"> |
||||
<div class="col-sm"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-striped table-hover"> |
||||
<thead> |
||||
<tr> |
||||
<th>Name</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@if (!Model.ProviderOrganizations.Any()) |
||||
{ |
||||
<tr> |
||||
<td colspan="6">No results to list.</td> |
||||
</tr> |
||||
} |
||||
else |
||||
{ |
||||
@foreach (var org in Model.ProviderOrganizations) |
||||
{ |
||||
<tr> |
||||
<td class="align-middle"> |
||||
<a asp-controller="Organizations" asp-action="Edit" |
||||
asp-route-id="@org.OrganizationId">@org.OrganizationName</a> |
||||
</td> |
||||
</tr> |
||||
} |
||||
} |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue