This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Routing;
|
using Microsoft.AspNetCore.Routing;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ namespace AyaNova.Biz
|
|||||||
_errors.Add(new ValidationError() { Code = errorCode, Message = errorMessage, Target = propertyName });
|
_errors.Add(new ValidationError() { Code = errorCode, Message = errorMessage, Target = propertyName });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//TODO: CHILD COLLECTION MOD add error version for indexed child
|
||||||
|
|
||||||
// //Add a bunch of errors, generally from a child object failed operastion
|
// //Add a bunch of errors, generally from a child object failed operastion
|
||||||
// public void AddErrors(List<ValidationError> errors)
|
// public void AddErrors(List<ValidationError> errors)
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -638,7 +638,7 @@ namespace AyaNova.Biz
|
|||||||
l.Add(new FormField { TKey = "PurchaseOrderCustom15", FieldKey = "PurchaseOrderCustom15", IsCustomField = true });
|
l.Add(new FormField { TKey = "PurchaseOrderCustom15", FieldKey = "PurchaseOrderCustom15", IsCustomField = true });
|
||||||
l.Add(new FormField { TKey = "PurchaseOrderCustom16", FieldKey = "PurchaseOrderCustom16", IsCustomField = true });
|
l.Add(new FormField { TKey = "PurchaseOrderCustom16", FieldKey = "PurchaseOrderCustom16", IsCustomField = true });
|
||||||
|
|
||||||
//Items
|
//Customizable child Items
|
||||||
l.Add(new FormField { TKey = "PurchaseOrderReceiptReceivedDate", FieldKey = "Items.ReceivedDate" });
|
l.Add(new FormField { TKey = "PurchaseOrderReceiptReceivedDate", FieldKey = "Items.ReceivedDate" });
|
||||||
l.Add(new FormField { TKey = "PurchaseOrderItemPartRequestedByID", FieldKey = "Items.PartRequestedById" });
|
l.Add(new FormField { TKey = "PurchaseOrderItemPartRequestedByID", FieldKey = "Items.PartRequestedById" });
|
||||||
l.Add(new FormField { TKey = "PurchaseOrderItemWorkOrderNumber", FieldKey = "Items.WorkorderItemPartRequestId" });
|
l.Add(new FormField { TKey = "PurchaseOrderItemWorkOrderNumber", FieldKey = "Items.WorkorderItemPartRequestId" });
|
||||||
|
|||||||
@@ -36,6 +36,12 @@ namespace AyaNova.Biz
|
|||||||
// if (!string.IsNullOrWhiteSpace(FF.PropertyName))//this used to work because there would be no property name but now there is so it doesn't
|
// if (!string.IsNullOrWhiteSpace(FF.PropertyName))//this used to work because there would be no property name but now there is so it doesn't
|
||||||
if (!FF.IsCustomField)
|
if (!FF.IsCustomField)
|
||||||
{
|
{
|
||||||
|
//TODO: CHILD COLLECTION MOD
|
||||||
|
/*
|
||||||
|
Update RequiredFieldsValidator to look for these period seperated items and navigate through teh collection by name / reflection to step through children and flag errors to include parent
|
||||||
|
e.g in validation error field name could be "poitems.vendorpartnumber:3" to indicate poitems collection 4th row has error in vendorpartnumber
|
||||||
|
or perhaps it makes sense to add a seperate INDEX property to make client processing easier and not a colon:index scheme in the field name (that actually makes more sense)
|
||||||
|
*/
|
||||||
//Now get the actual property name from the available fields using the lt key
|
//Now get the actual property name from the available fields using the lt key
|
||||||
string RequiredPropertyName = FF.FieldKey;
|
string RequiredPropertyName = FF.FieldKey;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace AyaNova.Biz
|
namespace AyaNova.Biz
|
||||||
{
|
{
|
||||||
|
//TODO: CHILD COLLECTION MOD add "Index" property to indicate child collection index location of error
|
||||||
public class ValidationError
|
public class ValidationError
|
||||||
{
|
{
|
||||||
public ApiErrorCode Code { get; set; }
|
public ApiErrorCode Code { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user