This commit is contained in:
2021-02-20 16:07:56 +00:00
parent 827ed22ff1
commit bd115b679b
2 changed files with 11 additions and 7 deletions

View File

@@ -52,6 +52,7 @@ todo: OOPS, FormFieldReference has a potentially major issue:
the FieldKey should exactly match the Model definition of that property
todo: child collection items error / rule / customization handling
All commented in with //TODO: CHILD COLLECTION MOD
Currently not supported but should be when get to wo it will be a beast without this
users will need to hide child items, set required on them and see errors from server on them
RESOLUTION:
@@ -59,14 +60,15 @@ todo: child collection items error / rule / customization handling
where ParentCollectionName is exactly the same as the Model collection property name and
FieldName is exactly the same as the child collection objects Model property name
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)
Update client form server errors handler to handle indexed child collection like that and report error on row and in popup edit form
Update client form to display error in data table read only display somehow (can't be hover due to mobile so other way)
maybe just red row to indicate has errors with some non color secondary indicator, they open and the edit form shows the exact error on the field
e.g in validation error field name would be "poitems.vendorpartnumber" to indicate poitems collection vendorpartnumber field and set childitems index property (new) to 3 to indicate 4th row (0based)
Update ValidationError.cs class, add index property and use it for above
Update BizObject.cs add error methods that include index for use with indexed collection item errors
Update client gzform.cs server errors handler to handle indexed child collection like that and report error on row and in popup edit form
Update client po items form to display error in data table read only display somehow (can't be hover due to mobile so other way)
maybe just red row to indicate has errors with some non color secondary indicator, they open and the edit form shows the exact error on the field
Update client po edit poitem form input controls, use regular biz rule error from server handling but use the compound key name for the item e.g. "poitem.vendorpartnumber"
Update form customization form at client to group together the child collection items and maybe indicate the collection name above or in a group
so all poitem fields grouped in UI apart from header form fields
Update all child form collections, use regular biz rule error from server handling but use the compound key name for the item e.g. "poitem.vendorpartnumber"
todo: tax codes, taxable objects
Biz rules updated to prevent tax value changes to any of the following fields once it's been used on any item that has tax codes
@@ -191,7 +193,8 @@ todo: test inventory affecting ops
reversals, updates, deletes etc
todo: test default tax codes are set
todo: test form customization hide child collection items
also test required rule and server errors display correctly / clear when updated
todo: test required rule and server errors display correctly / clear in both poitems table row and in edit form for poitem when opened
make up fake rules if necessary just to confirm the new child collection error handling works

View File

@@ -757,6 +757,7 @@ export default {
// This is required so that server errors can be cleared when input is changed
// formReference is an optional string name of the form ref property if alternative named form
fieldValueChanged(vm, ref, formReference) {
//TODO: CHILD COLLECTION MOD add error version for indexed child
let that = this;
let formControl = null;
if (formReference == undefined) {