@model StockMaster.ViewModels.DashboardViewModel @{ ViewData["Title"] = "Dashboard"; var userRole = Context.Session.GetString("Role"); bool isAdmin = userRole == "Admin"; bool canManageInventory = isAdmin || userRole == "Inventory Manager"; bool canSell = isAdmin || userRole == "Sales Personnel"; }

Dashboard

Welcome, @Context.Session.GetString("FullName") (@userRole)

Today's Sales

@Model.TotalSalesToday.ToString("N2") MKD

Monthly Sales

@Model.TotalSalesMonth.ToString("N2") MKD

Total Products

@Model.StockSummary["TotalProducts"]

Total Stock

@Model.StockSummary["TotalStock"]

Low Stock Products
@if (Model.LowStockProducts.Any()) {
@foreach (var product in Model.LowStockProducts) { }
Product Name Reorder Level Action
@product.Name @product.ReorderLevel Create Order
} else {

All products have sufficient stock

}
System Information
  • Total Warehouses: @Model.StockSummary["Warehouses"]
  • Date: @DateTime.Now.ToString("dd.MM.yyyy")
  • User: @Context.Session.GetString("Username")
  • Role: @userRole