feat: two-step staging upload + multi-page PDF person inheritance

- Add stage/process-staged/remove-staged endpoints for batch upload workflow
- Add staging gallery UI with thumbnail previews and per-image removal
- Inherit person info & doc fields from page 1 for multi-page PDFs
- Auto-link page 2+ to same person on confirmation
- Show info banner on review page for multi-page documents
- Exclude staged docs from stats counters
This commit is contained in:
Georges Haddad
2026-04-11 17:09:48 +03:00
parent 1b6d5543a6
commit 3b3bcf2cf2
6 changed files with 446 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ async def document_queue(request: Request, status: str = "", uploaded: int = 0):
SUM(CASE WHEN status='extracted' THEN 1 ELSE 0 END) AS pending_review,
SUM(CASE WHEN status='pending' THEN 1 ELSE 0 END) AS processing,
SUM(CASE WHEN status='error' THEN 1 ELSE 0 END) AS errors
FROM documents"""
FROM documents WHERE status != 'staged'"""
).fetchone()
return templates.TemplateResponse(