From 29de78ca8707b18af4664eeb0926c4bd40dfd5be Mon Sep 17 00:00:00 2001 From: michivonah Date: Sat, 8 Apr 2023 12:54:33 +0200 Subject: [PATCH] minor changes #3 --- pages/customers.py | 9 +++++++-- pages/settings.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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.')