1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -05:00

active page status, org customer select filter

This commit is contained in:
Kyle Spearrin
2018-03-21 21:58:14 -04:00
parent 6e16581fe8
commit ab3b3c6e40
8 changed files with 136 additions and 14 deletions

View File

@ -19,7 +19,7 @@ namespace Bit.Admin.Controllers
_organizationRepository = organizationRepository;
}
public async Task<IActionResult> Index(string name = null, string userEmail = null, bool paid = false,
public async Task<IActionResult> Index(string name = null, string userEmail = null, bool? paid = null,
int page = 1, int count = 25)
{
if(page < 1)
@ -33,8 +33,7 @@ namespace Bit.Admin.Controllers
}
var skip = (page - 1) * count;
var organizations = await _organizationRepository.SearchAsync(name, userEmail, paid ? (bool?)true : null,
skip, count);
var organizations = await _organizationRepository.SearchAsync(name, userEmail, paid, skip, count);
return View(new OrganizationsModel
{
Items = organizations as List<Organization>,