From 7d11e0f46dabd164cc53986274bb3f77dcd3c5cb Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 22 Feb 2021 18:23:39 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 7 ------- ayanova/src/api/gzform.js | 11 ++++------- ayanova/src/views/inv-purchase-order.vue | 4 ++-- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index ea8a2231..4e5144b0 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -47,13 +47,6 @@ todo: WHEN HAVE WORKORDER FORM customer popup notes need to pop pop pop, forgot ## SERVER MISC ITEMS -todo: FormFieldReference, edit at server to be in order that is shown on form or - modify the Customize form to put them in alpha order or something, right now it is basically random (except po which I just did in order and makes more sense) -todo: OOPS, FormFieldReference has a potentially major issue: - RequiredFieldsValidator expects the FieldKey property to be the exact name of the business object property, but I've been just tossing anything in there willy nilly - Go through them all and ensure that the fieldkey is the actual biz property, not made up random nonsense and not the translation key (unless they happen to be identical) - 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 diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js index 37b56026..ccc0be3b 100644 --- a/ayanova/src/api/gzform.js +++ b/ayanova/src/api/gzform.js @@ -48,7 +48,7 @@ function isNumber(n) { function getControl(vm, ref) { let ctrl = vm.$refs[ref]; - //I don't think this is reauired anymore + //I don't think this is required anymore // if (ctrl === undefined) { // //it's either a sub field in custom fields component or it's a coding error // let customFields = vm.$refs["customFields"]; @@ -712,13 +712,10 @@ export default { //See if control templateFieldName is in server required fields collection //this is a collection of both custom field definitions and standard form fields that are required //since all names are unique can just filter out the one we need by name which will inherently ignore custom fields by default - //de-lodash - // let templateItem = window.$gz. _.find(template, [ - // "fld", - // formCustomTemplateFieldName - // ]); - let templateItem = template.find(z => z.fld == formCustomTemplateFieldName); + let templateItem = template.find( + z => z.fld.toLowerCase() == formCustomTemplateFieldName.toLowerCase() + ); if (templateItem === undefined || templateItem.hide !== true) { return true; diff --git a/ayanova/src/views/inv-purchase-order.vue b/ayanova/src/views/inv-purchase-order.vue index c1058542..8747ab46 100644 --- a/ayanova/src/views/inv-purchase-order.vue +++ b/ayanova/src/views/inv-purchase-order.vue @@ -402,8 +402,8 @@ ref="receivedCost" data-cy="receivedCost" :rules="[ - form().decimalValid(this, 'receivedCost'), - form().required(this, 'receivedCost') + form().decimalValid(this, 'Items.ReceivedCost'), + form().required(this, 'Items.ReceivedCost') ]" >