Skip to content
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

feat(forms): adds ability to export forms #5739

Merged
merged 7 commits into from
Jan 29, 2025
Merged

Conversation

whitdog47
Copy link
Contributor

This pull request introduces new features that allow users to export incident forms and bulk delete forms within the Forms tab.

Key Changes:

  1. Backend Enhancements:

    • Added a new function get_project_forms_export_template in src/dispatch/document/service.py to fetch the project forms export template.
    • Updated the create function to handle the special case of only allowing one forms export document per project.
    • Introduced a new export function in src/dispatch/forms/service.py to handle the export logic, including grouping forms by project ID and ensuring necessary plugins are active.
    • Added a new endpoint /export in src/dispatch/forms/views.py to trigger the export process.
  2. Frontend Enhancements:

    • Added new components BulkEditSheet, DeleteBulkDialog, and ExportFormsDialog to handle bulk actions, including export and delete dialogs.
    • Updated TemplateTable.vue and store.js to include the new forms export template type.
    • Modified the forms api.js to include new methods exportForms and bulkDelete for API interaction.
    • Enhanced Table.vue to integrate the bulk edit sheet and export dialog functionalities.
  3. UI/UX Improvements:

    • Project managers and above can now select multiple forms and choose to export them via a new export dialog.
    • Project managers and above have the ability to bulk delete selected forms through a dedicated delete dialog.
    • Added visual feedback for export progress and success, including links to the exported folders.
Screen.Recording.2025-01-28.at.12.04.12.PM.mov
Screenshot 2025-01-28 at 12 16 24 PM

@whitdog47 whitdog47 added the enhancement New feature or request label Jan 28, 2025
@whitdog47 whitdog47 requested a review from aaronherman January 28, 2025 20:17
@whitdog47 whitdog47 self-assigned this Jan 28, 2025
@whitdog47 whitdog47 merged commit 2431406 into main Jan 29, 2025
9 checks passed
@whitdog47 whitdog47 deleted the enhancement/export-forms branch January 29, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants