From 69eb54abf63bf67e99685eb307ca2f24c2d6406b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 3 Aug 2019 17:18:53 -0500 Subject: [PATCH] Highlight former Employee records as red/warning --- tailbone/views/employees.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tailbone/views/employees.py b/tailbone/views/employees.py index b500d2fc..d6b1ffb2 100644 --- a/tailbone/views/employees.py +++ b/tailbone/views/employees.py @@ -141,6 +141,10 @@ class EmployeesView(MasterView): q = q.filter(model.Employee.status == self.enum.EMPLOYEE_STATUS_CURRENT) return q + def grid_extra_class(self, employee, i): + if employee.status == self.enum.EMPLOYEE_STATUS_FORMER: + return 'warning' + def editable_instance(self, employee): if self.rattail_config.demo(): return not bool(employee.user and employee.user.username == 'chuck')