From a043a33ca55549fdb4ee486dbb7d09afa9b55be0 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 24 Aug 2017 18:10:23 +0630 Subject: [PATCH] update addorder --- app/views/origami/addorders/show.html.erb | 111 +++++++++++++++------- 1 file changed, 79 insertions(+), 32 deletions(-) diff --git a/app/views/origami/addorders/show.html.erb b/app/views/origami/addorders/show.html.erb index fdea2efc..8f9b1c08 100644 --- a/app/views/origami/addorders/show.html.erb +++ b/app/views/origami/addorders/show.html.erb @@ -109,11 +109,14 @@

Total

-

+

-
+
+
@@ -124,7 +127,7 @@
@@ -163,13 +166,10 @@ $(function(){ success: function(data) { var menu_items_list = $('.menu_items_list'); menu_items_list.empty(); - menu_items = data.menu_items; for(var field in menu_items) { - instances = menu_items[field].instances ; - $(instances).each(function(i){ if (instances[i].is_default === true) { code = instances[i].code; @@ -177,22 +177,22 @@ $(function(){ price = parseFloat(instances[i].price).toFixed(2); is_available = instances[i].is_available ; is_on_promotion = instances[i].is_on_promotion; - item_attributes = instances[i].item_attributes; + item_attributes = instances[i].values; promotion_price = instances[i].promotion_price; code = instances[i].code; } }); - + row = '
' +'
' +''+ menu_items[field].name +'' - +"
'" + +"
" +'' +'
' +'
' - +"