-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display a list of forms after a user has logged on #227
Comments
This sounds something like a "recent activity" feature. It's reasonable and straightforward to implement. Not all admins may want it, so we can make it a config like RECENT_ACTIVITY_ENABLED, which should default to False. https://github.com/signebedi/libreforms-fastapi/blob/master/libreforms_fastapi/utils/config.py. Then, we want to modify the home jinja2 template. Currently, the template is very straightforward, and to add this we will need to add some javascript. https://github.com/signebedi/libreforms-fastapi/blob/master/libreforms_fastapi/app/templates/home.html.jinja. The template has access to the config object, so you can access the config we set above as Then, we want to pull the API data using Ajax (the endpoint will be /api/form/read_all) and render ~5 of the most recent changes in a data table, see eg. below.
You will want to pass the libreforms-fastapi/libreforms_fastapi/app/__init__.py Lines 1066 to 1073 in e1c8132
@wcj365 Want to take a stab at a PR for this feature? |
[api] Allow sorting of read_all by last_edited date |
We'll leave in pagination to the datatable for now, but it may make sense to remove that option from the UI datatable down the road. The broader question is whether we should be able to set the length read_all API call as a param. |
[api] [form] Add set_length int param to read_all API endpoint |
After a user logs on.
Display a list of all forms that the user has saved/submitted.
Show key fields including date created, last modified, status)
Include a link to the form so user can directly access the form and make updates.
The text was updated successfully, but these errors were encountered: