Document Review

Full-screen document review interface for the internal team. Part of the Document Obtaining workflow — team members review documents uploaded by customers through the Portal.

Architecture

LayerLocation
Review pagefrontend/src/pages/internal/DocumentReviewDetail.tsx
Componentsfrontend/src/components/document-review/ (7 files: ReviewLayout, PdfViewer, ActionsSection, ApplicantSection, ChecklistSection, RejectionSection, StatusSection)
Rejection settingsfrontend/src/pages/internal/RejectionReasonsSettings.tsx
Rejection bundle processorbackend/src/lib/jobs/processors/rejection-bundle.ts (BullMQ)

Review Workflow

Customer uploads document via [[Portal]]
  --> Fulfillment created (documentObtainingFulfillments, fileId FK into CAS)
  --> Assigned to reviewer (assignedDepartmentId + reviewerId on the request batch)
  --> Reviewer opens full-screen review interface
  --> Approve or Reject with reasons
  --> If rejected: rejections bundled (10-min window) into one consolidated email
      via the rejection-bundle BullMQ processor, re-upload requested

Since the files-collection-canonical work (PR#1752), uploaded documents enter the canonical file chain (collection → member → version); document obtaining writes that chain on upload as of PR#2005, with a fulfillment-chain-reconciliation job backfilling stragglers.

Review Interface

The DocumentReviewDetail page provides:

  • Full-screen document viewer (PDF, images)
  • Side panel with document metadata and history
  • Approve/reject action buttons
  • Rejection reason selection (from admin-configured list)
  • Review checklist tracking

Rejection System

ConceptPurpose
Rejection reasonsAdmin-configurable list (documentObtainingRejectionReasons table, with active toggle + sort order)
Rejection bundlesdocumentObtainingRejectionBundles — rejections within a 10-minute window are consolidated into one customer email by the rejection-bundle BullMQ processor
Rejection historyTrack all review decisions per document

Rejection reasons are managed at frontend/src/pages/internal/RejectionReasonsSettings.tsx, accessible from the Admin Dashboard.

Review Checklist

The documentObtainingReviewChecklistResults table tracks criteria that must be verified during review. Each document type can have different checklist items that the reviewer must confirm before approval.

Document Templates

Document templates (and their filters) are baselined from staging into local/preview/development via an atlas migration (PR#1789); mock data no longer touches them.