User foundation setup
This commit is contained in:
@@ -5,8 +5,8 @@ App.TableController = Ember.ObjectController.extend
|
||||
|
||||
actions:
|
||||
clearProductOrders: ->
|
||||
@get('product_orders').toArray().forEach (product_order)->
|
||||
product_order.unloadRecord()
|
||||
# toArray is needed because without is the iterator is not working properly
|
||||
@get('product_orders').toArray().invoke 'unloadRecord'
|
||||
orderProducts: ->
|
||||
orders = @get('product_orders').toArray()
|
||||
data = orders.map( (order)->order.serialize() )
|
||||
|
||||
@@ -12,11 +12,11 @@ h4
|
||||
= product_order.quantity
|
||||
| x
|
||||
= product_order.product.name
|
||||
span.currency=currency product_order.product.price
|
||||
span.currency=currency product_order.total
|
||||
else
|
||||
li No products
|
||||
li= t 'product_orders.no_orders'
|
||||
li.total
|
||||
| Total
|
||||
= t 'product_orders.total'
|
||||
span.currency=currency orderTotal
|
||||
if product_orders
|
||||
a.tiny.button.right{action orderProducts} href="#" = t 'product_orders.order_button'
|
||||
|
||||
Reference in New Issue
Block a user