Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanderLaan committed Nov 11, 2024
1 parent 0f52a3f commit 13dce0c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
7 changes: 5 additions & 2 deletions functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import pickle
import re
import streamlit as st

import pandas as pd
import plotly.graph_objects as go
Expand Down Expand Up @@ -118,11 +119,13 @@ def read_user_data(username):

if os.path.exists(csv_file):
user_data = pd.read_csv(csv_file)
st.write(csv_file)

return user_data

else:
print("No data found for this user.")
st.write(f'{username}')
print(f"No data found for {username}")

return pd.DataFrame(
columns=["week", "druk", "note"]
Expand All @@ -132,7 +135,7 @@ def read_user_data(username):
# checks all employees files based on list of employees and creates for selected week overview of work pressure of each employee
# if employee didn't fill form for selected week, it will be listed as bad_employee and shamed in dashboard
def create_week_planning_team(week_number, employees_list):
print(week_number)
#print(employees_list)
df_current_week = pd.DataFrame(columns=["name", "druk", "note", "color"])
good_employees = []
bad_employees = []
Expand Down
17 changes: 0 additions & 17 deletions input_employees/kizjè.csv

This file was deleted.

24 changes: 20 additions & 4 deletions wim.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,26 @@
)

submitted = st.form_submit_button("INVULLEN")
if submitted:
selected_category = selected_category[2:]
print(selected_category)
update_user_csv(username, week_numbers, selected_category, notes)
if submitted:
selected_category = selected_category[2:]
print(selected_category)
update_user_csv(username, week_numbers, selected_category, notes)
st.write(f'{username}, Bedankt voor het invullen, door de datum aan te passen kan je ook voor volgende week alvast je verwachte drukte invullen.')
st.write('Geniet van je week!')

# next_week_button = st.button('Vul hier meteen ook voor volgende week in')

# if next_week_button:
# submitted = st.form_submit_button("INVULLEN")
# if submitted:
# if weeknumbers == 52:
# weeknumber = 1
# else:
# week_numbers += 1
# selected_category = selected_category[2:]
# print(selected_category)
# update_user_csv(username, week_numbers, selected_category, notes)
# st.write(f'{username}, je bent nu al lekker bezig, bedankt voor het invullen van jou drukte voor de komende twee weken!')


elif nav == "overzicht":
Expand Down

0 comments on commit 13dce0c

Please sign in to comment.