From 2eb5f799b4a20a6882eaf3f4cba052e792c82560 Mon Sep 17 00:00:00 2001 From: murraydr Date: Wed, 18 Oct 2023 13:07:48 -0400 Subject: [PATCH] rearrange history buttons / added more descirptive labels --- substitutionHistoryWindow.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/substitutionHistoryWindow.py b/substitutionHistoryWindow.py index 945e687..47a084f 100644 --- a/substitutionHistoryWindow.py +++ b/substitutionHistoryWindow.py @@ -8,8 +8,8 @@ def subHisWin(subRequestsArchiveFilename,defaultFont): history = pd.read_csv(subRequestsArchiveFilename,dtype=str) - layout=[[sg.Text("Name of TA:")], - [sg.Input()],[sg.Button("Find History"),sg.Button("Close Window"),sg.Button("Weekly Kudos"),sg.Button("Hall of Fame")], + layout=[[sg.Text("TA Search Box: Type a substring of the name of a TA",key="-LABEL-")], + [sg.Input()],[sg.Button("Find History"),sg.Button("Weekly Kudos"),sg.Button("Hall of Fame"),sg.Button("Close Window")], [sg.Button("+APP"),sg.Button("-APP"),sg.Button("+ACC"),sg.Button("-ACC"),sg.Button("+REJ"),sg.Button("-REJ"),sg.Button("+CAN"),sg.Button("-CAN"),sg.Button("+FUL"),sg.Button("-FUL")] ,[sg.Text("",key="OUTPUT",expand_x=True,expand_y=True,size=(200, 20))]] @@ -35,6 +35,7 @@ def subHisWin(subRequestsArchiveFilename,defaultFont): event = "Find History" if event=="Find History": + window["-LABEL-"].update(value='TA Search Box: Type a substring of the name of a TA') name = values[0] netIDs=HF.nameToID(name,getAllMatches=True) if not hasattr(netIDs,'__len__') or len(netIDs)==0: @@ -95,7 +96,8 @@ def subHisWin(subRequestsArchiveFilename,defaultFont): pd.set_option('max_colwidth', 30) #Display instructions while the inputStr is not a valid input for the Hall of Fame - output='To customize which categories to add (App,Acc,Rej,Can,Ful):\nuse 0,1,2,3,4 or any combination thereof in the text box then click "Hall of Fame" again\n(e.g. "12" yields Accepted plus Rejected)\n' + window["-LABEL-"].update(value='Hall of Fame: To customize which categories to add (App,Acc,Rej,Can,Ful):\nuse 0,1,2,3,4 or any combination thereof in the text box then click "Hall of Fame" again\n(e.g. "12" yields Accepted plus Rejected)') + output='' inputStr=values[0] if inputStr=="" or not inputStr.isnumeric(): inputStr="" @@ -120,6 +122,7 @@ def subHisWin(subRequestsArchiveFilename,defaultFont): pastDate=timeStr-timedelta(hours=4+24*7,minutes=0) currDate=currDate.strftime('%m')+"/"+currDate.strftime('%d') pastDate=pastDate.strftime('%m')+"/"+pastDate.strftime('%d') + window["-LABEL-"].update(value='Kudos: Displaying most fulfilled sub requests between '+pastDate+' and '+currDate) output=f'Name : Hours subbed\n'