From bd115b679b63fee4a72a892b4e98aafb76d16e22 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 20 Feb 2021 16:07:56 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 17 ++++++++++------- ayanova/src/api/gzform.js | 1 + 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index b4deada8..64f60ba4 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -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 diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js index 56599b5d..0a08e84f 100644 --- a/ayanova/src/api/gzform.js +++ b/ayanova/src/api/gzform.js @@ -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) {