This commit is contained in:
2018-11-29 01:10:29 +00:00
parent 6e99dee09b
commit ca1cfe752f
13 changed files with 709 additions and 15 deletions

View File

@@ -12,8 +12,8 @@ Filter is constructed from an FILTEROPTIONS object fetched from the server list
- e.g.: {list:"widget",fields:[{fld:"name",lt:"WidgetName",type:"text"},{fld:"dollarAmount",lt:"WidgetDollarAmount",type:"currency"}]}
Certain types have extended abilities, for example dates have the classic floating AyaNova date ranges pre-defined or specific dates
Filters are saved to the database:
- Filter: Name, UserId, List, Filter (Json string) (column names to be determined)
- i.e. "My widget filter", 1, "widget", "[{fld:"name",comparisonoperator:"Like",value:"Bob*"},{fld:"tags",comparisonoperator:"Eq",value:"[23,456,54]"}]
- Filter: Name, OwnerId, Public, ListKey, Filter (Json string) (column names to be determined)
- i.e. "My widget filter", 1, true, "widget", "[{fld:"name",comparisonoperator:"Like",value:"Bob*"},{fld:"tags",comparisonoperator:"Eq",value:"[23,456,54]"}]
- means all widgets that start with the name "Bob" and are tagged with tags with id values 23, 456 and 54
Upon user selecting a filter to use the list query string has the regular paging info but also the filter id as a query parameter
- Server loads the filter if it's public or has the user ID if it's personal only
@@ -25,9 +25,15 @@ Upon user selecting a filter to use the list query string has the regular paging
LIST FILTERING TODO
- Implement this with widget list first
- Add Filter table and models and route to save, edit
- Add API route to widget list that returns the FILTEROPTIONS object as outlined above
- Add DataFilter table and models and route to save, edit
- Add listkey property to list??
- Add API route to widget list that returns the FILTEROPTIONS object as outlined above
- Just a dynamic object really, no need for objects to model it I don't think as it's a one way server to client thing and doesn't need parsing or anything
- Add a list route that accepts the current paging options and also a filter id
- A method that can take the list of field filter values and the field types and construct an sql query from it
- Tests for all of the above (particularly the query builder because that was a bitch with v7)
- Client side
- Implement filter editor dialog

View File

@@ -5,7 +5,10 @@ Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNTQyNjY5Njc3IiwiZXhwIjoi
## IMMEDIATE ITEMS
SERVER SCHEMA
- Add unique constraint to all name columns in all tables in ayschema and run tests (how did I miss that before??)
- See datafilter schema code (note that it will increase the index count by one)
- http://www.postgresqltutorial.com/postgresql-unique-constraint/
@@ -75,8 +78,6 @@ INITIAL TESTING NOTES: