Fix product ordering pricing and improve acceptance user product ordering coverage
This commit is contained in:
@@ -21,7 +21,7 @@ App.TableController = Ember.ObjectController.extend
|
||||
if existing = @store.all('product_order').find((po)-> po.get('product') == product and not po.get('order'))
|
||||
existing.increment()
|
||||
else
|
||||
@store.createRecord 'product_order', product: product
|
||||
@store.createRecord 'product_order', product: product, price: product.get('price')
|
||||
joinOccupiedTable: ->
|
||||
#@secured =>
|
||||
Ember.$.post('/user/join_occupied_table.json', table_id: @get('model.id'))
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
hr.hide-for-medium-up
|
||||
if modelDisabled
|
||||
a.tiny.button.right{action clearProductOrders} href="#" ×
|
||||
a.tiny.button.right{action "clearProductOrders"} href="#" ×
|
||||
.clearfix
|
||||
.panel
|
||||
ul.product-orders
|
||||
each product_order in product_orders
|
||||
li.product_order
|
||||
li.product-order
|
||||
= product_order.quantity
|
||||
| x
|
||||
| x
|
||||
= product_order.product.name
|
||||
button.product_order-remove.right{action removeProductOrder product_order}
|
||||
button.product-order-remove.right{action "removeProductOrder" product_order}
|
||||
span.icon
|
||||
span.currency=currency product_order.total
|
||||
else
|
||||
@@ -19,4 +19,4 @@ if modelDisabled
|
||||
= t 'product_orders.total'
|
||||
span.right.currency=currency orderTotal
|
||||
if product_orders
|
||||
a.order-selected-products-button{action orderProducts} href="#"= t 'product_orders.order_button'
|
||||
a.order-selected-products-button{action "orderProducts"} href="#"= t 'product_orders.order_button'
|
||||
|
||||
Reference in New Issue
Block a user