g
sort supplier dashboard from old to new
This commit is contained in:
@@ -5,17 +5,19 @@ App.IndexController = Ember.ObjectController.extend
|
||||
sections: (-> @store.all('section')).property()
|
||||
active_lists: (->
|
||||
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
|
||||
@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')
|
||||
|
||||
active_section: (-> @get('controllers.application.active_section')).property('controllers.application.active_section')
|
||||
active_orders: (->
|
||||
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
|
||||
@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')
|
||||
|
||||
actions:
|
||||
|
||||
@@ -57,6 +57,10 @@ Supplier
|
||||
- https://github.com/buytruckload/geonames_api
|
||||
- Section view
|
||||
- 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 broadcast to current users option
|
||||
|
||||
|
||||
Reference in New Issue
Block a user