clean up migrate_outstanding stuff
This commit is contained in:
@@ -127,55 +127,7 @@ namespace AyaNova.Api.Controllers
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// Reject CustomerServiceRequest
|
||||
// /// </summary>
|
||||
// /// <param name="id">Source object id</param>
|
||||
// /// <param name="apiVersion">From route path</param>
|
||||
// /// <returns>CustomerServiceRequest</returns>
|
||||
// [HttpPost("reject/{id}")]
|
||||
// public async Task<IActionResult> RejectCustomerServiceRequest([FromRoute] long id, ApiVersion apiVersion)
|
||||
// {
|
||||
// if (!serverState.IsOpen)
|
||||
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
// CustomerServiceRequestBiz biz = CustomerServiceRequestBiz.GetBiz(ct, HttpContext);
|
||||
// if (!Authorized.HasCreateRole(HttpContext.Items, biz.BizType))
|
||||
// return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
// if (!ModelState.IsValid)
|
||||
// return BadRequest(new ApiErrorResponse(ModelState));
|
||||
// CustomerServiceRequest o = await biz.RejectAsync(id);
|
||||
// if (o == null)
|
||||
// return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
// else
|
||||
// return CreatedAtAction(nameof(CustomerServiceRequestController.GetCustomerServiceRequest), new { id = o.Id, version = apiVersion.ToString() }, new ApiCreatedResponse(o));
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Accept CustomerServiceRequest to new WorkOrder
|
||||
// /// </summary>
|
||||
// /// <param name="id">Source CSR id</param>
|
||||
// /// <param name="apiVersion">From route path</param>
|
||||
// /// <returns>CustomerServiceRequest with WorkOrderItemId set</returns>
|
||||
// [HttpPost("accept/{id}/{workorderid}")]
|
||||
// public async Task<IActionResult> AcceptCustomerServiceRequest([FromRoute] long id, ApiVersion apiVersion)
|
||||
// {
|
||||
// if (!serverState.IsOpen)
|
||||
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
// CustomerServiceRequestBiz biz = CustomerServiceRequestBiz.GetBiz(ct, HttpContext);
|
||||
// if (!Authorized.HasCreateRole(HttpContext.Items, biz.BizType))
|
||||
// return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
// if (!ModelState.IsValid)
|
||||
// return BadRequest(new ApiErrorResponse(ModelState));
|
||||
// CustomerServiceRequest o = await biz.AcceptAsync(id);
|
||||
// if (o == null)
|
||||
// return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
// else
|
||||
// return CreatedAtAction(nameof(CustomerServiceRequestController.GetCustomerServiceRequest), new { id = o.Id, version = apiVersion.ToString() }, new ApiCreatedResponse(o));
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------
|
||||
|
||||
@@ -153,45 +153,6 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// //ACCEPT
|
||||
// //
|
||||
// internal async Task<CustomerServiceRequest> AcceptAsync(long csrId, long workorderId) //MIGRATE_OUTSTANDING waiting for workorder to be completed or at least have a customerid which it currently doesn't
|
||||
// {
|
||||
// var dbObject = await GetAsync(csrId, false);
|
||||
// if (dbObject == null)
|
||||
// {
|
||||
// AddError(ApiErrorCode.NOT_FOUND, "id");
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// throw new System.NotImplementedException("//MIGRATE_OUTSTANDING CustomerServiceRequestBiz::AcceptAsync - awaiting workorder completion ");
|
||||
// // WorkOrder w=null;
|
||||
// //if (workorderId==0){WorkOrderBiz.GenerateWorkOrder()} //this is how it would work in theory
|
||||
|
||||
|
||||
|
||||
// }
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// //REJECT
|
||||
// //
|
||||
// internal async Task<CustomerServiceRequest> RejectAsync(long csrId)
|
||||
// {
|
||||
// var dbObject = await GetAsync(csrId, false);
|
||||
// if (dbObject == null)
|
||||
// {
|
||||
// AddError(ApiErrorCode.NOT_FOUND, "id");
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// //Nothing to validate as it just came from the db and rejecting doesn't require validation
|
||||
// dbObject.Status = CustomerServiceRequestStatus.Declined;
|
||||
// await PutAsync(dbObject);
|
||||
// return dbObject;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//SEARCH
|
||||
|
||||
Reference in New Issue
Block a user