Fix selecting only active employees in the employees selector for suppliers

This commit is contained in:
2015-02-20 23:58:04 +01:00
parent 348f994765
commit e60955130a
@@ -1,7 +1,8 @@
App.modals.SelectEmployeeController = App.modals.BaseController.extend App.modals.SelectEmployeeController = App.modals.BaseController.extend
employee: null employee: null
title_path: 'employee.select_modal.title' title_path: 'employee.select_modal.title'
employees: (-> @store.all('employee').filterBy('active') ).property() employees: (-> @get('all_employees').filterBy('active') ).property('all_employees.@each.active')
all_employees: (-> @store.all('employee')).property()
actions: actions:
selectEmployee: (employee)-> selectEmployee: (employee)->
@set 'employee', employee @set 'employee', employee