📍 Page Location
URL: /dashboard/authenticated
📸 Visual Representation of the Page
Step 3: Trader Dashboard - Dual View
TRADER🔔 Notifications
My Contracts (Dual Role)
| Contract ID | My Role | Product | Status | Actions |
|---|---|---|---|---|
| contract-001 | BUYER | Wheat | PENDING DEPOSIT | |
| contract-002 | SUPPLIER | Rice | PENDING CONFIRMATION |
🎨 Detailed Visual Description
Dashboard shows contracts with "My Role" column indicating "Buyer" or "Supplier". Each contract shows appropriate action buttons based on trader role in that contract. "Dual Contract" button available for managing both sides.
Key Visual Elements:
- Dual role display
- Role-based actions
- Dual contract management
⚙️ Backend Process
API Endpoint: GET /api/contracts
Process Flow:
1. Queries contracts where trader email appears in buyerEmail OR supplierEmail
2. Returns all trader contracts
3. Enriches with role informationDatabase Operations:
- Table:
database.contracts - Action: Query trader contracts (both roles)
➡️ Next Action
Trader can act as buyer or supplier per contract