working on filter
All checks were successful
Potlatch Loggers Organization/ComputerKeeper/pipeline/head This commit looks good

This commit is contained in:
Josh Biltonen 2022-10-13 17:58:26 -07:00
parent e2cc3e305f
commit d88057366b

View File

@ -11,7 +11,10 @@ WINDOW=None
colum_lut = ["Serial Number","Brand","Grade","Name"] colum_lut = ["Serial Number","Brand","Grade","Name"]
layout = [[sg.Menu([['File', ['Open', 'Save', 'Add Computer','Remove Computer']]])], layout = [[sg.Menu([['File', ['Open', 'Save', 'Add Computer','Remove Computer']]])],
[sg.Text("search"), sg.Input(s=(35,))], [sg.Text("search"), sg.Input(s=(35,))],
[sg.Input(s=(19,)),sg.Input(s=(6,)),sg.Input(s=(6,)),sg.Input(s=(4,))], [sg.Input(s=(19,),enable_events=True,key="filter Serial Number"),
sg.Input(s=(6,),enable_events=True,key="filter Brand"),
sg.Input(s=(6,),enable_events=True,key="filter Grade"),
sg.Input(s=(4,),enable_events=True,key="filter Name")],
[sg.Table([["word","Yes"]],colum_lut,key = "table", enable_events=True)], [sg.Table([["word","Yes"]],colum_lut,key = "table", enable_events=True)],
[sg.Text("Serial Number")], [sg.Text("Serial Number")],
[sg.Input(key='Serial Number')], [sg.Input(key='Serial Number')],
@ -97,6 +100,10 @@ def main():
print(f'Click on column {column}') print(f'Click on column {column}')
# Sort data on the table by the value of column # Sort data on the table by the value of column
# then update window['-TABLE-'].update(values=new_data) # then update window['-TABLE-'].update(values=new_data)
else:
print(event, values[event])
Computers=Query()
print(db.search(Computers[event[7:]].find(values[event])!=-1))
# Finish up by removing from the screen # Finish up by removing from the screen