move to evented mustache system

This commit is contained in:
2012-11-28 20:15:59 +01:00
parent 3da9dc68d7
commit 0fa0d1e0ba
31 changed files with 324 additions and 176 deletions
@@ -0,0 +1,17 @@
class Order
constructor: (@attributes)->
table_number: -> @attributes.table_number
id: -> @attributes.id || @attributes._id
total_amount: -> @attributes.total_amount
section_title: -> @attributes.section_title
list_id: -> @attributes.list_id
state: -> @attributes.state
display: ->
order_txts = []
return '' unless @attributes.products
for product in @attributes.products
order_txts.push(product.name + ' (' + product.number + ')')
order_txts.join(', ')
can_process: -> @attributes.state == 'placed'
@Order = Order