Greenification of the specs

This commit is contained in:
2015-10-06 17:20:56 +02:00
parent 2df5b290ef
commit 0985881552
16 changed files with 48 additions and 34 deletions
@@ -0,0 +1,6 @@
App.OrdersDisplayController = Ember.Controller.extend
sections: Ember.computed -> @store.peekAll('section')
orders: Ember.computed 'model.[]', 'globals.active_section.id', ->
orders = @get('model').filterBy('needs_supplier_attention')
orders = orders.filterBy('list.section.id', id) if id = @get('globals.active_section.id')
orders.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first :-) Customer happyness