diff --git a/pages/customers.py b/pages/customers.py index abcabe1..286f32b 100644 --- a/pages/customers.py +++ b/pages/customers.py @@ -1,5 +1,5 @@ import streamlit as st -import pandas as pd +import dbfunctions import branding branding.loadBranding() @@ -7,4 +7,9 @@ st.write(""" # Customers Here you can see all customers: -""") \ No newline at end of file +""") + +customerList = st.tabs(["All customers"]) + +with customerList: + st.dataframe(dbfunctions.loadTable(f"SELECT * FROM alltickets WHERE \"Status\" = 'Open' AND \"Assigned to\" = '{st.session_state.username}' ORDER BY \"Ticketnumber\""), use_container_width=True) \ No newline at end of file diff --git a/pages/settings.py b/pages/settings.py index 9235eb7..941801e 100644 --- a/pages/settings.py +++ b/pages/settings.py @@ -17,7 +17,7 @@ saveBtn = st.button('Save changes') st.info(f"Your UserID: {int(st.session_state.userid)}") if saveBtn: - dbfunctions.executeQuery(f"UPDATE \"user\" SET username = '{newUsername}' WHERE userid = {int(st.session_state.userid)};") + dbfunctions.executeWithoutFetch(f"UPDATE \"user\" SET username = '{newUsername}' WHERE userid = {int(st.session_state.userid)};") st.success('Username changed', icon="✅") else: st.write('You are not logged in. Please log in before accessing the settings.')