Skip to content

Feat 335 admin tools - #339

Open
mohammadsherif0 wants to merge 7 commits into
devfrom
feat-335-admin-tools
Open

Feat 335 admin tools#339
mohammadsherif0 wants to merge 7 commits into
devfrom
feat-335-admin-tools

Conversation

@mohammadsherif0

Copy link
Copy Markdown
Collaborator

Summary

Adds an admin-only Admin Tools dashboard page (Settings nav) with a first tool to replace an existing document’s PDF or ZIP file on disk while keeping the same document id/hash. Intended for correcting a wrong submission file after the submission is closed.

New User Features

  • Admin Tools page under Settings (admin_tools), admin-only nav entry
  • Replace document file modal: type filter, search, paginated selectable table (10/page), upload replacement file
  • Tool modal mounts only while open (lazy v-if) so document subscription is not loaded until needed

New Dev Features

  • nav_element migration for Admin Tools (component: AdminTools, path admin_tools)
  • Socket documentReplaceFile (admin-gated, transactional): validates PDF/ZIP type match, for PDFs clears CARE annotations/comments and best-effort strips embedded PDF annotations via PDFRPC, then overwrites files/{hash}.{pdf|zip}

Known Limitations

  • If PDFRPC strip fails, the raw uploaded PDF is written instead
  • No “import annotations from replacement PDF” option

Future Steps / open questions for review

  • Clearing old CARE annotations: Keep always wiping CARE annotations/comments on PDF replace, or make it optional?
  • Optional later: import-annotations checkbox on replace similar to upload Document
  • Optional later: server-side document paging for very large admin document lists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant