diff --git a/tailbone/views/people.py b/tailbone/views/people.py index 969693d7..183c63a5 100644 --- a/tailbone/views/people.py +++ b/tailbone/views/people.py @@ -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)())