From 21bd0f95754768995d8e89b695de651d0ceee73f Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 21 Nov 2017 16:04:45 +0630 Subject: [PATCH] update sqa testing feedback --- app/assets/javascripts/addorder.js | 13 ++- app/controllers/origami/surveys_controller.rb | 1 + app/views/crm/customers/_new_form.html.erb | 8 +- .../origami/credit_payments/index.html.erb | 16 ++-- app/views/origami/discounts/index.html.erb | 4 +- app/views/origami/home/show.html.erb | 4 +- app/views/origami/surveys/_form.html.erb | 86 +++++++++++++------ app/views/reports/dailysale/index.html.erb | 2 +- .../membership_settings/index.html.erb | 2 +- 9 files changed, 90 insertions(+), 46 deletions(-) diff --git a/app/assets/javascripts/addorder.js b/app/assets/javascripts/addorder.js index 4057bf5f..8db28bd9 100755 --- a/app/assets/javascripts/addorder.js +++ b/app/assets/javascripts/addorder.js @@ -465,7 +465,7 @@ $(function() { // click select option icon for add $(document).on('click', '.attribute_btn', function(event){ - $('.change_qty').val(1); + // $('.change_qty').val(1); value = $(this).data('value'); type = $(this).data('type'); instances = $(this).data('instances'); @@ -505,6 +505,8 @@ $(function() { // click select option icon for add $(document).on('click', '.option_btn', function(event){ + active =$(this).hasClass('selected-option'); + console.log(active); value = $(this).data('value'); type = $(this).data('type'); group = $(this).data('group'); @@ -514,7 +516,12 @@ $(function() { $('.'+type).removeClass("selected-option"); } }); - $(this).addClass('selected-option'); + if (active) { + $(this).revoveClass('selected-option'); + }else{ + $(this).addClass('selected-option'); + } + if(group == "set_menu"){ code = $(this).data('code'); @@ -858,7 +865,7 @@ $(function() { id = $(this).attr('id'); value = $(this).val(); - + $('#count').attr('value',value); if (id=="count") { price = $("#unit_price").text(); $("#total_price").text(value*price); diff --git a/app/controllers/origami/surveys_controller.rb b/app/controllers/origami/surveys_controller.rb index cf348481..b1baa0a8 100644 --- a/app/controllers/origami/surveys_controller.rb +++ b/app/controllers/origami/surveys_controller.rb @@ -30,6 +30,7 @@ class Origami::SurveysController < BaseOrigamiController end # end end + private # Never trust parameters from the scary internet, only allow the white list through. diff --git a/app/views/crm/customers/_new_form.html.erb b/app/views/crm/customers/_new_form.html.erb index 992512f2..967fad2d 100755 --- a/app/views/crm/customers/_new_form.html.erb +++ b/app/views/crm/customers/_new_form.html.erb @@ -5,13 +5,13 @@

- + <%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr", :style=>"width: 30px"%> - + <%= f.radio_button :salutation,"Mrs", :class => "salutation mrs with-gap radio-col-indigo", :value=>"Mrs", :style=>"width: 30px"%> - + <%= f.radio_button :salutation,"Miss", :class => "salutation miss with-gap radio-col-indigo", :value=>"Miss", :style=>"width: 30px"%> - + <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
diff --git a/app/views/origami/credit_payments/index.html.erb b/app/views/origami/credit_payments/index.html.erb index a913f579..e9ccc8c4 100755 --- a/app/views/origami/credit_payments/index.html.erb +++ b/app/views/origami/credit_payments/index.html.erb @@ -95,16 +95,16 @@
-
-
1000
-
3000
+
+
1000
+
3000
-
-
5000
-
10000
+
+
5000
+
10000
-
-
Pay
+
+
Pay
diff --git a/app/views/origami/discounts/index.html.erb b/app/views/origami/discounts/index.html.erb index 2549849a..88e2283a 100755 --- a/app/views/origami/discounts/index.html.erb +++ b/app/views/origami/discounts/index.html.erb @@ -194,10 +194,10 @@
-
+
- +
diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index 38d93892..9b129534 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -361,7 +361,7 @@ <% if @dining.status != "available" %> - <% if @status_order == 'order' %> + <% if @status_order == 'order' && @status_sale != 'sale' %> @@ -379,8 +379,6 @@ - - diff --git a/app/views/origami/surveys/_form.html.erb b/app/views/origami/surveys/_form.html.erb index 5a99b74b..b1853eeb 100755 --- a/app/views/origami/surveys/_form.html.erb +++ b/app/views/origami/surveys/_form.html.erb @@ -5,33 +5,41 @@ <%= f.error_notification %>
- <%= f.input :child%> - <%= f.input :adult %> - <%= f.input :male %> - <%= f.input :female %> - <%= f.input :local %> + <%= f.input :child , input_html: { class: 'col-md-8' }%> + <%= f.input :adult , input_html: { class: 'col-md-8' }%> + <%= f.input :male , input_html: { class: 'col-md-8' }%> + <%= f.input :female , input_html: { class: 'col-md-8' }%> + <%= f.input :total_customer, input_html: { class: 'col-md-8'} %> + <%= f.input :local , input_html: { class: 'col-md-8' }%>
-
-
- - +
-
- -
- - +
+
+ +
+
+
+ +
- <%= f.input :total_customer %> + + <%= f.input :dining_name, :as => :hidden, :input_html => { :value => @dining_facility.name } %> <%= f.input :created_by, :as => :hidden, :input_html => { :value => current_login_employee.name } %> @@ -77,15 +85,45 @@ \ No newline at end of file diff --git a/app/views/reports/dailysale/index.html.erb b/app/views/reports/dailysale/index.html.erb index 6b5177c2..e258f892 100755 --- a/app/views/reports/dailysale/index.html.erb +++ b/app/views/reports/dailysale/index.html.erb @@ -21,7 +21,7 @@
-
+
diff --git a/app/views/settings/membership_settings/index.html.erb b/app/views/settings/membership_settings/index.html.erb index 65715af8..d9d752db 100755 --- a/app/views/settings/membership_settings/index.html.erb +++ b/app/views/settings/membership_settings/index.html.erb @@ -2,7 +2,7 @@