diff --git a/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml b/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml index d2ef2fe..777447f 100644 --- a/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/ItemRequestMaster.cshtml @@ -229,7 +229,7 @@ }, { "title": "User ID", - "data": "userId", + "data": "userName", }, { diff --git a/Areas/Inventory/Views/InventoryMaster/QrMaster.cshtml b/Areas/Inventory/Views/InventoryMaster/QrMaster.cshtml index cc2374c..32cc2fa 100644 --- a/Areas/Inventory/Views/InventoryMaster/QrMaster.cshtml +++ b/Areas/Inventory/Views/InventoryMaster/QrMaster.cshtml @@ -494,10 +494,7 @@ const formData = { Id: this.thisItem.movementId, - // LastStation: this.selectedStation, - // LatestStatus: "Delivered", - // ReceiveDate: new Date(now.getTime() + 8 * 60 * 60 * 1000).toISOString(), - // MovementComplete: true + ReceiveDate: new Date(now.getTime() + 8 * 60 * 60 * 1000).toISOString(), }; diff --git a/Controllers/API/Inventory/InvMainAPI.cs b/Controllers/API/Inventory/InvMainAPI.cs index 8d30458..e6dd9fe 100644 --- a/Controllers/API/Inventory/InvMainAPI.cs +++ b/Controllers/API/Inventory/InvMainAPI.cs @@ -558,7 +558,9 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory item, // Includes all properties of the original item QRString = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host.Value}/I/{item.ItemId}" // Generate QR String }).ToList(); - Console.WriteLine(Json(itemMovementList)); + //Console.WriteLine(Json(itemMovementList)); + + //return Json(itemMovementList); return Json(itemMovementListWithQR); } @@ -691,6 +693,7 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory } updatedList.LatestStatus = "Delivered"; + updatedList.receiveDate = receiveMovement.receiveDate; updatedList.MovementComplete = true; _centralDbContext.ItemMovements.Update(updatedList); @@ -894,13 +897,13 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory public async Task ItemRequestList() { - var itemRequestList = await _centralDbContext.Requests.Include(i => i.Product).ToListAsync(); + var itemRequestList = await _centralDbContext.Requests.Include(i => i.Product).Include(i => i.User).ToListAsync(); return Json(itemRequestList.Select(i => new { i.requestId, productName = i.Product?.ProductName, i.ProductId, - i.UserId, + userName = i.User?.FullName, i.status, i.StationId, i.RequestQuantity,