From 453435f8fa9e92dd7d296feefad6664fdc1f815f Mon Sep 17 00:00:00 2001 From: code2lab Date: Thu, 30 May 2019 14:00:39 +0630 Subject: [PATCH] Mobile Responsive for all reports --- app/assets/stylesheets/application.scss | 10 +++ ...hift_card_sale_tran_report_filter.html.erb | 60 +++++++------- .../reports/card_sale_tran/index.html.erb | 78 +++++++++---------- ...ft_card_settle_tran_report_filter.html.erb | 58 +++++++------- .../reports/card_settle_tran/index.html.erb | 66 ++++++++-------- .../_commission_report_filter.html.erb | 14 ++-- .../_shift_sale_report_filter.html.erb | 52 ++++++------- .../_shift_sale_report_filter.html.erb | 2 +- .../induty/_shift_sale_report_filter.html.erb | 34 ++++---- .../_shift_sale_report_filter.html.erb | 34 ++++---- .../_shift_sale_report_filter.html.erb | 42 +++++----- .../reports/payment_method/index.html.erb | 76 +++++++++--------- .../_shift_sale_report_filter.html.erb | 18 ++--- .../_shift_sale_report_filter.html.erb | 50 ++++++------ .../_shift_sale_report_filter.html.erb | 50 ++++++------ .../_shift_sale_report_filter.html.erb | 38 ++++----- .../_stock_check_report_filter.html.erb | 18 ++--- .../_shift_sale_report_filter.html.erb | 28 +++---- app/views/reports/void_sale/index.html.erb | 44 +++++------ 19 files changed, 391 insertions(+), 381 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c7037f08..6d9f03e6 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -204,4 +204,14 @@ i.logout_icon{ .mbl-right-btn{ text-align: right; } + + .mbl-table{ + display: block; + overflow: scroll; + } + + .mbl-table-card{ + overflow: scroll; + display: inline-block; + } } diff --git a/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb b/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb index 0d70fe4f..e46b8408 100644 --- a/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb +++ b/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb @@ -2,15 +2,15 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
- + <% if defined? @payment_method %> -
- - <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> +
+ + <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
- <% end %> -
- + <% end %> +
+
<% if not defined? payments %> - -
- - + +
+ + -
+
<% end %> -
+
- +
-
- +
+
-
- +
+
-
+

-
-
+
+
<% end %> - <% end %> -
+ <% end %> +
\ No newline at end of file + diff --git a/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb b/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb index 0d70fe4f..fe2a7a62 100644 --- a/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb +++ b/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb @@ -2,15 +2,15 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
- + <% if defined? @payment_method %> -
- - <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> +
+ + <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
- <% end %> -
- + <% end %> +
+
<% if not defined? payments %> - -
+ +
- + -
+
<% end %> -
+
- +
-
- +
+
-
- +
+
-
+

-
-
+
+
<% end %> - <% end %> -
+ <% end %> +
\ No newline at end of file + diff --git a/app/views/reports/commission/_commission_report_filter.html.erb b/app/views/reports/commission/_commission_report_filter.html.erb index d7d41eb6..a39915b9 100755 --- a/app/views/reports/commission/_commission_report_filter.html.erb +++ b/app/views/reports/commission/_commission_report_filter.html.erb @@ -11,17 +11,17 @@ <% end %>
--> -
+
- +
-
- +
+
- +
-
+

@@ -89,4 +89,4 @@ }); - --> \ No newline at end of file + --> diff --git a/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb b/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb index 22ae03ce..4f960e96 100755 --- a/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb +++ b/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb @@ -2,8 +2,8 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
-
- +
+
<% if defined? filter_for_credit %> -
- +
+ <%= select_tag "filter_check", options_for_select(@filter_for_credit, :selected => params[:filter_check]), :class => "form-control", :style => "height: 37px;" %>
<% end %> -
- - <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %> -
-
+
+ + <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %> +
+
- +
-
- +
+
-
- +
+ -
-
+
+
-
+

-
+
<% end %> - <% end %> -
+ <% end %> +
\ No newline at end of file + + 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 a54afb7f..b2aeb16f 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 @@ -2,8 +2,8 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
-
- +
+
<% end %> -
+
- +
-
- +
+
-
- +
+
-
+
diff --git a/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb b/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb index 1d7c2a94..89264e82 100755 --- a/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb +++ b/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb @@ -2,8 +2,8 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
-
- +
+
<% if defined? payments %> - -
- - + +
+ + -
+
<% end %> -
+
- +
-
- +
+
-
- +
+
-
+

