Spaces:
Running
Running
James McCool
commited on
Commit
·
ea83f72
1
Parent(s):
8803344
Implement conditional logic for per player salary display in app.py to handle cases with filled lineups. This enhancement ensures accurate salary calculations and improves user clarity in the lineup summary.
Browse files
app.py
CHANGED
@@ -1030,12 +1030,20 @@ with tab4:
|
|
1030 |
|
1031 |
col1, col2, col3 = st.columns([2, 1, 3])
|
1032 |
with col1:
|
1033 |
-
|
1034 |
-
|
1035 |
-
<
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1039 |
|
1040 |
with col3:
|
1041 |
if total_salary <= 50000:
|
|
|
1030 |
|
1031 |
col1, col2, col3 = st.columns([2, 1, 3])
|
1032 |
with col1:
|
1033 |
+
if (10 - len(filled_lineup)) > 0:
|
1034 |
+
st.markdown(f"""
|
1035 |
+
<div style='text-align: left'>
|
1036 |
+
<b>💰 Per Player:</b> `${round((50000 - total_salary) / (10 - len(filled_lineup)), 0)}`
|
1037 |
+
</div>
|
1038 |
+
""",
|
1039 |
+
unsafe_allow_html=True)
|
1040 |
+
else:
|
1041 |
+
st.markdown(f"""
|
1042 |
+
<div style='text-align: left'>
|
1043 |
+
<b>💰 Per Player:</b> `${round(50000 - total_salary, 0)}`
|
1044 |
+
</div>
|
1045 |
+
""",
|
1046 |
+
unsafe_allow_html=True)
|
1047 |
|
1048 |
with col3:
|
1049 |
if total_salary <= 50000:
|