Start with supplier foundation style

This commit is contained in:
2014-04-10 18:31:51 +02:00
parent 19acd26dbc
commit 0942cf4b1d
22 changed files with 1610 additions and 114 deletions
@@ -0,0 +1,21 @@
class List
constructor: (@attributes)->
id: -> @attributes.id || @attributes._id
table_number: -> @attributes.table_number
total_amount: -> @attributes.total_amount
section_title: -> @attributes.section_title
needs_help: -> @attributes.needs_help
needs_payment: -> @attributes.needs_payment
active: -> @attributes.state == 'active'
table_id: -> @attributes.table_id
products: -> @attributes.products || []
has_active_orders: -> @attributes.has_active_orders
supplier_name: -> @attributes.supplier_name
created_at: -> @attributes.created_at
display: ->
txt = @supplier_name()
txt += ' - '
txt += Quser.format_date(@created_at())
txt
@List = List