BulatF commited on
Commit
5ac8c99
·
1 Parent(s): 73c760a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -9
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
- if st.session_state.forced_taker in team_members:
74
- new_entry = {
75
- 'standup_taker': st.session_state.forced_taker,
76
- 'date': datetime.now().strftime("%Y-%m-%d")
77
- }
78
- st.session_state.standup_history.append(new_entry)
79
-
80
- st.write(f"The stand-up taker has been forced to **{st.session_state.forced_taker}**.")
 
 
 
 
81
  else:
82
- st.write("Invalid name. Please enter a valid team member name.")
 
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}.")