JSONApi progress
This commit is contained in:
@@ -4,6 +4,7 @@ App.MenuProductCategoriesComponent = Ember.Component.extend
|
||||
active_product_categories: (->
|
||||
console.log "Reevaluate product categories"
|
||||
list = @get('product_categories')
|
||||
return [] unless list
|
||||
now = new Date()
|
||||
list = list.filter (product_category) =>
|
||||
return false unless product_category.get("active_on_#{$day_names[now.getDay()]}")
|
||||
|
||||
@@ -8,7 +8,7 @@ App.TableController = Ember.Controller.extend
|
||||
else
|
||||
# no list and open supplier
|
||||
if @get('model.occupied') then false else true
|
||||
).property('globals.active_list.id', 'supplier.can_take_orders', 'model.occupied', 'model.id', 'globals.active_list.table.id')
|
||||
).property('globals.active_list.id', 'model.supplier.can_take_orders', 'model.occupied', 'model.id', 'globals.active_list.table.id', 'model.supplier.id')
|
||||
supplier: Ember.computed.alias 'model.supplier'
|
||||
showJoinButton: Ember.computed 'globals.active_list.id', 'supplier.can_take_orders', 'model.occupied', 'model.id', 'globals.active_list.table.id', ->
|
||||
return false unless @get('supplier.can_take_orders')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.row: .small-12.columns
|
||||
h3
|
||||
span.supplier-name= supplier.name
|
||||
span.supplier-name= model.supplier.name
|
||||
span.table-number
|
||||
' #
|
||||
= model.number
|
||||
@@ -13,7 +13,7 @@
|
||||
button.join-table-button{action "joinOccupiedTable"}=t 'join_request.requestor.join_this_table'
|
||||
.row
|
||||
if tableCanTakeOrders
|
||||
.large-6.columns= menu-product-categories product_categories=supplier.product_categories orderProducts=true
|
||||
.large-6.columns= menu-product-categories product_categories=model.supplier.product_categories orderProducts=true
|
||||
.large-6.columns= new-product-orders-list table=model
|
||||
else
|
||||
.large12= menu-product-categories product_categories=supplier.product_categories orderProducts=false
|
||||
.large12= menu-product-categories product_categories=model.supplier.product_categories orderProducts=false
|
||||
|
||||
Reference in New Issue
Block a user