remove denormalization of lists and orders towards the section
This commit is contained in:
@@ -6,7 +6,7 @@ App.IndexController = Ember.Controller.extend
|
||||
orders: Ember.computed -> @store.peekAll('order')
|
||||
sections: Ember.computed -> @store.peekAll('section')
|
||||
#active_section: Ember.computed.alias 'globals.active_section'
|
||||
active_lists: Ember.computed 'lists.@each.state', 'globals.active_section.id', 'lists.@each.table', ->
|
||||
active_lists: Ember.computed 'lists.@each.state', 'globals.active_section.id', 'lists.@each.table', -> # table needed for when list changes table
|
||||
@get('orders') # trigger orders, otherwise observers are not initialized/triggered (active_orders)
|
||||
if section_id = @get('globals.active_section.id')
|
||||
lists = @get('lists').filter (l)=>( l.get('table.section.id') == section_id && l.get('state') == 'active' )
|
||||
|
||||
Reference in New Issue
Block a user