Resolve "Drafts Feature"
Closes #248
At this moment,
My drafts/submissions
- means the submissions which is created and/or submitted by me as a creator, proxy or re-submitter.
Features implementation
Below features are supported in the My submissions
and Survey detail
page
- Manage your drafts
- You can search your drafts by survey or location
- You can submit (for only ready for submit), continue, upload, download, export (json + pdf) or delete your drafts
- Manage your submissions
- You can search your drafts by survey, type (creator, proxy, re-submitter) or the archive status.
- You can resubmit, delete, archive, restore, export the submissions as long as you're the creator of the submission or admin of the submission group.
Click the status chip to make filter easily.
Code implementation
- Created two store modules (
myDrafts.store.js
andmySubmissions.store.js
) to manage all of my drafts and submissions - Added endpoint for
drafts
collection - Refactored
My submissions
page and its contents - Fixed the bug that
Restore
andDelete
submission buttons are not showing on the survey detail page (it was implemented already but didn't worked so far) - Cleaned up and refactored
db
module - Cleaned up
routers
of client app - Upgraded some packages to fix the broken
eslint
Edited by Martin Feng