Equipment sync javítása
This commit is contained in:
@@ -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 ()
|
||||||
|
|||||||
Reference in New Issue
Block a user