This commit is contained in:
2020-02-13 18:41:18 +00:00
parent c8d483ecc7
commit c2f122fca1

View File

@@ -46,6 +46,48 @@ SHELL / NAV / MENUS / LAYOUT
TODO: FILTER AT CLIENT
JSON DataListView format:
ONE string of json, not separate
Contains all columns that are relevant each as an object with various props desired to be returned in order
If a column isn't filtered or sorted or included then it isn't in the collection
Order and presence determines sort, filter, return and display order
Each column object contains it's sorted, sort order and filters collection which can be empty
Sort and filter properties are optional and can be omitted
"any" property is optional in a filter and can be omitted
UI: shows all available columns, user sets order by re-arranging and whether to include or not with a checkbox Include which defaults to true if there is any conditions on that column
Example:
DataListView JSON:
[{key:"COLUMN UNIQUE KEY ID",sort:"-" or "+",filter:{any:true/false,items:[{FILTER OBJECT SEE BELOW}]} }, {key:"second column unique key"},{...etc...}]
Filter object definition:
Has an "any" boolean property which if true means make an OR query of the conditions if more than one, if nore present or false it means AND each condition (if more than one)
filter:{any:true/false,items:[
{op:"OPERATOR",value:One of an array of strings, single string or single value of any supported type, i.e. int, decimal, bool iso8601 date etc }
]}
Filter operators:
public const string OpEquality = "=";
public const string OpGreaterThan = ">";
public const string OpGreaterThanOrEqualTo = ">=";
public const string OpLessThan = "<";
public const string OpLessThanOrEqualTo = "<=";
public const string OpNotEqual = "!=";
public const string OpNotLike = "!%";
public const string OpStartsWith = "%-";
public const string OpEndsWith = "-%";
public const string OpContains = "-%-";
public const string OpNotContains = "!-%-";
TAGS - At server if equality compare value is an array of strings then it's assumed to be tags, if it's a single value then it's regular
Sort / filter / select return columns all in one!
- This combined is a "view" or DataListView (fucking renaming again here we come! :)
- Each list has 2 default templates for fields to return etc, a table view and a picklist view
@@ -60,17 +102,27 @@ TODO: FILTER AT CLIENT
- Like a card with top part all static info, then filters below as a collection that can expand the card vertically with ADD and REMOVE buttons for each one
- In v7 user can set AND or OR query for custom more than one condition (but it applies to teh whole group, not both and and or individually)
- Sort
- Need to be able to set order for sorting
- Can view order also be sort order?
- Or maybe since viewing and querying are decoupled it makes sense that sort order and view order are also decoupled?
- Or, maybe it should always be visible if it's sorted or filtered so the user can't be like "what the fuck, why am I seeing it like this?"
- also simplicity for the ui
- View order is sort and filter order
- Visible
- Checkbox if visible which means the server returns it or not, visible maybe not correct word here
- This way the user can customize the grid all in one savable setting
- Grid defaults to last "View" that was in use
- REPORTS
- Report object has following properties:
- DataList name it's based off of
- Required fields from DataList
- Report template itself with it's own code and template requirements TBD
- Report columns returned: When user selects to show a report, client will fixup any missing columns from the datalistview currently in use
- For example they are viewing a table based on a TestWidgetDataList DataListview with only 3 columns in it
- They drop down the reports list which shows all reports based off TestWidgetDataList view
- They select a report to print.
- Report code looks at report's required fields from DatalistView and sees report uses 6 fields listed
- Code compares report fields to in use DataListview fields and appends any report required fields missing from current view to the right of the collection in the current DataListview
- When report is run it will have all fields this way returned but will still be sorted and filtered by table view
- As part of editing process user can select an existing datalistview to prime their report editing view
- A report can be selected from any client table that is based on the same view
- MINI code is not right:
- right now it produces a single column header but can contain multiple columns of data