diff --git a/Controllers/API/Inventory/InvMainAPI.cs b/Controllers/API/Inventory/InvMainAPI.cs index e6dd9fe..e63345c 100644 --- a/Controllers/API/Inventory/InvMainAPI.cs +++ b/Controllers/API/Inventory/InvMainAPI.cs @@ -548,7 +548,7 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory public async Task ItemMovementList() { - var itemMovementList = await _centralDbContext.ItemMovements.ToListAsync(); + var itemMovementList = await _centralDbContext.ItemMovements.Include(i => i.NextUser).ToListAsync(); //var itemList = await _centralDbContext.Items.ToListAsync(); int itemrow = 0; @@ -556,7 +556,8 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory { id = itemrow++, item, // Includes all properties of the original item - QRString = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host.Value}/I/{item.ItemId}" // Generate QR String + QRString = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host.Value}/I/{item.ItemId}", // Generate QR String + userName = item.NextUser?.FullName }).ToList(); //Console.WriteLine(Json(itemMovementList));