Highlight former Employee records as red/warning
This commit is contained in:
parent
1bb0330ab5
commit
69eb54abf6
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue