James McCool
commited on
Commit
·
8ae5fd1
1
Parent(s):
409a345
Refactor column layout in 'Manage Portfolio' section of 'app.py' to enhance user interface by adjusting column definitions and improving button placements for better functionality.
Browse files
app.py
CHANGED
|
@@ -1084,16 +1084,16 @@ if selected_tab == 'Data Load':
|
|
| 1084 |
if selected_tab == 'Manage Portfolio':
|
| 1085 |
if 'origin_portfolio' in st.session_state and 'projections_df' in st.session_state:
|
| 1086 |
with st.container():
|
| 1087 |
-
reset_port_col, recalc_div_col, blank_reset_col, contest_size_col = st.columns(2, 2, 4, 2)
|
| 1088 |
-
with
|
| 1089 |
if st.button('Reset Portfolio', key='reset_port'):
|
| 1090 |
st.session_state['settings_base'] = True
|
| 1091 |
st.session_state['working_frame'] = st.session_state['base_frame'].copy()
|
| 1092 |
-
with
|
| 1093 |
if st.button("Recalculate Diversity"):
|
| 1094 |
st.session_state['display_frame']['Diversity'] = recalc_diversity(st.session_state['display_frame'], st.session_state['player_columns'])
|
| 1095 |
|
| 1096 |
-
with
|
| 1097 |
with st.form(key='contest_size_form'):
|
| 1098 |
size_col, strength_col, submit_col = st.columns(3)
|
| 1099 |
with size_col:
|
|
@@ -1980,7 +1980,7 @@ if selected_tab == 'Manage Portfolio':
|
|
| 1980 |
download_port, merge_port, clear_export, add_rows_col, remove_rows_col, blank_export_col = st.columns([1, 1, 1, 2, 2, 6])
|
| 1981 |
with download_port:
|
| 1982 |
st.download_button(label="Download Portfolio", data=st.session_state['export_file'].to_csv(index=False), file_name="portfolio.csv", mime="text/csv")
|
| 1983 |
-
|
| 1984 |
with merge_port:
|
| 1985 |
if st.button("Add all to Custom Export"):
|
| 1986 |
st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge']])
|
|
|
|
| 1084 |
if selected_tab == 'Manage Portfolio':
|
| 1085 |
if 'origin_portfolio' in st.session_state and 'projections_df' in st.session_state:
|
| 1086 |
with st.container():
|
| 1087 |
+
reset_port_col, recalc_div_col, blank_reset_col, contest_size_col = st.columns([2, 2, 4, 2])
|
| 1088 |
+
with reset_port_col:
|
| 1089 |
if st.button('Reset Portfolio', key='reset_port'):
|
| 1090 |
st.session_state['settings_base'] = True
|
| 1091 |
st.session_state['working_frame'] = st.session_state['base_frame'].copy()
|
| 1092 |
+
with recalc_div_col:
|
| 1093 |
if st.button("Recalculate Diversity"):
|
| 1094 |
st.session_state['display_frame']['Diversity'] = recalc_diversity(st.session_state['display_frame'], st.session_state['player_columns'])
|
| 1095 |
|
| 1096 |
+
with contest_size_col:
|
| 1097 |
with st.form(key='contest_size_form'):
|
| 1098 |
size_col, strength_col, submit_col = st.columns(3)
|
| 1099 |
with size_col:
|
|
|
|
| 1980 |
download_port, merge_port, clear_export, add_rows_col, remove_rows_col, blank_export_col = st.columns([1, 1, 1, 2, 2, 6])
|
| 1981 |
with download_port:
|
| 1982 |
st.download_button(label="Download Portfolio", data=st.session_state['export_file'].to_csv(index=False), file_name="portfolio.csv", mime="text/csv")
|
| 1983 |
+
|
| 1984 |
with merge_port:
|
| 1985 |
if st.button("Add all to Custom Export"):
|
| 1986 |
st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge']])
|