[x] Automatic app data sync on sign in (if online; tries no matter what sign in route is taken)
[x] Manual app data sync via File menu
[x] Electron autoupdater
[x] Can be manually triggered via File menu (see TODO)
[x] Menus: Containers, lists, forms and iFrames
[x] Forms
[x] Empty form (with cloudUser and cloudCSV data)
[x] Fill out and save the form as draft
[x] Submit the form to KoboToolbox
[x] cloudUser tags replace user info
[x] cloudCSV Administrative Regions tags replace geolocation based on the local db (i.e. catchment only)
[x] cloudCSV Taxonomy tags replace with local db taxonomies (no autocomplete for select_multiple see: enketo/enketo#1301)
[x] Sync, i.e. submit, local draft forms
[x] See a local unsynced (draft) count (see TODO)
[x] Draft, i.e. locally saved draft form list
[x] Cloud, i.e. synced, form list
[x] iFrame for Dashboard
New features compared to v2:
Modules can now have icons synced from bahis-management
Massive upgrades of all dependencies (and removing mPower and other limiting deps)
New styling engine via muiv5
Kobo form styling (note: this actually influences the whole app but works quite nicely)
Simplified code
Fewer components (which all did the same stuff)
No need for Reduce (just using the React app's own state)
Form lists no longer need list definitions as we use the mui Datagrid element to provide column controls and table filtering
Deprecations compared to v2:
Translations - I have currently removed all app language controls; these should be very easy to reintroduce in a later version
Flat tables - I don't think we need flat tables for bahis-desk TBH, using the long-form table that is native to KoboToolbox and similar solutions works fine and is pretty speedy (for n<1000 at least)
TODO:
[x] MAJOR: We can't edit locally saved draft forms (see enketo/enketo#1302)
[x] MAJOR: Workflows don't work for the same reason
[x] MAJOR: And we can't open synced forms for the same reason
[x] Delete locally saved draft
[ ] Manually triggered electron updater doesn't feed a message back to the user
[ ] The local draft counter is quite slow to update (some stored state I think)
[ ] What's new should be a dismissable modal rather than the accordion - and probably DB based rather than manually typed.
[ ] Should we migrate v2 form data into this app somehow?
[ ] Add username, app version and last sync time to API calls
[ ] Add pagination to submissions API calls?
[ ] Move over to BAHIS 3 user auth and roles
[x] Check our get / post forms code handles redeployed forms in KoboToolbox? Do we need to store the specific deployment UID for submission?
[x] There is a bug where if you try to view an existing form and then go back to the form list page it breaks - this might magically solve itself if the above major issues are solved.
Dev Note
For some reason, on my linux box, I had to manually edit package.json for leaflet.googlemutant (bahis-desk/node_modules/leaflet.gridlayer.googlemutant/package.json) and change 'browser' to 'main' and delete the 'module' entry.
Dependency Changes
Tonnes!
Database Changes
Tonnes!
Checklist
[x] I have read the road86 Contribution Guide.
[x] I have checked all commit message styles match the requested structure.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have assigned at least one reviewer.
[ ] New and existing unit tests pass locally with my changes.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] My changes generate no new warnings.
[ ] I have made corresponding changes to the documentation.
DO NOT MERGE - THIS PR IS NOT FULLY FUNCTIONAL
Description
Features:
New features compared to v2:
Deprecations compared to v2:
TODO:
Dev Note
For some reason, on my linux box, I had to manually edit package.json for leaflet.googlemutant (bahis-desk/node_modules/leaflet.gridlayer.googlemutant/package.json) and change 'browser' to 'main' and delete the 'module' entry.
Dependency Changes
Tonnes!
Database Changes
Tonnes!
Checklist