feat: Add currency and unit support across models, routes, and templates; enhance UI for consumption, costs, and production
This commit is contained in:
@@ -46,6 +46,18 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label for="production-form-unit">
|
||||
Unit
|
||||
<select id="production-form-unit" name="unit_name" required>
|
||||
<option value="" disabled selected>Select unit</option>
|
||||
{% for unit in unit_options %}
|
||||
<option value="{{ unit.name }}" data-symbol="{{ unit.symbol }}">
|
||||
{{ unit.name }} ({{ unit.symbol }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<input id="production-form-unit-symbol" type="hidden" name="unit_symbol" />
|
||||
<label for="production-form-amount">
|
||||
Amount
|
||||
<input
|
||||
@@ -75,7 +87,7 @@
|
||||
|
||||
{% endblock %} {% block scripts %} {{ super() }}
|
||||
<script id="production-data" type="application/json">
|
||||
{{ {"scenarios": scenarios, "production": production_by_scenario} | tojson }}
|
||||
{{ {"scenarios": scenarios, "production": production_by_scenario, "unit_options": unit_options} | tojson }}
|
||||
</script>
|
||||
<script src="/static/js/production.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user