This commit is contained in:
@@ -266,7 +266,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
|
||||
|
||||
#endregion workorderstate
|
||||
#endregion quotestate
|
||||
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace AyaNova.Api.Controllers
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
#endregion workorderitem
|
||||
#endregion quoteitem
|
||||
|
||||
|
||||
/*
|
||||
@@ -524,10 +524,10 @@ namespace AyaNova.Api.Controllers
|
||||
/// <summary>
|
||||
/// Get QuoteItemLabor object
|
||||
/// </summary>
|
||||
/// <param name="workOrderItemLaborId"></param>
|
||||
/// <param name="QuoteItemLaborId"></param>
|
||||
/// <returns>A single QuoteItemLabor</returns>
|
||||
[HttpGet("items/labors/{workOrderItemLaborId}")]
|
||||
public async Task<IActionResult> GetQuoteItemLabor([FromRoute] long workOrderItemLaborId)
|
||||
[HttpGet("items/labors/{QuoteItemLaborId}")]
|
||||
public async Task<IActionResult> GetQuoteItemLabor([FromRoute] long QuoteItemLaborId)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
@@ -536,7 +536,7 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
var o = await biz.LaborGetAsync(workOrderItemLaborId);
|
||||
var o = await biz.LaborGetAsync(QuoteItemLaborId);
|
||||
if (o == null)
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
return Ok(ApiOkResponse.Response(o));
|
||||
@@ -574,10 +574,10 @@ namespace AyaNova.Api.Controllers
|
||||
/// <summary>
|
||||
/// Delete QuoteItemLabor
|
||||
/// </summary>
|
||||
/// <param name="workOrderItemLaborId"></param>
|
||||
/// <param name="QuoteItemLaborId"></param>
|
||||
/// <returns>NoContent</returns>
|
||||
[HttpDelete("items/labors/{workOrderItemLaborId}")]
|
||||
public async Task<IActionResult> DeleteQuoteItemLabor([FromRoute] long workOrderItemLaborId)
|
||||
[HttpDelete("items/labors/{QuoteItemLaborId}")]
|
||||
public async Task<IActionResult> DeleteQuoteItemLabor([FromRoute] long QuoteItemLaborId)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
@@ -586,7 +586,7 @@ namespace AyaNova.Api.Controllers
|
||||
QuoteBiz biz = QuoteBiz.GetBiz(ct, HttpContext);
|
||||
if (!Authorized.HasDeleteRole(HttpContext.Items, AyaType.QuoteItemLabor))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!await biz.LaborDeleteAsync(workOrderItemLaborId))
|
||||
if (!await biz.LaborDeleteAsync(QuoteItemLaborId))
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user