This commit is contained in:
@@ -71,6 +71,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
return Ok(ApiOkResponse.Response(o, !Authorized.HasModifyRole(HttpContext.Items, biz.BizType)));
|
return Ok(ApiOkResponse.Response(o, !Authorized.HasModifyRole(HttpContext.Items, biz.BizType)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: GET BY RELATIVE
|
||||||
|
//get by descendent type and id
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -116,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//TODO: this should post a workorder instead, no need for Create first like this
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Post WorkOrder
|
/// Post WorkOrder
|
||||||
@@ -148,10 +152,15 @@ namespace AyaNova.Api.Controllers
|
|||||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||||
else
|
else
|
||||||
return CreatedAtAction(nameof(WorkOrderController.GetWorkOrder), new { id = o.Id, version = apiVersion.ToString() }, new ApiCreatedResponse(o));
|
return CreatedAtAction(nameof(WorkOrderController.GetWorkOrder), new { id = o.Id, version = apiVersion.ToString() }, new ApiCreatedResponse(o));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: CreateFromTemplate(templateid)
|
||||||
|
//TODO: Createfromquote(quoteid)
|
||||||
|
//todo: createfrompm(pmid)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Duplicate WorkOrder
|
/// Duplicate WorkOrder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -80,9 +80,13 @@ namespace AyaNova.Biz
|
|||||||
[CoreBizObject]
|
[CoreBizObject]
|
||||||
WorkOrderItem = 35,
|
WorkOrderItem = 35,
|
||||||
[CoreBizObject]
|
[CoreBizObject]
|
||||||
WorkOrderTemplate = 36,
|
WorkOrderItemLabor = 36,
|
||||||
[CoreBizObject]
|
[CoreBizObject]
|
||||||
WorkOrderTemplateItem = 37
|
WorkOrderItemPart = 37,
|
||||||
|
[CoreBizObject]
|
||||||
|
WorkOrderTemplate = 38,
|
||||||
|
[CoreBizObject]
|
||||||
|
WorkOrderTemplateItem = 39
|
||||||
|
|
||||||
|
|
||||||
//NOTE: New objects added here need to also be added to the following classes:
|
//NOTE: New objects added here need to also be added to the following classes:
|
||||||
|
|||||||
@@ -76,6 +76,9 @@ WARNING: Since version 3.0.0, each Include will cause an additional JOIN to be a
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//CREATE
|
//CREATE
|
||||||
|
|
||||||
|
//TODO: Modify this to expect a workorder object like most POST routes for other objects
|
||||||
|
//No need for this style of create empty and return
|
||||||
|
|
||||||
//Called from route and also seeder
|
//Called from route and also seeder
|
||||||
internal async Task<WorkOrder> CreateAsync(long? workorderTemplateId, long? customerId, uint? serial)
|
internal async Task<WorkOrder> CreateAsync(long? workorderTemplateId, long? customerId, uint? serial)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace AyaNova.Models
|
|||||||
//NOTE: this could be a common class applied to everything for common biz rule stuff
|
//NOTE: this could be a common class applied to everything for common biz rule stuff
|
||||||
//i.e. specific rights in situations based on rules, like candelete, canedit etc
|
//i.e. specific rights in situations based on rules, like candelete, canedit etc
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool NonDataBaseExampleColumn { get; set; }//example of how to add a property that is not persisted but is used by both ends dynamically, should come up with a naming scheme so can see them at a glance
|
public string OP { get; set; }//Patch operation value, e.g. "add", "remove", "replace"
|
||||||
|
|
||||||
|
|
||||||
}//eoc
|
}//eoc
|
||||||
|
|||||||
@@ -28,17 +28,20 @@ namespace AyaNova.Models
|
|||||||
[JsonIgnore]//Avoid circular reference when serializing
|
[JsonIgnore]//Avoid circular reference when serializing
|
||||||
public WorkOrder WorkOrder { get; set; }
|
public WorkOrder WorkOrder { get; set; }
|
||||||
|
|
||||||
|
//dependents
|
||||||
|
public List<WorkOrderItemLabor> WorkorderItemLabors { get; set; }
|
||||||
|
|
||||||
public WorkOrderItem()
|
public WorkOrderItem()
|
||||||
{
|
{
|
||||||
Tags = new List<string>();
|
Tags = new List<string>();
|
||||||
|
WorkorderItemLabors = new List<WorkOrderItemLabor>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Not persisted business properties
|
//Not persisted business properties
|
||||||
//NOTE: this could be a common class applied to everything for common biz rule stuff
|
//NOTE: this could be a common class applied to everything for common biz rule stuff
|
||||||
//i.e. specific rights in situations based on rules, like candelete, canedit etc
|
//i.e. specific rights in situations based on rules, like candelete, canedit etc
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool NonDataBaseExampleColumn { get; set; }//example of how to add a property that is not persisted but is used by both ends dynamically, should come up with a naming scheme so can see them at a glance
|
public bool OP { get; set; }//patch operation value
|
||||||
|
|
||||||
}//eoc
|
}//eoc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user