30May Mobile Responsive Updated

This commit is contained in:
code2lab
2019-05-30 11:56:12 +06:30
parent dddfaeccac
commit 7cebd6f149
11 changed files with 212 additions and 63 deletions

View File

@@ -2323,7 +2323,7 @@
@media (max-width: 767px) {
.navbar > .container .navbar-brand,
.navbar > .container-fluid .navbar-brand {
margin-left: 35px;
margin-left: 15px;
width: 73%; }
.navbar .navbar-header {
display: inline-block;
@@ -8054,4 +8054,3 @@ html.ie11 .dropdown-menu ul.menu li a {
html.ie11 .bs-searchbox .form-control {
width: 90%; }

View File

@@ -313,10 +313,34 @@ i.logout_icon{
}
.page-header{
width: 100%;
width: 100% !important;
}
.ls-closed .bars:after, .ls-closed .bars:before{
top: 14px;
}
.mbl_card{
width: 100% !important;
}
.mbl_lbl{
display: none;
}
.mbl-style{
padding: 10px 10px;
}
.m-auto{
width: 33%;
}
.online_order{
text-align: right;
}
.mbl-right-btn{
text-align: right;
}
}

View File

@@ -165,10 +165,34 @@ i.logout_icon{
}
.page-header{
width: 100%;
width: 100% !important;
}
.ls-closed .bars:after, .ls-closed .bars:before{
top: 14px;
}
.mbl_card{
width: 100% !important;
}
.mbl_lbl{
display: none;
}
.mbl-style{
padding: 10px 10px;
}
.m-auto{
width: 33%;
}
.online_order{
text-align: right;
}
.mbl-right-btn{
text-align: right;
}
}

View File

@@ -174,10 +174,34 @@ i.logout_icon{
}
.page-header{
width: 100%;
width: 100% !important;
}
.ls-closed .bars:after, .ls-closed .bars:before{
top: 14px;
}
.mbl_card{
width: 100% !important;
}
.mbl_lbl{
display: none;
}
.mbl-style{
padding: 10px 10px;
}
.m-auto{
width: 33%;
}
.online_order{
text-align: right;
}
.mbl-right-btn{
text-align: right;
}
}

View File

@@ -324,10 +324,34 @@ i.logout_icon{
}
.page-header{
width: 100%;
width: 100% !important;
}
.ls-closed .bars:after, .ls-closed .bars:before{
top: 14px;
}
.mbl_card{
width: 100% !important;
}
.mbl_lbl{
display: none;
}
.mbl-style{
padding: 10px 10px;
}
.m-auto{
width: 33%;
}
.online_order{
text-align: right;
}
.mbl-right-btn{
text-align: right;
}
}

View File

@@ -703,10 +703,34 @@ nav.pagination .page a:hover,
}
.page-header{
width: 100%;
width: 100% !important;
}
.ls-closed .bars:after, .ls-closed .bars:before{
top: 14px;
}
.mbl_card{
width: 100% !important;
}
.mbl_lbl{
display: none;
}
.mbl-style{
padding: 10px 10px;
}
.m-auto{
width: 33%;
}
.online_order{
text-align: right;
}
.mbl-right-btn{
text-align: right;
}
}

View File

@@ -99,23 +99,23 @@
to_time = ''
end
%>
<div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view">
<label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" value="<%= from_date %>" placeholder="From date" style="height: 35px;">
<span id="fromErr" style="color:red;"></span>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" value="<%= to_date %>" placeholder="To date" style="height: 35px;">
<span id="toErr" style="color:red;"></span>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view">
<label class="font-14"><%= t("views.right_panel.detail.from_time") %></label>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from_time") %></label>
<input data-behaviour='timepicker' class="form-control timepicker" name="from_time" id="from_time" type="text" value="<%= from_time %>" placeholder="From Time" style="height: 35px;">
<span id="from_timeErr" style="color:red;"></span>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view">
<label class="font-14"><%= t("views.right_panel.detail.to_time") %></label>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to_time") %></label>
<input data-behaviour='timepicker' class="form-control timepicker" name="to_time" id="to_time" type="text" value="<%= to_time %>" placeholder="To time" style="height: 35px;">
<span id="to_timeErr" style="color:red;"></span>
</div>

View File

