Skip to content

πŸƒ Broker Cards

Display components for the broker list and detail pages.

graph LR
    BC["BrokerCard"] --> BI["BrokerIcon<br/><small>4-step fallback</small>"]
    BC --> RB["Role Badge<br/><small>πŸ‘‘ Owner Β· ✏️ Editor Β· πŸ‘οΈ Viewer</small>"]
    CBC["CashBalanceCard"] --> CF["Currency Flags<br/><small>Multi-currency rows</small>"]

🏦 BrokerCard

Displays a broker as a card in the /brokers list page.

Broker List with Cards

⚑ Features

  • BrokerIcon + name, base currency, and description
  • Cash balance display with multi-currency breakdown
  • Role badge for shared brokers:
    • πŸ‘‘ Owner β€” Full control
    • ✏️ Editor β€” Can modify
    • πŸ‘οΈ Viewer β€” Read-only
  • Quick actions: Edit (✏️), Delete (πŸ—‘οΈ), Navigate to detail page

πŸ“‹ Key Props

Prop Type Description
broker BrokerRead Broker data object
role UserRole Current user's role for this broker
cashBalances CashBalance[] Multi-currency balance data

Events: edit, delete β€” dispatched with broker ID.


πŸ’° CashBalanceCard

Displays the cash balance for a broker, broken down by currency.

⚑ Features

  • Total balance with multi-currency row breakdown
  • Color coding: green for positive balances, red for negative (overdraft)
  • Currency flags via emoji for each currency row
  • Links to cash transaction history

πŸ“‹ Key Props

Prop Type Description
balances CashBalance[] Array of { currency, amount }
baseCurrency string Broker's base currency for total

Used in: Broker detail page sidebar.