Remodel/packages/api/src/remodel_api/routers/templates.py
Mannu e6dc39aa33 [S1-T12/T13] P&L revenue breakdown + collapsible rows + UI polish
- Engine: Add ppa_revenue_cr, mcp_revenue_cr, tariff, units to PnLRow
- Engine: Split PPA vs MCP revenue in P&L computation
- Web: Collapsible rows for PPA/MCP Revenue and Opex
- Web: Highlighted rows (Total Revenue, EBITDA, EBIT, PBT, PAT)
- Web: Units above Tariff in breakdown, bg-blue-50 highlight
- Fix sticky column z-index for horizontal scroll
- CLAUDE.md: Add project documentation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 10:42:36 +05:30

25 lines
746 B
Python

"""Templates router: default cost-item catalog + custom templates."""
from __future__ import annotations
from typing import Any
from fastapi import APIRouter
router = APIRouter()
@router.get("/templates/cost-items")
async def get_default_cost_items() -> list[dict[str, Any]]:
"""Return the built-in default cost item catalog."""
from remodel_engine.catalog.cost_items import DEFAULT_COST_ITEMS
return [item.model_dump() for item in DEFAULT_COST_ITEMS]
@router.get("/templates/phasing")
async def get_phasing_templates() -> dict[str, Any]:
"""Return built-in phasing curve templates."""
from remodel_engine.catalog.phasing import PHASING_TEMPLATES
return {k: v.model_dump() for k, v in PHASING_TEMPLATES.items()}