@page "/members" @using BlazorWebAssembly.Services @using LibraryManagement.Shared.Models @using BlazorWebAssembly.Models @using Microsoft.AspNetCore.Authorization @attribute [Authorize(Roles = "Librarian")] @inject LibraryApiClient ApiClient @inject IJSRuntime JS @inject NavigationManager Navigation
Manage library members and administrator accounts. (@(_allUsers?.Count() ?? 0) total)
| Member | Contact | Role | Status | Actions |
|---|---|---|---|---|
|
@(user.FullName?.Substring(0, Math.Min(2, user.FullName.Length)).ToUpper() ?? "U")
@if (!string.IsNullOrEmpty(user.StudentId))
{
ID: @user.StudentId
}
|
@user.Email
@(string.IsNullOrEmpty(user.PhoneNumber) ? "No phone" : user.PhoneNumber)
|
@user.Role | @if (user.BanStatus == true) { Suspended } else if (user.IsActive) { Active } else { Inactive } |
|
Showing @((_pagedResult.CurrentPage - 1) * _pagedResult.PageSize + 1) to @(Math.Min(_pagedResult.CurrentPage * _pagedResult.PageSize, _pagedResult.TotalCount)) of @_pagedResult.TotalCount members
@_selectedUser.User.Email
@(string.IsNullOrEmpty(_selectedUser.User.PhoneNumber) ? "-" : _selectedUser.User.PhoneNumber)
@(string.IsNullOrEmpty(_selectedUser.User.StudentId) ? "-" : _selectedUser.User.StudentId)
@_selectedUser.User.CreatedAt.ToString("MMMM dd, yyyy")
@(string.IsNullOrEmpty(_selectedUser.User.Address) ? "-" : _selectedUser.User.Address)
Credits will be added instantly for automated subscription purchases.
No active subscription for this member.
@plan.Price.ToString("N0") MMK / @plan.DurationMonths mo
@if (!isCurrent) { } else { }@(_currentView == ViewMode.Create ? "Add a new reader to the library system." : $"Update profile details for {_editUser?.FullName}.")
Review and approve pending "Pay Cash at Library" subscription requests.
@if (_isLoading) {No pending membership requests to approve.
@sub.UserEmail