feat: add scenarios list page with metrics and quick actions
- Introduced a new template for listing scenarios associated with a project. - Added metrics for total, active, draft, and archived scenarios. - Implemented quick actions for creating new scenarios and reviewing project overview. - Enhanced navigation with breadcrumbs for better user experience. refactor: update Opex and Profitability templates for consistency - Changed titles and button labels for clarity in Opex and Profitability templates. - Updated form IDs and action URLs for better alignment with new naming conventions. - Improved navigation links to include scenario and project overviews. test: add integration tests for Opex calculations - Created new tests for Opex calculation HTML and JSON flows. - Validated successful calculations and ensured correct data persistence. - Implemented tests for currency mismatch and unsupported frequency scenarios. test: enhance project and scenario route tests - Added tests to verify scenario list rendering and calculator shortcuts. - Ensured scenario detail pages link back to the portfolio correctly. - Validated project detail pages show associated scenarios accurately.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Initial Capex Planner · CalMiner{% endblock %}
|
||||
{% block title %}Capex Planner · CalMiner{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav class="breadcrumb">
|
||||
@@ -10,17 +10,24 @@
|
||||
{% if scenario %}
|
||||
<a href="{{ url_for('scenarios.view_scenario', scenario_id=scenario.id) }}">{{ scenario.name }}</a>
|
||||
{% endif %}
|
||||
<span aria-current="page">Initial Capex Planner</span>
|
||||
<span aria-current="page">Capex Planner</span>
|
||||
</nav>
|
||||
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<h1>Initial Capex Planner</h1>
|
||||
<p class="text-muted">Capture upfront capital requirements and review categorized totals.</p>
|
||||
<h1>Capex Planner</h1>
|
||||
<p class="text-muted">Plan capital requirements for {{ scenario.name if scenario else 'this scenario' }}.</p>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
{% if cancel_url %}
|
||||
<a class="btn" href="{{ cancel_url }}">Cancel</a>
|
||||
{% if scenario_url %}
|
||||
<a class="btn" href="{{ scenario_url }}">Scenario Overview</a>
|
||||
{% elif project_url %}
|
||||
<a class="btn" href="{{ project_url }}">Project Overview</a>
|
||||
{% elif cancel_url %}
|
||||
<a class="btn" href="{{ cancel_url }}">Back</a>
|
||||
{% endif %}
|
||||
{% if scenario_portfolio_url %}
|
||||
<a class="btn" href="{{ scenario_portfolio_url }}">Scenario Portfolio</a>
|
||||
{% endif %}
|
||||
<button class="btn primary" type="submit" form="capex-form">Save & Calculate</button>
|
||||
</div>
|
||||
@@ -188,7 +195,7 @@
|
||||
{% if result %}
|
||||
<div class="report-grid">
|
||||
<article class="report-card">
|
||||
<h3>Total Initial Capex</h3>
|
||||
<h3>Total Capex</h3>
|
||||
<p class="metric">
|
||||
<strong>{{ result.totals.overall | currency_display(result.currency) }}</strong>
|
||||
</p>
|
||||
@@ -249,7 +256,7 @@
|
||||
</table>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="muted">Provide component details and calculate to see initial capex totals.</p>
|
||||
<p class="muted">Provide component details and calculate to see capex totals.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user