sort supplier dashboard from old to new
This commit is contained in:
2014-09-05 16:20:08 +02:00
parent ad7b396dd1
commit 3491e77951
2 changed files with 10 additions and 4 deletions
@@ -5,17 +5,19 @@ App.IndexController = Ember.ObjectController.extend
sections: (-> @store.all('section')).property() sections: (-> @store.all('section')).property()
active_lists: (-> active_lists: (->
if @get('controllers.application.active_section.id') if @get('controllers.application.active_section.id')
@get('lists').filter (l)=>( l.get('section.id') == @get('controllers.application.active_section.id') && l.get('state') == 'active' ) lists = @get('lists').filter (l)=>( l.get('section.id') == @get('controllers.application.active_section.id') && l.get('state') == 'active' )
else else
@get('lists').filterProperty('state', 'active') lists = @get('lists').filterProperty('state', 'active')
lists.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first :-) Customer happyness
).property('lists.@each.state', 'controllers.application.active_section.id') ).property('lists.@each.state', 'controllers.application.active_section.id')
active_section: (-> @get('controllers.application.active_section')).property('controllers.application.active_section') active_section: (-> @get('controllers.application.active_section')).property('controllers.application.active_section')
active_orders: (-> active_orders: (->
if @get('active_section.id') if @get('active_section.id')
@get('orders').filter (o)=>( o.get('section.id') == @get('active_section.id') && o.get('needs_supplier_attention') ) orders = @get('orders').filter (o)=>( o.get('section.id') == @get('active_section.id') && o.get('needs_supplier_attention') )
else else
@get('orders').filter (o)->( o.get('needs_supplier_attention') ) orders = @get('orders').filter (o)->( o.get('needs_supplier_attention') )
orders.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first :-) Customer happyness
).property('orders.@each.state', 'active_section.id') ).property('orders.@each.state', 'active_section.id')
actions: actions:
+4
View File
@@ -57,6 +57,10 @@ Supplier
- https://github.com/buytruckload/geonames_api - https://github.com/buytruckload/geonames_api
- Section view - Section view
- add order vinkjes (active, delivered) management to table actions (post release) - add order vinkjes (active, delivered) management to table actions (post release)
- List view
- add order vinkjes (active, delivered) management to orders of active list
- Dashboard
- toggle lists and orders same way as user product categories using controller setting
- Add opening hours to settings with special cases - Add opening hours to settings with special cases
- Add broadcast to current users option - Add broadcast to current users option