This commit is contained in:
@@ -25,14 +25,14 @@ UI FEATURE - The ability to customize forms:
|
|||||||
- During business rule validation check at backend it checks if the fields are required and have entries and returns a validation error if not exactly the same as for built in rules
|
- During business rule validation check at backend it checks if the fields are required and have entries and returns a validation error if not exactly the same as for built in rules
|
||||||
- Ideally this would be a better feature if it was everywhere, not just in a limited set of objects but rather in all substantial objects
|
- Ideally this would be a better feature if it was everywhere, not just in a limited set of objects but rather in all substantial objects
|
||||||
- Client caches the customization data when it first opens the form and then checks if it's changed when it next opens the form
|
- Client caches the customization data when it first opens the form and then checks if it's changed when it next opens the form
|
||||||
- The route that fetches the FormCustomization data needs to accept a query item that is a date or concurrency token so that
|
- The route that fetches the FormCustom data needs to accept a query item that is a date or concurrency token so that
|
||||||
if nothing has changed the server returns the unchanged code or instead returns all the data if it is changed to save bandwidth
|
if nothing has changed the server returns the unchanged code or instead returns all the data if it is changed to save bandwidth
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- Need a FormCustomization table and model to hold the user's form customization data
|
- Need a FormCustom table and model to hold the user's form customization data
|
||||||
- Only holds items that differ from stock, no "core" fields allowed
|
- Only holds items that differ from stock, no "core" fields allowed
|
||||||
- FormKey
|
- FormKey
|
||||||
- FieldKey
|
- FieldKey
|
||||||
@@ -40,11 +40,29 @@ UI FEATURE - The ability to customize forms:
|
|||||||
- Required
|
- Required
|
||||||
- Type (checkbox, date, date time, decimal, number, picklist, and text)
|
- Type (checkbox, date, date time, decimal, number, picklist, and text)
|
||||||
|
|
||||||
- Need a FormFields static collection class that contains the fields available to each form
|
- Need a FormAvailableFields static collection class that contains the fields available to each form
|
||||||
- Fields: FormKey, FieldKey (localekey), Core (bool, true means can't be hidden), IsCustom (bool, means it's one of the custom fields that can be set to type etc)
|
|
||||||
- This should be independent from any other class tied to a particular route or controller or db table as it could be some or none of all of those things
|
- This should be independent from any other class tied to a particular route or controller or db table as it could be some or none of all of those things
|
||||||
- Probably a static class that backs a route that you provide a formkey and get back this collection similar to FilterOptions classes
|
- Method: GetFields(FormKey): FormKey, FieldKey (localekey), Core (bool, true means can't be hidden), IsCustom (bool, means it's one of the custom fields that can be set to type etc)
|
||||||
|
- Method: GetForms() returns a list of form names
|
||||||
|
- Method: IsValidForm(string formKey) bool exists or not
|
||||||
|
|
||||||
|
|
||||||
|
- Need a FormCustom controller that supports routes for:
|
||||||
|
- Routes for customization form populating and receiving
|
||||||
|
- GET (formkey), gets a FormOptions object that combines the data from FormAvailableFields static class with the current custom values if any from the FormCustom table
|
||||||
|
- POST (formkey), accepts a FormCustom object that contains the users customization choices only
|
||||||
|
- Validation ensures "CORE" fields cannot be customized
|
||||||
|
- Localization changes are handled here even though they aren't part of the actual FormCustom table, so split off and separately the localized text is updated
|
||||||
|
|
||||||
|
- Routes for the day to day form display purposes that efficiently fetch the form customization to use on demand and caches at the client
|
||||||
|
- (GET formkey, token): Given a formkey and an *optional* concurrency token, returns one of the following:
|
||||||
|
- If no concurrency token or doesn't match the current db one then:
|
||||||
|
- a list of customized fields (not the non customized ones) so the client can display the UI correctly:
|
||||||
|
- Basically whatever is in the FormCustom table record for that formkey
|
||||||
|
- If concurrency token provided and is unchanged then simply returns a code 304 (NOT MODIFIED)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EXISTING v7:
|
EXISTING v7:
|
||||||
- 10 custom fields in
|
- 10 custom fields in
|
||||||
|
|||||||
Reference in New Issue
Block a user