feat: Persist initial capex calculations and enhance navigation links in UI

This commit is contained in:
2025-11-12 23:52:06 +01:00
parent d9fd82b2e3
commit 1240b08740
7 changed files with 99 additions and 11 deletions

View File

@@ -13,12 +13,20 @@
</nav>
<header class="page-header">
{% set profitability_href = url_for('calculations.profitability_form') %}
{% set capex_href = url_for('calculations.capex_form') %}
{% if project and scenario %}
{% set profitability_href = profitability_href ~ '?project_id=' ~ project.id ~ '&scenario_id=' ~ scenario.id %}
{% set capex_href = capex_href ~ '?project_id=' ~ project.id ~ '&scenario_id=' ~ scenario.id %}
{% endif %}
<div>
<h1>{{ scenario.name }}</h1>
<p class="text-muted">Status: {{ scenario.status.value.title() }}</p>
</div>
<div class="header-actions">
<a class="btn" href="{{ url_for('projects.view_project', project_id=project.id) }}">Back to Project</a>
<a class="btn" href="{{ profitability_href }}">Profitability Calculator</a>
<a class="btn" href="{{ capex_href }}">Initial Capex Planner</a>
<a class="btn primary" href="{{ url_for('scenarios.edit_scenario_form', scenario_id=scenario.id) }}">Edit Scenario</a>
</div>
</header>