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 %}Processing Opex Planner · CalMiner{% endblock %}
|
||||
{% block title %}Opex Planner · CalMiner{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav class="breadcrumb">
|
||||
@@ -10,19 +10,26 @@
|
||||
{% if scenario %}
|
||||
<a href="{{ url_for('scenarios.view_scenario', scenario_id=scenario.id) }}">{{ scenario.name }}</a>
|
||||
{% endif %}
|
||||
<span aria-current="page">Processing Opex Planner</span>
|
||||
<span aria-current="page">Opex Planner</span>
|
||||
</nav>
|
||||
|
||||
<header class="page-header">
|
||||
<div>
|
||||
<h1>Processing Opex Planner</h1>
|
||||
<h1>Opex Planner</h1>
|
||||
<p class="text-muted">Capture recurring operational costs and review annual totals with escalation assumptions.</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 %}
|
||||
<button class="btn primary" type="submit" form="processing-opex-form">Save & Calculate</button>
|
||||
{% if scenario_portfolio_url %}
|
||||
<a class="btn" href="{{ scenario_portfolio_url }}">Scenario Portfolio</a>
|
||||
{% endif %}
|
||||
<button class="btn primary" type="submit" form="opex-form">Save & Calculate</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -47,7 +54,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form id="processing-opex-form" class="form scenario-form" method="post" action="{{ form_action }}">
|
||||
<form id="opex-form" class="form scenario-form" method="post" action="{{ form_action }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token or '' }}" />
|
||||
<input type="hidden" name="options[persist]" value="{{ '1' if options and options.persist else '' }}" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user