- Established the P0 scaffolding for the frontend, including login, layout, and routing for four roles. - Integrated the Customer Wealth Dashboard, Advisor Clients Dashboard, Analyst Market Dashboard, and Risk Alerts Dashboard. - Updated the API client to support fetching customer and product data, enhancing the overall functionality of the dashboard. - Added error handling components to improve user experience during data fetching. - Enhanced charting capabilities using Ant Design Charts for better data visualization. This update lays the groundwork for further development of the frontend application, ensuring a robust structure for future features and integrations.
18 lines
415 B
TypeScript
18 lines
415 B
TypeScript
import type { HoldingRow, ProductNav } from './dashboardTypes'
|
|
|
|
export function mergeHoldingsWithNav(
|
|
holdings: HoldingRow[],
|
|
navMap: Record<string, ProductNav | undefined>,
|
|
): HoldingRow[] {
|
|
return holdings.map((h) => {
|
|
const nav = navMap[h.product_id]
|
|
if (!nav) return h
|
|
return {
|
|
...h,
|
|
nav: nav.nav,
|
|
daily_chg_pct: nav.daily_chg_pct,
|
|
nav_date: nav.nav_date,
|
|
}
|
|
})
|
|
}
|