Files
group_xinghuo_jinrong/web/src/utils/mergeHoldingsWithNav.ts
T
zhanghongyu_0626 ad930c26b1 feat(frontend): Implement initial P0 scaffolding and enhance dashboard features
- 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.
2026-09-09 15:50:33 +08:00

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,
}
})
}