Fix closing list problem not unlinking the table active list

This commit is contained in:
2014-12-17 17:51:31 +01:00
parent bdcb0d60b8
commit 87881177ab
8 changed files with 24 additions and 21 deletions
@@ -21,6 +21,7 @@ App.List = DS.Model.extend
markClosed: ->
@set('state', 'closed')
#@set 'has_active_orders', false
@set 'table', null
@markHelped()
@markIsPaid()
markHelped: ->
@@ -32,3 +32,7 @@ App.Order = DS.Model.extend
display: (->
@get('product_orders').map((po) -> "#{po.get('quantity')} x #{po.get('product.name')}").join(', ')
).property('product_orders.@each.quantity', 'product_orders.@each.product.@each.name')
display_tag: (->
"<span class='display order-display order-#{@get('id')} #{@get('state')}'><span class='pre-display'></span>#{@get('display')}<span class='post-display'></span></span>".htmlSafe()
).property('display', 'state')