Use end time as default filter, sort for Trainwreck

This commit is contained in:
Lance Edgar 2021-02-18 20:02:53 -06:00
parent 26d7ab080f
commit 89bb0aa56d

View file

@ -60,7 +60,6 @@ class TransactionView(MasterView):
grid_columns = [ grid_columns = [
'start_time', 'start_time',
'end_time', 'end_time',
'upload_time',
'system', 'system',
'terminal_id', 'terminal_id',
'receipt_number', 'receipt_number',
@ -143,10 +142,11 @@ class TransactionView(MasterView):
super(TransactionView, self).configure_grid(g) super(TransactionView, self).configure_grid(g)
g.filters['receipt_number'].default_active = True g.filters['receipt_number'].default_active = True
g.filters['receipt_number'].default_verb = 'equal' g.filters['receipt_number'].default_verb = 'equal'
g.filters['upload_time'].default_active = True
g.filters['upload_time'].default_verb = 'equal' g.filters['end_time'].default_active = True
g.filters['upload_time'].default_value = six.text_type(localtime(self.rattail_config).date()) g.filters['end_time'].default_verb = 'equal'
g.set_sort_defaults('upload_time', 'desc') g.filters['end_time'].default_value = six.text_type(localtime(self.rattail_config).date())
g.set_sort_defaults('end_time', 'desc')
g.set_enum('system', self.enum.TRAINWRECK_SYSTEM) g.set_enum('system', self.enum.TRAINWRECK_SYSTEM)
g.set_type('total', 'currency') g.set_type('total', 'currency')