📍 Page Location
URL: /dashboard/authenticated
📸 Visual Representation of the Page
My Contracts
| Contract ID | Product | Value | Status | Actions |
|---|---|---|---|---|
| contract-001 | Wheat | $2,627,500 | PENDING SUPPLIER CONFIRMATION |
🎨 Detailed Visual Description
Contract shows "COMPLETED" status in green. Payment status shows "Payment Received: 100% (30% from pool + 70% financed)". Document section shows list of uploaded documents with download links. Documents are accessible from /uploads/contracts/{contractId}/ directory. Each document shows: filename, upload date, file size, download button.
Key Visual Elements:
- Completed status
- Payment confirmation (100% received)
- Document list with download links
- Document storage location display
- Transaction history
⚙️ Backend Process
API Endpoint: GET /api/contracts/:contractId/documents, GET /api/contracts
Process Flow:
1. Returns contract with status "completed"
2. Queries database.documents for all contract documents
3. Returns document metadata: id, filename, path, size, uploadedAt
4. Document files accessible from: /uploads/contracts/{contractId}/{timestamp}-{filename}
5. Shows payment history: 30% from pool, 70% financed
6. Includes all transaction recordsDatabase Operations:
- Table:
database.contracts, database.documents, database.transactions - Action: Query completed contract with documents. Documents stored in /uploads/contracts/{contractId}/ directory.
➡️ Next Action
Contract completed! Supplier can download documents and view transaction history. Documents remain stored in /uploads directory.