no success

This commit is contained in:
2016-06-02 15:22:47 +02:00
parent eb368a31ca
commit e4461d3d29
@@ -9,7 +9,9 @@ App.IndexController = Ember.Controller.extend
active_lists: Ember.computed 'lists.@each.state', 'globals.active_section.id', 'lists.@each.table', -> # table needed for when list changes 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) @get('orders') # trigger orders, otherwise observers are not initialized/triggered (active_orders)
if section_id = @get('globals.active_section.id') if section_id = @get('globals.active_section.id')
lists = @get('lists').filter (l)=>( l.get('table.section.id') == section_id && l.get('state') == 'active' ) lists = @get('lists').filter (list) =>
return false unless list.get('state') is 'active'
list.get('table.section.id') is section_id
else else
lists = @get('lists').filterBy('state', 'active') lists = @get('lists').filterBy('state', 'active')
lists.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first, work your way down :-) Customer happyness lists.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first, work your way down :-) Customer happyness