@using System.ComponentModel.DataAnnotations @using ImageBoardServerApp.Data.Repository @inject NavigationManager navManager @user.Email | @user.Posts.Count Posts | @user.Comments.Count Comments | @user.SubmittedReports.Count Reports submitted | @user.RecivedReports.Count Reports recived | Update Role Unban (if banned) @user.Role
@code { private string selectedRole; [Parameter] [Required] public UserData user { get; set; } protected override async Task OnInitializedAsync() { selectedRole = user.Role; } private async Task unban() { user.BanReason = "Not Banned"; user.TimeBanned = -1; await UsersRepository.updateUserAsync(user); } private async Task updateRole() { user.Role = selectedRole; await UsersRepository.updateUserAsync(user); } }