@{ var userRole = Context.Session.GetString("Role"); bool isAdmin = userRole == "Admin"; bool canManageInventory = isAdmin || userRole == "Inventory Manager"; bool canSell = isAdmin || userRole == "Sales Personnel"; bool canManageWarehouse = isAdmin || canSell|| userRole == "Warehouse Staff"; bool canAccessSettings = isAdmin || canManageInventory || canSell; } @ViewData["Title"] - Stock Master @await RenderSectionAsync("Styles", required: false)
@if (TempData["Success"] != null) {
@TempData["Success"]
} @if (TempData["Error"] != null) {
@TempData["Error"]
} @RenderBody()
@await RenderSectionAsync("Scripts", required: false)