-
-
+
+
<% end %> - <% end %> -
+ <% end %> +
\ No newline at end of file + 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 32fcbf8f..485f9112 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 @@ -11,23 +11,23 @@ <% end %>
--> -
+
- +
-
- +
+
-
- +
+
-

+

- +
-
- +
+
-
- +
+
-
+

-
-
+
+
<% end %> <% end %>
@@ -60,7 +60,7 @@ $('#waiter').show(); if(payment_type){ $('#payment_type').hide(); - } + } } else if(item == 'sale'){ $('#waiter').hide(); @@ -68,7 +68,7 @@ } else{ $('#waiter').hide(); - $('#cashier').show(); + $('#cashier').show(); $("#item").val('sale'); } }); @@ -105,7 +105,7 @@ if(item == 'sale'){ $('#waiter').hide(); - $('#cashier').show(); + $('#cashier').show(); if(payment_type){ $('#payment_type').show(); } diff --git a/app/views/reports/void_sale/index.html.erb b/app/views/reports/void_sale/index.html.erb index d7b6ee10..e7ea05ea 100755 --- a/app/views/reports/void_sale/index.html.erb +++ b/app/views/reports/void_sale/index.html.erb @@ -19,12 +19,12 @@ +
-
-
+
+
<% if @sale_data.count > 0 %> @@ -35,19 +35,19 @@ <% end %> <% if @shift_from %> - <% if @shift %> + <% if @shift %> <% cashier_name = !@shift.nil? ? @shift[0].employee.name : '-' %> - <% end %> + <% end %> - <% end %> + <% end %> - + @@ -63,7 +63,7 @@ else delimiter = "" end - %> + %> <% total_amount = 0.0 %> <% grand_total = 0.0 %> <% rounding_adjustment = 0.0 %> @@ -76,7 +76,7 @@ - + @@ -113,8 +113,8 @@ var from = ""; var to = ""; - show_shift_name(period,period_type,from,to,'shift_item'); - } + show_shift_name(period,period_type,from,to,'shift_item'); + } // OK button is clicked $('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){ @@ -130,13 +130,13 @@ to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear(); $('#to').val(to) search_by_date(); - }); + }); function search_by_date(){ from = $("#from").val(); to = $("#to").val(); var period = 0; - var period_type = 1; + var period_type = 1; if(to != '' && from != ''){ shift_name = from + ',' + to; @@ -145,7 +145,7 @@ console.log(check_arr.length) if(check_arr.length == 1){ - show_shift_name(period,period_type,from,to,'shift_item'); + show_shift_name(period,period_type,from,to,'shift_item'); } if(check_arr.length == 3){ check_arr = []; @@ -163,7 +163,7 @@ shift.empty(); var str = ''; - var param_shift = ''; + var param_shift = ''; var param_shift = '<%= params[:shift_name] rescue '-'%>'; url = '<%= reports_get_shift_by_date_path %>'; @@ -171,7 +171,7 @@ $.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){ str = ''; - $(data.message).each(function(index){ + $(data.message).each(function(index){ var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date; var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date; @@ -181,18 +181,18 @@ selected = 'selected = "selected"'; } else{ - selected = ''; - } + selected = ''; + } }else{ - selected = ''; - } + selected = ''; + } str += ''; // console.log(sh_date) - }) + }) shift.append(str); }); } }); - \ No newline at end of file +
<%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%> ( <%= cashier_name rescue '-'%> )
<%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.sale_date") %> <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> <%= t("views.right_panel.detail.grand_total") %> <%= t("views.right_panel.detail.rnd_adj_sh") %><%= t("views.right_panel.detail.grand_total") %> +
<%= t("views.right_panel.detail.rnd_adj_sh") %>
<%= t("views.right_panel.detail.grand_total") %> +
<%= t("views.right_panel.detail.rnd_adj_sh") %>
<%= number_with_precision(item.total_amount.to_f, precision: precision.to_i ,delimiter: delimiter) %> <%= number_with_precision(item.grand_total.to_f , precision: precision.to_i ,delimiter: delimiter) rescue '-'%> <%= number_with_precision(item.rounding_adjustment.to_f, precision: precision.to_i ,delimiter: delimiter) rescue '-' %><%= number_with_precision(item.grand_total.to_f + item.rounding_adjustment.to_f , precision: precision.to_i ,delimiter: delimiter) rescue '-'%> <%= number_with_precision(item.grand_total.to_f + item.rounding_adjustment.to_f , precision: precision.to_i ,delimiter: delimiter) rescue '-'%>