mirror of
https://github.com/bitwarden/server
synced 2026-02-19 10:53:34 +00:00
organization search page
This commit is contained in:
11
src/Admin/Models/OrganizationsModel.cs
Normal file
11
src/Admin/Models/OrganizationsModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Admin.Models
|
||||
{
|
||||
public class OrganizationsModel : PagedModel<Organization>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string UserEmail { get; set; }
|
||||
public bool Paid { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/Admin/Models/PagedModel.cs
Normal file
13
src/Admin/Models/PagedModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Admin.Models
|
||||
{
|
||||
public abstract class PagedModel<T>
|
||||
{
|
||||
public List<T> Items { get; set; }
|
||||
public int Page { get; set; }
|
||||
public int Count { get; set; }
|
||||
public int? PreviousPage => Page < 2 ? (int?)null : Page - 1;
|
||||
public int? NextPage => Items.Count < Count ? (int?)null : Page + 1;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,9 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Models.Table;
|
||||
|
||||
namespace Bit.Admin.Models
|
||||
{
|
||||
public class UsersModel
|
||||
public class UsersModel : PagedModel<User>
|
||||
{
|
||||
public List<User> Users { get; set; }
|
||||
public string Email { get; set; }
|
||||
public int Page { get; set; }
|
||||
public int Count { get; set; }
|
||||
public int? PreviousPage => Page < 2 ? (int?)null : Page - 1;
|
||||
public int? NextPage => Users.Count < Count ? (int?)null : Page + 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user