@model SkyArtShop.Models.AdminUser @{ ViewData["Title"] = "View User"; Layout = "~/Views/Shared/_AdminLayout.cshtml"; }

User Details

Edit User Back to Users
Basic Information
Full Name: @Model.Name
Email: @Model.Email
Phone: @(string.IsNullOrEmpty(Model.Phone) ? "Not provided" : Model.Phone)
Role: @if (Model.Role == "MasterAdmin") { Master Admin } else if (Model.Role == "Admin") { Admin } else if (Model.Role == "Cashier") { Cashier } else if (Model.Role == "Accountant") { Accountant }
Status: @if (Model.IsActive) { Active } else { Inactive }
Created: @Model.CreatedAt.ToString("MMMM dd, yyyy HH:mm")
Created By: @Model.CreatedBy
Last Login: @if (Model.LastLogin.HasValue) { @Model.LastLogin.Value.ToString("MMMM dd, yyyy HH:mm") } else { Never logged in }
@if (!string.IsNullOrEmpty(Model.Notes)) {
Notes:

@Model.Notes

}
Permissions
@if (Model.Permissions != null && Model.Permissions.Any()) {
    @foreach (var permission in Model.Permissions) {
  • @{ var displayPerm = permission.Replace("_", " "); displayPerm = char.ToUpper(displayPerm[0]) + displayPerm.Substring(1); } @displayPerm
  • }
} else {

No permissions assigned.

}
Quick Actions
Edit User @if (Model.Role != "MasterAdmin") { }