LoadSortBanTableData(
sortState.AddColumn("ip", p => p.Ban.Address);
sortState.AddColumn("uid", p => p.Ban.PlayerUserId);
sortState.AddColumn("time", p => p.Ban.BanTime, SortOrder.Descending);
+ sortState.AddColumn("round", p => p.Ban.RoundId, SortOrder.Descending);
// sortState.AddColumn("expire_time", p => p.ban.Unban == null ? p.ban.ExpirationTime : p.ban.Unban!.UnbanTime);
sortState.AddColumn("admin", p => p.Admin!.LastSeenUserName);
sortState.AddColumn("role", p => p.Ban.RoleId);
@@ -132,7 +133,8 @@ await pagination.LoadLinqAsync(bans, e => e.Select(b =>
BanHelper.IsBanActive(b.Ban),
b.Ban.BanTime,
b.Admin?.LastSeenUserName,
- b.Ban.RoleId);
+ b.Ban.RoleId,
+ b.Ban.RoundId);
}));
return sortState;
@@ -150,7 +152,8 @@ public sealed record RoleBan(
bool Active,
DateTime BanTime,
string? Admin,
- string Role);
+ string Role,
+ int? Round);
public enum ShowFilter
{
diff --git a/SS14.Admin/Pages/Tables/BansTable.cshtml b/SS14.Admin/Pages/Tables/BansTable.cshtml
index f866768..45b358e 100644
--- a/SS14.Admin/Pages/Tables/BansTable.cshtml
+++ b/SS14.Admin/Pages/Tables/BansTable.cshtml
@@ -23,6 +23,9 @@
|
+
+
+ |
Expires |
@@ -75,6 +78,7 @@
| @ban.Reason |
@ban.BanTime.ToString("yyyy-MM-dd HH:mm:ss") |
+ @ban.Round |
@(ban.Expires?.ToString("yyyy-MM-dd HH:mm:ss") ?? "PERMANENT")
@if (ban.Unbanned is { } unbanned)
diff --git a/SS14.Admin/Pages/Tables/RoleBansTable.cshtml b/SS14.Admin/Pages/Tables/RoleBansTable.cshtml
index 319532d..d0fc11a 100644
--- a/SS14.Admin/Pages/Tables/RoleBansTable.cshtml
+++ b/SS14.Admin/Pages/Tables/RoleBansTable.cshtml
@@ -27,6 +27,9 @@
|
|
+
+
+ |
Expires |
@@ -77,6 +80,7 @@
| @ban.Reason |
@ban.Role |
@ban.BanTime.ToString("yyyy-MM-dd HH:mm:ss") |
+ @ban.Round |
@(ban.Expires?.ToString("yyyy-MM-dd HH:mm:ss") ?? "PERMANENT")
@if (ban.Unbanned is { } unbanned)
|