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.
This commit is contained in:
@@ -40,4 +40,7 @@ if (-not $SkipNeo4j) {
|
||||
python scripts/sync/sync_neo4j.py
|
||||
}
|
||||
|
||||
Write-Host "=== Fix UTF-8 seed text (Windows) ==="
|
||||
python (Join-Path $Root "scripts/dev/fix_utf8_seed.py")
|
||||
|
||||
Write-Host "Done."
|
||||
|
||||
@@ -20,10 +20,12 @@ from app.config.settings import settings
|
||||
from app.utils.db import get_engine
|
||||
|
||||
CUSTOMER_SEED = ROOT / "scripts/core/03-seed-customers.sql"
|
||||
PRODUCT_SEED = ROOT / "scripts/core/02-seed-base.sql"
|
||||
AML_SEED = ROOT / "scripts/agent/seed-aml-list.sql"
|
||||
RISK_DEMO = ROOT / "scripts/demo/prepare_risk_demo.sql"
|
||||
|
||||
_ROW_RE = re.compile(r"\('(CUST-[^']+)',\s*'([^']+)'")
|
||||
_PRODUCT_RE = re.compile(r"\('(PROD-[^']+)',\s*'([^']+)'")
|
||||
|
||||
|
||||
def _parse_customer_names() -> list[tuple[str, str]]:
|
||||
@@ -32,6 +34,12 @@ def _parse_customer_names() -> list[tuple[str, str]]:
|
||||
return _ROW_RE.findall(block)
|
||||
|
||||
|
||||
def _parse_product_names() -> list[tuple[str, str]]:
|
||||
content = PRODUCT_SEED.read_text(encoding="utf-8")
|
||||
block = content.split("INSERT INTO core_product")[1]
|
||||
return _PRODUCT_RE.findall(block)
|
||||
|
||||
|
||||
def _parse_aml_rows() -> list[dict[str, str]]:
|
||||
content = AML_SEED.read_text(encoding="utf-8")
|
||||
rows: list[dict[str, str]] = []
|
||||
@@ -78,6 +86,15 @@ def main() -> None:
|
||||
)
|
||||
print(f"updated {len(names)} core_customer.display_name")
|
||||
|
||||
products = _parse_product_names()
|
||||
with core.begin() as conn:
|
||||
for product_id, product_name in products:
|
||||
conn.execute(
|
||||
text("UPDATE core_product SET product_name = :n WHERE product_id = :id"),
|
||||
{"id": product_id, "n": product_name},
|
||||
)
|
||||
print(f"updated {len(products)} core_product.product_name")
|
||||
|
||||
aml_rows = _parse_aml_rows()
|
||||
with agent.begin() as conn:
|
||||
conn.execute(text("DELETE FROM risk_aml_list"))
|
||||
@@ -104,7 +121,11 @@ def main() -> None:
|
||||
sample = conn.execute(
|
||||
text("SELECT customer_id, display_name FROM core_customer WHERE customer_id = 'CUST-3001'")
|
||||
).one()
|
||||
prod = conn.execute(
|
||||
text("SELECT product_id, product_name FROM core_product WHERE product_id = 'PROD-110022'")
|
||||
).one()
|
||||
print("verify CUST-3001:", sample)
|
||||
print("verify PROD-110022:", prod)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user