From 785541e438974c98bfa05e7d98326e8816b0e37d Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 28 Nov 2017 14:16:25 +0630 Subject: [PATCH 1/2] change report filter UI and check focus for datepicker --- app/assets/javascripts/application.js | 2 +- .../_commission_report_filter.html.erb | 30 +++++++++---------- .../_shift_sale_report_filter.html.erb | 6 ++-- .../_shift_sale_report_filter.html.erb | 6 ++-- .../_shift_sale_report_filter.html.erb | 6 ++-- .../_shift_sale_report_filter.html.erb | 6 ++-- .../_stock_check_report_filter.html.erb | 4 +-- .../_shift_sale_report_filter.html.erb | 6 ++-- 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 249a933f..cc1317a5 100755 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -107,7 +107,7 @@ $(document).ready(function() { } }); - $('form:first *:input[type!=hidden]:first').focus(); + $('form:first *input[data-behaviour!=datepicker]:input[type!=hidden]:first').focus(); // $(document).on("focus", "[data-behaviour~='datepicker']", function(e){ // $(this).datepicker({"format": "yyyy-M-dd", "weekStart": 1, "autoclose": true}); diff --git a/app/views/reports/commission/_commission_report_filter.html.erb b/app/views/reports/commission/_commission_report_filter.html.erb index 0e2f71f8..d7d41eb6 100755 --- a/app/views/reports/commission/_commission_report_filter.html.erb +++ b/app/views/reports/commission/_commission_report_filter.html.erb @@ -1,7 +1,7 @@
-<%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %> + <%= form_tag report_path, :method => :get, :id => "frm_report", :class => "form" do %> <% if period_type != false %> -
+
- - - -
-
- - -
+ + + +
+
+ + +
- <% @commissioner.each do |c| %> <% if @com_id == c.id %> @@ -34,16 +34,16 @@
-
+
+
+ <% end %> + <% end %>
- <% end %> -<% end %> - - +
- +
-
diff --git a/app/views/reports/payment_method/_shift_sale_report_filter.html.erb b/app/views/reports/payment_method/_shift_sale_report_filter.html.erb index 3a7f93c3..30463ed2 100755 --- a/app/views/reports/payment_method/_shift_sale_report_filter.html.erb +++ b/app/views/reports/payment_method/_shift_sale_report_filter.html.erb @@ -27,15 +27,15 @@
- +
- +
-
diff --git a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb b/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb index d791852f..2534eba0 100755 --- a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb +++ b/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb @@ -27,15 +27,15 @@
- +
- +
-
diff --git a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb index 34b324a6..8e6a87a0 100755 --- a/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb +++ b/app/views/reports/shiftsale/_shift_sale_report_filter.html.erb @@ -21,15 +21,15 @@
- +
- +
-

diff --git a/app/views/reports/stock_check/_stock_check_report_filter.html.erb b/app/views/reports/stock_check/_stock_check_report_filter.html.erb index b7bb304d..a058d442 100755 --- a/app/views/reports/stock_check/_stock_check_report_filter.html.erb +++ b/app/views/reports/stock_check/_stock_check_report_filter.html.erb @@ -14,11 +14,11 @@
- +
- +
diff --git a/app/views/reports/void_sale/_shift_sale_report_filter.html.erb b/app/views/reports/void_sale/_shift_sale_report_filter.html.erb index 46bf04eb..94c8a012 100755 --- a/app/views/reports/void_sale/_shift_sale_report_filter.html.erb +++ b/app/views/reports/void_sale/_shift_sale_report_filter.html.erb @@ -22,15 +22,15 @@
- +
- +
-
From f669101d3cd79397626f5dfb6a406f0c776545a1 Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 28 Nov 2017 14:57:18 +0630 Subject: [PATCH 2/2] remove blank in collection select for menu item and menu item instance --- app/views/settings/menu_item_instances/_form.html.erb | 2 +- app/views/settings/set_menu_items/_form.html.erb | 2 +- app/views/settings/simple_menu_items/_form.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/settings/menu_item_instances/_form.html.erb b/app/views/settings/menu_item_instances/_form.html.erb index ceadea31..58c82852 100755 --- a/app/views/settings/menu_item_instances/_form.html.erb +++ b/app/views/settings/menu_item_instances/_form.html.erb @@ -11,7 +11,7 @@ <%= f.input :item_instance_name %> <%= f.input :price %> - <%= f.input :item_attributes, collection: @item.item_attributes%> + <%= f.input :item_attributes, collection: @item.item_attributes, include_blank: false, include_hidden: false%> <%= f.input :is_on_promotion %> <%= f.input :promotion_price %> diff --git a/app/views/settings/set_menu_items/_form.html.erb b/app/views/settings/set_menu_items/_form.html.erb index 21e86e85..4b7d570e 100755 --- a/app/views/settings/set_menu_items/_form.html.erb +++ b/app/views/settings/set_menu_items/_form.html.erb @@ -10,7 +10,7 @@ <%= f.input :item_code,:input_html => {:class => "col-md-9"} %> <%= f.input :name,:input_html => {:class => "col-md-9"} %> <%= f.input :alt_name,:input_html => {:class => "col-md-9"} %> - <%= f.input :type, :collection => ["SimpleMenuItem","SetMenuItem"], :input_html => {:class => "col-md-9"},:input_html => {:class => "col-md-9"} %> + <%= f.input :type, :collection => ["SimpleMenuItem","SetMenuItem"], :input_html => {:class => "col-md-9"},:input_html => {:class => "col-md-9"}, include_blank: false, include_hidden: false %> <%= f.input :min_qty,:input_html => {:class => "col-md-9"} %> <%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %> diff --git a/app/views/settings/simple_menu_items/_form.html.erb b/app/views/settings/simple_menu_items/_form.html.erb index 4e953ccd..7fd4b353 100755 --- a/app/views/settings/simple_menu_items/_form.html.erb +++ b/app/views/settings/simple_menu_items/_form.html.erb @@ -10,7 +10,7 @@ <%= f.input :item_code,:input_html => {:class => "col-md-9"} %> <%= f.input :name,:input_html => {:class => "col-md-9"} %> <%= f.input :alt_name,:input_html => {:class => "col-md-9"} %> - <%= f.input :type, :collection => ["SimpleMenuItem","SetMenuItem"], :input_html => {:class => "col-md-9"} %> + <%= f.input :type, :collection => ["SimpleMenuItem","SetMenuItem"], :input_html => {:class => "col-md-9"}, include_blank: false, include_hidden: false %> <%= f.input :min_qty,:input_html => {:class => "col-md-9"} %> <%= f.input :account_id, :label => "Account type", :collection => Account.collection,:input_html => {:class => "col-md-9"} %>