diff --git a/SS14.Admin/Pages/Bans/Index.cshtml.cs b/SS14.Admin/Pages/Bans/Index.cshtml.cs index af477d9..a0aa420 100644 --- a/SS14.Admin/Pages/Bans/Index.cshtml.cs +++ b/SS14.Admin/Pages/Bans/Index.cshtml.cs @@ -103,6 +103,7 @@ public static async Task 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("hits", p => p.HitCount); @@ -133,7 +134,8 @@ await pagination.LoadLinqAsync(bans, e => e.Select(b => BanHelper.IsBanActive(b.Ban), b.Ban.BanTime, b.Admin?.LastSeenUserName, - b.HitCount); + b.HitCount, + b.Ban.RoundId); })); return sortState; @@ -151,7 +153,8 @@ public sealed record Ban( bool Active, DateTime BanTime, string? Admin, - int hitCount); + int hitCount, + int? Round); public enum ShowFilter { diff --git a/SS14.Admin/Pages/RoleBans/Index.cshtml.cs b/SS14.Admin/Pages/RoleBans/Index.cshtml.cs index a3b4579..af12a1e 100644 --- a/SS14.Admin/Pages/RoleBans/Index.cshtml.cs +++ b/SS14.Admin/Pages/RoleBans/Index.cshtml.cs @@ -102,6 +102,7 @@ public static async Task 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)