This commit is contained in:
2019-04-08 21:41:39 +00:00
parent 75291261a5
commit bb42ff0387

View File

@@ -14,106 +14,15 @@ TODO CLIENT STUFF
TODO NEXT
IMMEDIATE ISSUES:
How and where to display form errors that are unhandled on form and not related to notification, i.e. ErrorServerUnresponsive when attempting to use a form that was already open
See server project widget validation code which will now give server errors on certain values so can proceed with work.
Current issue is where to put notifications, code is to help test,
Issues:
ISSUE: need to display multiple types of messages, best way to do that??
- DONE: Local validation errors - this works and is done
- DONE: Server errors - This works and is done
- DONE: Application errors
- Notifications, stuff that you want to know is there and can go and look at but isn't urgent enough to put in the users face
- Used for notification system, non-urgent system messages, direct messages from users etc, anything that isn't immediately important
- This seems like an application wide thing so maybe a bell icon that takes to another area of the program, or opens a div at the top or bottom of the page??
ISSUE: Not sure this is the correct approach, it's needing to iterate the return error object multiple times which is a code smell
- Once to see if there are errors and another time to build up the errors
- Maybe it should be called once only as a method after the server returns the results and the gzvalidate populates a key on the data object in the form which in turn drives the error box?
FIX:
Need to test with full features, so plow ahead getting to a normal cycle of errors and then go back and fix the things that don't work later
Scenarios:
- DONE: Local form validation errors display correctly and are cleared when edited
- Server form validation errors displayed correctly
- DONE control ones under control where local form validation errors show
- DONE whole object ones at top
- DONE Server form validation errors cleared in individual inputs upon any change to them and general if it only applies to validation
- On submit:
- Doesn't happen if any local validation errors
- DONE: All server errors clear on submit
- Validation short circuits if form is loading and no data yet
- Validation short circuits if no server errors at all
DIRTY CHECKING to short circuit rule checks
inernalChange does get set to true but only on the very first actual change, later it can be false again, however this is enough for me to detect a change and remove the server rule
direct control properties when control was changed / is dirty:
=-=-=-=-
hasColor: true
hasFocused: undefined
hasInput: true
hasMouseDown: undefined
initialValue: 8212
internalChange: true
isClearing: undefined
isFocused: true
isResetting: undefined
lazySelection: undefined
lazyValue: "82121"
Same properties when control was NOT changed:
=-=-=-
hasColor: undefined
hasFocused: undefined
hasInput: true
hasMouseDown: undefined
initialValue: null
internalChange: undefined
isClearing: undefined
isFocused: undefined
isResetting: undefined
lazySelection: undefined
lazyValue: undefined
LOADING CHECKING to short circuit rule checks when form is first loading
Vuetify Inputs have a loading property, can that be used to super short circuit rule checking?
CSS??
=-=-
I need to have my own .css file that is used by the app, right now there is no styling at all anywhere but the stock one
Get broken server rule to display in vue properly
see the "bit sketchy but seems to work" bit
Ensure a form-wide server validation error displays properly
- this page has an idea along the lines of what I was thinking: https://dev-squared.com/2018/01/18/using-modelstate-validation-vue-js-net-core-2/
- Test on mobile and desktop all browsers before moving on, it must be solid with error handling (required, after before etc) and etc and then if all is well we can move on to the other field types
End to end action
- The faster I get to a fully working basic level like being able to do data entry and submit to server new or updated records, the faster I can flesh out all the rest
- Code the submit data to server route for update
- Code for new record to the server
Simulate server broken rules so can integrate into ui and rule system
- Validation
- I also need to add that it scans and or keeps a collection of broken rules that come back from the server and each component checks a rule that checks in turn for server broken rules in last api call
- My rules object needs to be coded so I can easily specify a collection of rules appropriate to a form field
- So, for example let's say I have a date input, if I commonly need one to be required and be after or before another field then I should have a single combined rule of
RequiredAndAfterTarget and this method is aggregates both the required and the After rules into a single collection returned
- Test on mobile and desktop all browsers before moving on, it must be solid with error handling (required, after before etc) and etc and then if all is well we can move on to the other field types