move to evented mustache system
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user