Fix list table dependency on supplier dashboard

This commit is contained in:
2015-10-08 18:19:20 +02:00
parent 7fa9a7d941
commit 709bd59c0c
3 changed files with 7 additions and 13 deletions
@@ -5,7 +5,7 @@ App.IndexController = Ember.Controller.extend
orders: Ember.computed -> @store.peekAll('order')
sections: (-> @store.peekAll('section')).property()
active_section: Ember.computed.alias 'globals.active_section'
active_lists: Ember.computed 'lists.@each.state', 'active_section.id', ->
active_lists: Ember.computed 'lists.@each.state', 'active_section.id', 'lists.@each.table', ->
@get('orders') # trigger orders, otherwise observers are not initialized/triggered (active_orders)
if section_id = @get('active_section.id')
lists = @get('lists').filter (l)=>( l.get('section.id') == section_id && l.get('state') == 'active' )