Update app.py
Browse files
app.py
CHANGED
|
@@ -70,13 +70,17 @@ if st.session_state.logged_in:
|
|
| 70 |
st.session_state.forced_taker = st.text_input("Force a specific person to take the stand-up:", st.session_state.forced_taker)
|
| 71 |
|
| 72 |
if st.button("Force Stand-Up"):
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
else:
|
| 82 |
-
st.write("
|
|
|
|
| 70 |
st.session_state.forced_taker = st.text_input("Force a specific person to take the stand-up:", st.session_state.forced_taker)
|
| 71 |
|
| 72 |
if st.button("Force Stand-Up"):
|
| 73 |
+
current_weekday = datetime.now().strftime("%A")
|
| 74 |
+
if current_weekday in ["Tuesday", "Thursday"]:
|
| 75 |
+
if st.session_state.forced_taker in team_members:
|
| 76 |
+
new_entry = {
|
| 77 |
+
'standup_taker': st.session_state.forced_taker,
|
| 78 |
+
'date': datetime.now().strftime("%Y-%m-%d")
|
| 79 |
+
}
|
| 80 |
+
st.session_state.standup_history.append(new_entry)
|
| 81 |
+
|
| 82 |
+
st.write(f"The stand-up taker has been forced to **{st.session_state.forced_taker}**.")
|
| 83 |
+
else:
|
| 84 |
+
st.write("Invalid name. Please enter a valid team member name.")
|
| 85 |
else:
|
| 86 |
+
st.write(f"Stand-up taker can only be forced on Tuesday and Thursday. Today is {current_weekday}.")
|