Fix suppliers switcher component

This commit is contained in:
2015-02-27 16:22:58 +01:00
parent 0e08a04df8
commit 832f80e20e
@@ -1,7 +1,8 @@
App.SuppliersSwitcherComponent = Ember.Component.extend
classNames: ['suppliers-switcher-container']
suppliers: (-> @get('targetObject.store').all 'supplier').property()
other_suppliers: ( -> @get('suppliers').rejectBy 'id', @get('targetObject.controllers.application.supplier.id')).property('suppliers.@each')
other_suppliers: ( -> @get('suppliers').rejectBy 'id', @get('current_supplier.id')).property('suppliers.@each')
current_supplier: Ember.computed.alias 'targetObject.controllers.application.supplier'
actions:
switchTo: (locale)->
setLocale locale