This commit is contained in:
@@ -9,75 +9,53 @@ MISC ITEMS THAT CAME UP
|
||||
|
||||
LISTVIEW REPLACE CURRENT <----HERE not THERE ---v
|
||||
(below this is all past for reference)
|
||||
FILTER
|
||||
Very similar to columnview in that it's saved at the server then triggers a refresh and server handles from local copy
|
||||
/*
|
||||
OLD EXAMPLE:
|
||||
{"offset":0,"limit":10,"dataListKey":"CustomerDataList",
|
||||
"listView":"[
|
||||
{\"fld\":\"customername\",\"sort\":\"+\",\"filter\":{\"items\":[{\"op\":\"=\",\"value\":\"dfdfdf\"},{\"op\":\"=\",\"value\":\"3333\"}],\"any\":true}},
|
||||
{\"fld\":\"customerphone1\",\"filter\":{\"items\":[{\"op\":\">\",\"value\":\"44444\"},
|
||||
{\"op\":\"<\",\"value\":\"7777\"}]}},
|
||||
{\"fld\":\"customeremail\"}
|
||||
{\"fld\":\"customerheadoffice\"},
|
||||
{\"fld\":\"customertags\",\"sort\":\"+\"}]"}
|
||||
|
||||
NEW:
|
||||
columns:["PartInventoryTransactionEntryDate","PartPartNumber","PartWarehouseName","PartInventoryTransactionQuantity","PartInventoryTransactionDescription","PartInventoryTransactionSource","PartInventoryBalance"]
|
||||
sortBy:[{"PartInventoryTransactionEntryDate":"-"}],//All sorted columns here as keyvalue pairs value is a string of "+" for ascending "-" for descending and are IN ORDER of how to be sorted
|
||||
filter:[{column:"PartPartNumber",any:true/false,items:[{op: "=",value: "400735"}]}],
|
||||
clientCriteria:"2" //could be anything here that makes sense to the list, in this case an example customer id for customernotedatalist
|
||||
|
||||
CURRENTLY IN BUILDER:
|
||||
editItemFilter:{ "any": true, "items": [ { "op": "=", "value": "*thisweek*", "display": "= Week - Current", "token": true }, { "op": "=", "value": "*lastmonth*", "display": "= Month - Previous", "token": true } ] }
|
||||
|
||||
|
||||
columns are represented in a higher level object DataListTableOptions
|
||||
sort and filter are in here
|
||||
|
||||
columns and sort are a singleton per datalistkey,userid persisted automatically (no alternative "views" just one of these). User can set them or reset them to default.
|
||||
filter is different: user can persist a filter by name for future selection, sharing with others (public). The default filter is no filter.
|
||||
*/
|
||||
TODO (round 1):
|
||||
|
||||
CLIENT
|
||||
Implement filter UI to construct local filter object that is temporary and stored in session state
|
||||
doesn't have to do anything specific yet, just handles the filtering into an object for the next stage
|
||||
Construct a filter string json in the format easiest to consume at server
|
||||
FilteredColumns array so can show in UI properly or computed and constructed from cached local filter for this list
|
||||
TODO (now)
|
||||
|
||||
CLIENT
|
||||
Filter manager - implement RESET functionality
|
||||
maybe delete is the reset? Just shows reset but actually calls delete route same
|
||||
server handles as reset situation instead of outright delete
|
||||
|
||||
Implement code to ensure default filter is selected when no last filter in session
|
||||
store last filterid in session if not already so survives a full page refresh?
|
||||
Implement code to load saved filters, refresh them on edit in filtermanager
|
||||
|
||||
Implement filter buttons for mobile mode
|
||||
Need filter drop down to select which columns to filter which triggers opening regular filter items
|
||||
Needs also to show a filter beside "headings" which are filtered so it's known
|
||||
Or maybe if it's not too ugly filter on each one, nahh theres no room I think
|
||||
|
||||
Translation keys
|
||||
Add the missing keys to server or find a suitable one to use
|
||||
pore over the translation keys in the filter manager, datatable and filter control
|
||||
there are definitely some extra ones in there
|
||||
|
||||
Mobile view
|
||||
why does it not switch when switch widths and have to reset?
|
||||
slowness
|
||||
Why does initial grid load on full refresh go so slowly?
|
||||
|
||||
|
||||
SERVER
|
||||
DataListSqlFilterCriteriaBuilder - modify to handle date tokens using client timestamp (old filter code already put back in comment form)
|
||||
API docs - at least remove the outdated stuff if not outright replacing it
|
||||
maybe no need to document the listview shit, let people figure it out if they have to, seems like something we don't need to push out there
|
||||
|
||||
TODO (round 2):
|
||||
Send to server (as unsaved filter, not dealing with saving just yet) with datalist request and get back filtered data
|
||||
|
||||
|
||||
todo (after)
|
||||
Test TEST **TEST**
|
||||
Test all column types are properly filterable including ENUMS
|
||||
Clean up the server and client code including the wierd props not being used set on all list forms etc
|
||||
get rid of the countless commented out lines that are now irrelevant and will just cause confusion in future
|
||||
|
||||
Remove the backup copy of the old listview manager
|
||||
Look for "listview" and get rid of it
|
||||
|
||||
todo(round 3):
|
||||
Saveable filters etc
|
||||
add "unsaved filter" to ddlist and value is always local filter
|
||||
add "save" button etc kind of like v7 when it's an unsaved filter only or edit I guess if it's an existing one
|
||||
these open a filter Create / Delete / saveas I guess UI
|
||||
|
||||
|
||||
|
||||
|
||||
Customers
|
||||
Filter
|
||||
-
|
||||
{ "headers": [ { "text": "", "sortable": false, "width": "1px", "value": "data-table-select" },
|
||||
{ "text": "Customer name", "fk": "customername", "value": "columns.c0", "align": "start" },
|
||||
{ "text": "Business", "fk": "customerphone1", "value": "columns.c1" },
|
||||
{ "text": "Email", "fk": "customeremail", "value": "columns.c2" },
|
||||
{ "text": "Head Office", "fk": "customerheadoffice", "value": "columns.c3" },
|
||||
{ "text": "Web Address", "fk": "customerwebaddress", "value": "columns.c4" } ],
|
||||
"options": { "page": 1, "itemsPerPage": 10, "sortBy": [ "columns.c2" ], "sortDesc": [ false ],
|
||||
"groupBy": [], "groupDesc": [], "mustSort": false, "multiSort": true }, "mobile": false, "showGroupBy": false,
|
||||
"someItems": false, "everyItem": false, "singleSelect": false, "disableSort": false }
|
||||
|
||||
.......
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user