Step 3 of 9

Step 3: Trader Dashboard - Dual View

Trader sees all contracts where they are involved as either buyer or supplier.

📍 Page Location

URL: /dashboard/authenticated

📸 Visual Representation of the Page

Step 3: Trader Dashboard - Dual View
TRADER🔔 Notifications

My Contracts (Dual Role)

Contract IDMy RoleProductStatusActions
contract-001BUYERWheatPENDING DEPOSIT
contract-002SUPPLIERRicePENDING 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 information

Database Operations:

  • Table: database.contracts
  • Action: Query trader contracts (both roles)

➡️ Next Action

Trader can act as buyer or supplier per contract