mbosse99 commited on
Commit
b413413
·
1 Parent(s): 8b272c6

Added preparation link

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -97,8 +97,10 @@ def create_button_handler():
97
  appointment_response = create_meeting(request_params)
98
  st.session_state["appointment_response"] = appointment_response
99
  if st.session_state["assessment_toggle"]:
 
 
100
  db_item = {
101
- "id":str(uuid.uuid4()),
102
  "zoom_meeting_id":str(appointment_response["zoom_meeting"]["id"]),
103
  "assessment_title":st.session_state["subject_input"],
104
  "start_time":start_date_str,
@@ -158,7 +160,9 @@ if "cosmos_db" not in st.session_state:
158
  # Cosmos DB Client erstellen
159
  client = CosmosClient(os.environ.get('DB_CONNECTION'), os.environ.get('DB_KEY'))
160
  st.session_state["cosmos_db"] = client
161
-
 
 
162
  col1, col2 = st.columns([2, 1])
163
 
164
  col1.title("Appointment Tool")
@@ -181,4 +185,6 @@ st.button("Create appointment", key="create_button", disabled=False if st.sessio
181
 
182
  if st.session_state["appointment_response"]:
183
  st.success("The appointment was created correctly.")
184
- st.write(os.environ.get('BASE_API')+"/meeting-consent?redirect="+st.session_state["appointment_response"]["zoom_meeting"]["start_url"].replace("https://us06web.zoom.us/s/", ""))
 
 
 
97
  appointment_response = create_meeting(request_params)
98
  st.session_state["appointment_response"] = appointment_response
99
  if st.session_state["assessment_toggle"]:
100
+ assessment_id = str(uuid.uuid4())
101
+ st.session_state["assessment_db_id"] = assessment_id
102
  db_item = {
103
+ "id":assessment_id,
104
  "zoom_meeting_id":str(appointment_response["zoom_meeting"]["id"]),
105
  "assessment_title":st.session_state["subject_input"],
106
  "start_time":start_date_str,
 
160
  # Cosmos DB Client erstellen
161
  client = CosmosClient(os.environ.get('DB_CONNECTION'), os.environ.get('DB_KEY'))
162
  st.session_state["cosmos_db"] = client
163
+ if "assessment_db_id" not in st.session_state:
164
+ st.session_state["assessment_db_id"] = None
165
+
166
  col1, col2 = st.columns([2, 1])
167
 
168
  col1.title("Appointment Tool")
 
185
 
186
  if st.session_state["appointment_response"]:
187
  st.success("The appointment was created correctly.")
188
+ st.write(os.environ.get('BASE_API')+"/meeting-consent?redirect="+st.session_state["appointment_response"]["zoom_meeting"]["start_url"].replace("https://us06web.zoom.us/s/", ""))
189
+ if st.session_state["assessment_toggle"]:
190
+ st.write("Here is the link for the assessment preparation: https://tensora.ai/workgenius/interview-preparation?assessment-id="+st.session_state["assessment_db_id"])