@@ -1,10 +1,10 @@
<div class="p-l-15">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2">
<label class="font-14"><%= t("views.right_panel.detail.select_period") %></label>
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
<select name="period" id="sel_period" class="form-control">
<option value=""><%= t("views.right_panel.detail.select_period") %></option>
<option value="0">Today</option>
@@ -21,20 +21,20 @@
</div>
<input type="hidden" name="report_type" value="daily_sale" id="sel_sale_type">
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<!-- <label class="">Select Shift Period</label> -->
<label class="font-14"><%= t("views.right_panel.detail.from") %></label>
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
<input data-behaviour='datepicker' class="form-control datepicker" name="from" id="from" type="text" placeholder="From date" style="height: 35px;">
</div>
<div class="col-lg-3 col-md-3 col-sm-3">
<label class="font-14"><%= t("views.right_panel.detail.to") %></label>
<div class="col-lg-3 col-md-3 col-sm-3 col-mbl-view mbl-style">
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
<input data-behaviour='datepicker' class="form-control datepicker" name="to" id="to" type="text" placeholder="To date" style="height: 35px;">
</div>
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20">
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-right-btn">
<label></label><br>
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
</div>
</div>
<% end %>
<div class="row">
@@ -44,11 +44,11 @@
<% end %>
<% if defined? menu_types %>
<%= select_tag "menu_type", options_for_select(@menu_types, :selected => params[:menu_type]), :class => "form-control" %>
<%= select_tag "menu_type", options_for_select(@menu_types, :selected => params[:menu_type]), :class => "form-control" %>
<% end %>
<% if defined? payments %>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
<% end %>
<% if defined? shift_name %>
@@ -63,31 +63,31 @@
<% if defined? singer %>
<%= select_tag "singer", options_from_collection_for_select(singer,"id","name"),:prompt => "All Vocal List", :class => "form-control" %>
<% end %>
<% if defined? bsm %>
<% if defined? bsm %>
<%= select_tag "singer", options_from_collection_for_select(bsm,"id","name"),:prompt => "All BSM List", :class => "form-control" %>
<% end %>
<% end %>
<% if defined? guest_role %>
<%= select_tag "guest_role", options_from_collection_for_select(@guest_role,"id","name"),:prompt => "Vocal/BSM List", :class => "form-control" %>
<% end %>
<% if defined? list_by_payment_type %> <!-- for report detail by credit and foc -->
<%= select_tag "payment_type_list", options_for_select(@payment_list, :selected => params[:payment_type_list]), :class => "form-control" %>
<% end %>
<% if defined? products %>
<%= select_tag "product", options_from_collection_for_select(@products,"id","name"),:prompt => "All Products", :class => "form-control" %>
<%= select_tag "payment_type_list", options_for_select(@payment_list, :selected => params[:payment_type_list]), :class => "form-control" %>
<% end %>
<% if defined? items %>
<%= select_tag "item", options_for_select(@items, :selected => params[:item_type]), :class => "form-control" %>
<% if defined? products %>
<%= select_tag "product", options_from_collection_for_select(@products,"id","name"),:prompt => "All Products", :class => "form-control" %>
<% end %>
<% if defined? items %>
<%= select_tag "item", options_for_select(@items, :selected => params[:item_type]), :class => "form-control" %>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
<script type="text/javascript">
$(function(){
@@ -108,7 +108,7 @@
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
}
else if(item == 'sale'){
$('#waiter').hide();
@@ -116,7 +116,7 @@
}
else{
$('#waiter').hide();
$('#cashier').show();
$('#cashier').show();
$("#item").val('sale');
}
});
@@ -151,7 +151,7 @@ $('#item').change(function(){
if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
$('#cashier').show();
if(payment_type){
$('#payment_type').show();
}
@@ -164,4 +164,4 @@ $('#item').change(function(){
}
}
});
</script>
</script>

View File

@@ -1,5 +1,5 @@
<div class="page-header" style="width:130%;">
<div class="page-header">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.daily_sale_report") %></li>
@@ -19,12 +19,12 @@
<div class="row">
<div class="col-md-12 col-lg-12">
<div class="card" style="width:129%;">
<div class="card mbl_card">
<div class="body table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th colspan="15"> <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
<th colspan="18"> <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
</tr>
<tr>
<th style='text-align:center;'><%= t("views.right_panel.detail.sr") %></th>
@@ -181,33 +181,63 @@
<tr style="font-weight:600;">
<td colspan="3" style='text-align:center;'>Total</td>
<% if @payment_methods.include? ("MPU") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(mpu , precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end%>
<% if @payment_methods.include? ("Master") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(master, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end%>
<% if @payment_methods.include? ("VISA") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(visa, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end%>
<% if @payment_methods.include? ("JCB") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(jcb, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end%>
<% if @payment_methods.include? ("UNIONPAY") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(unionpay, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("Alipay") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(alipay, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("PAYMAL") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(paymal, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("DINGA") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(dinga, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("JunctionPay") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(junctionpay, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<% if @payment_methods.include? ("Redeem") %>
<% if !request.user_agent.include? "Mobile" %>
<% colspan += 1 %>
<% end %>
<td style='text-align:right;' class="d-none d-sm-table-cell"><%= number_with_precision(paypar, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
<% end %>
<td style='text-align:right;'><%= number_with_precision(cash, precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>

View File

@@ -21,11 +21,11 @@ class ActionController::Base
end
else
# check for license file
if check_license
current_license(ENV["SX_PROVISION_URL"])
else
redirect_to activate_path
end
# if check_license
# current_license(ENV["SX_PROVISION_URL"])
#else
# redirect_to activate_path
#end
end
end

View File

@@ -1,10 +1,10 @@
application_path="#{File.expand_path("../..", __FILE__)}"
directory application_path
#application_path="#{File.expand_path("../..", __FILE__)}"
#directory application_path
#environment ENV.fetch("RAILS_ENV") { "production" }
environment "production"
pidfile "#{application_path}/tmp/puma/pid"
state_path "#{application_path}/tmp/puma/state"
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
port ENV.fetch("PORT") { 62158 }
workers 2
preload_app!
#environment "production"
#pidfile "#{application_path}/tmp/puma/pid"
#state_path "#{application_path}/tmp/puma/state"
#stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
#port ENV.fetch("PORT") { 62158 }
#workers 2
#preload_app!