Add the "Employee Status" filter to People grid
This commit is contained in:
parent
04ba14fcd7
commit
2ad0223e9a
|
@ -121,6 +121,10 @@ class PeopleView(MasterView):
|
|||
g.filters['last_name'].default_active = True
|
||||
g.filters['last_name'].default_verb = 'contains'
|
||||
|
||||
g.set_joiner('employee_status', lambda q: q.outerjoin(model.Employee))
|
||||
g.set_filter('employee_status', model.Employee.status,
|
||||
value_enum=self.enum.EMPLOYEE_STATUS)
|
||||
|
||||
g.sorters['email'] = lambda q, d: q.order_by(getattr(model.PersonEmailAddress.address, d)())
|
||||
g.sorters['phone'] = lambda q, d: q.order_by(getattr(model.PersonPhoneNumber.number, d)())
|
||||
|
||||
|
|
Loading…
Reference in a new issue