Spaces:
Sleeping
Sleeping
[FIX] Add Available amout unit/year
Browse files- tabs/tab1_inputs.py +3 -3
tabs/tab1_inputs.py
CHANGED
|
@@ -114,12 +114,12 @@ def dialog_add_custom_resource(cost_sliders, edit_index: int | None = None, pres
|
|
| 114 |
group = resource_to_group.get(batch_group)
|
| 115 |
unit = resource_unit_map.get(group, "?")
|
| 116 |
|
| 117 |
-
st.markdown(f'<p class="caption">Unit for this group: <strong>{unit}</strong></p>', unsafe_allow_html=True)
|
| 118 |
|
| 119 |
st.markdown('<p class="dialog-title">2 — Available quantity</p>', unsafe_allow_html=True)
|
| 120 |
|
| 121 |
batch_amount = st.number_input(
|
| 122 |
-
label=f"Available amount ({unit})",
|
| 123 |
min_value=0.0,
|
| 124 |
format="%.2f",
|
| 125 |
value=float(existing["amount"]) if existing.get("amount") and existing.get("amount") != 0.0 else None,
|
|
@@ -682,7 +682,7 @@ def render_tab(cost_sliders):
|
|
| 682 |
|
| 683 |
for group, rlist in resource_groups.items():
|
| 684 |
unit = resource_unit_map.get(group, "")
|
| 685 |
-
with st.expander(f"**{group}** ({unit})", expanded=True):
|
| 686 |
|
| 687 |
cols = st.columns(4)
|
| 688 |
|
|
|
|
| 114 |
group = resource_to_group.get(batch_group)
|
| 115 |
unit = resource_unit_map.get(group, "?")
|
| 116 |
|
| 117 |
+
st.markdown(f'<p class="caption">Unit for this group: <strong>{unit}/year</strong></p>', unsafe_allow_html=True)
|
| 118 |
|
| 119 |
st.markdown('<p class="dialog-title">2 — Available quantity</p>', unsafe_allow_html=True)
|
| 120 |
|
| 121 |
batch_amount = st.number_input(
|
| 122 |
+
label=f"Available amount ({unit}/year)",
|
| 123 |
min_value=0.0,
|
| 124 |
format="%.2f",
|
| 125 |
value=float(existing["amount"]) if existing.get("amount") and existing.get("amount") != 0.0 else None,
|
|
|
|
| 682 |
|
| 683 |
for group, rlist in resource_groups.items():
|
| 684 |
unit = resource_unit_map.get(group, "")
|
| 685 |
+
with st.expander(f"**{group}** ({unit}/year)", expanded=True):
|
| 686 |
|
| 687 |
cols = st.columns(4)
|
| 688 |
|