Equipment sync javítása

This commit is contained in:
2025-03-20 13:44:24 +01:00
parent b48b8dbb6c
commit 6dcc4989ac
2 changed files with 11 additions and 11 deletions
@@ -88,19 +88,19 @@ namespace WorkFlowCheck.API.Controllers
[HttpGet("GetEquipment/{id}")] [HttpGet("GetEquipment/{id}")]
public async Task<ApiResponseDTO<CheckPointDTO>> GetEquipmentAsync(int id) public async Task<ApiResponseDTO<EquipmentDTO>> GetEquipmentAsync(int id)
{ {
var retVal = new ApiResponseDTO<CheckPointDTO>() var retVal = new ApiResponseDTO<EquipmentDTO>()
{ {
IsSuccess = true, IsSuccess = true,
}; };
var checkPointListDTO = await _syncService.GetCheckPointAsync(id); var equipmentDTO = await _syncService.GetEquipmentAsync(id);
if (checkPointListDTO != null) if (equipmentDTO != null)
{ {
retVal.IsSuccess = true; retVal.IsSuccess = true;
retVal.Data = checkPointListDTO; retVal.Data = equipmentDTO;
} }
else else
{ {
@@ -157,19 +157,19 @@ namespace WorkFlowCheck.API.Controllers
[HttpGet("GetLocation/{id}")] [HttpGet("GetLocation/{id}")]
public async Task<ApiResponseDTO<CheckPointDTO>> GetLocationAsync(int id) public async Task<ApiResponseDTO<LocationDTO>> GetLocationAsync(int id)
{ {
var retVal = new ApiResponseDTO<CheckPointDTO>() var retVal = new ApiResponseDTO<LocationDTO>()
{ {
IsSuccess = true, IsSuccess = true,
}; };
var checkPointListDTO = await _syncService.GetCheckPointAsync(id); var locationDTO = await _syncService.GetLocationAsync(id);
if (checkPointListDTO != null) if (locationDTO != null)
{ {
retVal.IsSuccess = true; retVal.IsSuccess = true;
retVal.Data = checkPointListDTO; retVal.Data = locationDTO;
} }
else else
{ {
@@ -71,7 +71,7 @@
$('#tbEquipmentsPage').on('click', '.edit-btn', function () $('#tbEquipmentsPage').on('click', '.edit-btn', function ()
{ {
const row = table.row($(this).closest('tr')).data(); const row = table.row($(this).closest('tr')).data();
window.location.href = `@Url.Page("./EquipmentEditPage")?id=${row.id}`; window.location.href = `@Url.Page("/BaseStock/Equipments/EquipmentEditPage")?id=${row.id}`;
}); });
$('#tbEquipmentsPage').on('click', '.delete-btn', function () $('#tbEquipmentsPage').on('click', '.delete-btn', function ()