Document Management
Overview
Document Management provides file upload, storage, preview, and download capabilities across all screens that support attachments. This is a reusable component available wherever records require supporting documentation.
Features
| Feature | Description |
|---|---|
| Upload | Attach files via drag-and-drop or file picker |
| Preview | View images and PDFs inline without downloading |
| Download | Save files to local machine |
| Delete | Remove attached documents |
Supported File Types
| Category | Extensions |
|---|---|
| Documents | PDF, DOC, DOCX, TXT |
| Spreadsheets | XLS, XLSX, CSV |
| Images | JPG, JPEG, PNG, GIF |
Maximum file size: 25 MB
Where It Appears
| Screen | Entity | Use Case |
|---|---|---|
| Cash Worksheet | cash_receipt_worksheet | Supporting receipts, correspondence |
| Write-Off Packet | write_off_packet | Collection logs, client communications |
| Receivables | packet_receivable | Receivable-specific documentation |
UI Components
Document Section
Header: Shows document count and upload button
File List:
- File icon (based on type)
- File name
- File size + upload date
- Actions: Preview, Download, Delete
Preview Modal
- Inline image display
- PDF iframe viewer
- Close button
Storage
Files are stored in S3 with database records tracking:
- Original filename
- File size
- MIME type
- S3 URL / file path
- Upload timestamp
- Uploader user ID
Business Rules
| Rule | Description |
|---|---|
| Size Limit | Files over 25 MB are rejected |
| Type Validation | Only allowed extensions accepted |
| Entity Linking | Each file linked to exactly one entity |
| Read-Only Mode | Upload/delete disabled when entity is locked |
See Also
| Document | Relationship |
|---|---|
| Write-Offs | Packet documents for audit |
| Cash Management | Worksheet documents |