This commit is contained in:
2021-04-15 17:37:53 +00:00
parent c333da5574
commit d890b63d27
5 changed files with 23 additions and 4 deletions

View File

@@ -193,7 +193,7 @@ namespace AyaNova.Biz
{
//Note: this is intentionally not using the getasync because
//doing so would invoke the children which would then get deleted on save since putobject has no children
WorkOrder dbObject = await ct.WorkOrder.AsNoTracking().FirstOrDefaultAsync(z=>z.Id==putObject.Id);
WorkOrder dbObject = await ct.WorkOrder.AsNoTracking().FirstOrDefaultAsync(z => z.Id == putObject.Id);
if (dbObject == null)
{
AddError(ApiErrorCode.NOT_FOUND, "id");
@@ -1129,6 +1129,13 @@ namespace AyaNova.Biz
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderId");
}
//TEST TEST TEST
if (proposedObj.Notes.Contains("₿"))
{
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "notes", "HODL!");
}
//Check state if updatable right now
if (!isNew)
{
@@ -2913,6 +2920,16 @@ namespace AyaNova.Biz
{
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
}
//TEST TEST TEST
if (proposedObj.EstimatedQuantity == 69)
{
//`Items[${activeWoItemIndex}].scheduledUsers[${activeItemIndex}].estimatedQuantity`
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, $"Items[{0}].ScheduledUsers[0].EstimatedQuantity", "◈◈ TEST HODL!! ◈◈");
}
//Check state if updatable right now
if (!isNew)
{