Skip to content

Commit

Permalink
table bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Parv17k committed Dec 6, 2020
1 parent 638abf1 commit 905626f
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ def createticket(user_id):

def updatestatus(user):
st.write("I am in")
sql = f"""select et.ticket_id,et.status, et.title
from (select * from (select * from tickets,ticket_status where tickets.status_id = ticket_status.id) t
left join employees e on t.assigned_to_id = e.id)
et , issue_reporter i where i.id = et.issuer_id and i.id={str(user['id'][0])} ;"""
sql = f"""select tickets.ticket_id,ticket_status.status, tickets.title from tickets,ticket_status where tickets.status_id = ticket_status.id and assigned_to_id = {str(user['id'][0])};"""

data = query_db(sql)
tickets=[]
Expand Down Expand Up @@ -205,21 +202,11 @@ def dashboard_employee(user_data):
head.title("Employee Dashboard")
st.success("Hello '"+user_data['name'][0]+"', Please scroll down and access your dashboard")
show_tickets(user_data)
<<<<<<< HEAD
st.write("I am up")

updatestatus(user_data)
st.write("I am down")
if st.button('show feedback table for the user'):
showFeedback(user_data)

=======
if st.button('show feedback table for the user'):
showFeedback(user_data)
if st.button('update any ticket status'):
updatestatus(user_data)

>>>>>>> fa7f8d1e17db1133d200ca563e6972653816517f
def dashboard_management(user_data):
head.title("Management Dashboard")
st.success("Hello '"+user_data['name'][0]+"', Please scroll down and access your dashboard")
Expand Down Expand Up @@ -274,8 +261,6 @@ def auth(id,password,domain):



<<<<<<< HEAD
=======
'## Read tables'

sql_all_table_names = "select relname from pg_class where relkind='r' and relname !~ '^(pg_|sql_)';"
Expand All @@ -287,4 +272,3 @@ def auth(id,password,domain):
sql_table = f'select * from {table_name};'
df = query_db(sql_table)
st.dataframe(df)
>>>>>>> fa7f8d1e17db1133d200ca563e6972653816517f

0 comments on commit 905626f

Please sign in to comment.