Added custom length of back-search for Kudos

This commit is contained in:
murraydr 2023-10-25 09:46:24 -04:00
parent 2eb5f799b4
commit d154792389
7 changed files with 44 additions and 8 deletions

Binary file not shown.

View File

@ -8,8 +8,6 @@ import scheduledPayrollWindow as PWin
#TODO demonstrate workflow with git
#TODO document how to setup for next semester (staff and section changes)
#TODO do error checking within while loop (update text color / valid status)
# IMPOSSIBLE: pysimplegui does not allow for changing of the layout object after the window is created,
# so the number of rows of checkboxes cannot be changed without reopening the window

View File

@ -1 +1 @@
2022-10-04 15:15:51.231447
2023-10-25 09:09:55.033493

View File

@ -121,7 +121,7 @@ def subAppWin(staffDatabaseFilename,secDFilename,subRequestsFilename,subRequests
while event != sg.WIN_CLOSED and completed==False:
event, values = window.read()
#values.values() is an array of the input from all window elements, we use strides to get the checkboxes as "columns" instead of "rows"
#values.values() is an array of the input from all window elements, we use strides to get a "column" of checkboxes instead of a "row" of checkboxes
approveValues=list(values.values())[::5]
acceptValues=list(values.values())[1::5]
rejectValues=list(values.values())[2::5]

View File

@ -117,12 +117,17 @@ def subHisWin(subRequestsArchiveFilename,defaultFont):
window['+FUL'].Update(disabled=True)
window['-FUL'].Update(disabled=True)
inputStr=values[0]
try:
numDays=int(inputStr)
except:
numDays=7
timeStr=datetime.now()
currDate=timeStr-timedelta(hours=4,minutes=0)
pastDate=timeStr-timedelta(hours=4+24*7,minutes=0)
pastDate=timeStr-timedelta(hours=4+24*numDays,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)
window["-LABEL-"].update(value='Kudos: Displaying most fulfilled sub requests between '+pastDate+' and '+currDate+"\nType a number to see that many days' worth (default is 7)")
output=f'Name : Hours subbed\n'

View File

@ -1 +1,34 @@
Timestamp,Requestor,Section,Dates,Replacement,Reason
2023-09-19 13:57:17.596000,sipahiog,Sec 46,09/19,haggart3,Sickness
2023-09-19 18:45:55.239000,sebalyma,Sec 40,10/10,ngvivian,will be in ohio for beginning of that week
2023-09-19 22:32:06.420000,mcgui186,Sec 6,09/21,schul769,Funeral
2023-09-20 17:12:04.654000,austi143,Sec 11,09/20,,"Grandpa had stroke, have to go home"
2023-09-20 17:12:30.949000,gautamya,Sec 21,09/20,,Sick
2023-09-20 17:29:31.529000,upadhy19,Sec 4,09/20,,Strong Stomachache
2023-09-21 13:22:29.001000,sipahiog,Sec 46,09/21,,Sickness
2023-09-21 18:25:24.758000,mcgui186,R_HR2,09/21,sipahiog,Funeral
2023-09-21 18:26:11.335000,mcgui186,R_HR1,09/21,haggart3,Funeral
2023-09-23 14:25:11.349000,borekmi1,Sec 1,09/25,sebalyma,Problem with the transportation to MSU
2023-09-25 17:05:16.919000,burgejae,Sec 46,09/26,aggarw75,Important meeting came up
2023-09-25 17:05:25.520000,anindhos,M_HR1;M_HR2,09/25,bhardw41,Mandatory project meeting
2023-09-25 21:37:26.276000,aggarw75,Sec 11,09/27,lnumehak,
2023-09-26 01:51:03.453000,john7531,S_HR1;S_HR2,10/02,bhardw41,Laptop died. Replacement may not come before my shift.
2023-09-26 14:52:30.307000,darshanv,W_HR1;W_HR2;Sec 20,09/27,micksoph,Visiting the SSN office for on campus registration and receiving SSN
2023-09-26 16:25:19.977000,sipahiog,T_HR1;T_HR2,09/26,haggart3,Something came up with a class
2023-09-28 14:58:15.450000,sonarsoh,Sec 17,10/02;10/04,tagaychr,broken arm
2023-10-03 19:14:01.917000,sipahiog,Sec 30,10/09,john7531,out of town
2023-10-04 19:47:39.642000,schne542,Sec 19,10/09,aggarw75,I have a doctors appointment on 10/9 back home.
2023-10-04 20:02:13.852000,mcgui186,R_HR1;R_HR2,10/05,haggart3,I need to go to helproom for a project of mine
2023-10-04 20:07:34.501000,sipahiog,Sec 46,10/10,haggart3,Out of town
2023-10-09 17:51:15.406000,austi143,Sec 11,10/09,bhardw41,Im sick
2023-10-11 01:06:38.157000,pittend2,Sec 25,10/11,kumararn,Sick
2023-10-11 16:49:39.541000,murraydr,M_HR1;M_HR2,10/09,,test1
2023-10-11 16:50:11.365000,murraydr,M_HR1,10/02;10/09,,test2
2023-10-11 17:24:59.666000,austi143,Sec 11,10/11,lnumehak,Im sick
2023-10-15 20:46:29.883000,allarde2,S_HR1;S_HR2,10/15,,Family emergency
2023-10-16 00:52:26.038000,tagaychr,Sec 36,10/26,sonarsoh,out of town
2023-10-18 14:56:06.049000,sipahiog,Sec 30,10/18,wadhwan5,Need to be out of town for family situation
2023-10-18 19:14:18.676000,sipahiog,Sec 46,10/19,mengjoey,Out of town
2023-10-18 19:37:07.303000,goyaljis,Sec 32,10/25,ngvivian,court appointment
2023-10-18 20:06:22.747000,straskra,Sec 22,10/18,,Strep Throat diagnosis
2023-10-24 21:04:58.030000,sipahiog,Sec 30,10/25,singhs65,I messed up my flight

1 Timestamp Requestor Section Dates Replacement Reason
2 2023-09-19 13:57:17.596000 sipahiog Sec 46 09/19 haggart3 Sickness
3 2023-09-19 18:45:55.239000 sebalyma Sec 40 10/10 ngvivian will be in ohio for beginning of that week
4 2023-09-19 22:32:06.420000 mcgui186 Sec 6 09/21 schul769 Funeral
5 2023-09-20 17:12:04.654000 austi143 Sec 11 09/20 Grandpa had stroke, have to go home
6 2023-09-20 17:12:30.949000 gautamya Sec 21 09/20 Sick
7 2023-09-20 17:29:31.529000 upadhy19 Sec 4 09/20 Strong Stomachache
8 2023-09-21 13:22:29.001000 sipahiog Sec 46 09/21 Sickness
9 2023-09-21 18:25:24.758000 mcgui186 R_HR2 09/21 sipahiog Funeral
10 2023-09-21 18:26:11.335000 mcgui186 R_HR1 09/21 haggart3 Funeral
11 2023-09-23 14:25:11.349000 borekmi1 Sec 1 09/25 sebalyma Problem with the transportation to MSU
12 2023-09-25 17:05:16.919000 burgejae Sec 46 09/26 aggarw75 Important meeting came up
13 2023-09-25 17:05:25.520000 anindhos M_HR1;M_HR2 09/25 bhardw41 Mandatory project meeting
14 2023-09-25 21:37:26.276000 aggarw75 Sec 11 09/27 lnumehak
15 2023-09-26 01:51:03.453000 john7531 S_HR1;S_HR2 10/02 bhardw41 Laptop died. Replacement may not come before my shift.
16 2023-09-26 14:52:30.307000 darshanv W_HR1;W_HR2;Sec 20 09/27 micksoph Visiting the SSN office for on campus registration and receiving SSN
17 2023-09-26 16:25:19.977000 sipahiog T_HR1;T_HR2 09/26 haggart3 Something came up with a class
18 2023-09-28 14:58:15.450000 sonarsoh Sec 17 10/02;10/04 tagaychr broken arm
19 2023-10-03 19:14:01.917000 sipahiog Sec 30 10/09 john7531 out of town
20 2023-10-04 19:47:39.642000 schne542 Sec 19 10/09 aggarw75 I have a doctors appointment on 10/9 back home.
21 2023-10-04 20:02:13.852000 mcgui186 R_HR1;R_HR2 10/05 haggart3 I need to go to helproom for a project of mine
22 2023-10-04 20:07:34.501000 sipahiog Sec 46 10/10 haggart3 Out of town
23 2023-10-09 17:51:15.406000 austi143 Sec 11 10/09 bhardw41 I’m sick
24 2023-10-11 01:06:38.157000 pittend2 Sec 25 10/11 kumararn Sick
25 2023-10-11 16:49:39.541000 murraydr M_HR1;M_HR2 10/09 test1
26 2023-10-11 16:50:11.365000 murraydr M_HR1 10/02;10/09 test2
27 2023-10-11 17:24:59.666000 austi143 Sec 11 10/11 lnumehak I’m sick
28 2023-10-15 20:46:29.883000 allarde2 S_HR1;S_HR2 10/15 Family emergency
29 2023-10-16 00:52:26.038000 tagaychr Sec 36 10/26 sonarsoh out of town
30 2023-10-18 14:56:06.049000 sipahiog Sec 30 10/18 wadhwan5 Need to be out of town for family situation
31 2023-10-18 19:14:18.676000 sipahiog Sec 46 10/19 mengjoey Out of town
32 2023-10-18 19:37:07.303000 goyaljis Sec 32 10/25 ngvivian court appointment
33 2023-10-18 20:06:22.747000 straskra Sec 22 10/18 Strep Throat diagnosis
34 2023-10-24 21:04:58.030000 sipahiog Sec 30 10/25 singhs65 I messed up my flight