fix user fullname in product request

This commit is contained in:
ameerulrasyid 2025-02-26 16:23:58 +08:00
parent 20c01825f9
commit 01814cc26f
3 changed files with 8 additions and 8 deletions

View File

@ -229,7 +229,7 @@
},
{
"title": "User ID",
"data": "userId",
"data": "userName",
},
{

View File

@ -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(),
};

View File

@ -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<IActionResult> 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,