feat: Add currency and unit support across models, routes, and templates; enhance UI for consumption, costs, and production
This commit is contained in:
@@ -57,6 +57,17 @@ title %}Costs · CalMiner{% endblock %} {% block content %}
|
||||
{{ select_field( "Scenario", "capex-form-scenario", name="scenario_id",
|
||||
options=scenarios, required=True, placeholder="Select a scenario",
|
||||
placeholder_disabled=True ) }}
|
||||
{{ select_field(
|
||||
"Currency",
|
||||
"capex-form-currency",
|
||||
name="currency_code",
|
||||
options=currency_options,
|
||||
required=True,
|
||||
placeholder="Select currency",
|
||||
placeholder_disabled=True,
|
||||
value_attr="id",
|
||||
label_attr="name"
|
||||
) }}
|
||||
<label for="capex-form-amount">
|
||||
Amount
|
||||
<input
|
||||
@@ -90,6 +101,17 @@ title %}Costs · CalMiner{% endblock %} {% block content %}
|
||||
{{ select_field( "Scenario", "opex-form-scenario", name="scenario_id",
|
||||
options=scenarios, required=True, placeholder="Select a scenario",
|
||||
placeholder_disabled=True ) }}
|
||||
{{ select_field(
|
||||
"Currency",
|
||||
"opex-form-currency",
|
||||
name="currency_code",
|
||||
options=currency_options,
|
||||
required=True,
|
||||
placeholder="Select currency",
|
||||
placeholder_disabled=True,
|
||||
value_attr="id",
|
||||
label_attr="name"
|
||||
) }}
|
||||
<label for="opex-form-amount">
|
||||
Amount
|
||||
<input
|
||||
@@ -117,7 +139,7 @@ title %}Costs · CalMiner{% endblock %} {% block content %}
|
||||
|
||||
{% endblock %} {% block scripts %} {{ super() }}
|
||||
<script id="costs-payload" type="application/json">
|
||||
{{ {"capex": capex_by_scenario, "opex": opex_by_scenario} | tojson }}
|
||||
{{ {"capex": capex_by_scenario, "opex": opex_by_scenario, "currency_options": currency_options} | tojson }}
|
||||
</script>
|
||||
<script src="/static/js/costs.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user