7 lines
459 B
CoffeeScript
7 lines
459 B
CoffeeScript
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.table.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
|