Some more changes because I cannot stop
This commit is contained in:
@@ -16,7 +16,7 @@ Qsupplier.App.List = DS.Model.extend
|
||||
orders: DS.hasMany('order')
|
||||
section: DS.belongsTo('section')
|
||||
section_id: attr('string')
|
||||
active: ( -> @get('state') == 'active' ).property('state')
|
||||
active: ( -> @get('state') is 'active' ).property('state')
|
||||
markClosed: ->
|
||||
@set('state', 'closed')
|
||||
#@set 'has_active_orders', false
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
.table-number {{table.number}}
|
||||
.table-number= table.number
|
||||
.status-icons
|
||||
span.needs_payment
|
||||
span.needs_help
|
||||
span.active_order
|
||||
div class="table-actions table-actions-#{unbound table.id}"
|
||||
.title= table.number
|
||||
if table.active_list
|
||||
if table.active_list
|
||||
div class="table-actions table-actions-#{unbound table.id}"
|
||||
.title= table.number
|
||||
.table-action-row
|
||||
Qsupplier.App.MarkListHelpedButtonView content=table.active_list
|
||||
Qsupplier.App.CloseListButtonView content=table.active_list
|
||||
.table-action-row=currency table.active_list.total
|
||||
each user in table.active_list.users
|
||||
img src=user.facebook_image
|
||||
each user in table.active_list.users
|
||||
img src=user.facebook_image
|
||||
if editmodedisabled
|
||||
.table-settings
|
||||
select
|
||||
|
||||
@@ -32,7 +32,9 @@ root.Qsupplier=
|
||||
if list = Qsupplier.App.List.findCached(e.data.id)
|
||||
list.markIsPaid()
|
||||
else if e.event == 'list_update'
|
||||
Qsupplier.App.List.updateOrAdd(e.data.list) if Qsupplier.App
|
||||
if Qsupplier.App
|
||||
list = Qsupplier.App.List.updateOrAdd(e.data.list)
|
||||
debugger
|
||||
else if e.event == 'list_closed'
|
||||
if Qsupplier.App and list = Qsupplier.App.List.findCached(e.data.id)
|
||||
list.markClosed()
|
||||
|
||||
Reference in New Issue
Block a user