Skip to content

Commit

Permalink
minor changes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
michivonah committed Apr 8, 2023
1 parent a85564b commit 29de78c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions pages/customers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import streamlit as st
import pandas as pd
import dbfunctions
import branding

branding.loadBranding()

st.write("""
# Customers
Here you can see all customers:
""")
""")

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)
2 changes: 1 addition & 1 deletion pages/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')

0 comments on commit 29de78c

Please sign in to comment.