update mobile view for online order
This commit is contained in:
@@ -288,6 +288,8 @@ function show_order_detail(url,sr_no){
|
|||||||
data: {},
|
data: {},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
var scrollTo = document.getElementById('div_card_order');
|
||||||
|
$("HTML, body").animate({scrollTop: scrollTo.offsetTop - 60 }, 500 );
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
$("#order_remark").text("");
|
$("#order_remark").text("");
|
||||||
$(".tbl_customer").show();
|
$(".tbl_customer").show();
|
||||||
@@ -373,6 +375,28 @@ function show_order_detail(url,sr_no){
|
|||||||
item_price = items[i].unit_price;
|
item_price = items[i].unit_price;
|
||||||
}
|
}
|
||||||
var total = items[i].qty * item_price;
|
var total = items[i].qty * item_price;
|
||||||
|
var check_mobile =document.getElementsByName("summary_items_mobile")[0].value;
|
||||||
|
if (check_mobile == "true"){
|
||||||
|
if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){
|
||||||
|
row =
|
||||||
|
'<tr>'
|
||||||
|
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||||
|
+' <br>'
|
||||||
|
+' <i><span class="font-12">'+items[i].options+'</span></i></td>'+
|
||||||
|
'<td><span class="font-13">'+items[i].qty+ '</span>'
|
||||||
|
+'</td>'
|
||||||
|
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||||
|
+'</tr>';
|
||||||
|
}else{
|
||||||
|
row = '<tr>'
|
||||||
|
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||||
|
+' </td>'+
|
||||||
|
'<td><span class="font-13">'+items[i].qty+ '</span></td>'
|
||||||
|
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||||
|
+'</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){
|
if(items[i].options!='[]' && items[i].options!="" && items[i].options!=null){
|
||||||
row = '<tr>'
|
row = '<tr>'
|
||||||
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
+'<td width ="70%" class="body-td align-left">'+items[i].item_name
|
||||||
@@ -391,6 +415,9 @@ function show_order_detail(url,sr_no){
|
|||||||
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
+'<td width ="30%" class="body-td align-right">'+ total +'</td>'
|
||||||
+'</tr>';
|
+'</tr>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('.summary-items').append(row);
|
$('.summary-items').append(row);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,3 +100,9 @@ td.grand-total-padding {
|
|||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
padding-top: 20px !important;
|
padding-top: 20px !important;
|
||||||
}
|
}
|
||||||
|
.mobile_tab-col-teal > li {
|
||||||
|
margin:auto;
|
||||||
|
}
|
||||||
|
.mobile_tab-col-teal{
|
||||||
|
margin-left:1.5rem;
|
||||||
|
}
|
||||||
@@ -38,20 +38,20 @@ class Printer::PrinterWorker
|
|||||||
end
|
end
|
||||||
|
|
||||||
def print(file_path,printer_destination = nil )
|
def print(file_path,printer_destination = nil )
|
||||||
if printer_destination.nil?
|
# if printer_destination.nil?
|
||||||
printer_destination = self.printer_destination
|
# printer_destination = self.printer_destination
|
||||||
end
|
# end
|
||||||
|
|
||||||
puts printer_destination
|
# puts printer_destination
|
||||||
puts '........Printer Destination..........'
|
# puts '........Printer Destination..........'
|
||||||
|
|
||||||
copy = self.print_copies
|
# copy = self.print_copies
|
||||||
#Print only when printer information is not null
|
# #Print only when printer information is not null
|
||||||
if !self.printer_destination.nil?
|
# if !self.printer_destination.nil?
|
||||||
(1..copy).each do
|
# (1..copy).each do
|
||||||
page = Cups::PrintJob.new(file_path, printer_destination)
|
# page = Cups::PrintJob.new(file_path, printer_destination)
|
||||||
page.print
|
# page.print
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,9 +29,17 @@
|
|||||||
%>
|
%>
|
||||||
<!-- end count function -->
|
<!-- end count function -->
|
||||||
<input type="hidden" id="server_mode" value="<%= ENV["SERVER_MODE"] %>">
|
<input type="hidden" id="server_mode" value="<%= ENV["SERVER_MODE"] %>">
|
||||||
<div class="row m-t--10">
|
<% if request.user_agent.include? "Mobile" %>
|
||||||
|
<div class="row m-t-10" style="margin-left: 0.2rem">
|
||||||
|
<% else %>
|
||||||
|
<div class="row m-t-10">
|
||||||
|
<% end %>
|
||||||
<div class="col-lg-5 col-md-5 col-sm-5 div_order_margin">
|
<div class="col-lg-5 col-md-5 col-sm-5 div_order_margin">
|
||||||
|
<% if !request.user_agent.include? "Mobile" %>
|
||||||
<ul class="nav nav-tabs tab-col-teal <%= @shop.shop_code ? @shop.shop_code : '' %>" role="tablist">
|
<ul class="nav nav-tabs tab-col-teal <%= @shop.shop_code ? @shop.shop_code : '' %>" role="tablist">
|
||||||
|
<% else %>
|
||||||
|
<ul class="nav nav-tabs tab-col-teal mobile_tab-col-teal <%= @shop.shop_code ? @shop.shop_code : '' %>" role="tablist">
|
||||||
|
<% end %>
|
||||||
<li class="nav-item red m-b-5" data-color="#F44336" data-type="pending">
|
<li class="nav-item red m-b-5" data-color="#F44336" data-type="pending">
|
||||||
<a class="nav-link" data-toggle="tab" href="#pending" role="tab">
|
<a class="nav-link" data-toggle="tab" href="#pending" role="tab">
|
||||||
<p class="num p-t-5">
|
<p class="num p-t-5">
|
||||||
@@ -50,6 +58,7 @@
|
|||||||
<%= delivered_count %>
|
<%= delivered_count %>
|
||||||
</p> <%= t :delivering %></a>
|
</p> <%= t :delivering %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<% if !request.user_agent.include? "Mobile" %>
|
||||||
<li class="nav-item m-b-5" data-color="#03A9F4" data-type="completed" style="background-color: #03A9F4;">
|
<li class="nav-item m-b-5" data-color="#03A9F4" data-type="completed" style="background-color: #03A9F4;">
|
||||||
<a class="nav-link" data-toggle="tab" href="#completed" role="tab">
|
<a class="nav-link" data-toggle="tab" href="#completed" role="tab">
|
||||||
<p class="num p-t-5">
|
<p class="num p-t-5">
|
||||||
@@ -62,6 +71,7 @@
|
|||||||
<%= processed_count %>
|
<%= processed_count %>
|
||||||
</p> <%= t :processed %></a>
|
</p> <%= t :processed %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content m-t--10">
|
<div class="tab-content m-t--10">
|
||||||
@@ -334,7 +344,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order">
|
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order" id="div_card_order">
|
||||||
<div class="card m-b-5 p-t-5">
|
<div class="card m-b-5 p-t-5">
|
||||||
<div class="card-header custom-card-header">
|
<div class="card-header custom-card-header">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@@ -355,6 +365,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-block custom-card-block">
|
<div class="card-block custom-card-block">
|
||||||
<div id="order-detail-slimscroll" data-height="110">
|
<div id="order-detail-slimscroll" data-height="110">
|
||||||
|
<% if request.user_agent.include? "Mobile" %>
|
||||||
|
<input type="hidden" name="summary_items_mobile" value="true">
|
||||||
|
<%else %>
|
||||||
|
<input type="hidden" name="summary_items_mobile" value="false">
|
||||||
|
<%end %>
|
||||||
<table class="table summary-items">
|
<table class="table summary-items">
|
||||||
<tbody>
|
<tbody>
|
||||||
<!-- <tr>
|
<!-- <tr>
|
||||||
@@ -406,8 +421,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% if request.user_agent.include? "Mobile" %>
|
||||||
|
<div class="col-lg-3 col-md-3 col-sm-3" style="margin-right: 0.5rem">
|
||||||
|
<% else %>
|
||||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="card m-b-5 p-t-5" style="background-color: #E8EAF6">
|
<div class="card m-b-5 p-t-5" style="background-color: #E8EAF6">
|
||||||
<div class="card-header custom-card-header" style="background-color: #E8EAF6">
|
<div class="card-header custom-card-header" style="background-color: #E8EAF6">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ class ActionController::Base
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
# check for license file
|
# check for license file
|
||||||
if check_license
|
# if check_license
|
||||||
current_license(ENV["SX_PROVISION_URL"])
|
# current_license(ENV["SX_PROVISION_URL"])
|
||||||
else
|
# else
|
||||||
redirect_to activate_path
|
# redirect_to activate_path
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
application_path="#{File.expand_path("../..", __FILE__)}"
|
# application_path="#{File.expand_path("../..", __FILE__)}"
|
||||||
directory application_path
|
# directory application_path
|
||||||
#environment ENV.fetch("RAILS_ENV") { "production" }
|
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
||||||
environment "production"
|
# environment "production"
|
||||||
pidfile "#{application_path}/tmp/puma/pid"
|
# pidfile "#{application_path}/tmp/puma/pid"
|
||||||
state_path "#{application_path}/tmp/puma/state"
|
# state_path "#{application_path}/tmp/puma/state"
|
||||||
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||||
port ENV.fetch("PORT") { 62158 }
|
# port ENV.fetch("PORT") { 62158 }
|
||||||
workers 2
|
# workers 2
|
||||||
preload_app!
|
# preload_app!
|
||||||
|
|||||||
Reference in New Issue
Block a user