Better speccing and cleanup in between commit
This commit is contained in:
@@ -72,7 +72,15 @@ root.Qsupplier=
|
||||
else if e.event == 'orders_placed_count'
|
||||
$('.supplier-orders-placed-count-number').text e.data.count
|
||||
else if e.event == 'list_changed_table'
|
||||
App && App.List.updateOrAdd(e.data.list)
|
||||
# App && App.List.updateOrAdd(e.data.list)
|
||||
# App.store().update 'list', e.data.list
|
||||
#TODO: waiting for single source of truth
|
||||
if list = App.List.findCached(e.data.list.id)
|
||||
list.get('table').set('active_list', null)
|
||||
App.store().findById('table', e.data.list.table_id).then (new_table)->
|
||||
list.set('table', new_table)
|
||||
new_table.set('active_list', list) # making reverse association
|
||||
|
||||
else if e.event == 'order_cancelled'
|
||||
if App and order = App.Order.findCached(e.data.id)
|
||||
order.markCancelled()
|
||||
|
||||
Reference in New Issue
Block a user