This commit is contained in:
2020-02-25 19:01:24 +00:00
parent dab7b6fdad
commit a760f9dea9

View File

@@ -42,71 +42,15 @@ CURRENT ROADMAP
CURRENT TODOs
=-=-=-=-=-=-=
todo: datalistview editor
- showing options for wiki and attach etc, not required need to add override in gzmenu
TODO: DataTable need a no results display to make it clear it hasn't just bombed or something on no results
TODO: CACHE dataListAvailable Fields at least on one temporary cache for most current
- This is because the listview editor needs it and if a user is flipping back and forth between
the datatable and the filter getting it just right they will be triggering a fetch over and over
TODO: In DELETE USER server code must delete listviews as well that are not public for that user
TODO: duplicate code unique name at server shows datetime as UTC, find alternative scheme that doesn't do that and is shorter
- Maybe tries to append unique digit counting up until it finds one not in use and returns that?
UNSAVED STATUS IN EDITOR
If start with saved filter, as long as user is editing it keeps same name until they leave without saving then it becomes unsaved with -1 id
- So while in edit form can save or not their choice
- If leave without saving converts to unsaved filter at that moment so back at datatable form it shows as unsaved filter
- No prompt to save? Or change text to say will continue as unsaved filter
- How to cancel changes then?
ListViewEditor
- Edit list view, can also duplicate to create fresh one
- gets listviewid and datalistkey on route
- INIT
- First GET DataListFields for the DataListKey from DataList ListFields route (query string DataListKey value supplied )
- This is the pool of available fields
- Second get the ListView that is currently in use so can setup the page view
- If listviewid is zero then that's starting with the default list view so need to fetch it and then init the form
- If listviewid is -1 then that's staring with an unsaved listview so get that from the saved form store
- If listviewid is greater than 0 then it's a saved listview and there sb a cached version of it but ideally maybe fetch it from
- Third: Make up the working copy array that the UI is tied to
- Fourth: when the working copy array changes that should trigger the UI to draw accordingly
- Editing
- Editable fields: Name, Public, ListView
- Default fields: UserId, ListKey
- any changes to UI objects affects working copy
- Also the cached listview stuff needs to be changed so if user leaves form and goes back the changes are immediately seen in the datatable
- Put unsaved listview into formsettings and set id to -1
- Any field set to a filter or sort is also autoamtically visible and can't be set invisible
- Each field has optional array of filters
- Each field has optional sort toggle plus minus or unsorted (could use icons for this)
- Saving
- process working copy to generate a ListView suitable to save and save it
- Dont' include items not set to visible
- On save set formsettings listviewid to whatever the id is and put listview into temp cache and clear out unsaved listview
- duplicate
- Make a listview and save under new duplicate name or however Widget was coded (makes a default then user changes name I guess)
- set formsettings listviewid to duplicates new id and clear out formsettings unsaved listview and put formsettings listivew into cache
- delete
- Remove listview from server, fixup local formsetting to use default listview and id 0
- WORKING COPY ARRAY FORMAT
- Need all fields available in it.
- Each field is in order determined in UI (user can re-arrange order so need UI method called with circular buffer)
- Each field has
- visible property
- filter array (optional)
- Sort property -+ (optional)
GZFORM FORMSETTINGS RELATED TO DATALISTVIEW
- formSettings.saved.dataTable.{listViewId:[0 if none or else the last saved view id selected], unsavedListView:[edited but unsaved listview json, only if listviewId=0]}
- formSettings.temp.cachedListView - temporary cached version of listview that was saved at server but only if saved listviewId is non-zero
TODO: have a think about fouralarmfire's situation with crazy high id numbers, do we want to import them as that or...?
- thought of adding a single letter scheme to them to reset or something